summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-creds.c
Commit message (Collapse)AuthorAge
* remove unused includesThomas Hindoe Paaboel Andersen2015-02-23
| | | | | | This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
* sd-bus: fix typoLennart Poettering2015-01-23
|
* bus: fix capabilities on big-endianDavid Herrmann2014-12-30
| | | | | | | | | | | The kernel provides capabilities as a u32 array, sd-bus uses an u8 array. This works fine on little-endian as both are encoded the same way. However, this fails on big-endian if we do not perform sufficient byte-swapping on each u32 entry. This patch makes sd-bus use u32, too. We avoid changing any kernel provided data so we can keep pointing into kdbus pool buffers which contain u32 arrays.
* bus: drop creds->capability_sizeDavid Herrmann2014-12-30
| | | | | | | | | | | The number of available caps can be read from /proc/sys/kernel/cap_last_cap during runtime. Our helper cap_last_cap() does that, so there's no reason to remember the size of any capability cache. We can just pre-allocate arrays with a suitable size for all available caps and reject any higher caps. The kernel capability API uses u32 as base so make sure we do the same. Note that this is specified by POSIX, so it's unlikely to change.
* sd-bus: get rid of PID starttime conceptLennart Poettering2014-12-09
| | | | As kdbus no longer exports this, remove all traces from sd-bus too
* sd-bus: set creds info for "org.freedesktop.DBus.Local" generated messages, tooLennart Poettering2014-11-27
|
* sd-bus: fake valid well-known-names metadata for faked bus messagesLennart Poettering2014-11-27
|
* sd-bus: optimize how we generate the well-known-names lists in messages from ↵Lennart Poettering2014-11-27
| | | | kdbus
* sd-bus: given that the kernel now passes the auxgroups list as 32bit array ↵Lennart Poettering2014-11-26
| | | | | | | to us, no need to convert to uid_t manually This way, we can save one allocation and avoid copying the array unnecesarily.
* sd-bus: properly copy selinux label and description field when duplicating ↵Lennart Poettering2014-11-25
| | | | creds object
* sd-bus: add supplementary groups list to creds objectLennart Poettering2014-11-25
|
* sd-bus: update to current kernel version, by splitting off the extended ↵Lennart Poettering2014-11-25
| | | | | | | | | | | | | | | | | | | | | | KDBUS_ITEM_PIDS structure from KDBUS_ITEM_CREDS Also: - adds support for euid, suid, fsuid, egid, sgid, fsgid fields. - makes augmentation of creds with data from /proc explicitly controllable to give apps better control over this, given that this is racy. - enables augmentation for kdbus connections (previously we only did it for dbus1). This is useful since with recent kdbus versions it is possible for clients to control the metadata they want to send. - changes sd_bus_query_sender_privilege() to take the euid of the client into consideration, if known - when we don't have permissions to read augmentation data from /proc, don't fail, just don't add the data in
* sd-bus: rename "connection name" to "description" for the sd-bus API tooLennart Poettering2014-11-04
| | | | | kdbus recently renamed this concept, and so should we in what we expose in userspace.
* Remove unnecessary casts in printfsZbigniew Jędrzejewski-Szmek2014-05-15
| | | | No functional change expected :)
* bus: replace sd_bus_label_{escape,unescape}() by new ↵Lennart Poettering2014-03-11
| | | | | | | | | | | sd_bus_path_{encode,decode}() The new calls work similarly, but enforce a that a common, fixed bus path prefix is used. This follows discussions with Simon McVittie on IRC that it should be a good idea to make sure that people don't use the escaping applied here too wildly as anything other than the last label of a bus path.
* api: in constructor function calls, always put the returned object pointer ↵Lennart Poettering2014-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | first (or second) Previously the returned object of constructor functions where sometimes returned as last, sometimes as first and sometimes as second parameter. Let's clean this up a bit. Here are the new rules: 1. The object the new object is derived from is put first, if there is any 2. The object we are creating will be returned in the next arguments 3. This is followed by any additional arguments Rationale: For functions that operate on an object we always put that object first. Constructors should probably not be too different in this regard. Also, if the additional parameters might want to use varargs which suggests to put them last. Note that this new scheme only applies to constructor functions, not to all other functions. We do give a lot of freedom for those. Note that this commit only changes the order of the new functions we added, for old ones we accept the wrong order and leave it like that.
* util: generalize code that checks whether PIDs are alive or unwaited forLennart Poettering2014-02-18
|
* bus: unescape connection name when reading it from credentialsLennart Poettering2014-01-22
|
* bus: include connection name in credentials structureLennart Poettering2014-01-22
|
* libsystemd: split up into subdirsTom Gundersen2014-01-21
We still only produce on .so, but let's keep the sources separate to make things a bit less messy.