summaryrefslogtreecommitdiff
path: root/src/shared/audit.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-04-29 21:40:54 +0200
committerLennart Poettering <lennart@poettering.net>2015-04-29 21:45:58 +0200
commitcfeaa44a09756a93a881f786678973d9b1e382db (patch)
treec86172a848d4ca1716e1b2b82427e819f025e51c /src/shared/audit.h
parentcfa9677bd164574600d29a9bf99f9d1f28a7a170 (diff)
sd-bus: properly handle creds that are known but undefined for a process
A number of fields do not apply to all processes, including: there a processes without a controlling tty, without parent process, without service, user services or session. To distuingish these cases from the case where we simply don't have the data, always return ENXIO for them, while returning ENODATA for the case where we really lack the information. Also update the credentials dumping code to show this properly. Fields that are known but do not apply are now shown as "n/a". Note that this also changes some of the calls in process-util.c and cgroup-util.c to return ENXIO for these cases.
Diffstat (limited to 'src/shared/audit.h')
-rw-r--r--src/shared/audit.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/shared/audit.h b/src/shared/audit.h
index 781866ae1c..6de331c73e 100644
--- a/src/shared/audit.h
+++ b/src/shared/audit.h
@@ -25,6 +25,7 @@
#include <stdbool.h>
#include <sys/types.h>
+#define AUDIT_SESSION_INVALID ((uint32_t) -1)
int audit_session_from_pid(pid_t pid, uint32_t *id);
int audit_loginuid_from_pid(pid_t pid, uid_t *uid);