Skip to content

Commit 06b6651

Browse files
aviraxprsuntk
authored andcommitted
Fix su --shell argument handling (tiann#2529)
This fixes tiann#2523.
1 parent 9c0ebb4 commit 06b6651

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

userspace/ksud/src/su.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,11 @@ pub fn root_shell() -> Result<()> {
104104
"preserve-environment",
105105
"preserve the entire environment",
106106
);
107-
opts.optflag(
107+
opts.optopt(
108108
"s",
109109
"shell",
110110
"use SHELL instead of the default /system/bin/sh",
111+
"SHELL",
111112
);
112113
opts.optflag("v", "version", "display version number and exit");
113114
opts.optflag("V", "", "display version code and exit");

0 commit comments

Comments
 (0)