summaryrefslogtreecommitdiff
path: root/src/basic/audit-util.h
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2017-10-10 00:22:57 +0200
committerMichael Biebl <biebl@debian.org>2017-10-10 00:22:57 +0200
commitf5e65279187b6aa0c0c5a00b14dca9eab441ffb2 (patch)
treeb834735b2b8fabf24499bb8cc12d4f24870436f7 /src/basic/audit-util.h
parent81c583552ee1c3355cdef1b11a33737dd98e6971 (diff)
downloadsystemd-f5e65279187b6aa0c0c5a00b14dca9eab441ffb2.tar.gz
New upstream version 235
Diffstat (limited to 'src/basic/audit-util.h')
-rw-r--r--src/basic/audit-util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/basic/audit-util.h b/src/basic/audit-util.h
index e048503991..3088951326 100644
--- a/src/basic/audit-util.h
+++ b/src/basic/audit-util.h
@@ -29,3 +29,7 @@ int audit_session_from_pid(pid_t pid, uint32_t *id);
int audit_loginuid_from_pid(pid_t pid, uid_t *uid);
bool use_audit(void);
+
+static inline bool audit_session_is_valid(uint32_t id) {
+ return id > 0 && id != AUDIT_SESSION_INVALID;
+}