summaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorDenys Vlasenko2017-08-06 20:00:21 +0200
committerDenys Vlasenko2017-08-06 20:00:21 +0200
commited7d118dd0cfda7be21dafae5eb34b0d419f62ec (patch)
tree6a4fd35b659132b16f4c2823eb660b1b9d3954de /miscutils
parentc8e29317e97ee595a66314275c163a5ce55fcca9 (diff)
downloadbusybox-ed7d118dd0cfda7be21dafae5eb34b0d419f62ec.zip
busybox-ed7d118dd0cfda7be21dafae5eb34b0d419f62ec.tar.gz
adjtimex: make it NOFORK
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/adjtimex.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/miscutils/adjtimex.c b/miscutils/adjtimex.c
index a39c4f5..ce6f8cc 100644
--- a/miscutils/adjtimex.c
+++ b/miscutils/adjtimex.c
@@ -18,7 +18,7 @@
//config: Adjtimex reads and optionally sets adjustment parameters for
//config: the Linux clock adjustment algorithm.
-//applet:IF_ADJTIMEX(APPLET(adjtimex, BB_DIR_SBIN, BB_SUID_DROP))
+//applet:IF_ADJTIMEX(APPLET_NOFORK(adjtimex, adjtimex, BB_DIR_SBIN, BB_SUID_DROP, adjtimex))
//kbuild:lib-$(CONFIG_ADJTIMEX) += adjtimex.o
@@ -116,6 +116,11 @@ int adjtimex_main(int argc UNUSED_PARAM, char **argv)
txc.modes |= ADJ_TICK;
}
+ /* It's NOFORK applet because the code is very simple:
+ * just some printf. No opens, no allocs.
+ * If you need to make it more complex, feel free to downgrade to NOEXEC
+ */
+
ret = adjtimex(&txc);
if (ret < 0)
bb_perror_nomsg_and_die();