3802a3d3d7af51ddff31943d5514382f01265770Lennart Poettering<?xml version='1.0'?> <!--*- Mode: nxml; nxml-child-indent: 2; indent-tabs-mode: nil -*-->
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
12b42c76672a66c2d4ea7212c14f8f1b5a62b78dTom Gundersen"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5de0ccffcc4a5a946102a14e0b0e681d964e3225Zbigniew Jędrzejewski-Szmek This file is part of systemd.
5de0ccffcc4a5a946102a14e0b0e681d964e3225Zbigniew Jędrzejewski-Szmek Copyright 2014 Zbigniew Jędrzejewski-Szmek
5de0ccffcc4a5a946102a14e0b0e681d964e3225Zbigniew Jędrzejewski-Szmek systemd is free software; you can redistribute it and/or modify it
5de0ccffcc4a5a946102a14e0b0e681d964e3225Zbigniew Jędrzejewski-Szmek under the terms of the GNU Lesser General Public License as published by
5de0ccffcc4a5a946102a14e0b0e681d964e3225Zbigniew Jędrzejewski-Szmek the Free Software Foundation; either version 2.1 of the License, or
5de0ccffcc4a5a946102a14e0b0e681d964e3225Zbigniew Jędrzejewski-Szmek (at your option) any later version.
5de0ccffcc4a5a946102a14e0b0e681d964e3225Zbigniew Jędrzejewski-Szmek systemd is distributed in the hope that it will be useful, but
5de0ccffcc4a5a946102a14e0b0e681d964e3225Zbigniew Jędrzejewski-Szmek WITHOUT ANY WARRANTY; without even the implied warranty of
5de0ccffcc4a5a946102a14e0b0e681d964e3225Zbigniew Jędrzejewski-Szmek MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5de0ccffcc4a5a946102a14e0b0e681d964e3225Zbigniew Jędrzejewski-Szmek Lesser General Public License for more details.
5de0ccffcc4a5a946102a14e0b0e681d964e3225Zbigniew Jędrzejewski-Szmek You should have received a copy of the GNU Lesser General Public License
5de0ccffcc4a5a946102a14e0b0e681d964e3225Zbigniew Jędrzejewski-Szmek along with systemd; If not, see <http://www.gnu.org/licenses/>.
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <title>sd_bus_creds_get_pid</title>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <productname>systemd</productname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <contrib>A monkey with a typewriter</contrib>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <surname>Jędrzejewski-Szmek</surname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <email>zbyszek@in.waw.pl</email>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refentrytitle>sd_bus_creds_get_pid</refentrytitle>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_pid</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_tid</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_uid</refname>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <refname>sd_bus_creds_get_fsuid</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_gid</refname>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <refname>sd_bus_creds_get_fsgid</refname>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <refname>sd_bus_creds_get_supplementary_gids</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_comm</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_tid_comm</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_exe</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_cmdline</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_cgroup</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_unit</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_slice</refname>
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <refname>sd_bus_creds_get_user_unit</refname>
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <refname>sd_bus_creds_get_user_slice</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_session</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_owner_uid</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_has_effective_cap</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_has_permitted_cap</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_has_inheritable_cap</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_has_bounding_cap</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_selinux_context</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_audit_session_id</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_audit_login_uid</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_unique_name</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refname>sd_bus_creds_get_well_known_names</refname>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <refname>sd_bus_creds_get_description</refname>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refpurpose>Retrieve fields from a credentials object</refpurpose>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <refsynopsisdiv>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcsynopsisinfo>#include <systemd/sd-bus.h></funcsynopsisinfo>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_pid</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>pid_t *<parameter>pid</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcdef>int <function>sd_bus_creds_get_ppid</function></funcdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>pid_t *<parameter>ppid</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_tid</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>pid_t *<parameter>tid</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcdef>int <function>sd_bus_creds_get_uid</function></funcdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>uid_t *<parameter>uid</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering </funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcdef>int <function>sd_bus_creds_get_euid</function></funcdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>uid_t *<parameter>uid</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering </funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcdef>int <function>sd_bus_creds_get_suid</function></funcdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>uid_t *<parameter>uid</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering </funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcdef>int <function>sd_bus_creds_get_fsuid</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>uid_t *<parameter>uid</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_gid</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>gid_t *<parameter>gid</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcdef>int <function>sd_bus_creds_get_egid</function></funcdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>gid_t *<parameter>gid</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering </funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcdef>int <function>sd_bus_creds_get_sgid</function></funcdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>gid_t *<parameter>gid</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering </funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcdef>int <function>sd_bus_creds_get_fsgid</function></funcdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>gid_t *<parameter>gid</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering </funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcdef>int <function>sd_bus_creds_get_supplementary_gids</function></funcdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>const gid_t **<parameter>gids</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_comm</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>const char **<parameter>comm</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_tid_comm</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>const char **<parameter>comm</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_exe</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>const char **<parameter>exe</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_cmdline</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>char ***<parameter>cmdline</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_cgroup</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>const char **<parameter>cgroup</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_unit</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>const char **<parameter>unit</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <funcprototype>
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <funcdef>int <function>sd_bus_creds_get_slice</function></funcdef>
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <paramdef>const char **<parameter>slice</parameter></paramdef>
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_user_unit</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>const char **<parameter>unit</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <funcdef>int <function>sd_bus_creds_get_user_slice</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>const char **<parameter>slice</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_session</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>const char **<parameter>slice</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_owner_uid</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>uid_t *<parameter>uid</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_has_effective_cap</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>int <parameter>capability</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_has_permitted_cap</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>int <parameter>capability</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_has_inheritable_cap</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>int <parameter>capability</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_has_bounding_cap</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>int <parameter>capability</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_selinux_context</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>const char **<parameter>context</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_audit_session_id</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>uint32_t *<parameter>sessionid</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_audit_login_uid</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>uid_t *<parameter>loginuid</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcdef>int <function>sd_bus_creds_get_tty</function></funcdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <paramdef>const char **<parameter>tty</parameter></paramdef>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_unique_name</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>const char **<parameter>name</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <funcdef>int <function>sd_bus_creds_get_well_known_names</function></funcdef>
8dc385e7701726be69b681e2738a1d74a21b24f1Jan Engelhardt <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <paramdef>char ***<parameter>name</parameter></paramdef>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </funcprototype>
5c20a8bca1dd16d64b2dd959a2552f6452448932Lennart Poettering <funcprototype>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <funcdef>int <function>sd_bus_creds_get_description</function></funcdef>
5c20a8bca1dd16d64b2dd959a2552f6452448932Lennart Poettering <paramdef>sd_bus_creds *<parameter>c</parameter></paramdef>
5c20a8bca1dd16d64b2dd959a2552f6452448932Lennart Poettering <paramdef>const char **<parameter>name</parameter></paramdef>
5c20a8bca1dd16d64b2dd959a2552f6452448932Lennart Poettering </funcprototype>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek </refsynopsisdiv>
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <para>These functions return credential information from an
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <parameter>sd_bus_creds</parameter> object. Credential objects may
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering be created with
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering in which case they describe the credentials of the process
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering identified by the specified PID, with
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <citerefentry><refentrytitle>sd_bus_get_name_creds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering in which case they describe the credentials of a bus peer
b655a0282c0869ed545fbd7a9cc2069d3afcaef2Umut Tezduyar Lindskog identified by the specified bus name, with
056f95d0a70413e10e4a4ea9966baabb5a1450edDaniel Mack <citerefentry><refentrytitle>sd_bus_get_owner_creds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering in which case they describe the credentials of the creator of a
b655a0282c0869ed545fbd7a9cc2069d3afcaef2Umut Tezduyar Lindskog <citerefentry><refentrytitle>sd_bus_message_get_creds</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering in which case they describe the credentials of the sender of the
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering message.</para>
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <para>Not all credential fields are part of every
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <literal>sd_bus_creds</literal> object. Use
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <citerefentry><refentrytitle>sd_bus_creds_get_mask</refentrytitle><manvolnum>3</manvolnum></citerefentry>
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering to determine the mask of fields available.</para>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <para><function>sd_bus_creds_get_pid()</function> will retrieve
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt the PID (process identifier). Similarly,
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <function>sd_bus_creds_get_ppid()</function> will retrieve the
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering parent PID. Note that PID 1 has no parent process, in which case
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering -ENXIO is returned.</para>
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_get_tid()</function> will retrieve the
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek TID (thread identifier).</para>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <para><function>sd_bus_creds_get_uid()</function> will retrieve
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt the numeric UID (user identifier). Similarly,
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <function>sd_bus_creds_get_euid()</function> returns the effective
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering UID, <function>sd_bus_creds_get_suid()</function> the saved UID
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering and <function>sd_bus_creds_get_fsuid()</function> the file system
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_get_gid()</function> will retrieve the
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt numeric GID (group identifier). Similarly,
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <function>sd_bus_creds_get_egid()</function> returns the effective
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering GID, <function>sd_bus_creds_get_sgid()</function> the saved GID
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering and <function>sd_bus_creds_get_fsgid()</function> the file system
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <para><function>sd_bus_creds_get_supplementary_gids()</function>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering will retrieve the supplementary GIDs list.</para>
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_get_comm()</function> will retrieve the
dc968941bfc9be464e1df15afa05693dec3ec192Jan Engelhardt comm field (truncated name of the executable, as stored in
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <filename>/proc/<replaceable>pid</replaceable>/comm</filename>).
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_get_tid_comm()</function> will retrieve
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek the comm field of the thread (as stored in
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <filename>/proc/<replaceable>pid</replaceable>/task/<replaceable>tid</replaceable>/comm</filename>).
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <para><function>sd_bus_creds_get_exe()</function> will retrieve
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering the path to the program executable (as stored in the
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <filename>/proc/<replaceable>pid</replaceable>/exe</filename>
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt link, but with the <literal> (deleted)</literal> suffix removed). Note
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering that kernel threads do not have an executable path, in which case
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering -ENXIO is returned.</para>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <para><function>sd_bus_creds_get_cmdline()</function> will
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering retrieve an array of command line arguments (as stored in
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <filename>/proc/<replaceable>pid</replaceable>/cmdline</filename>). Note
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering that kernel threads do not have a command line, in which case
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering -ENXIO is returned.</para>
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_get_cgroup()</function> will retrieve
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek the cgroup path. See <ulink
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek url="https://www.kernel.org/doc/Documentation/cgroups/cgroups.txt">cgroups.txt</ulink>.
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <para><function>sd_bus_creds_get_unit()</function> will retrieve
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering the systemd unit name (in the system instance of systemd) that the
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt process is a part of. See
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. For
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt processes that are not part of a unit, returns -ENXIO.
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_get_user_unit()</function> will
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek retrieve the systemd unit name (in the user instance of systemd)
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt that the process is a part of. See
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>. For
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt processes that are not part of a user unit, returns -ENXIO.
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_get_slice()</function> will retrieve
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek the systemd slice (a unit in the system instance of systemd) that
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt the process is a part of. See
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt <citerefentry><refentrytitle>systemd.slice</refentrytitle><manvolnum>5</manvolnum></citerefentry>. Similarly,
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <function>sd_bus_creds_get_user_slice()</function> retrieves the
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering systemd slice of the process, in the user instance of systemd.
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <para><function>sd_bus_creds_get_session()</function> will
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering retrieve the identifier of the login session that the process is
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt a part of. See
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>. For
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt processes that are not part of a session, returns -ENXIO.
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <para><function>sd_bus_creds_get_owner_uid()</function> will
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering retrieve the numeric UID (user identifier) of the user who owns
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt the login session that the process is a part of. See
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
b938cb902c3b5bca807a94b277672c64d6767886Jan Engelhardt For processes that are not part of a session, returns -ENXIO.
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_has_effective_cap()</function> will
5485de1edbfd442e0727f699a50c489d815d771dZbigniew Jędrzejewski-Szmek check whether the capability specified by
5485de1edbfd442e0727f699a50c489d815d771dZbigniew Jędrzejewski-Szmek <parameter>capability</parameter> was set in the effective
66f756d437658cc464bfb5647c97efd0cf77f933Jan Engelhardt capabilities mask. A positive return value means that is was
5485de1edbfd442e0727f699a50c489d815d771dZbigniew Jędrzejewski-Szmek set, zero means that it was not set, and a negative return
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering value indicates an error. See
5aded369782f28255bc6b494ca905d7acaea7a56Zbigniew Jędrzejewski-Szmek <citerefentry project='man-pages'><refentrytitle>capabilities</refentrytitle><manvolnum>7</manvolnum></citerefentry>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek and <varname>Capabilities=</varname> and
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <varname>CapabilityBoundingSet=</varname> settings in
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd.exec</refentrytitle><manvolnum>5</manvolnum></citerefentry>.
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_has_permitted_cap()</function> is
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering similar to <function>sd_bus_creds_has_effective_cap()</function>,
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek but will check the permitted capabilities mask.</para>
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_has_inheritable_cap()</function> is
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering similar to <function>sd_bus_creds_has_effective_cap()</function>,
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek but will check the inheritable capabilities mask.</para>
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_has_bounding_cap()</function> is
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering similar to <function>sd_bus_creds_has_effective_cap()</function>,
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek but will check the bounding capabilities mask.</para>
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_get_selinux_context()</function> will
82adf6af7c72b852449346835f33184a841b4796Lennart Poettering retrieve the SELinux security context (label) of the process.</para>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <para><function>sd_bus_creds_get_audit_session_id()</function>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering will retrieve the audit session identifier of the process. Returns
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering -ENXIO for processes that are not part of an audit session.</para>
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_get_audit_login_uid()</function> will
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek retrieve the audit user login identifier (the identifier of the
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering user who is "responsible" for the session). Returns -ENXIO for
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering processes that are not part of an audit session.</para>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <para><function>sd_bus_creds_get_tty()</function> will retrieve
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering the controlling TTY, without the prefixing "/dev/". Returns -ENXIO
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering for processes that have no controlling TTY.</para>
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_get_unique_name()</function> will
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek retrieve the D-Bus unique name. See <ulink
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek url="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus">The
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek D-Bus specification</ulink>.</para>
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <para><function>sd_bus_creds_get_well_known_names()</function> will
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek retrieve the set of D-Bus well-known names. See <ulink
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek url="http://dbus.freedesktop.org/doc/dbus-specification.html#message-protocol-names-bus">The
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek D-Bus specification</ulink>.</para>
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <para><function>sd_bus_creds_get_description()</function> will
5c20a8bca1dd16d64b2dd959a2552f6452448932Lennart Poettering retrieve a descriptive name of the bus connection of the
5c20a8bca1dd16d64b2dd959a2552f6452448932Lennart Poettering peer. This name is useful to discern multiple bus connections by
5c20a8bca1dd16d64b2dd959a2552f6452448932Lennart Poettering the same peer, and may be altered by the peer with the
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <citerefentry><refentrytitle>sd_bus_set_description</refentrytitle><manvolnum>3</manvolnum></citerefentry>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <para>All functions that take a <parameter>const
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek char**</parameter> parameter will store the answer there as an
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek address of a NUL-terminated string. It will be valid as long as
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <parameter>c</parameter> remains valid, and should not be freed or
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek modified by the caller.</para>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <para>All functions that take a <parameter>char***</parameter>
7f3fdb7f19a109fa3d1be92926bfe4cea1817da5Jakub Wilk parameter will store the answer there as an address of an array
ff9b60f38bf68eba4a47cabff14547d92e083214Torstein Husebø of strings. Each individual string is NUL-terminated, and the
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek array is NULL-terminated as a whole. It will be valid as long as
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <parameter>c</parameter> remains valid, and should not be freed or
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek modified by the caller.</para>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <para>On success, these calls return 0 or a positive integer. On
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek failure, these calls return a negative errno-style error code.
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <para>Returned errors may indicate the following problems:</para>
8474b70c3a3842cdf3d51f331dd117ab6421f6d0Zbigniew Jędrzejewski-Szmek <term><constant>-ENODATA</constant></term>
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt <listitem><para>The given field is not available in the
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering credentials object <parameter>c</parameter>.</para>
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt <listitem><para>The given field is not specified for the described
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering process or peer. This will be returned by
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <function>sd_bus_get_user_unit()</function>,
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <function>sd_bus_get_user_slice()</function>,
b7ea3f3ed6204dca31f8f2a84b667c1783259c5bLennart Poettering <function>sd_bus_get_session()</function>, and
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <function>sd_bus_get_owner_uid()</function> if the process is
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering not part of a systemd system unit, systemd user unit, systemd
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering slice, or logind session. It will also be returned by
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <function>sd_bus_creds_get_exe()</function> and
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <function>sd_bus_creds_get_cmdline()</function> for kernel
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt threads (since these are not started from an executable binary,
a8eaaee72a2f06e0fb64fb71de3b71ecba31dafbJan Engelhardt nor have a command line), and by
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <function>sd_bus_creds_get_audit_session_id()</function> and
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <function>sd_bus_creds_get_audit_login_uid()</function> when
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering the process is not part of an audit session, and
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering <function>sd_bus_creds_get_tty()</function> if the process has
52d7c4dcf157745767931d49c9fa9c73448f746aLennart Poettering no controlling TTY.
8474b70c3a3842cdf3d51f331dd117ab6421f6d0Zbigniew Jędrzejewski-Szmek <term><constant>-EINVAL</constant></term>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <listitem><para>Specified pointer parameter is <constant>NULL</constant>.
8474b70c3a3842cdf3d51f331dd117ab6421f6d0Zbigniew Jędrzejewski-Szmek <term><constant>-ENOMEM</constant></term>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <listitem><para>Memory allocation failed.</para></listitem>
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <para><function>sd_bus_creds_get_pid()</function> and the other
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering functions described here are available as a shared library, which
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering can be compiled and linked to with the
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <constant>libsystemd</constant> <citerefentry
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering project='die-net'><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
cd6d5e1c7631d6e74cb04be279dee22e423e08b8Zbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>sd-bus</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <citerefentry><refentrytitle>sd_bus_creds_new_from_pid</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <citerefentry project='man-pages'><refentrytitle>fork</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
f6f7a9848e27fbc1748aec9264e58a2aeaf736dbLennart Poettering <citerefentry project='man-pages'><refentrytitle>execve</refentrytitle><manvolnum>2</manvolnum></citerefentry>,
5aded369782f28255bc6b494ca905d7acaea7a56Zbigniew Jędrzejewski-Szmek <citerefentry project='man-pages'><refentrytitle>credentials</refentrytitle><manvolnum>7</manvolnum></citerefentry>,
5aded369782f28255bc6b494ca905d7acaea7a56Zbigniew Jędrzejewski-Szmek <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
5aded369782f28255bc6b494ca905d7acaea7a56Zbigniew Jędrzejewski-Szmek <citerefentry project='man-pages'><refentrytitle>proc</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
e530ed5e1407e0571afc01552e41365ffb01befaZbigniew Jędrzejewski-Szmek <citerefentry><refentrytitle>systemd.journal-fields</refentrytitle><manvolnum>7</manvolnum></citerefentry>