aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NOFORK_NOEXEC.lst2
-rw-r--r--miscutils/setserial.c7
2 files changed, 5 insertions, 4 deletions
diff --git a/NOFORK_NOEXEC.lst b/NOFORK_NOEXEC.lst
index 3bd82aa60..30690af61 100644
--- a/NOFORK_NOEXEC.lst
+++ b/NOFORK_NOEXEC.lst
@@ -310,7 +310,7 @@ setfont
310setkeycodes 310setkeycodes
311setlogcons 311setlogcons
312setpriv - spawner, changes state, let's play safe and not be noexec 312setpriv - spawner, changes state, let's play safe and not be noexec
313setserial 313setserial - noexec
314setsid - spawner, uses fork_or_rexec() [not audited to work in noexec], let's play safe and not be noexec 314setsid - spawner, uses fork_or_rexec() [not audited to work in noexec], let's play safe and not be noexec
315setuidgid - noexec. spawner 315setuidgid - noexec. spawner
316sha1sum - noexec. runner 316sha1sum - noexec. runner
diff --git a/miscutils/setserial.c b/miscutils/setserial.c
index a4d59f898..2000de7b1 100644
--- a/miscutils/setserial.c
+++ b/miscutils/setserial.c
@@ -15,7 +15,7 @@
15//config: help 15//config: help
16//config: Retrieve or set Linux serial port. 16//config: Retrieve or set Linux serial port.
17 17
18//applet:IF_SETSERIAL(APPLET(setserial, BB_DIR_BIN, BB_SUID_DROP)) 18//applet:IF_SETSERIAL(APPLET_NOEXEC(setserial, setserial, BB_DIR_BIN, BB_SUID_DROP, setserial))
19 19
20//kbuild:lib-$(CONFIG_SETSERIAL) += setserial.o 20//kbuild:lib-$(CONFIG_SETSERIAL) += setserial.o
21 21
@@ -746,14 +746,15 @@ int setserial_main(int argc UNUSED_PARAM, char **argv)
746 opts = getopt32(argv, "bGavzgq"); 746 opts = getopt32(argv, "bGavzgq");
747 argv += optind; 747 argv += optind;
748 748
749 if (!argv[1]) /* one arg only? */ 749 if (!argv[1]) /* one arg only? (nothing to change?) */
750 opts |= OPT_LIST_OF_DEVS; 750 opts |= OPT_LIST_OF_DEVS; /* force display */
751 751
752 if (!(opts & OPT_LIST_OF_DEVS)) { 752 if (!(opts & OPT_LIST_OF_DEVS)) {
753 serial_set(argv, opts); 753 serial_set(argv, opts);
754 argv[1] = NULL; 754 argv[1] = NULL;
755 } 755 }
756 756
757 /* -v effect: "after setting params, do not be silent, show them" */
757 if (opts & (OPT_VERBOSE | OPT_LIST_OF_DEVS)) { 758 if (opts & (OPT_VERBOSE | OPT_LIST_OF_DEVS)) {
758 do { 759 do {
759 serial_get(*argv, opts & OPT_MODE_MASK); 760 serial_get(*argv, opts & OPT_MODE_MASK);