mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00
su: Refuse to run if stdin is not a TTY
This commit is contained in:
parent
46cd9157cd
commit
6e592fb5c3
Notes:
sideshowbarker
2024-07-19 01:30:46 +09:00
Author: https://github.com/awesomekling
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