mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 23:38:12 +00:00
su: Refuse to run if stdin is not a TTY
This commit is contained in:
parent
46cd9157cd
commit
6e592fb5c3
1 changed files with 5 additions and 0 deletions
|
@ -36,6 +36,11 @@ extern "C" int main(int, char**);
|
|||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (!isatty(STDIN_FILENO)) {
|
||||
warnln("{}: standard in is not a terminal", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
const char* user = nullptr;
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue