return 0;
}
+#if 0 /// UNNEEDED by elogind
bool use_audit(void) {
static int cached_use = -1;
return cached_use;
}
+#endif // 0
--- /dev/null
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+ This file is part of systemd.
+
+ Copyright 2010 Lennart Poettering
+
+ systemd is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ systemd is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include <stdint.h>
+#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);
+
+#if 0 /// UNNEEDED by elogind
+bool use_audit(void);
+#endif // 0
_CGROUP_MASK_ALL = CGROUP_CONTROLLER_TO_MASK(_CGROUP_CONTROLLER_MAX) - 1
} CGroupMask;
+#if 0 /// UNNEEDED by elogind
/* Special values for the cpu.shares attribute */
#define CGROUP_CPU_SHARES_INVALID ((uint64_t) -1)
#define CGROUP_CPU_SHARES_MIN UINT64_C(2)
x == CGROUP_BLKIO_WEIGHT_INVALID ||
(x >= CGROUP_BLKIO_WEIGHT_MIN && x <= CGROUP_BLKIO_WEIGHT_MAX);
}
+#endif // 0
/*
* General rules:
return d;
}
+#if 0 /// UNNEEDED by elogind
static int search_and_fopen_internal(const char *path, const char *mode, const char *root, char **search, FILE **_f) {
char **i;
return search_and_fopen_internal(path, mode, root, copy, _f);
}
-#if 0 /// UNNEEDED by elogind
int search_and_fopen_nulstr(const char *path, const char *mode, const char *root, const char *search, FILE **_f) {
_cleanup_strv_free_ char **s = NULL;
return 0;
}
+#if 0 /// UNNEEDED by elogind
int tempfn_random(const char *p, const char *extra, char **ret) {
const char *fn;
char *t, *x;
return 0;
}
-#if 0 /// UNNEEDED by elogind
int tempfn_random_child(const char *p, const char *extra, char **ret) {
char *t, *x;
uint64_t u;
DIR *xopendirat(int dirfd, const char *name, int flags);
-int search_and_fopen(const char *path, const char *mode, const char *root, const char **search, FILE **_f);
#if 0 /// UNNEEDED by elogind
+int search_and_fopen(const char *path, const char *mode, const char *root, const char **search, FILE **_f);
int search_and_fopen_nulstr(const char *path, const char *mode, const char *root, const char *search, FILE **_f);
#endif // 0
#define FOREACH_LINE(line, f, on_error) \
#endif // 0
int tempfn_xxxxxx(const char *p, const char *extra, char **ret);
-int tempfn_random(const char *p, const char *extra, char **ret);
#if 0 /// UNNEEDED by elogind
+int tempfn_random(const char *p, const char *extra, char **ret);
int tempfn_random_child(const char *p, const char *extra, char **ret);
int write_timestamp_file_atomic(const char *fn, usec_t n);
rest && rest[0] == '/' ? rest+1 : rest,
NULL);
}
-#endif // 0
-#if 0 /// UNNEEDED by elogind
int find_binary(const char *name, char **ret) {
int last_error, r;
return r;
}
+#if 0 /// UNNEEDED by elogind
int strv_extend_strv(char ***a, char **b, bool filter_duplicates) {
char **s, **t;
size_t p, q, i = 0, j;
return -ENOMEM;
}
-#if 0 /// UNNEEDED by elogind
int strv_extend_strv_concat(char ***a, char **b, const char *suffix) {
int r;
char **s;
char **strv_copy(char * const *l);
unsigned strv_length(char * const *l) _pure_;
-int strv_extend_strv(char ***a, char **b, bool filter_duplicates);
#if 0 /// UNNEEDED by elogind
+int strv_extend_strv(char ***a, char **b, bool filter_duplicates);
int strv_extend_strv_concat(char ***a, char **b, const char *suffix);
#endif // 0
int strv_extend(char ***l, const char *value);
#include "util.h"
#include "virt.h"
+#if 0 /// UNNEEDED by elogind
static int detect_vm_cpuid(void) {
/* CPUID is an x86 specific interface. */
cached_found = r;
return r;
}
+#endif // 0
int detect_container(void) {
return ret == 0;
}
+#if 0 /// UNNEEDED by elogind
static const char *const virtualization_table[_VIRTUALIZATION_MAX] = {
[VIRTUALIZATION_NONE] = "none",
[VIRTUALIZATION_KVM] = "kvm",
};
DEFINE_STRING_TABLE_LOOKUP(virtualization, int);
+#endif // 0
_VIRTUALIZATION_INVALID = -1
};
+#if 0 /// UNNEEDED by elogind
static inline bool VIRTUALIZATION_IS_VM(int x) {
return x >= VIRTUALIZATION_VM_FIRST && x <= VIRTUALIZATION_VM_LAST;
}
}
int detect_vm(void);
+#endif // 0
int detect_container(void);
#if 0 /// UNNEEDED by elogind
int detect_virtualization(void);
int running_in_chroot(void);
+#if 0 /// UNNEEDED by elogind
const char *virtualization_to_string(int v) _const_;
int virtualization_from_string(const char *s) _pure_;
+#endif // 0