summaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/login.c4
-rw-r--r--loginutils/sulogin.c5
2 files changed, 5 insertions, 4 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index 70e3b13..a18b4d5 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -486,8 +486,8 @@ int login_main(int argc UNUSED_PARAM, char **argv)
// If this stuff is really needed, add it and explain why!
/* Set signals to defaults */
- /*signal(SIGALRM, SIG_DFL); - not needed, we already set it
- * to non-SIG_IGN, and on exec such signals are reset to SIG_DFL */
+ /* Non-ignored signals revert to SIG_DFL on exec anyway */
+ /*signal(SIGALRM, SIG_DFL);*/
/* Is this correct? This way user can ctrl-c out of /etc/profile,
* potentially creating security breach (tested with bash 3.0).
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);
}