errno is not set here
This commit is contained in:
parent
27bc29da7a
commit
8d69d84784
1 changed files with 1 additions and 1 deletions
2
main.c
2
main.c
|
@ -36,7 +36,7 @@ drop_privileges(const char *user, const char *path)
|
||||||
/* is root? */
|
/* is root? */
|
||||||
if (getuid() != 0) {
|
if (getuid() != 0) {
|
||||||
syslog(LOG_DAEMON, "chroot requires program to be run as root");
|
syslog(LOG_DAEMON, "chroot requires program to be run as root");
|
||||||
err(1, "chroot requires root user");
|
errx(1, "chroot requires root user");
|
||||||
}
|
}
|
||||||
/* search user uid from name */
|
/* search user uid from name */
|
||||||
if ((pw = getpwnam(user)) == NULL) {
|
if ((pw = getpwnam(user)) == NULL) {
|
||||||
|
|
Loading…
Reference in a new issue