auth/as: dont pollute parents environment or namespace (thanks jrmu, sl)

This commit is contained in:
cinap_lenrek 2024-10-06 02:03:54 +00:00
parent ddcfc1de22
commit 40177b86bf

View file

@ -71,6 +71,9 @@ main(int argc, char *argv[])
if(argc == 0)
usage();
/* don't pollute the parents environment / namespace */
rfork(RFENVG|RFNAMEG);
if(becomeuser(argv[0]) < 0)
sysfatal("can't change uid for %s: %r", argv[0]);