[git commit] inetd: fix for running by non-root

Denys Vlasenko vda.linux at googlemail.com
Thu Nov 9 15:19:42 UTC 2017


commit: https://git.busybox.net/busybox/commit/?id=2fee2bce6f9c67c0836598e340bee8ae2e980212
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 networking/inetd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/networking/inetd.c b/networking/inetd.c
index 67984ac..4dfa008 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -1488,7 +1488,7 @@ int inetd_main(int argc UNUSED_PARAM, char **argv)
 				bb_error_msg("non-root must run services as himself");
 				goto do_exit1;
 			}
-			if (pwd->pw_uid != 0) {
+			if (pwd->pw_uid != real_uid) {
 				if (sep->se_group)
 					pwd->pw_gid = grp->gr_gid;
 				/* initgroups, setgid, setuid: */


More information about the busybox-cvs mailing list