[git commit] ntpd: allow non-root to run it (e.g. with -w option)
Denys Vlasenko
vda.linux at googlemail.com
Tue Dec 15 22:23:44 UTC 2020
commit: https://git.busybox.net/busybox/commit/?id=9b44deac01d61929a734a3ee4f739e95b024bfec
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
This is safe: it's not a setuid applet, the attempt to set time
will simply fail if attempted by non-root
>From openwrt 600-allow-ntpd-non-root.patch
function old new delta
ntp_init 1049 1005 -44
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
networking/ntpd.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/networking/ntpd.c b/networking/ntpd.c
index 44e711232..032dc51ac 100644
--- a/networking/ntpd.c
+++ b/networking/ntpd.c
@@ -2462,9 +2462,6 @@ static NOINLINE void ntp_init(char **argv)
srand(getpid());
- if (getuid())
- bb_simple_error_msg_and_die(bb_msg_you_must_be_root);
-
/* Set some globals */
G.discipline_jitter = G_precision_sec;
G.stratum = MAXSTRAT;
More information about the busybox-cvs
mailing list