Import Debian patch 434_login_stop_checking_args_after--

* NEWS, src/login.c (check_flags): Stop checking the arguments
	after --. The later options will be sent to the shell, and do not
	need to be checked.
This commit is contained in:
nekral-guest 2008-05-18 14:54:35 +00:00
parent 6a17c2b27f
commit fb4271bdf9
3 changed files with 13 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2008-05-18 Nicolas François <nicolas.francois@centraliens.net>
Import Debian patch 434_login_stop_checking_args_after--
* NEWS, src/login.c (check_flags): Stop checking the arguments
after --. The later options will be sent to the shell, and do not
need to be checked.
2008-05-18 Nicolas François <nicolas.francois@centraliens.net> 2008-05-18 Nicolas François <nicolas.francois@centraliens.net>
* src/vipw.c, src/su.c, src/newgrp.c: Harmonize the children's * src/vipw.c, src/su.c, src/newgrp.c: Harmonize the children's

3
NEWS
View File

@ -12,6 +12,9 @@ shadow-4.1.1 -> shadow-4.1.2 UNRELEASED
- chfn - chfn
* Allow non-US-ASCII characters in the GECOS fields ("name", "room * Allow non-US-ASCII characters in the GECOS fields ("name", "room
number", and "other info" fields). number", and "other info" fields).
- login
* Do not fail if a shell option, specified after --, has more than 2
letters.
- su - su
* If the SULOG_FILE does not exist when an su session is logged, make * If the SULOG_FILE does not exist when an su session is logged, make
sure the file is created with group root, instead of using the group sure the file is created with group root, instead of using the group

View File

@ -251,6 +251,9 @@ static void check_flags (int argc, char *const *argv)
for (arg = 1; arg < argc; arg++) { for (arg = 1; arg < argc; arg++) {
if (argv[arg][0] == '-' && strlen (argv[arg]) > 2) if (argv[arg][0] == '-' && strlen (argv[arg]) > 2)
usage (); usage ();
if (strcmp(argv[arg], "--") == 0) {
break; /* stop checking on a "--" */
}
} }
} }