aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-07-17 15:53:34 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-07-17 12:36:10 +0100
commitb73e5cd51551556f9e6a4f7d9e7deec4d9d661bd (patch)
tree3f43b47901efd94ca5ebbcd25897d7b59f6ef57f /meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
parent4fb8d2e4fda6e90d38766bf333b9fb6b3cb95561 (diff)
downloadopenembedded-core-contrib-b73e5cd51551556f9e6a4f7d9e7deec4d9d661bd.tar.gz
shadow: upgrade from 4.1.4.3 to 4.2.1
Upgrade shadow from 4.1.4.3 to 4.2.1. Changes during this upgrade are as following. 1. Remove the "merged" patches. These patches are either merged or the same functionality has been implemented upstream. add_root_cmd_groupmems.patch add_root_cmd_options.patch fix-etc-gshadow-reading.patch shadow-4.1.4.2-env-reset-keep-locale.patch shadow-4.1.4.2-groupmod-pam-check.patch shadow-4.1.4.2-su_no_sanitize_env.patch shadow.automake-1.11.patch shadow_fix_for_automake-1.12.patch useradd.patch 2. Remove the unneeded patch. The following patch has been removed because the logic in the related codes of the new version has been changed. In specific, the codes now can handle the 'NULL' return value. So there's no need for the following patch. slackware_fix_for_glib-2.17_crypt.patch 3. Teak the current patch to match the new version. allow-for-setting-password-in-clear-text.patch 4. Add a patch to fix compilation failure. usermod-fix-compilation-failure-with-subids-disabled.patch 5. Add a patch to fix the installation failure. fix-installation-failure-with-subids-disabled.patch 5. Add a patch to fix the failure at rootfs time if extrausers is inherited. commonio.c-fix-unexpected-open-failure-in-chroot-env.patch 6. Fix the bad section in the recipe. 7. Disable the new subids feature in the new version as it doesn't support cross compilation for now. 8. Modify the pkg_postinst to `exit 1' if the `pwconv' or `grpconv' fails. Also, fix the arguments to use '--root $D' instead of '--root=$D'. 9. Add a patch for shadow-native to create parent directories when necessary. 0001-useradd.c-create-parent-directories-when-necessary.patch Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch')
-rw-r--r--meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch215
1 files changed, 104 insertions, 111 deletions
diff --git a/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
index eafb935a3a..68da25f406 100644
--- a/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
+++ b/meta/recipes-extended/shadow/files/allow-for-setting-password-in-clear-text.patch
@@ -3,20 +3,19 @@ Upstream-Status: Inappropriate [OE specific]
Allow for setting password in clear text.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-
---
src/Makefile.am | 8 ++++----
src/groupadd.c | 8 +++++++-
- src/groupmod.c | 9 ++++++++-
+ src/groupmod.c | 8 +++++++-
src/useradd.c | 9 +++++++--
- src/usermod.c | 10 ++++++++--
- 5 files changed, 34 insertions(+), 10 deletions(-)
+ src/usermod.c | 8 +++++++-
+ 5 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
-index 6a3b4c5..1ffdbc6 100644
+index 25e288d..856b087 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -76,10 +76,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT)
+@@ -88,10 +88,10 @@ chgpasswd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBSELINUX) $(LIBCRYPT)
chsh_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
chpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT)
gpasswd_LDADD = $(LDADD) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
@@ -29,47 +28,46 @@ index 6a3b4c5..1ffdbc6 100644
grpck_LDADD = $(LDADD) $(LIBSELINUX)
grpconv_LDADD = $(LDADD) $(LIBSELINUX)
grpunconv_LDADD = $(LDADD) $(LIBSELINUX)
-@@ -99,9 +99,9 @@ su_SOURCES = \
+@@ -111,9 +111,9 @@ su_SOURCES = \
suauth.c
su_LDADD = $(LDADD) $(LIBPAM) $(LIBCRYPT_NOPAM) $(LIBSKEY) $(LIBMD)
sulogin_LDADD = $(LDADD) $(LIBCRYPT)
--useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
-+useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
- userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
--usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX)
-+usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBCRYPT)
+-useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR)
++useradd_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT)
+ userdel_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE)
+-usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR)
++usermod_LDADD = $(LDADD) $(LIBPAM_SUID) $(LIBAUDIT) $(LIBSELINUX) $(LIBSEMANAGE) $(LIBACL) $(LIBATTR) $(LIBCRYPT)
vipw_LDADD = $(LDADD) $(LIBSELINUX)
install-am: all-am
diff --git a/src/groupadd.c b/src/groupadd.c
-index 66b38de..3157486 100644
+index f716f57..4e28c26 100644
--- a/src/groupadd.c
+++ b/src/groupadd.c
-@@ -124,6 +124,7 @@ static void usage (void)
+@@ -124,6 +124,7 @@ static /*@noreturn@*/void usage (int status)
(void) fputs (_(" -o, --non-unique allow to create groups with duplicate\n"
- " (non-unique) GID\n"), stderr);
- (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), stderr);
-+ (void) fputs (_(" -P, --clear-password PASSWORD use this clear text password for the new group\n"), stderr);
- (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs (_(" -r, --system create a system account\n"), stderr);
- (void) fputs ("\n", stderr);
-@@ -388,13 +389,14 @@ static void process_flags (int argc, char **argv)
- {"key", required_argument, NULL, 'K'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
+ " (non-unique) GID\n"), usageout);
+ (void) fputs (_(" -p, --password PASSWORD use this encrypted password for the new group\n"), usageout);
++ (void) fputs (_(" -P, --clear-password PASSWORD use this clear password for the new group\n"), usageout);
+ (void) fputs (_(" -r, --system create a system account\n"), usageout);
+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+ (void) fputs ("\n", usageout);
+@@ -387,12 +388,13 @@ static void process_flags (int argc, char **argv)
+ {"key", required_argument, NULL, 'K'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
- {"root", required_argument, NULL, 'R'},
- {"system", no_argument, NULL, 'r'},
+ {"system", no_argument, NULL, 'r'},
+ {"root", required_argument, NULL, 'R'},
{NULL, 0, NULL, '\0'}
};
- while ((c =
-- getopt_long (argc, argv, "fg:hK:op:R:r", long_options,
-+ getopt_long (argc, argv, "fg:hK:op:P:R:r", long_options,
- &option_index)) != -1) {
+- while ((c = getopt_long (argc, argv, "fg:hK:op:rR:",
++ while ((c = getopt_long (argc, argv, "fg:hK:op:P:rR:",
+ long_options, NULL)) != -1) {
switch (c) {
case 'f':
-@@ -446,6 +448,10 @@ static void process_flags (int argc, char **argv)
+@@ -444,6 +446,10 @@ static void process_flags (int argc, char **argv)
pflg = true;
group_passwd = optarg;
break;
@@ -77,37 +75,35 @@ index 66b38de..3157486 100644
+ pflg = true;
+ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
+ break;
- case 'R':
- if ('/' != optarg[0]) {
- fprintf (stderr,
+ case 'r':
+ rflg = true;
+ break;
diff --git a/src/groupmod.c b/src/groupmod.c
-index 27eb159..17acbc3 100644
+index d9d3807..68f49d1 100644
--- a/src/groupmod.c
+++ b/src/groupmod.c
-@@ -127,6 +127,8 @@ static void usage (void)
- (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), stderr);
+@@ -127,6 +127,7 @@ static void usage (int status)
+ (void) fputs (_(" -o, --non-unique allow to use a duplicate (non-unique) GID\n"), usageout);
(void) fputs (_(" -p, --password PASSWORD change the password to this (encrypted)\n"
- " PASSWORD\n"), stderr);
-+ (void) fputs (_(" -P, --clear-password PASSWORD change the password to this (clear text)\n"
-+ " PASSWORD\n"), stderr);
- (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs ("\n", stderr);
- exit (E_USAGE);
-@@ -348,11 +350,12 @@ static void process_flags (int argc, char **argv)
- {"new-name", required_argument, NULL, 'n'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
+ " PASSWORD\n"), usageout);
++ (void) fputs (_(" -P, --clear-password PASSWORD change the password to this clear PASSWORD\n"), usageout);
+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+ (void) fputs ("\n", usageout);
+ exit (status);
+@@ -375,10 +376,11 @@ static void process_flags (int argc, char **argv)
+ {"new-name", required_argument, NULL, 'n'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
- {"root", required_argument, NULL, 'R'},
+ {"root", required_argument, NULL, 'R'},
{NULL, 0, NULL, '\0'}
};
- while ((c =
-- getopt_long (argc, argv, "g:hn:op:R:",
-+ getopt_long (argc, argv, "g:hn:op:P:R:",
- long_options, &option_index)) != -1) {
+- while ((c = getopt_long (argc, argv, "g:hn:op:R:",
++ while ((c = getopt_long (argc, argv, "g:hn:op:P:R:",
+ long_options, NULL)) != -1) {
switch (c) {
case 'g':
-@@ -376,6 +379,10 @@ static void process_flags (int argc, char **argv)
+@@ -405,6 +407,10 @@ static void process_flags (int argc, char **argv)
group_passwd = optarg;
pflg = true;
break;
@@ -115,84 +111,81 @@ index 27eb159..17acbc3 100644
+ group_passwd = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
+ pflg = true;
+ break;
- case 'R':
- if ('/' != optarg[0]) {
- fprintf (stderr,
+ case 'R': /* no-op, handled in process_root_flag () */
+ break;
+ default:
diff --git a/src/useradd.c b/src/useradd.c
-index 2102630..390909c 100644
+index b3bd451..4416f90 100644
--- a/src/useradd.c
+++ b/src/useradd.c
-@@ -716,6 +716,7 @@ static void usage (void)
+@@ -773,6 +773,7 @@ static void usage (int status)
(void) fputs (_(" -o, --non-unique allow to create users with duplicate\n"
- " (non-unique) UID\n"), stderr);
- (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), stderr);
-+ (void) fputs (_(" -P, --clear-password PASSWORD clear text password of the new account\n"), stderr);
- (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), stderr);
- (void) fputs (_(" -r, --system create a system account\n"), stderr);
- (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), stderr);
-@@ -1035,6 +1036,7 @@ static void process_flags (int argc, char **argv)
- {"no-user-group", no_argument, NULL, 'N'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
+ " (non-unique) UID\n"), usageout);
+ (void) fputs (_(" -p, --password PASSWORD encrypted password of the new account\n"), usageout);
++ (void) fputs (_(" -P, --clear-password PASSWORD clear password of the new account\n"), usageout);
+ (void) fputs (_(" -r, --system create a system account\n"), usageout);
+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+ (void) fputs (_(" -s, --shell SHELL login shell of the new account\n"), usageout);
+@@ -1047,6 +1048,7 @@ static void process_flags (int argc, char **argv)
+ {"no-user-group", no_argument, NULL, 'N'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
- {"root", required_argument, NULL, 'R'},
- {"system", no_argument, NULL, 'r'},
- {"shell", required_argument, NULL, 's'},
-@@ -1047,9 +1049,9 @@ static void process_flags (int argc, char **argv)
+ {"system", no_argument, NULL, 'r'},
+ {"root", required_argument, NULL, 'R'},
+ {"shell", required_argument, NULL, 's'},
+@@ -1059,9 +1061,9 @@ static void process_flags (int argc, char **argv)
};
while ((c = getopt_long (argc, argv,
#ifdef WITH_SELINUX
-- "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:UZ:",
-+ "b:c:d:De:f:g:G:k:K:lmMNop:P:R:rs:u:UZ:",
- #else
-- "b:c:d:De:f:g:G:k:K:lmMNop:R:rs:u:U",
-+ "b:c:d:De:f:g:G:k:K:lmMNop:P:R:rs:u:U",
- #endif
+- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:UZ:",
++ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:UZ:",
+ #else /* !WITH_SELINUX */
+- "b:c:d:De:f:g:G:hk:K:lmMNop:rR:s:u:U",
++ "b:c:d:De:f:g:G:hk:K:lmMNop:P:rR:s:u:U",
+ #endif /* !WITH_SELINUX */
long_options, NULL)) != -1) {
switch (c) {
-@@ -1214,6 +1216,9 @@ static void process_flags (int argc, char **argv)
+@@ -1227,6 +1229,9 @@ static void process_flags (int argc, char **argv)
}
user_pass = optarg;
break;
-+ case 'P': /* set clear text password */
++ case 'P': /* set clear text password */
+ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
+ break;
- case 'R':
- /* no-op since we handled this in process_root_flag() earlier */
+ case 'r':
+ rflg = true;
break;
diff --git a/src/usermod.c b/src/usermod.c
-index 8363597..f4c1cee 100644
+index e7d4351..b79f7a3 100644
--- a/src/usermod.c
+++ b/src/usermod.c
-@@ -325,6 +325,7 @@ static void usage (void)
- " new location (use only with -d)\n"
- " -o, --non-unique allow using duplicate (non-unique) UID\n"
- " -p, --password PASSWORD use encrypted password for the new password\n"
-+ " -P, --clear-password PASSWORD use clear text password for the new password\n"
- " -R --root CHROOT_DIR directory to chroot into\n"
- " -s, --shell SHELL new login shell for the user account\n"
- " -u, --uid UID new UID for the user account\n"
-@@ -950,6 +951,7 @@ static void process_flags (int argc, char **argv)
- {"move-home", no_argument, NULL, 'm'},
- {"non-unique", no_argument, NULL, 'o'},
- {"password", required_argument, NULL, 'p'},
+@@ -419,6 +419,7 @@ static /*@noreturn@*/void usage (int status)
+ " new location (use only with -d)\n"), usageout);
+ (void) fputs (_(" -o, --non-unique allow using duplicate (non-unique) UID\n"), usageout);
+ (void) fputs (_(" -p, --password PASSWORD use encrypted password for the new password\n"), usageout);
++ (void) fputs (_(" -P, --clear-password PASSWORD use clear password for the new password\n"), usageout);
+ (void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
+ (void) fputs (_(" -s, --shell SHELL new login shell for the user account\n"), usageout);
+ (void) fputs (_(" -u, --uid UID new UID for the user account\n"), usageout);
+@@ -996,6 +997,7 @@ static void process_flags (int argc, char **argv)
+ {"move-home", no_argument, NULL, 'm'},
+ {"non-unique", no_argument, NULL, 'o'},
+ {"password", required_argument, NULL, 'p'},
+ {"clear-password", required_argument, NULL, 'P'},
- {"root", required_argument, NULL, 'R'},
- #ifdef WITH_SELINUX
- {"selinux-user", required_argument, NULL, 'Z'},
-@@ -961,9 +963,9 @@ static void process_flags (int argc, char **argv)
+ {"root", required_argument, NULL, 'R'},
+ {"shell", required_argument, NULL, 's'},
+ {"uid", required_argument, NULL, 'u'},
+@@ -1012,7 +1014,7 @@ static void process_flags (int argc, char **argv)
+ {NULL, 0, NULL, '\0'}
};
while ((c = getopt_long (argc, argv,
- #ifdef WITH_SELINUX
-- "ac:d:e:f:g:G:hl:Lmop:R:s:u:UZ:",
-+ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:UZ:",
- #else
-- "ac:d:e:f:g:G:hl:Lmop:R:s:u:U",
-+ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:U",
- #endif
- long_options, NULL)) != -1) {
- switch (c) {
-@@ -1055,6 +1057,10 @@ static void process_flags (int argc, char **argv)
+- "ac:d:e:f:g:G:hl:Lmop:R:s:u:U"
++ "ac:d:e:f:g:G:hl:Lmop:P:R:s:u:U"
+ #ifdef ENABLE_SUBIDS
+ "v:w:V:W:"
+ #endif /* ENABLE_SUBIDS */
+@@ -1112,6 +1114,10 @@ static void process_flags (int argc, char **argv)
user_pass = optarg;
pflg = true;
break;
@@ -200,9 +193,9 @@ index 8363597..f4c1cee 100644
+ user_pass = pw_encrypt (optarg, crypt_make_salt (NULL, NULL));
+ pflg = true;
+ break;
- case 'R':
- /* no-op since we handled this in process_root_flag() earlier */
+ case 'R': /* no-op, handled in process_root_flag () */
break;
+ case 's':
--
1.7.9.5