← Commit list

97b738d35

Denys Vlasenko
Denys Vlasenko
2017-08-06
SUCCESS Duration: 143s

Subject

setserial: make it NOEXEC

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

NOFORK_NOEXEC.lst+1 -1
@@ -310,7 +310,7 @@ setfont
setkeycodes
setlogcons
setpriv - spawner, changes state, let's play safe and not be noexec
-setserial
+setserial - noexec
setsid - spawner, uses fork_or_rexec() [not audited to work in noexec], let's play safe and not be noexec
setuidgid - noexec. spawner
sha1sum - noexec. runner
miscutils/setserial.c+4 -3
@@ -15,7 +15,7 @@
//config: help
//config: Retrieve or set Linux serial port.
-//applet:IF_SETSERIAL(APPLET(setserial, BB_DIR_BIN, BB_SUID_DROP))
+//applet:IF_SETSERIAL(APPLET_NOEXEC(setserial, setserial, BB_DIR_BIN, BB_SUID_DROP, setserial))
//kbuild:lib-$(CONFIG_SETSERIAL) += setserial.o
@@ -746,14 +746,15 @@ int setserial_main(int argc UNUSED_PARAM, char **argv)
opts = getopt32(argv, "bGavzgq");
argv += optind;
- if (!argv[1]) /* one arg only? */
- opts |= OPT_LIST_OF_DEVS;
+ if (!argv[1]) /* one arg only? (nothing to change?) */
+ opts |= OPT_LIST_OF_DEVS; /* force display */
if (!(opts & OPT_LIST_OF_DEVS)) {
serial_set(argv, opts);
argv[1] = NULL;
}
+ /* -v effect: "after setting params, do not be silent, show them" */
if (opts & (OPT_VERBOSE | OPT_LIST_OF_DEVS)) {
do {
serial_get(*argv, opts & OPT_MODE_MASK);