chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
networkd: vxlan add support for GBP
[elogind.git]
/
src
/
shared
/
audit.c
diff --git
a/src/shared/audit.c
b/src/shared/audit.c
index 4701c0a8de856548d1eb7b8e0d31dd9304636872..54148fcf1836a40c0062a649f6ea676d77a9a2b8 100644
(file)
--- a/
src/shared/audit.c
+++ b/
src/shared/audit.c
@@
-19,20
+19,14
@@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
-#include <assert.h>
-#include <string.h>
-#include <unistd.h>
#include <errno.h>
#include <errno.h>
-#include <stdlib.h>
#include <stdio.h>
#include <stdio.h>
-#include <ctype.h>
#include "macro.h"
#include "audit.h"
#include "util.h"
#include "macro.h"
#include "audit.h"
#include "util.h"
-#include "
log
.h"
+#include "
process-util
.h"
#include "fileio.h"
#include "fileio.h"
-#include "virt.h"
int audit_session_from_pid(pid_t pid, uint32_t *id) {
_cleanup_free_ char *s = NULL;
int audit_session_from_pid(pid_t pid, uint32_t *id) {
_cleanup_free_ char *s = NULL;
@@
-52,7
+46,7
@@
int audit_session_from_pid(pid_t pid, uint32_t *id) {
if (r < 0)
return r;
if (r < 0)
return r;
- if (u ==
(uint32_t) -1
|| u <= 0)
+ if (u ==
AUDIT_SESSION_INVALID
|| u <= 0)
return -ENXIO;
*id = u;
return -ENXIO;
*id = u;