Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151226792
D47869.id147368.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
969 B
Referenced Files
None
Subscribers
None
D47869.id147368.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D47869: comsat: move uid/gid setting earlier
Attached
Detach File
Event Timeline
Log In to Comment