Page MenuHomeFreeBSD

D51149.diff
No OneTemporary

D51149.diff

diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c
--- a/libexec/tftpd/tftpd.c
+++ b/libexec/tftpd/tftpd.c
@@ -351,10 +351,14 @@
tftp_log(LOG_ERR, "chdir: %s", strerror(errno));
exit(1);
}
- if (setgroups(1, &nobody->pw_gid) != 0) {
+ if (setgroups(0, NULL) != 0) {
tftp_log(LOG_ERR, "setgroups failed");
exit(1);
}
+ if (setgid(nobody->pw_gid) != 0) {
+ tftp_log(LOG_ERR, "setgid failed");
+ exit(1);
+ }
if (setuid(nobody->pw_uid) != 0) {
tftp_log(LOG_ERR, "setuid failed");
exit(1);

File Metadata

Mime Type
text/plain
Expires
Fri, Jun 5, 12:14 AM (12 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33735162
Default Alt Text
D51149.diff (536 B)

Event Timeline