Page MenuHomeFreeBSD

D47869.id147368.diff
No OneTemporary

D47869.id147368.diff

Index: libexec/comsat/comsat.c
===================================================================
--- libexec/comsat/comsat.c
+++ libexec/comsat/comsat.c
@@ -171,6 +171,14 @@
}
(void)tcgetattr(fileno(tp), &tio);
cr = ((tio.c_oflag & (OPOST|ONLCR)) == (OPOST|ONLCR)) ? "\n" : "\n\r";
+
+ /* * Set uid/gid/groups to user's in case mail drop is on nfs */
+ if ((p = getpwnam(user)) == NULL ||
+ initgroups(p->pw_name, p->pw_gid) == -1 ||
+ setgid(p->pw_gid) == -1 ||
+ setuid(p->pw_uid) == -1)
+ return;
+
switch (stb.st_mode & (S_IXUSR | S_IXGRP)) {
case S_IXUSR:
case (S_IXUSR | S_IXGRP):
@@ -211,13 +219,6 @@
struct passwd *p;
unsigned char line[BUFSIZ];
- /* Set uid/gid/groups to user's in case mail drop is on nfs */
- if ((p = getpwnam(user)) == NULL ||
- initgroups(p->pw_name, p->pw_gid) == -1 ||
- setgid(p->pw_gid) == -1 ||
- setuid(p->pw_uid) == -1)
- return;
-
if ((fi = fopen(file, "r")) == NULL)
return;

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 7, 11:49 PM (14 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31056533
Default Alt Text
D47869.id147368.diff (969 B)

Event Timeline