3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/networking/ppp/nonpriv.patch
Yury G. Kudryashov 3ca6582874 ppp-2.4.5, a few patches
svn path=/nixpkgs/trunk/; revision=31279
2012-01-04 15:10:27 +00:00

14 lines
369 B
Diff

diff --git a/pppd/main.c b/pppd/main.c
index 014d614..6661d33 100644
--- a/pppd/main.c
+++ b/pppd/main.c
@@ -334,7 +334,7 @@ main(argc, argv)
umask(umask(0777) | 022);
uid = getuid();
- privileged = uid == 0;
+ privileged = (uid == 0) || (geteuid() != 0);
slprintf(numbuf, sizeof(numbuf), "%d", uid);
script_setenv("ORIG_UID", numbuf, 0);