aboutsummaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorEitan Adler <eadler@FreeBSD.org>2012-10-22 03:07:05 +0000
committerEitan Adler <eadler@FreeBSD.org>2012-10-22 03:07:05 +0000
commit50e04779c499d5c329d1863b71ecd7c2b5824f76 (patch)
tree90ec7fe4bf0dae506d699603babb4917082f098a /libexec
parentc969ca9408ebdda12176a10520a73ea4f7a3c23c (diff)
Notes
Diffstat (limited to 'libexec')
-rw-r--r--libexec/tftpd/tftpd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c
index 7363abf3c0e95..a0010b3c50322 100644
--- a/libexec/tftpd/tftpd.c
+++ b/libexec/tftpd/tftpd.c
@@ -371,7 +371,10 @@ main(int argc, char *argv[])
}
chdir("/");
setgroups(1, &nobody->pw_gid);
- setuid(nobody->pw_uid);
+ if (setuid(nobody->pw_uid) != 0) {
+ tftp_log(LOG_ERR, "setuid failed");
+ exit(1);
+ }
}
len = sizeof(me_sock);