- newusers man page more informative

- userdel should not need to run semanage
- max group name length set to 32 characters Resolves: #586330 #586408
    #582553
This commit is contained in:
Peter Vrabec 2010-04-28 13:25:49 +00:00
parent 0e194dc14e
commit 9e1e8e7d22
3 changed files with 67 additions and 2 deletions

View file

@ -0,0 +1,32 @@
diff -up shadow-4.1.4.2/man/newusers.8.infoParentDir shadow-4.1.4.2/man/newusers.8
--- shadow-4.1.4.2/man/newusers.8.infoParentDir 2010-04-28 13:44:04.634870854 +0200
+++ shadow-4.1.4.2/man/newusers.8 2010-04-28 13:46:07.190866220 +0200
@@ -88,7 +88,7 @@ This field is copied in the GECOS field
.RS 4
This field is used to define the home directory of the user\&.
.sp
-If this field does not specify an existing directory, the specified directory is created, with ownership set to the user being created or updated and its primary group\&.
+If this field does not specify an existing directory, the specified directory is created, with ownership set to the user being created or updated and its primary group\&.Note that newusers does not create parent directories of the new user's home directory. The newusers command will fail to create the home directory if the parent directories do not exist, and will send a message to stderr informing the user of the failure. The newusers command will not halt or return a failure to the calling shell if it fails to create the home directory, it will continue to process the batch of new users specified\&.
.sp
If the home directory of an existing user is changed,
\fBnewusers\fR
diff -up shadow-4.1.4.2/man/newusers.8.xml.infoParentDir shadow-4.1.4.2/man/newusers.8.xml
--- shadow-4.1.4.2/man/newusers.8.xml.infoParentDir 2010-04-28 13:48:01.419238133 +0200
+++ shadow-4.1.4.2/man/newusers.8.xml 2010-04-28 13:55:40.499663030 +0200
@@ -192,7 +192,15 @@
<para>
If this field does not specify an existing directory, the
specified directory is created, with ownership set to the
- user being created or updated and its primary group.
+ user being created or updated and its primary group. Note
+ that newusers does not create parent directories of the new
+ user's home directory. The newusers command will fail to
+ create the home directory if the parent directories do not
+ exist, and will send a message to stderr informing the user
+ of the failure. The newusers command will not halt or return
+ a failure to the calling shell if it fails to create the home
+ directory, it will continue to process the batch of new users
+ specified.
</para>
<para>
If the home directory of an existing user is changed,

View file

@ -0,0 +1,22 @@
diff -up shadow-4.1.4.2/src/userdel.c.semanage shadow-4.1.4.2/src/userdel.c
--- shadow-4.1.4.2/src/userdel.c.semanage 2010-04-28 14:47:25.581366330 +0200
+++ shadow-4.1.4.2/src/userdel.c 2010-04-28 14:48:08.736376028 +0200
@@ -974,18 +974,6 @@ int main (int argc, char **argv)
}
#endif
-#ifdef WITH_SELINUX
- if (is_selinux_enabled () > 0) {
- const char *args[5];
- args[0] = "/usr/sbin/semanage";
- args[1] = "login";
- args[2] = "-d";
- args[3] = user_name;
- args[4] = NULL;
- safe_system (args[0], args, NULL, 1);
- }
-#endif
-
/*
* Cancel any crontabs or at jobs. Have to do this before we remove
* the entry from /etc/passwd.

View file

@ -1,7 +1,7 @@
Summary: Utilities for managing accounts and shadow password files Summary: Utilities for managing accounts and shadow password files
Name: shadow-utils Name: shadow-utils
Version: 4.1.4.2 Version: 4.1.4.2
Release: 2%{?dist} Release: 3%{?dist}
Epoch: 2 Epoch: 2
URL: http://pkg-shadow.alioth.debian.org/ URL: http://pkg-shadow.alioth.debian.org/
Source0: ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-%{version}.tar.bz2 Source0: ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-%{version}.tar.bz2
@ -11,6 +11,8 @@ Patch0: shadow-4.1.4.2-redhat.patch
Patch1: shadow-4.1.4.1-goodname.patch Patch1: shadow-4.1.4.1-goodname.patch
Patch2: shadow-4.1.4.2-leak.patch Patch2: shadow-4.1.4.2-leak.patch
Patch3: shadow-4.1.4.2-fixes.patch Patch3: shadow-4.1.4.2-fixes.patch
Patch4: shadow-4.1.4.2-infoParentDir.patch
Patch5: shadow-4.1.4.2-semange.patch
License: BSD and GPLv2+ License: BSD and GPLv2+
Group: System Environment/Base Group: System Environment/Base
BuildRequires: libselinux-devel >= 1.25.2-1 BuildRequires: libselinux-devel >= 1.25.2-1
@ -39,6 +41,8 @@ are used for managing group accounts.
%patch1 -p1 -b .goodname %patch1 -p1 -b .goodname
%patch2 -p1 -b .leak %patch2 -p1 -b .leak
%patch3 -p1 -b .fixes %patch3 -p1 -b .fixes
%patch4 -p1 -b .infoParentDir
%patch5 -p1 -b .semange
iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8 iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8
cp -f doc/HOWTO.utf8 doc/HOWTO cp -f doc/HOWTO.utf8 doc/HOWTO
@ -58,7 +62,8 @@ cp -f doc/HOWTO.utf8 doc/HOWTO
--with-selinux \ --with-selinux \
--without-libcrack \ --without-libcrack \
--without-libpam \ --without-libpam \
--disable-shared --disable-shared \
--with-group-name-max-length=32
make make
%install %install
@ -180,6 +185,12 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/vigr.8* %{_mandir}/man8/vigr.8*
%changelog %changelog
* Wed Apr 28 2010 Peter Vrabec <pvrabec@redhat.com> - 2:4.1.4.2-3
- newusers man page more informative
- userdel should not need to run semanage
- max group name length set to 32 characters
Resolves: #586330 #586408 #582553
* Wed Nov 18 2009 Peter Vrabec <pvrabec@redhat.com> - 2:4.1.4.2-2 * Wed Nov 18 2009 Peter Vrabec <pvrabec@redhat.com> - 2:4.1.4.2-2
- apply patches{1,2,3} - apply patches{1,2,3}
- enable SHA512 in /etc/login.defs - enable SHA512 in /etc/login.defs