[Pkg-shadow-commits] r591 - trunk/debian/patches
Nicolas FRANCOIS
nekral-guest at costa.debian.org
Tue Oct 11 23:33:36 UTC 2005
Author: nekral-guest
Date: 2005-10-11 23:33:31 +0000 (Tue, 11 Oct 2005)
New Revision: 591
Added:
trunk/debian/patches/453_userdel_-f_removes_group
trunk/debian/patches/454_userdel_no_MAIL_FILE
trunk/debian/patches/455_userdel.8.xml
trunk/debian/patches/456_configure_typo_logdir
Log:
Somes patches that were submitted upstream, but not related to any bug in
the BTS.
Added: trunk/debian/patches/453_userdel_-f_removes_group
===================================================================
--- trunk/debian/patches/453_userdel_-f_removes_group 2005-10-11 22:16:29 UTC (rev 590)
+++ trunk/debian/patches/453_userdel_-f_removes_group 2005-10-11 23:33:31 UTC (rev 591)
@@ -0,0 +1,25 @@
+Goal: make the -f option force the removal of the user's group (even if it
+ is the primary group of another user)
+
+Index: shadow-4.0.13/src/userdel.c
+===================================================================
+--- shadow-4.0.13.orig/src/userdel.c 2005-10-12 00:47:01.000000000 +0200
++++ shadow-4.0.13/src/userdel.c 2005-10-12 01:00:39.000000000 +0200
+@@ -172,6 +172,9 @@
+ if (grp && getdef_bool ("USERGROUPS_ENAB")
+ && (grp->gr_mem[0] == NULL)) {
+
++ pwd = NULL;
++ if (!fflg)
++ {
+ /*
+ * Scan the passwd file to check if this group is still
+ * used as a primary group.
+@@ -189,6 +192,7 @@
+ }
+ }
+ endpwent ();
++ }
+
+ if (pwd == NULL) {
+ /*
Added: trunk/debian/patches/454_userdel_no_MAIL_FILE
===================================================================
--- trunk/debian/patches/454_userdel_no_MAIL_FILE 2005-10-11 22:16:29 UTC (rev 590)
+++ trunk/debian/patches/454_userdel_no_MAIL_FILE 2005-10-11 23:33:31 UTC (rev 591)
@@ -0,0 +1,21 @@
+Goal: do not use MAIL_FILE in userdel:
+ When MAIL_FILE is used, the mail spool is in the home directory, so
+ it do not need to be removed (in addition to the user's home
+ directory)
+
+Note: usermod should be checked also. Maybe MAIL_FILE can be removed from
+ login.defs
+
+Index: shadow-4.0.13/src/userdel.c
+===================================================================
+--- shadow-4.0.13.orig/src/userdel.c 2005-10-12 01:00:39.000000000 +0200
++++ shadow-4.0.13/src/userdel.c 2005-10-12 01:04:42.000000000 +0200
+@@ -554,7 +554,7 @@
+
+ maildir = getdef_str ("MAIL_DIR");
+ #ifdef MAIL_SPOOL_DIR
+- if (!maildir && !getdef_str ("MAIL_FILE"))
++ if (!maildir)
+ maildir = MAIL_SPOOL_DIR;
+ #endif
+ if (!maildir)
Added: trunk/debian/patches/455_userdel.8.xml
===================================================================
--- trunk/debian/patches/455_userdel.8.xml 2005-10-11 22:16:29 UTC (rev 590)
+++ trunk/debian/patches/455_userdel.8.xml 2005-10-11 23:33:31 UTC (rev 591)
@@ -0,0 +1,77 @@
+Goal: Document the -f option
+ Document the group removal behavior.
+
+Index: shadow-4.0.13/man/userdel.8.xml
+===================================================================
+--- shadow-4.0.13.orig/man/userdel.8.xml 2005-09-30 18:16:21.000000000 +0200
++++ shadow-4.0.13/man/userdel.8.xml 2005-10-12 01:16:05.000000000 +0200
+@@ -15,6 +15,7 @@
+ <cmdsynopsis>
+ <command>userdel</command>
+ <arg choice='opt'>-r </arg>
++ <arg choice='opt'>-f </arg>
+ <arg choice='plain'>
+ <replaceable>login_name</replaceable>
+ </arg>
+@@ -47,6 +48,34 @@
+ located in other file systems will have to be searched for and
+ deleted manually.
+ </para>
++ <para>
++ The mail spool is defined by the <emphasis>MAIL_DIR</emphasis>
++ variable in the <filename>login.defs</filename> file.
++ </para>
++ </listitem>
++ </varlistentry>
++ <varlistentry>
++ <term>
++ <option>-f</option>
++ </term>
++ <listitem>
++ <para>
++ This option forces the removal of the user, even if she is
++ still logged in.
++ It also forces <command>userdel</command> to remove the user's
++ home directory or her mail spool, even if another user uses
++ the same home directory or if the mail spool is not owned by
++ the specified user.
++ If <emphasis>USERGROUPS_ENAB</emphasis> is defined to
++ <emphasis remap='I'>yes</emphasis> in
++ <filename>/etc/login.defs</filename> and if a group exists
++ with the same name as the deleted user, then this group will
++ be removed, even if it is still the primary group of another
++ user.
++ </para>
++ <para><emphasis>Note:</emphasis> This option is dangerous and may
++ let your system in an inconsistent state.
++ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+@@ -135,12 +164,21 @@
+
+ <refsect1 id='caveats'>
+ <title>CAVEATS</title>
+- <para>
+- <command>userdel</command> will not allow you to remove an account if
++ <para><command>userdel</command> will not allow you to remove an account if
+ the user is currently logged in. You must kill any running processes
+- which belong to an account that you are deleting. You may not remove
+- any NIS attributes on a NIS client. This must be performed on the NIS
+- server.
++ which belong to an account that you are deleting.
++ </para>
++ <para>You may not remove any NIS attributes on a NIS client. This must
++ be performed on the NIS server.
++ </para>
++ <para>If <emphasis>USERGROUPS_ENAB</emphasis> is defined to <emphasis
++ remap='I'>yes</emphasis> in <filename>/etc/login.defs</filename>,
++ <command>userdel</command> will delete the group with the same name
++ as the user. To avoid inconsistencies in the passwd and group
++ databases, <command>userdel</command> will check that this group is
++ not used as a primary group for another user, and will just warn
++ without deleting the user otherwise. The <option>-f</option> option
++ can force the deletion of this group.
+ </para>
+ </refsect1>
+
Added: trunk/debian/patches/456_configure_typo_logdir
===================================================================
--- trunk/debian/patches/456_configure_typo_logdir 2005-10-11 22:16:29 UTC (rev 590)
+++ trunk/debian/patches/456_configure_typo_logdir 2005-10-11 23:33:31 UTC (rev 591)
@@ -0,0 +1,30 @@
+Goal: Fix a typo in configure.in
+
+Thanks to Mike Frysinger <vapier at gentoo.org>
+
+Index: shadow-4.0.13/configure.in
+===================================================================
+--- shadow-4.0.13.orig/configure.in 2005-10-12 00:47:01.000000000 +0200
++++ shadow-4.0.13/configure.in 2005-10-12 01:20:48.000000000 +0200
+@@ -170,7 +170,7 @@
+
+ AC_CACHE_CHECK([location of faillog/lastlog/wtmp], shadow_cv_logdir,
+ [for shadow_cv_logdir in /var/log /var/adm /usr/adm /etc; do
+- if test -d $logdir; then
++ if test -d $shadow_cv_logdir; then
+ break
+ fi
+ done])
+Index: shadow-4.0.13/configure
+===================================================================
+--- shadow-4.0.13.orig/configure 2005-10-12 00:47:12.000000000 +0200
++++ shadow-4.0.13/configure 2005-10-12 01:22:04.000000000 +0200
+@@ -23060,7 +23060,7 @@
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ for shadow_cv_logdir in /var/log /var/adm /usr/adm /etc; do
+- if test -d $logdir; then
++ if test -d $shadow_cv_logdir; then
+ break
+ fi
+ done
More information about the Pkg-shadow-commits
mailing list