浏览代码

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>
Denys Vlasenko 3 年之前
父节点
当前提交
9b44deac01
共有 1 个文件被更改,包括 0 次插入3 次删除
  1. 0 3
      networking/ntpd.c

+ 0 - 3
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;