]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
sysdeps: Document what _dbus_credentials_new_from_current_process has
authorSimon McVittie <smcv@collabora.com>
Mon, 15 Jan 2018 20:05:05 +0000 (20:05 +0000)
committerSimon McVittie <smcv@collabora.com>
Fri, 2 Mar 2018 14:52:18 +0000 (14:52 +0000)
It only has the most important credentials, not the full set.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=103737

dbus/dbus-credentials.c
dbus/dbus-sysdeps-unix.c

index 927f79d5f13e59ec4c45f0a28b047e064c9bdf41..4a7bafd108d91cbd9cef999ac9a10c70ce8f7176 100644 (file)
@@ -93,7 +93,7 @@ _dbus_credentials_new (void)
 }
 
 /**
- * Creates a new object with credentials (user ID and process ID) from the current process.
+ * Creates a new object with the most important credentials (user ID and process ID) from the current process.
  * @returns the new object or #NULL if no memory
  */
 DBusCredentials*
index f1764416e3a8e63a3a1373ff57fadb2d5e05bf41..d2a331ebad5c304505a50ed46190d6f2db450df9 100644 (file)
@@ -2756,8 +2756,14 @@ _dbus_user_info_fill_uid (DBusUserInfo *info,
 }
 
 /**
- * Adds the credentials of the current process to the
- * passed-in credentials object.
+ * Adds the most important credentials of the current process
+ * (the uid and pid) to the passed-in credentials object.
+ *
+ * The group vector is not included because it is rarely needed.
+ * The Linux security label is not included because it is rarely
+ * needed, it requires reading /proc, and the LSM API doesn't actually
+ * guarantee that the string seen in /proc is comparable to the strings
+ * found in SO_PEERSEC results.
  *
  * @param credentials credentials to add to
  * @returns #FALSE if no memory; does not properly roll back on failure, so only some credentials may have been added