forked from pool/shadow
- Add some fixes from Fedora:
- shadow-4.1.5.1-backup-mode.patch: open backup file with correct permissions. - shadow-4.1.5.1-logmsg.patch: fix error message - shadow-4.1.5.1-errmsg.patch: print error reason - shadow-4.1.5.1-manfix.patch: fix manual page OBS-URL: https://build.opensuse.org/package/show/Base:System/shadow?expand=0&rev=9
This commit is contained in:
parent
ca9b3f1aab
commit
214efedae2
20
shadow-4.1.5.1-backup-mode.patch
Normal file
20
shadow-4.1.5.1-backup-mode.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
diff -up shadow-4.1.5.1/lib/commonio.c.backup-mode shadow-4.1.5.1/lib/commonio.c
|
||||||
|
--- shadow-4.1.5.1/lib/commonio.c.backup-mode 2012-05-18 21:44:54.000000000 +0200
|
||||||
|
+++ shadow-4.1.5.1/lib/commonio.c 2012-09-19 20:27:16.089444234 +0200
|
||||||
|
@@ -301,15 +301,12 @@ static int create_backup (const char *ba
|
||||||
|
struct utimbuf ub;
|
||||||
|
FILE *bkfp;
|
||||||
|
int c;
|
||||||
|
- mode_t mask;
|
||||||
|
|
||||||
|
if (fstat (fileno (fp), &sb) != 0) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- mask = umask (077);
|
||||||
|
- bkfp = fopen (backup, "w");
|
||||||
|
- (void) umask (mask);
|
||||||
|
+ bkfp = fopen_set_perms (backup, "w", &sb);
|
||||||
|
if (NULL == bkfp) {
|
||||||
|
return -1;
|
||||||
|
}
|
22
shadow-4.1.5.1-errmsg.patch
Normal file
22
shadow-4.1.5.1-errmsg.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- src/useradd.c
|
||||||
|
+++ src/useradd.c 2013/09/17 12:30:31
|
||||||
|
@@ -1759,6 +1759,9 @@
|
||||||
|
if (access (user_home, F_OK) != 0) {
|
||||||
|
#ifdef WITH_SELINUX
|
||||||
|
if (set_selinux_file_context (user_home) != 0) {
|
||||||
|
+ fprintf (stderr,
|
||||||
|
+ _("%s: cannot set SELinux context for home directory %s\n"),
|
||||||
|
+ Prog, user_home);
|
||||||
|
fail_exit (E_HOMEDIR);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@@ -1788,6 +1791,9 @@
|
||||||
|
#ifdef WITH_SELINUX
|
||||||
|
/* Reset SELinux to create files with default contexts */
|
||||||
|
if (reset_selinux_file_context () != 0) {
|
||||||
|
+ fprintf (stderr,
|
||||||
|
+ _("%s: cannot reset SELinux file creation context\n"),
|
||||||
|
+ Prog);
|
||||||
|
fail_exit (E_HOMEDIR);
|
||||||
|
}
|
||||||
|
#endif
|
12
shadow-4.1.5.1-logmsg.patch
Normal file
12
shadow-4.1.5.1-logmsg.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up shadow-4.1.5.1/src/useradd.c.logmsg shadow-4.1.5.1/src/useradd.c
|
||||||
|
--- shadow-4.1.5.1/src/useradd.c.logmsg 2013-02-20 15:41:44.000000000 +0100
|
||||||
|
+++ shadow-4.1.5.1/src/useradd.c 2013-03-19 18:40:04.908292810 +0100
|
||||||
|
@@ -275,7 +275,7 @@ static void fail_exit (int code)
|
||||||
|
user_name, AUDIT_NO_ID,
|
||||||
|
SHADOW_AUDIT_FAILURE);
|
||||||
|
#endif
|
||||||
|
- SYSLOG ((LOG_INFO, "failed adding user '%s', data deleted", user_name));
|
||||||
|
+ SYSLOG ((LOG_INFO, "failed adding user '%s', exit code: %d", user_name, code));
|
||||||
|
exit (code);
|
||||||
|
}
|
||||||
|
|
21
shadow-4.1.5.1-manfix.patch
Normal file
21
shadow-4.1.5.1-manfix.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
diff -up shadow-4.1.5.1/man/useradd.8.xml.manfix shadow-4.1.5.1/man/useradd.8.xml
|
||||||
|
--- shadow-4.1.5.1/man/useradd.8.xml.manfix 2013-06-14 15:25:44.000000000 +0200
|
||||||
|
+++ shadow-4.1.5.1/man/useradd.8.xml 2013-07-19 07:33:53.768619759 +0200
|
||||||
|
@@ -161,7 +161,7 @@
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
- <option>-d</option>, <option>--home</option>
|
||||||
|
+ <option>-d</option>, <option>--home-dir</option>
|
||||||
|
<replaceable>HOME_DIR</replaceable>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
@@ -362,7 +362,7 @@
|
||||||
|
</varlistentry>
|
||||||
|
<varlistentry>
|
||||||
|
<term>
|
||||||
|
- <option>-M</option>
|
||||||
|
+ <option>-M</option>, <option>--no-create-home</option>
|
||||||
|
</term>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
@ -1,3 +1,13 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Sep 17 14:56:44 CEST 2013 - kukuk@suse.de
|
||||||
|
|
||||||
|
- Add some fixes from Fedora:
|
||||||
|
- shadow-4.1.5.1-backup-mode.patch: open backup file with correct
|
||||||
|
permissions.
|
||||||
|
- shadow-4.1.5.1-logmsg.patch: fix error message
|
||||||
|
- shadow-4.1.5.1-errmsg.patch: print error reason
|
||||||
|
- shadow-4.1.5.1-manfix.patch: fix manual page
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Feb 5 13:19:46 CET 2013 - kukuk@suse.de
|
Tue Feb 5 13:19:46 CET 2013 - kukuk@suse.de
|
||||||
|
|
||||||
|
@ -35,6 +35,10 @@ Patch2: useradd-script.diff
|
|||||||
Patch3: chkname-regex.diff
|
Patch3: chkname-regex.diff
|
||||||
Patch4: useradd-default.diff
|
Patch4: useradd-default.diff
|
||||||
Patch5: getdef-new-defs.diff
|
Patch5: getdef-new-defs.diff
|
||||||
|
Patch6: shadow-4.1.5.1-manfix.patch
|
||||||
|
Patch7: shadow-4.1.5.1-logmsg.patch
|
||||||
|
Patch8: shadow-4.1.5.1-errmsg.patch
|
||||||
|
Patch9: shadow-4.1.5.1-backup-mode.patch
|
||||||
BuildRequires: audit-devel
|
BuildRequires: audit-devel
|
||||||
BuildRequires: libacl-devel
|
BuildRequires: libacl-devel
|
||||||
BuildRequires: libattr-devel
|
BuildRequires: libattr-devel
|
||||||
@ -59,6 +63,10 @@ group accounts.
|
|||||||
%patch3 -p0
|
%patch3 -p0
|
||||||
%patch4 -p0
|
%patch4 -p0
|
||||||
%patch5 -p0
|
%patch5 -p0
|
||||||
|
%patch6 -p1
|
||||||
|
%patch7 -p1
|
||||||
|
%patch8 -p0
|
||||||
|
%patch9 -p1
|
||||||
|
|
||||||
iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8
|
iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8
|
||||||
mv -v doc/HOWTO.utf8 doc/HOWTO
|
mv -v doc/HOWTO.utf8 doc/HOWTO
|
||||||
|
Loading…
Reference in New Issue
Block a user