errno is not set here

This commit is contained in:
Florian Obser 2020-12-04 19:31:42 +01:00
parent 27bc29da7a
commit 8d69d84784
1 changed files with 1 additions and 1 deletions

2
main.c
View File

@ -36,7 +36,7 @@ drop_privileges(const char *user, const char *path)
/* is root? */
if (getuid() != 0) {
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 */
if ((pw = getpwnam(user)) == NULL) {