blob: 7b70b0a5fdf97740bfd695b43e04385aa4c9ad5b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
$NetBSD: patch-ae,v 1.3 2003/12/11 17:14:22 adam Exp $
--- privileges.c.orig 2003-12-11 18:07:44.000000000 +0000
+++ privileges.c
@@ -68,7 +68,7 @@ void reclaim_privs(void)
{
if(noPrivileges)
return;
- setgid(egid);
+ setegid(egid);
Setuid(euid);
print_privs("after reclaim privs, both uids should be 0 ");
}
@@ -76,7 +76,7 @@ void reclaim_privs(void)
void drop_privs(void)
{
Setuid(ruid);
- setgid(rgid);
+ setegid(rgid);
print_privs("after drop_privs, real should be 0, effective should not ");
}
|