File: sd_bus_set_description.3

package info (click to toggle)
manpages-de 2.12-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 71,404 kB
  • sloc: sh: 1,059; makefile: 71; python: 64; perl: 37; sed: 11
file content (145 lines) | stat: -rw-r--r-- 5,186 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
'\" t
.TH "SD_BUS_SET_DESCRIPTION" "3" "" "systemd 241" "sd_bus_set_description"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
sd_bus_set_description, sd_bus_get_description, sd_bus_set_anonymous, sd_bus_set_trusted, sd_bus_set_allow_interactive_authorization, sd_bus_get_allow_interactive_authorization \- Set or query properties of a bus object
.SH "SYNOPSIS"
.sp
.ft B
.nf
#include <systemd/sd\-bus\&.h>
.fi
.ft
.HP \w'int\ sd_bus_set_description('u
.BI "int sd_bus_set_description(sd_bus\ *" "bus" ", const\ char\ *" "description" ");"
.HP \w'int\ sd_bus_get_description('u
.BI "int sd_bus_get_description(sd_bus\ *" "bus" ", const\ char\ **" "description" ");"
.HP \w'int\ sd_bus_set_anonymous('u
.BI "int sd_bus_set_anonymous(sd_bus\ *" "bus" ", int\ " "b" ");"
.HP \w'int\ sd_bus_set_trusted('u
.BI "int sd_bus_set_trusted(sd_bus\ *" "bus" ", int\ " "b" ");"
.HP \w'int\ sd_bus_set_allow_interactive_authorization('u
.BI "int sd_bus_set_allow_interactive_authorization(sd_bus\ *" "bus" ", int\ " "b" ");"
.HP \w'int\ sd_bus_get_allow_interactive_authorization('u
.BI "int sd_bus_get_allow_interactive_authorization(sd_bus\ *" "bus" ");"
.SH "DESCRIPTION"
.PP
\fBsd_bus_set_description()\fR
sets the description string that is used in logging to the specified string\&. The string is copied internally and freed when the bus object is deallocated\&. The
\fIdescription\fR
argument may be
\fBNULL\fR, in which case the description is unset\&. This function must be called before the bus has been started\&.
.PP
\fBsd_bus_get_description()\fR
returns a description string in
\fIdescription\fR\&. This string may have been previously set with
\fBsd_bus_set_description()\fR
or
\fBsd_bus_open_with_description\fR(3)
or similar\&. If not set this way, a default string like
"system"
or
"user"
will be returned for the system or user buses, and
\fBNULL\fR
otherwise\&.
.PP
\fBsd_bus_set_anonymous()\fR
enables or disables "anonymous authentication", i\&.e\&. lack of authentication, of the bus peer\&. This function must be called before the bus has been started\&. See the
\m[blue]\fBAuthentication Mechanisms\fR\m[]\&\s-2\u[1]\d\s+2
section of the D\-Bus specification for details\&.
.PP
\fBsd_bus_set_trusted()\fR
sets the "trusted" state on the
\fIbus\fR
object\&. If true, all connections on the bus are trusted and access to all privileged and unprivileged methods is granted\&. This function must be called before the bus has been started\&.
.PP
\fBsd_bus_set_allow_interactive_authorization()\fR
enables or disables interactive authorization for method calls\&. If true, messages are marked with the
\fBALLOW_INTERACTIVE_AUTHORIZATION\fR
flag specified by the
\m[blue]\fBD\-Bus\fR\m[]\&\s-2\u[2]\d\s+2
specification, informing the receiving side that the caller is prepared to wait for interactive authorization, which might take a considerable time to complete\&. If this flag is set, the user may be queried for passwords or confirmation via
\m[blue]\fBpolkit\fR\m[]\&\s-2\u[3]\d\s+2
or a similar framework\&.
.PP
\fBsd_bus_get_allow_interactive_authorization()\fR
returns true if interactive authorization is allowed and false if not\&.
.SH "RETURN VALUE"
.PP
On success, these functions return 0 or a positive integer\&. On failure, they return a negative errno\-style error code\&.
.SH "ERRORS"
.PP
Returned errors may indicate the following problems:
.PP
\fB\-EINVAL\fR
.RS 4
An argument is invalid\&.
.RE
.PP
\fB\-ENOPKG\fR
.RS 4
The bus cannot be resolved\&.
.RE
.PP
\fB\-EPERM\fR
.RS 4
The bus has already been started\&.
.RE
.PP
\fB\-ECHILD\fR
.RS 4
The bus was created in a different process\&.
.RE
.PP
\fB\-ENOMEM\fR
.RS 4
Memory allocation failed\&.
.RE
.SH "NOTES"
.PP
These APIs are implemented as a shared library, which can be compiled and linked to with the
\fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
file\&.
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1),
\fBsd-bus\fR(3),
\fBsd_bus_default_user\fR(3),
\fBsd_bus_default_system\fR(3),
\fBsd_bus_open_user\fR(3),
\fBsd_bus_open_system\fR(3)
.SH "NOTES"
.IP " 1." 4
Authentication Mechanisms
.RS 4
\%view-source:https://dbus.freedesktop.org/doc/dbus-specification.html#auth-mechanisms
.RE
.IP " 2." 4
D-Bus
.RS 4
\%view-source:https://dbus.freedesktop.org/doc/dbus-specification.html
.RE
.IP " 3." 4
polkit
.RS 4
\%http://www.freedesktop.org/wiki/Software/polkit
.RE