diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-15 23:22:47 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2020-12-15 23:23:44 +0100 |
commit | 9b44deac01d61929a734a3ee4f739e95b024bfec (patch) | |
tree | b6c09f27c498aa3b9f0ee0c9b5e1f8750d90e4b2 | |
parent | 73d93d9f83180a6149f363aaca131e281d2a52ff (diff) | |
download | busybox-w32-9b44deac01d61929a734a3ee4f739e95b024bfec.tar.gz busybox-w32-9b44deac01d61929a734a3ee4f739e95b024bfec.tar.bz2 busybox-w32-9b44deac01d61929a734a3ee4f739e95b024bfec.zip |
ntpd: allow non-root to run it (e.g. with -w option)
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@googlemail.com>
-rw-r--r-- | networking/ntpd.c | 3 |
1 files changed, 0 insertions, 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) | |||
2462 | 2462 | ||
2463 | srand(getpid()); | 2463 | srand(getpid()); |
2464 | 2464 | ||
2465 | if (getuid()) | ||
2466 | bb_simple_error_msg_and_die(bb_msg_you_must_be_root); | ||
2467 | |||
2468 | /* Set some globals */ | 2465 | /* Set some globals */ |
2469 | G.discipline_jitter = G_precision_sec; | 2466 | G.discipline_jitter = G_precision_sec; |
2470 | G.stratum = MAXSTRAT; | 2467 | G.stratum = MAXSTRAT; |