su: Default to root if no username is provided
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
919c9dd3cf
commit
b8ca749a6c
@ -62,8 +62,8 @@ Result<int> luna_main(int argc, char** argv)
|
||||
}
|
||||
|
||||
os::ArgumentParser parser;
|
||||
parser.add_description("Switch to a different user."_sv);
|
||||
parser.add_positional_argument(name, "name"_sv, true);
|
||||
parser.add_description("Switch to a different user (by default, root)."_sv);
|
||||
parser.add_positional_argument(name, "name"_sv, "root"_sv);
|
||||
parser.parse(argc, argv);
|
||||
|
||||
struct passwd* entry = getpwnam(name.chars());
|
||||
|
Loading…
Reference in New Issue
Block a user