480_getopt_args_reorder was applied upstream.

This commit is contained in:
nekral-guest
2008-03-19 18:47:33 +00:00
parent 86aaea0978
commit 7857beaf95
3 changed files with 1 additions and 55 deletions

1
debian/changelog vendored
View File

@@ -12,6 +12,7 @@ shadow (1:4.1.1~rc1-1) UNRELEASED; urgency=low
+ debian/patches/462_warn_to_edit_shadow
+ debian/patches/467_useradd_-r_LSB
+ debian/patches/466_fflush-prompt
+ debian/patches/480_getopt_args_reorder
* debian/watch: Add a watch file for shadow.
-- Nicolas FRANCOIS (Nekral) <nicolas.francois@centraliens.net> Sun, 24 Feb 2008 18:33:31 +0100

View File

@@ -1,54 +0,0 @@
Goal: Allow SU options to be passed after - or the username
Fixes: #331438 or #346445 in popularity-contest
Note: The man page is clear about su usage:
su [options] [-] [username [args]]
but too many package are using this feature
GNU su should also allow that.
The only drawback I can see is (for upstream) that "su -x" (which should
start a shell in debug mode) won't work (su -- -x) will have to be used
instead.
This was a problem when -c was not an su option, but it is no more the
case (a -- would have to be added for all the su -c "command"
invocations).
Index: shadow-4.1.0/src/su.c
===================================================================
--- shadow-4.1.0.orig/src/su.c
+++ shadow-4.1.0/src/su.c
@@ -379,19 +379,9 @@
};
while ((c =
- getopt_long (argc, argv, "-c:hlmps:", long_options,
+ getopt_long (argc, argv, "c:hlmps:", long_options,
&option_index)) != -1) {
switch (c) {
- case 1:
- /* this is not an su option */
- /* The next arguments are either '-', the
- * target name, or arguments to be passed
- * to the shell.
- */
- /* rewind the (not yet handled) option */
- optind--;
- goto end_su_options;
- break; /* NOT REACHED */
case 'c':
command = optarg;
break;
@@ -413,10 +403,9 @@
shellstr = optarg;
break;
default:
- usage (); /* NOT REACHED */
+ usage ();
}
}
- end_su_options:
if (optind < argc && !strcmp (argv[optind], "-")) {
fakelogin = 1;
optind++;

View File

@@ -18,7 +18,6 @@
523_su_arguments_are_concatenated
523_su_arguments_are_no_more_concatenated_by_default
579_chowntty_debug
480_getopt_args_reorder
483_su_fakelogin_wrong_arg0
491_configure.in_friendly_selinux_detection
592_manpages_typos