]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/sd_bus_creds_get_pid.xml
Merge pull request #221 from utezduyar/man-cgtop-explain-max-cpu
[thirdparty/systemd.git] / man / sd_bus_creds_get_pid.xml
1 <?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % entities SYSTEM "custom-entities.ent" >
5 %entities;
6 ]>
7
8 <!--
9 This file is part of systemd.
10
11 Copyright 2014 Zbigniew Jędrzejewski-Szmek
12
13 systemd is free software; you can redistribute it and/or modify it
14 under the terms of the GNU Lesser General Public License as published by
15 the Free Software Foundation; either version 2.1 of the License, or
16 (at your option) any later version.
17
18 systemd is distributed in the hope that it will be useful, but
19 WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Lesser General Public License for more details.
22
23 You should have received a copy of the GNU Lesser General Public License
24 along with systemd; If not, see <http://www.gnu.org/licenses/>.
25 -->
26
27 <refentry id="sd_bus_creds_get_pid">
28
29 <refentryinfo>
30 <title>sd_bus_creds_get_pid</title>
31 <productname>systemd</productname>
32
33 <authorgroup>
34 <author>
35 <contrib>A monkey with a typewriter</contrib>
36 <firstname>Zbigniew</firstname>
37 <surname>Jędrzejewski-Szmek</surname>
38 <email>zbyszek@in.waw.pl</email>
39 </author>
40 </authorgroup>
41 </refentryinfo>
42
43 <refmeta>
44 <refentrytitle>sd_bus_creds_get_pid</refentrytitle>
45 <manvolnum>3</manvolnum>
46 </refmeta>
47
48 <refnamediv>
49 <refname>sd_bus_creds_get_pid</refname>
50 <refname>sd_bus_creds_get_ppid</refname>
51 <refname>sd_bus_creds_get_tid</refname>
52 <refname>sd_bus_creds_get_uid</refname>
53 <refname>sd_bus_creds_get_euid</refname>
54 <refname>sd_bus_creds_get_suid</refname>
55 <refname>sd_bus_creds_get_fsuid</refname>
56 <refname>sd_bus_creds_get_gid</refname>
57 <refname>sd_bus_creds_get_egid</refname>
58 <refname>sd_bus_creds_get_sgid</refname>
59 <refname>sd_bus_creds_get_fsgid</refname>
60 <refname>sd_bus_creds_get_supplementary_gids</refname>
61 <refname>sd_bus_creds_get_comm</refname>
62 <refname>sd_bus_creds_get_tid_comm</refname>
63 <refname>sd_bus_creds_get_exe</refname>
64 <refname>sd_bus_creds_get_cmdline</refname>
65 <refname>sd_bus_creds_get_cgroup</refname>
66 <refname>sd_bus_creds_get_unit</refname>
67 <refname>sd_bus_creds_get_user_unit</refname>
68 <refname>sd_bus_creds_get_slice</refname>
69 <refname>sd_bus_creds_get_session</refname>
70 <refname>sd_bus_creds_get_owner_uid</refname>
71 <refname>sd_bus_creds_has_effective_cap</refname>
72 <refname>sd_bus_creds_has_permitted_cap</refname>
73 <refname>sd_bus_creds_has_inheritable_cap</refname>
74 <refname>sd_bus_creds_has_bounding_cap</refname>
75 <refname>sd_bus_creds_get_selinux_context</refname>
76 <refname>sd_bus_creds_get_audit_session_id</refname>
77 <refname>sd_bus_creds_get_audit_login_uid</refname>
78 <refname>sd_bus_creds_get_tty</refname>
79 <refname>sd_bus_creds_get_unique_name</refname>
80 <refname>sd_bus_creds_get_well_known_names</refname>
81 <refname>sd_bus_creds_get_description</refname>
82
83 <refpurpose>Retrieve fields from a credentials object</refpurpose>
84 </refnamediv>
85
86 <refsynopsisdiv>
87 <funcsynopsis>
88 <funcsynopsisinfo>#include &lt;systemd/sd-bus.h&gt;</funcsynopsisinfo>
89
90 <funcprototype>
91 <funcdef>int <function>sd_bus_creds_get_pid</function></funcdef>
92 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
93 <paramdef>pid_t *<parameter>pid</parameter></paramdef>
94 </funcprototype>
95
96 <funcprototype>
97 <funcdef>int <function>sd_bus_creds_get_ppid</function></funcdef>
98 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
99 <paramdef>pid_t *<parameter>ppid</parameter></paramdef>
100 </funcprototype>
101
102 <funcprototype>
103 <funcdef>int <function>sd_bus_creds_get_tid</function></funcdef>
104 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
105 <paramdef>pid_t *<parameter>tid</parameter></paramdef>
106 </funcprototype>
107
108 <funcprototype>
109 <funcdef>int <function>sd_bus_creds_get_uid</function></funcdef>
110 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
111 <paramdef>uid_t *<parameter>uid</parameter></paramdef>
112 </funcprototype>
113
114 <funcprototype>
115 <funcdef>int <function>sd_bus_creds_get_euid</function></funcdef>
116 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
117 <paramdef>uid_t *<parameter>uid</parameter></paramdef>
118 </funcprototype>
119
120 <funcprototype>
121 <funcdef>int <function>sd_bus_creds_get_suid</function></funcdef>
122 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
123 <paramdef>uid_t *<parameter>uid</parameter></paramdef>
124 </funcprototype>
125
126 <funcprototype>
127 <funcdef>int <function>sd_bus_creds_get_fsuid</function></funcdef>
128 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
129 <paramdef>uid_t *<parameter>uid</parameter></paramdef>
130 </funcprototype>
131
132 <funcprototype>
133 <funcdef>int <function>sd_bus_creds_get_gid</function></funcdef>
134 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
135 <paramdef>gid_t *<parameter>gid</parameter></paramdef>
136 </funcprototype>
137
138 <funcprototype>
139 <funcdef>int <function>sd_bus_creds_get_egid</function></funcdef>
140 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
141 <paramdef>gid_t *<parameter>gid</parameter></paramdef>
142 </funcprototype>
143
144 <funcprototype>
145 <funcdef>int <function>sd_bus_creds_get_sgid</function></funcdef>
146 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
147 <paramdef>gid_t *<parameter>gid</parameter></paramdef>
148 </funcprototype>
149
150 <funcprototype>
151 <funcdef>int <function>sd_bus_creds_get_fsgid</function></funcdef>
152 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
153 <paramdef>gid_t *<parameter>gid</parameter></paramdef>
154 </funcprototype>
155
156 <funcprototype>
157 <funcdef>int <function>sd_bus_creds_get_supplementary_gids</function></funcdef>
158 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
159 <paramdef>const gid_t **<parameter>gids</parameter></paramdef>
160 </funcprototype>
161
162 <funcprototype>
163 <funcdef>int <function>sd_bus_creds_get_comm</function></funcdef>
164 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
165 <paramdef>const char **<parameter>comm</parameter></paramdef>
166 </funcprototype>
167
168 <funcprototype>
169 <funcdef>int <function>sd_bus_creds_get_tid_comm</function></funcdef>
170 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
171 <paramdef>const char **<parameter>comm</parameter></paramdef>
172 </funcprototype>
173
174 <funcprototype>
175 <funcdef>int <function>sd_bus_creds_get_exe</function></funcdef>
176 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
177 <paramdef>const char **<parameter>exe</parameter></paramdef>
178 </funcprototype>
179
180 <funcprototype>
181 <funcdef>int <function>sd_bus_creds_get_cmdline</function></funcdef>
182 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
183 <paramdef>char ***<parameter>cmdline</parameter></paramdef>
184 </funcprototype>
185
186 <funcprototype>
187 <funcdef>int <function>sd_bus_creds_get_cgroup</function></funcdef>
188 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
189 <paramdef>const char **<parameter>cgroup</parameter></paramdef>
190 </funcprototype>
191
192 <funcprototype>
193 <funcdef>int <function>sd_bus_creds_get_unit</function></funcdef>
194 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
195 <paramdef>const char **<parameter>unit</parameter></paramdef>
196 </funcprototype>
197
198 <funcprototype>
199 <funcdef>int <function>sd_bus_creds_get_user_unit</function></funcdef>
200 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
201 <paramdef>const char **<parameter>unit</parameter></paramdef>
202 </funcprototype>
203
204 <funcprototype>
205 <funcdef>int <function>sd_bus_creds_get_slice</function></funcdef>
206 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
207 <paramdef>const char **<parameter>slice</parameter></paramdef>
208 </funcprototype>
209
210 <funcprototype>
211 <funcdef>int <function>sd_bus_creds_get_session</function></funcdef>
212 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
213 <paramdef>const char **<parameter>slice</parameter></paramdef>
214 </funcprototype>
215
216 <funcprototype>
217 <funcdef>int <function>sd_bus_creds_get_owner_uid</function></funcdef>
218 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
219 <paramdef>uid_t *<parameter>uid</parameter></paramdef>
220 </funcprototype>
221
222 <funcprototype>
223 <funcdef>int <function>sd_bus_creds_has_effective_cap</function></funcdef>
224 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
225 <paramdef>int <parameter>capability</parameter></paramdef>
226 </funcprototype>
227
228 <funcprototype>
229 <funcdef>int <function>sd_bus_creds_has_permitted_cap</function></funcdef>
230 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
231 <paramdef>int <parameter>capability</parameter></paramdef>
232 </funcprototype>
233
234 <funcprototype>
235 <funcdef>int <function>sd_bus_creds_has_inheritable_cap</function></funcdef>
236 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
237 <paramdef>int <parameter>capability</parameter></paramdef>
238 </funcprototype>
239
240 <funcprototype>
241 <funcdef>int <function>sd_bus_creds_has_bounding_cap</function></funcdef>
242 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
243 <paramdef>int <parameter>capability</parameter></paramdef>
244 </funcprototype>
245
246 <funcprototype>
247 <funcdef>int <function>sd_bus_creds_get_selinux_context</function></funcdef>
248 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
249 <paramdef>const char **<parameter>context</parameter></paramdef>
250 </funcprototype>
251
252 <funcprototype>
253 <funcdef>int <function>sd_bus_creds_get_audit_session_id</function></funcdef>
254 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
255 <paramdef>uint32_t *<parameter>sessionid</parameter></paramdef>
256 </funcprototype>
257
258 <funcprototype>
259 <funcdef>int <function>sd_bus_creds_get_audit_login_uid</function></funcdef>
260 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
261 <paramdef>uid_t *<parameter>loginuid</parameter></paramdef>
262 </funcprototype>
263
264 <funcprototype>
265 <funcdef>int <function>sd_bus_creds_get_tty</function></funcdef>
266 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
267 <paramdef>const char **<parameter>tty</parameter></paramdef>
268 </funcprototype>
269
270 <funcprototype>
271 <funcdef>int <function>sd_bus_creds_get_unique_name</function></funcdef>
272 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
273 <paramdef>const char **<parameter>name</parameter></paramdef>
274 </funcprototype>
275
276 <funcprototype>
277 <funcdef>int <function>sd_bus_creds_get_well_known_names</function></funcdef>
278 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
279 <paramdef>char ***<parameter>name</parameter></paramdef>
280 </funcprototype>
281
282 <funcprototype>
283 <funcdef>int <function>sd_bus_creds_get_description</function></funcdef>
284 <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
285 <paramdef>const char **<parameter>name</parameter></paramdef>
286 </funcprototype>
287
288 </funcsynopsis>
289 </refsynopsisdiv>
290
291 <refsect1>
292 <title>Description</title>
293
294 <para>These functions return information from an
295 <parameter>sd_bus_creds</parameter> credential object. Credential
296 objects may be created with
297 <citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
298 in which case they describe the credentials of the process
299 identified by the specified PID, with
300 <citerefentry><refentrytitle>sd_bus_get_name_creds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
301 in which case they describe the credentials of a bus peer
302 identified by the specified bus name, with
303 <citerefentry><refentrytitle>sd_bus_get_owner_creds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
304 in which case they describe the credentials of the creator of a
305 bus, or with
306 <citerefentry><refentrytitle>sd_bus_message_get_creds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
307 in which case they describe the credentials of the sender of the message.</para>
308
309 <para><function>sd_bus_creds_get_pid()</function> will retrieve
310 the PID (process identifier). Similar,
311 <function>sd_bus_creds_get_ppid()</function> will retrieve the
312 parent PID. Note that PID 1 has no parent process, in which case
313 -ENXIO is returned.</para>
314
315 <para><function>sd_bus_creds_get_tid()</function> will retrieve the
316 TID (thread identifier).</para>
317
318 <para><function>sd_bus_creds_get_uid()</function> will retrieve
319 the numeric UID (user identifier). Similar,
320 <function>sd_bus_creds_get_euid()</function> returns the effective
321 UID, <function>sd_bus_creds_get_suid()</function> the saved UID
322 and <function>sd_bus_creds_get_fsuid()</function> the file system
323 UID.</para>
324
325 <para><function>sd_bus_creds_get_gid()</function> will retrieve the
326 numeric GID (group identifier). Similar,
327 <function>sd_bus_creds_get_egid()</function> returns the effective
328 GID, <function>sd_bus_creds_get_sgid()</function> the saved GID
329 and <function>sd_bus_creds_get_fsgid()</function> the file system
330 GID.</para>
331
332 <para><function>sd_bus_creds_get_supplementary_gids()</function>
333 will retrieve the supplementary GIDs list.</para>
334
335 <para><function>sd_bus_creds_get_comm()</function> will retrieve the
336 comm field (truncated name of the executable, as stored in
337 <filename>/proc/<replaceable>pid</replaceable>/comm</filename>).
338 </para>
339
340 <para><function>sd_bus_creds_get_tid_comm()</function> will retrieve
341 the comm field of the thread (as stored in
342 <filename>/proc/<replaceable>pid</replaceable>/task/<replaceable>tid</replaceable>/comm</filename>).
343 </para>
344
345 <para><function>sd_bus_creds_get_exe()</function> will retrieve
346 the path to the program executable (as stored in the
347 <filename>/proc/<replaceable>pid</replaceable>/exe</filename>
348 link, but with <literal> (deleted)</literal> suffix removed). Note
349 that kernel threads do not have an executable path, in which case
350 -ENXIO is returned.</para>
351
352 <para><function>sd_bus_creds_get_cmdline()</function> will
353 retrieve an array of command line arguments (as stored in
354 <filename>/proc/<replaceable>pid</replaceable>/cmdline</filename>). Note
355 that kernel threads do not have a command line, in which case
356 -ENXIO is returned.</para>
357
358 <para><function>sd_bus_creds_get_cgroup()</function> will retrieve
359 the cgroup path. See <ulink
360 url="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>.
361 </para>
362
363 <para><function>sd_bus_creds_get_unit()</function> will retrieve
364 the systemd unit name (in the system instance of systemd) that the
365 process is part of. See
366 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. For
367 processes that are not part of a unit returns -ENXIO.
368 </para>
369
370 <para><function>sd_bus_creds_get_user_unit()</function> will
371 retrieve the systemd unit name (in the user instance of systemd)
372 that the process is part of. See
373 <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. For
374 processes that are not part of a user unit returns -ENXIO.
375 </para>
376
377 <para><function>sd_bus_creds_get_slice()</function> will retrieve
378 the systemd slice (a unit in the system instance of systemd) that
379 the process is part of. See
380 <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
381 </para>
382
383 <para><function>sd_bus_creds_get_session()</function> will
384 retrieve the logind session that the process is part of. See
385 <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. For
386 processes that are not part of a session returns -ENXIO.
387 </para>
388
389 <para><function>sd_bus_creds_get_owner_uid()</function> will
390 retrieve the numeric UID (user identifier) of the user who owns
391 the session that the process is part of. See
392 <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>
393 For processes that are not part of a session returns -ENXIO.
394 </para>
395
396 <para><function>sd_bus_creds_has_effective_cap()</function> will
397 check whether the capability specified by
398 <parameter>capability</parameter> was set in the effective
399 capabilities mask. A positive return value means that is was
400 set, zero means that it was not set, and a negative return
401 value signifies an error. See
402 <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
403 and <varname>Capabilities=</varname> and
404 <varname>CapabilityBoundingSet=</varname> settings in
405 <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
406 </para>
407
408 <para><function>sd_bus_creds_has_permitted_cap()</function> is
409 similar to <function>sd_bus_creds_has_effective_cap()</function>,
410 but will check the permitted capabilities mask.</para>
411
412 <para><function>sd_bus_creds_has_inheritable_cap()</function> is
413 similar to <function>sd_bus_creds_has_effective_cap()</function>,
414 but will check the inheritable capabilities mask.</para>
415
416 <para><function>sd_bus_creds_has_bounding_cap()</function> is
417 similar to <function>sd_bus_creds_has_effective_cap()</function>,
418 but will check the bounding capabilities mask.</para>
419
420 <para><function>sd_bus_creds_get_selinux_context()</function> will
421 retrieve the SELinux security context (label) of the process.</para>
422
423 <para><function>sd_bus_creds_get_audit_session_id()</function>
424 will retrieve the audit session identifier of the process. Returns
425 -ENXIO for processes that are not part of an audit session.</para>
426
427 <para><function>sd_bus_creds_get_audit_login_uid()</function> will
428 retrieve the audit user login identifier (the identifier of the
429 user who is "responsible" for the session). Returns -ENXIO for
430 processes that are not part of an audit session.</para>
431
432 <para><function>sd_bus_creds_get_tty()</function> will retrieve
433 the controlling TTY. Returns -ENXIO for processes that have no
434 controlling TTY.</para>
435
436 <para><function>sd_bus_creds_get_unique_name()</function> will
437 retrieve the D-Bus unique name. See <ulink
438 url="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus">The
439 D-Bus specification</ulink>.</para>
440
441 <para><function>sd_bus_creds_get_well_known_names()</function> will
442 retrieve the set of D-Bus well-known names. See <ulink
443 url="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus">The
444 D-Bus specification</ulink>.</para>
445
446 <para><function>sd_bus_creds_get_description()</function> will
447 retrieve a descriptive name of the bus connection of the
448 peer. This name is useful to discern multiple bus connections by
449 the same peer, and may be altered by the peer with the
450 <citerefentry><refentrytitle>sd_bus_set_description</refentrytitle><manvolnum>3</manvolnum></citerefentry>
451 call.</para>
452
453 <para>All functions that take a <parameter>const
454 char**</parameter> parameter will store the answer there as an
455 address of a NUL-terminated string. It will be valid as long as
456 <parameter>c</parameter> remains valid, and should not be freed or
457 modified by the caller.</para>
458
459 <para>All functions that take a <parameter>char***</parameter>
460 parameter will store the answer there as an address of a an array
461 of strings. Each individual string is NUL-terminated, and the
462 array is NULL-terminated as a whole. It will be valid as long as
463 <parameter>c</parameter> remains valid, and should not be freed or
464 modified by the caller.</para>
465 </refsect1>
466
467 <refsect1>
468 <title>Return Value</title>
469
470 <para>On success, these calls return 0 or a positive integer. On
471 failure, these calls return a negative errno-style error code.
472 </para>
473 </refsect1>
474
475 <refsect1>
476 <title>Errors</title>
477
478 <para>Returned errors may indicate the following problems:</para>
479
480 <variablelist>
481 <varlistentry>
482 <term><constant>-ENODATA</constant></term>
483
484 <listitem><para>Given field is not available in the
485 credentials object <parameter>c</parameter>.</para>
486 </listitem>
487 </varlistentry>
488
489 <varlistentry>
490 <term><constant>-ENXIO</constant></term>
491
492 <listitem><para>Given field is not specified for the described
493 process or peer. This will be returned by
494 <function>sd_bus_get_unit()</function>,
495 <function>sd_bus_get_user_unit()</function>,
496 <function>sd_bus_get_slice()</function>,
497 <function>sd_bus_get_session()</function>, and
498 <function>sd_bus_get_owner_uid()</function> if the process is
499 not part of a systemd system unit, systemd user unit, systemd
500 slice, or logind session. It will also be returned by
501 <function>sd_bus_creds_get_exe()</function> and
502 <function>sd_bus_creds_get_cmdline()</function> for kernel
503 threads (since these aren't started from an executable binary
504 or have a command line),
505 <function>sd_bus_creds_get_audit_session_id()</function> and
506 <function>sd_bus_creds_get_audit_login_uid()</function> when
507 the process is not part of an audit session, and
508 <function>sd_bus_creds_get_tty()</function> if the process has
509 no controlling TTY.
510 </para>
511 </listitem>
512 </varlistentry>
513
514 <varlistentry>
515 <term><constant>-EINVAL</constant></term>
516
517 <listitem><para>Specified pointer parameter is <constant>NULL</constant>.
518 </para></listitem>
519 </varlistentry>
520
521 <varlistentry>
522 <term><constant>-ENOMEM</constant></term>
523
524 <listitem><para>Memory allocation failed.</para></listitem>
525 </varlistentry>
526 </variablelist>
527 </refsect1>
528
529 <refsect1>
530 <title>Notes</title>
531
532 <para><function>sd_bus_open_user()</function> and other functions
533 described here are available as a shared library, which can be
534 compiled and linked to with the
535 <constant>libsystemd</constant> <citerefentry project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
536 file.</para>
537 </refsect1>
538
539 <refsect1>
540 <title>See Also</title>
541
542 <para>
543 <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
544 <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
545 <citerefentry><refentrytitle>fork</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
546 <citerefentry><refentrytitle>execve</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
547 <citerefentry project='man-pages'><refentrytitle>credentials</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
548 <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
549 <citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
550 <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>
551 </para>
552 </refsect1>
553
554 </refentry>