Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Dropping privileges: improve error message
Baptiste Daroussin committed 4 years ago
commit ac82ad8481dcbedc83b80899b8486b29bbccee51
parent b45e7ae
1 file changed +1 -1
modified src/utils.c
@@ -1031,7 +1031,7 @@ drop_privileges(void)
	if (geteuid() == 0) {
		nobody = getpwnam("nobody");
		if (nobody == NULL)
-
			err(EXIT_FAILURE, "Unable to drop privileges");
+
			errx(EXIT_FAILURE, "Unable to drop privileges: no 'nobody' user");
		setgroups(1, &nobody->pw_gid);
		/* setgid also sets egid and setuid also sets euid */
		if (setgid(nobody->pw_gid) == -1)