diff options
Diffstat (limited to 'loginutils/sulogin.c')
-rw-r--r-- | loginutils/sulogin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c index bfd4256..892c434 100644 --- a/loginutils/sulogin.c +++ b/loginutils/sulogin.c @@ -32,11 +32,12 @@ int sulogin_main(int argc UNUSED_PARAM, char **argv) opt_complementary = "t+"; /* -t N */ getopt32(argv, "t:", &timeout); + argv += optind; - if (argv[optind]) { + if (argv[0]) { close(0); close(1); - dup(xopen(argv[optind], O_RDWR)); + dup(xopen(argv[0], O_RDWR)); close(2); dup(0); } |