Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107433693
D47828.id147125.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
550 B
Referenced Files
None
Subscribers
None
D47828.id147125.diff
View Options
Index: libexec/comsat/comsat.c
===================================================================
--- libexec/comsat/comsat.c
+++ libexec/comsat/comsat.c
@@ -213,9 +213,10 @@
unsigned char line[BUFSIZ];
/* Set effective uid to user in case mail drop is on nfs */
- if ((p = getpwnam(user)) == NULL)
- return;
- if (setuid(p->pw_uid) != 0)
+ 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)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 15, 2:38 AM (7 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15804817
Default Alt Text
D47828.id147125.diff (550 B)
Attached To
Mode
D47828: comsat: Use initgroups and setgid not just setuid
Attached
Detach File
Event Timeline
Log In to Comment