summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow/files
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/shadow/files')
-rw-r--r--meta/recipes-extended/shadow/files/0001-lib-copydir-copy_entry-use-temporary-stat-buffer.patch37
-rw-r--r--meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch6
-rw-r--r--meta/recipes-extended/shadow/files/disable_syslog.patch22
-rw-r--r--meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch18
4 files changed, 30 insertions, 53 deletions
diff --git a/meta/recipes-extended/shadow/files/0001-lib-copydir-copy_entry-use-temporary-stat-buffer.patch b/meta/recipes-extended/shadow/files/0001-lib-copydir-copy_entry-use-temporary-stat-buffer.patch
deleted file mode 100644
index 2e5503bfd4..0000000000
--- a/meta/recipes-extended/shadow/files/0001-lib-copydir-copy_entry-use-temporary-stat-buffer.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From af4b8cb780587aa736692a3baa76b60474f19c5d Mon Sep 17 00:00:00 2001
2From: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
3Date: Mon, 18 Mar 2024 12:14:21 +0100
4Subject: [PATCH] lib/copydir:copy_entry(): use temporary stat buffer
5
6There are no guarantees that fstatat() does not clobber the stat
7buffer on errors.
8
9Use a temporary buffer so that the following code sees correct
10attributes of the source entry.
11
12Upstream-Status: Submitted [https://github.com/shadow-maint/shadow/pull/974]
13
14Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
15---
16 lib/copydir.c | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
18
19--- a/lib/copydir.c
20+++ b/lib/copydir.c
21@@ -400,6 +400,7 @@ static int copy_entry (const struct path
22 {
23 int err = 0;
24 struct stat sb;
25+ struct stat tmp_sb;
26 struct link_name *lp;
27 struct timespec mt[2];
28
29@@ -423,7 +424,7 @@ static int copy_entry (const struct path
30 * If the destination already exists do nothing.
31 * This is after the copy_dir above to still iterate into subdirectories.
32 */
33- if (fstatat(dst->dirfd, dst->name, &sb, AT_SYMLINK_NOFOLLOW) != -1) {
34+ if (fstatat(dst->dirfd, dst->name, &tmp_sb, AT_SYMLINK_NOFOLLOW) != -1) {
35 return err;
36 }
37
diff --git a/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
index cd99aad135..699269ed64 100644
--- a/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
+++ b/meta/recipes-extended/shadow/files/commonio.c-fix-unexpected-open-failure-in-chroot-env.patch
@@ -1,4 +1,4 @@
1From f512071dd3a4c29d4bf048c5a89c4ba9160e37b1 Mon Sep 17 00:00:00 2001 1From f7b765c022e4cad9140ac44712885c66e149abdc Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com> 2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Thu, 17 Jul 2014 15:53:34 +0800 3Date: Thu, 17 Jul 2014 15:53:34 +0800
4Subject: [PATCH] commonio.c-fix-unexpected-open-failure-in-chroot-env 4Subject: [PATCH] commonio.c-fix-unexpected-open-failure-in-chroot-env
@@ -20,10 +20,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
20 1 file changed, 12 insertions(+), 4 deletions(-) 20 1 file changed, 12 insertions(+), 4 deletions(-)
21 21
22diff --git a/lib/commonio.c b/lib/commonio.c 22diff --git a/lib/commonio.c b/lib/commonio.c
23index 01a26c9..82b2868 100644 23index 4d83e83..9ee0e13 100644
24--- a/lib/commonio.c 24--- a/lib/commonio.c
25+++ b/lib/commonio.c 25+++ b/lib/commonio.c
26@@ -601,10 +601,18 @@ int commonio_open (struct commonio_db *db, int mode) 26@@ -604,10 +604,18 @@ int commonio_open (struct commonio_db *db, int mode)
27 db->cursor = NULL; 27 db->cursor = NULL;
28 db->changed = false; 28 db->changed = false;
29 29
diff --git a/meta/recipes-extended/shadow/files/disable_syslog.patch b/meta/recipes-extended/shadow/files/disable_syslog.patch
new file mode 100644
index 0000000000..7299a8e61c
--- /dev/null
+++ b/meta/recipes-extended/shadow/files/disable_syslog.patch
@@ -0,0 +1,22 @@
1When building images using shadow-native, we shouldn't be spamming the host's
2log with lots of syslog messages which aren't relavent. Disable syslog use
3in the native case.
4
5Upstream-Status: Inappropriate [Would upstream accept a configure option?]
6Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
7
8Index: shadow-4.17.2/lib/defines.h
9===================================================================
10--- shadow-4.17.2.orig/lib/defines.h
11+++ shadow-4.17.2/lib/defines.h
12@@ -88,7 +88,9 @@
13
14 /* cleaner than lots of #ifdefs everywhere - use this as follows:
15 SYSLOG((LOG_CRIT, "user %s cracked root", user)); */
16-#ifdef ENABLE_NLS
17+#if 1
18+#define SYSLOG(x)
19+#elif ENABLE_NLS
20 /* Temporarily set LC_TIME to "C" to avoid strange dates in syslog.
21 This is a workaround for a more general syslog(d) design problem -
22 syslogd should log the current system time for each event, and not
diff --git a/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch b/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch
index 1eacb8a53f..318e2665c2 100644
--- a/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch
+++ b/meta/recipes-extended/shadow/files/shadow-update-pam-conf.patch
@@ -1,4 +1,4 @@
1From 38882ab288fd4d2cc2e45dff222ae3412c8fe357 Mon Sep 17 00:00:00 2001 1From eb17cd91d8e4d76ee95de9c0c9f4938ba2e3e82a Mon Sep 17 00:00:00 2001
2From: Kang Kai <kai.kang@windriver.com> 2From: Kang Kai <kai.kang@windriver.com>
3Date: Wed, 20 Jul 2011 19:18:14 +0800 3Date: Wed, 20 Jul 2011 19:18:14 +0800
4Subject: [PATCH] shadow: update pam related configure files 4Subject: [PATCH] shadow: update pam related configure files
@@ -15,7 +15,6 @@ Upstream-Status: Inappropriate [oe-core specific]
15 15
16Signed-off-by: Kang Kai <kai.kang@windriver.com> 16Signed-off-by: Kang Kai <kai.kang@windriver.com>
17--- 17---
18 etc/pam.d/chage | 2 +-
19 etc/pam.d/chgpasswd | 2 +- 18 etc/pam.d/chgpasswd | 2 +-
20 etc/pam.d/groupadd | 2 +- 19 etc/pam.d/groupadd | 2 +-
21 etc/pam.d/groupdel | 2 +- 20 etc/pam.d/groupdel | 2 +-
@@ -24,18 +23,8 @@ Signed-off-by: Kang Kai <kai.kang@windriver.com>
24 etc/pam.d/useradd | 2 +- 23 etc/pam.d/useradd | 2 +-
25 etc/pam.d/userdel | 2 +- 24 etc/pam.d/userdel | 2 +-
26 etc/pam.d/usermod | 2 +- 25 etc/pam.d/usermod | 2 +-
27 9 files changed, 9 insertions(+), 9 deletions(-) 26 8 files changed, 8 insertions(+), 8 deletions(-)
28 27
29diff --git a/etc/pam.d/chage b/etc/pam.d/chage
30index 8f49f5c..b1f365d 100644
31--- a/etc/pam.d/chage
32+++ b/etc/pam.d/chage
33@@ -1,4 +1,4 @@
34 #%PAM-1.0
35 auth sufficient pam_rootok.so
36 account required pam_permit.so
37-password include system-auth
38+password include common-password
39diff --git a/etc/pam.d/chgpasswd b/etc/pam.d/chgpasswd 28diff --git a/etc/pam.d/chgpasswd b/etc/pam.d/chgpasswd
40index 8f49f5c..b1f365d 100644 29index 8f49f5c..b1f365d 100644
41--- a/etc/pam.d/chgpasswd 30--- a/etc/pam.d/chgpasswd
@@ -116,3 +105,6 @@ index 8f49f5c..b1f365d 100644
116 account required pam_permit.so 105 account required pam_permit.so
117-password include system-auth 106-password include system-auth
118+password include common-password 107+password include common-password
108--
1092.43.0
110