int label_fix(const char *path, bool ignore_enoent, bool ignore_erofs);
int mkdir_label(const char *path, mode_t mode);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int symlink_label(const char *old_path, const char *new_path);
#endif // 0
return r;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
void log_close_journal(void) {
journal_fd = safe_close(journal_fd);
}
log_close_console();
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
void log_forget_fds(void) {
console_fd = kmsg_fd = syslog_fd = journal_fd = -1;
}
return 1;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
static int log_do_header(
char *header,
size_t size,
DEFINE_STRING_TABLE_LOOKUP(log_target, LogTarget);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
void log_received_signal(int level, const struct signalfd_siginfo *si) {
if (si->ssi_pid > 0) {
_cleanup_free_ char *p = NULL;
int log_open(void);
void log_close(void);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
void log_forget_fds(void);
#endif // 0
void log_close_syslog(void);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
void log_close_journal(void);
#endif // 0
void log_close_kmsg(void);
#define LOG_MESSAGE(fmt, ...) "MESSAGE=" fmt, ##__VA_ARGS__
#define LOG_MESSAGE_ID(x) "MESSAGE_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(x)
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
void log_received_signal(int level, const struct signalfd_siginfo *si);
void log_set_upgrade_syslog_to_journal(bool b);
return fd;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int memfd_map(int fd, uint64_t offset, size_t size, void **p) {
void *q;
int sealed;
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int memfd_get_sealed(int fd) {
int r;
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int memfd_new_and_map(const char *name, size_t sz, void **p) {
_cleanup_close_ int fd = -1;
int r;
#include <inttypes.h>
int memfd_new(const char *name);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int memfd_new_and_map(const char *name, size_t sz, void **p);
int memfd_map(int fd, uint64_t offset, size_t size, void **p);
#endif // 0
int memfd_set_sealed(int fd);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int memfd_get_sealed(int fd);
int memfd_get_size(int fd, uint64_t *sz);
return mkdir_safe_internal(path, mode, uid, gid, mkdir_label);
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int mkdir_parents_label(const char *path, mode_t mode) {
return mkdir_parents_internal(NULL, path, mode, mkdir_label);
}
/* mandatory access control(MAC) versions */
int mkdir_safe_label(const char *path, mode_t mode, uid_t uid, gid_t gid);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int mkdir_parents_label(const char *path, mode_t mode);
#endif // 0
int mkdir_p_label(const char *path, mode_t mode);
return fd_is_mount_point(fd, basename(t), flags);
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int umount_recursive(const char *prefix, int flags) {
bool again;
int n = 0, r;
int fd_is_mount_point(int fd, const char *filename, int flags);
int path_is_mount_point(const char *path, int flags);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int repeat_unmount(const char *path, int flags);
int umount_recursive(const char *target, int flags);
DEFINE_TRIVIAL_CLEANUP_FUNC(FILE*, endmntent);
#define _cleanup_endmntent_ _cleanup_(endmntentp)
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
bool fstype_is_network(const char *fstype);
#endif // 0
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int parse_range(const char *t, unsigned *lower, unsigned *upper) {
_cleanup_free_ char *word = NULL;
unsigned l, u;
int parse_size(const char *t, uint64_t base, uint64_t *size);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int parse_range(const char *t, unsigned *lower, unsigned *upper);
#define FORMAT_BYTES_MAX 8
return !!strchr(p, '/');
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int path_split_and_make_absolute(const char *p, char ***ret) {
char **l;
int r;
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int path_make_relative(const char *from_dir, const char *to_path, char **_r) {
char *r, *p;
unsigned n_parents;
return path_equal(a, b) || files_same(a, b) > 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
char* path_join(const char *root, const char *path, const char *rest) {
assert(path);
NULL);
}
#endif // 0
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int find_binary(const char *name, char **ret) {
int last_error, r;
return hidden_file_allow_backup(filename);
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
bool is_device_path(const char *path) {
/* Returns true on paths that refer to a device, either in
#endif
bool is_path(const char *p) _pure_;
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int path_split_and_make_absolute(const char *p, char ***ret);
#endif // 0
bool path_is_absolute(const char *p) _pure_;
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
char* path_make_absolute(const char *p, const char *prefix);
#endif // 0
int path_make_absolute_cwd(const char *p, char **ret);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int path_make_relative(const char *from_dir, const char *to_path, char **_r);
#endif // 0
char* path_kill_slashes(char *path);
int path_compare(const char *a, const char *b) _pure_;
bool path_equal(const char *a, const char *b) _pure_;
bool path_equal_or_files_same(const char *a, const char *b);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
char* path_join(const char *root, const char *path, const char *rest);
int path_strv_make_absolute_cwd(char **l);
char** path_strv_resolve(char **l, const char *prefix);
char** path_strv_resolve_uniq(char **l, const char *prefix);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int find_binary(const char *name, char **filename);
bool paths_check_timestamp(const char* const* paths, usec_t *paths_ts_usec, bool update);
_ret; \
})
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int parse_path_argument_and_warn(const char *path, bool suppress_root, char **arg);
#endif // 0
bool hidden_file_allow_backup(const char *filename);
bool hidden_file(const char *filename) _pure_;
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
bool is_device_path(const char *path);
#endif // 0
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int shall_restore_state(void) {
_cleanup_free_ char *value = NULL;
int r;
int parse_proc_cmdline(int (*parse_word)(const char *key, const char *value));
int get_proc_cmdline_key(const char *parameter, char **value);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int shall_restore_state(void);
const char* runlevel_to_target(const char *rl);
#endif // 0
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
void rename_process(const char name[8]) {
assert(name);
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int get_process_capeff(pid_t pid, char **capeff) {
const char *p;
int r;
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
static int get_process_id(pid_t pid, const char *field, uid_t *uid) {
_cleanup_fclose_ FILE *f = NULL;
char line[LINE_MAX];
(void) wait_for_terminate(*pid, NULL);
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int kill_and_sigcont(pid_t pid, int sig) {
int r;
return cached > 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
noreturn void freeze(void) {
/* Make sure nobody waits for us on a socket anymore */
int get_process_cmdline(pid_t pid, size_t max_length, bool comm_fallback, char **line);
int get_process_exe(pid_t pid, char **name);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int get_process_uid(pid_t pid, uid_t *uid);
int get_process_gid(pid_t pid, gid_t *gid);
int get_process_capeff(pid_t pid, char **capeff);
void sigkill_wait(pid_t *pid);
#define _cleanup_sigkill_wait_ _cleanup_(sigkill_wait)
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int kill_and_sigcont(pid_t pid, int sig);
void rename_process(const char name[8]);
bool is_main_thread(void);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
noreturn void freeze(void);
bool oom_score_adjust_is_valid(int oa);
#define PERSONALITY_INVALID 0xffffffffLU
#endif
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
unsigned long personality_from_string(const char *p);
const char *personality_to_string(unsigned long);
#endif
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
void mac_selinux_retest(void) {
#ifdef HAVE_SELINUX
cached_use = -1;
return r;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
void mac_selinux_finish(void) {
#ifdef HAVE_SELINUX
#endif
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int mac_selinux_create_socket_prepare(const char *label) {
#ifdef HAVE_SELINUX
#include "macro.h"
bool mac_selinux_use(void);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
void mac_selinux_retest(void);
#endif // 0
int mac_selinux_init(const char *prefix);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
void mac_selinux_finish(void);
#endif // 0
int mac_selinux_fix(const char *path, bool ignore_enoent, bool ignore_erofs);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int mac_selinux_apply(const char *path, const char *label);
int mac_selinux_get_create_label_from_exe(const char *exe, char **label);
int mac_selinux_create_file_prepare(const char *path, mode_t mode);
void mac_selinux_create_file_clear(void);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int mac_selinux_create_socket_prepare(const char *label);
void mac_selinux_create_socket_clear(void);
/* no set_remove2 */
/* no set_remove_value */
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int set_remove_and_put(Set *s, const void *old_key, const void *new_key);
#endif // 0
/* no set_remove_and_replace */
int set_consume(Set *s, void *value);
int set_put_strdup(Set *s, const char *p);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int set_put_strdupv(Set *s, char **l);
#endif // 0
return r;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int sigaction_many(const struct sigaction *sa, ...) {
va_list ap;
int r;
return r;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int default_signals(int sig, ...) {
static const struct sigaction sa = {
return signo;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
void nop_signal_handler(int sig) {
/* nothing here */
}
int reset_signal_mask(void);
int ignore_signals(int sig, ...);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int default_signals(int sig, ...);
int sigaction_many(const struct sigaction *sa, ...);
#endif // 0
int signal_from_string(const char *s) _pure_;
int signal_from_string_try_harder(const char *s);
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
void nop_signal_handler(int sig);
#endif // 0
return cached_use;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
static const char* const smack_attr_table[_SMACK_ATTR_MAX] = {
[SMACK_ATTR_ACCESS] = "security.SMACK64",
[SMACK_ATTR_EXEC] = "security.SMACK64EXEC",
return r;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int mac_smack_copy(const char *dest, const char *src) {
int r = 0;
_cleanup_free_ char *label = NULL;
return false;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int mac_smack_read(const char *path, SmackAttr attr, char **label) {
return -EOPNOTSUPP;
}
return 0;
}
-/// UNNEEDED by elogind
-#if 0
+#if 0 /// UNNEEDED by elogind
int mac_smack_copy(const char *dest, const char *src) {
return 0;
}