diff options
author | David Lamparter <equinox@opensourcerouting.org> | 2017-06-01 18:33:08 +0200 |
---|---|---|
committer | David Lamparter <equinox@opensourcerouting.org> | 2017-08-02 23:36:39 +0200 |
commit | 37a1f2fbb6e05053098a5f1af5eff16ac523dd35 (patch) | |
tree | 537022bb34cb3c92d2ae2d6c131f12d46190fdf5 /tests | |
parent | lib: vty_stdio signal handling (diff) | |
download | frr-37a1f2fbb6e05053098a5f1af5eff16ac523dd35.tar.xz frr-37a1f2fbb6e05053098a5f1af5eff16ac523dd35.zip |
lib: privs: make uid/gid accessible before setuid
This splits off privs_preinit(), which does the lookups for user and
group IDs. This is so the init code can create state directories while
still running as root.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/test_privs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/lib/test_privs.c b/tests/lib/test_privs.c index c2cb5c2ea..1984f28e6 100644 --- a/tests/lib/test_privs.c +++ b/tests/lib/test_privs.c @@ -108,6 +108,7 @@ int main(int argc, char **argv) /* Library inits. */ memory_init(); + zprivs_preinit(&test_privs); zprivs_init(&test_privs); #define PRIV_STATE() \ |