diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2016-12-06 11:35:00 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2016-12-06 11:35:00 +0100 |
commit | 6d77df88eaeaf655fe420153b0a77d931bdefa31 (patch) | |
tree | b0aae956a2e81afd903bb1ab3858121bf8e14583 /sys-apps/shadow | |
parent | kde-base/klipper -> kde-plasma/klipper (diff) | |
download | gentoo-6d77df88eaeaf655fe420153b0a77d931bdefa31.tar.gz gentoo-6d77df88eaeaf655fe420153b0a77d931bdefa31.tar.bz2 gentoo-6d77df88eaeaf655fe420153b0a77d931bdefa31.zip |
sys-apps/shadow: Fixed loading of defaults (bug #601802).
Package-Manager: portage-2.3.3
Diffstat (limited to 'sys-apps/shadow')
-rw-r--r-- | sys-apps/shadow/files/shadow-4.4-load_defaults.patch | 37 | ||||
-rw-r--r-- | sys-apps/shadow/shadow-4.4-r1.ebuild (renamed from sys-apps/shadow/shadow-4.4.ebuild) | 2 |
2 files changed, 39 insertions, 0 deletions
diff --git a/sys-apps/shadow/files/shadow-4.4-load_defaults.patch b/sys-apps/shadow/files/shadow-4.4-load_defaults.patch new file mode 100644 index 000000000000..4c0b84f68036 --- /dev/null +++ b/sys-apps/shadow/files/shadow-4.4-load_defaults.patch @@ -0,0 +1,37 @@ +From 507f96cdeb54079fb636c7ce21e371f7a16a520e Mon Sep 17 00:00:00 2001 +From: Tomas Mraz <tmraz@fedoraproject.org> +Date: Thu, 25 Aug 2016 11:20:34 +0200 +Subject: [PATCH] Fix regression in useradd not loading defaults properly. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The get_defaults() has to be called before processing the flags. + +Signed-off-by: Tomáš Mráz <tmraz@fedoraproject.org> +--- + src/useradd.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/useradd.c b/src/useradd.c +index fefa234..6c43e7e 100644 +--- a/src/useradd.c ++++ b/src/useradd.c +@@ -2027,6 +2027,8 @@ int main (int argc, char **argv) + is_shadow_grp = sgr_file_present (); + #endif + ++ get_defaults (); ++ + process_flags (argc, argv); + + #ifdef ENABLE_SUBIDS +@@ -2036,8 +2038,6 @@ int main (int argc, char **argv) + (!user_id || (user_id <= uid_max && user_id >= uid_min)); + #endif /* ENABLE_SUBIDS */ + +- get_defaults (); +- + #ifdef ACCT_TOOLS_SETUID + #ifdef USE_PAM + { diff --git a/sys-apps/shadow/shadow-4.4.ebuild b/sys-apps/shadow/shadow-4.4-r1.ebuild index 900c60b7ecd9..4c302d8ed8e7 100644 --- a/sys-apps/shadow/shadow-4.4.ebuild +++ b/sys-apps/shadow/shadow-4.4-r1.ebuild @@ -1,5 +1,6 @@ # Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 +# $Id$ EAPI="5" @@ -38,6 +39,7 @@ PATCHES=( "${FILESDIR}"/${PN}-4.1.3-dots-in-usernames.patch "${FILESDIR}"/${P}-su-snprintf.patch "${FILESDIR}"/${P}-prototypes.patch + "${FILESDIR}"/${P}-load_defaults.patch ) src_prepare() { |