From 80d7012b09cddbf6b8bb0d002af5f4645ad5c450 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Mon, 12 Sep 2022 22:24:01 +1000 Subject: Consolidate determination of UID/GID to run as Currently the logic to work out what UID and GID we will run as is spread across conf(). If --runas is specified it's handled in conf_runas(), otherwise it's handled by check_root(), which depends on initialization of the uid and gid variables by either conf() itself or conf_runas(). Make this clearer by putting all the UID and GID logic into a single conf_ugid() function. Signed-off-by: David Gibson --- util.h | 1 - 1 file changed, 1 deletion(-) (limited to 'util.h') diff --git a/util.h b/util.h index e2f686b..9626cb5 100644 --- a/util.h +++ b/util.h @@ -234,7 +234,6 @@ char *line_read(char *buf, size_t len, int fd); void procfs_scan_listen(struct ctx *c, uint8_t proto, int ip_version, int ns, uint8_t *map, uint8_t *exclude); void drop_caps(void); -void check_root(uid_t *uid, gid_t *gid); void drop_root(uid_t uid, gid_t gid); int ns_enter(const struct ctx *c); void write_pidfile(int fd, pid_t pid); -- cgit v1.2.3