blob: a53bb61bfdba452634921f43754471e78450d23e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
*** parser.c.orig Sat Jun 26 23:04:41 1993
--- parser.c Mon Oct 9 14:20:54 1995
***************
*** 89,94 ****
--- 89,95 ----
char *user;
{
struct passwd *pwd;
+ uid_t nobody;
static char line[LINE_LEN];
static char config[PATHLEN];
***************
*** 107,119 ****
a->next = 0;
cur_ali = aliases = a;
if (!(pwd = getpwnam(user)))
return(ERR_UNK_USER);
if (root) {
(void) setgid (pwd->pw_gid);
if (setuid (pwd->pw_uid) == -1)
! (void) setuid(NOBODY);
}
(void) strcpy (home, pwd->pw_dir);
--- 108,125 ----
a->next = 0;
cur_ali = aliases = a;
+ if (!(pwd = getpwnam("nobody")))
+ exit(67);
+
+ nobody = pwd->pw_uid;
+
if (!(pwd = getpwnam(user)))
return(ERR_UNK_USER);
if (root) {
(void) setgid (pwd->pw_gid);
if (setuid (pwd->pw_uid) == -1)
! (void) setuid(nobody);
}
(void) strcpy (home, pwd->pw_dir);
|