Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156440879
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
Thu, May 14, 5:30 PM (16 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33050115
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