aboutgitcodebugslistschat
path: root/util.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2022-09-12 22:23:59 +1000
committerStefano Brivio <sbrivio@redhat.com>2022-09-13 05:31:51 +0200
commit7330ae3abfba9722c04e6c52ae6222de47016834 (patch)
tree7fcedad80d3f101ac08247ec4136224cbec4bad8 /util.h
parente2cae8f1c3651b1237a3042b4ba6211155aa58f1 (diff)
downloadpasst-7330ae3abfba9722c04e6c52ae6222de47016834.tar
passt-7330ae3abfba9722c04e6c52ae6222de47016834.tar.gz
passt-7330ae3abfba9722c04e6c52ae6222de47016834.tar.bz2
passt-7330ae3abfba9722c04e6c52ae6222de47016834.tar.lz
passt-7330ae3abfba9722c04e6c52ae6222de47016834.tar.xz
passt-7330ae3abfba9722c04e6c52ae6222de47016834.tar.zst
passt-7330ae3abfba9722c04e6c52ae6222de47016834.zip
Don't store UID & GID persistently in the context structure
c->uid and c->gid are first set in conf(), and last used in check_root() itself called from conf(). Therefore these don't need to be fields in the long lived context structure and can instead be locals in conf(). Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'util.h')
-rw-r--r--util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.h b/util.h
index 8297bec..58312fb 100644
--- a/util.h
+++ b/util.h
@@ -234,7 +234,7 @@ 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(struct ctx *c);
+void check_root(uid_t *uid, gid_t *gid);
int ns_enter(const struct ctx *c);
void write_pidfile(int fd, pid_t pid);
int __daemon(int pidfile_fd, int devnull_fd);