diff options
3 files changed, 126 insertions, 36 deletions
diff --git a/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch new file mode 100644 index 0000000000..a6f604b652 --- /dev/null +++ b/meta/recipes-extended/shadow/files/0001-Disable-use-of-syslog-for-sysroot.patch | |||
| @@ -0,0 +1,124 @@ | |||
| 1 | From 8cf3454d567f77233023be49a39a33e9f0836f89 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Scott Garman <scott.a.garman@intel.com> | ||
| 3 | Date: Thu, 14 Apr 2016 12:28:57 +0200 | ||
| 4 | Subject: [PATCH] Disable use of syslog for sysroot | ||
| 5 | |||
| 6 | Disable use of syslog to prevent sysroot user and group additions from | ||
| 7 | writing entries to the host's syslog. This patch should only be used | ||
| 8 | with the shadow-native recipe. | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate [disable feature] | ||
| 11 | |||
| 12 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
| 13 | Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> | ||
| 14 | --- | ||
| 15 | src/groupadd.c | 3 +++ | ||
| 16 | src/groupdel.c | 3 +++ | ||
| 17 | src/groupmems.c | 3 +++ | ||
| 18 | src/groupmod.c | 3 +++ | ||
| 19 | src/useradd.c | 3 +++ | ||
| 20 | src/userdel.c | 3 +++ | ||
| 21 | src/usermod.c | 3 +++ | ||
| 22 | 7 files changed, 21 insertions(+) | ||
| 23 | |||
| 24 | diff --git a/src/groupadd.c b/src/groupadd.c | ||
| 25 | index 39b4ec0..f716f57 100644 | ||
| 26 | --- a/src/groupadd.c | ||
| 27 | +++ b/src/groupadd.c | ||
| 28 | @@ -34,6 +34,9 @@ | ||
| 29 | |||
| 30 | #ident "$Id$" | ||
| 31 | |||
| 32 | +/* Disable use of syslog since we're running this command against a sysroot */ | ||
| 33 | +#undef USE_SYSLOG | ||
| 34 | + | ||
| 35 | #include <ctype.h> | ||
| 36 | #include <fcntl.h> | ||
| 37 | #include <getopt.h> | ||
| 38 | diff --git a/src/groupdel.c b/src/groupdel.c | ||
| 39 | index da99347..46a679c 100644 | ||
| 40 | --- a/src/groupdel.c | ||
| 41 | +++ b/src/groupdel.c | ||
| 42 | @@ -34,6 +34,9 @@ | ||
| 43 | |||
| 44 | #ident "$Id$" | ||
| 45 | |||
| 46 | +/* Disable use of syslog since we're running this command against a sysroot */ | ||
| 47 | +#undef USE_SYSLOG | ||
| 48 | + | ||
| 49 | #include <ctype.h> | ||
| 50 | #include <fcntl.h> | ||
| 51 | #include <grp.h> | ||
| 52 | diff --git a/src/groupmems.c b/src/groupmems.c | ||
| 53 | index e4f107f..95cb073 100644 | ||
| 54 | --- a/src/groupmems.c | ||
| 55 | +++ b/src/groupmems.c | ||
| 56 | @@ -32,6 +32,9 @@ | ||
| 57 | |||
| 58 | #include <config.h> | ||
| 59 | |||
| 60 | +/* Disable use of syslog since we're running this command against a sysroot */ | ||
| 61 | +#undef USE_SYSLOG | ||
| 62 | + | ||
| 63 | #include <fcntl.h> | ||
| 64 | #include <getopt.h> | ||
| 65 | #include <grp.h> | ||
| 66 | diff --git a/src/groupmod.c b/src/groupmod.c | ||
| 67 | index d9d3807..6229737 100644 | ||
| 68 | --- a/src/groupmod.c | ||
| 69 | +++ b/src/groupmod.c | ||
| 70 | @@ -34,6 +34,9 @@ | ||
| 71 | |||
| 72 | #ident "$Id$" | ||
| 73 | |||
| 74 | +/* Disable use of syslog since we're running this command against a sysroot */ | ||
| 75 | +#undef USE_SYSLOG | ||
| 76 | + | ||
| 77 | #include <ctype.h> | ||
| 78 | #include <fcntl.h> | ||
| 79 | #include <getopt.h> | ||
| 80 | diff --git a/src/useradd.c b/src/useradd.c | ||
| 81 | index e1ebf50..25679d8 100644 | ||
| 82 | --- a/src/useradd.c | ||
| 83 | +++ b/src/useradd.c | ||
| 84 | @@ -34,6 +34,9 @@ | ||
| 85 | |||
| 86 | #ident "$Id$" | ||
| 87 | |||
| 88 | +/* Disable use of syslog since we're running this command against a sysroot */ | ||
| 89 | +#undef USE_SYSLOG | ||
| 90 | + | ||
| 91 | #include <assert.h> | ||
| 92 | #include <ctype.h> | ||
| 93 | #include <errno.h> | ||
| 94 | diff --git a/src/userdel.c b/src/userdel.c | ||
| 95 | index 19b12bc..a083929 100644 | ||
| 96 | --- a/src/userdel.c | ||
| 97 | +++ b/src/userdel.c | ||
| 98 | @@ -34,6 +34,9 @@ | ||
| 99 | |||
| 100 | #ident "$Id$" | ||
| 101 | |||
| 102 | +/* Disable use of syslog since we're running this command against a sysroot */ | ||
| 103 | +#undef USE_SYSLOG | ||
| 104 | + | ||
| 105 | #include <errno.h> | ||
| 106 | #include <fcntl.h> | ||
| 107 | #include <getopt.h> | ||
| 108 | diff --git a/src/usermod.c b/src/usermod.c | ||
| 109 | index 685b50a..28e5cfc 100644 | ||
| 110 | --- a/src/usermod.c | ||
| 111 | +++ b/src/usermod.c | ||
| 112 | @@ -34,6 +34,9 @@ | ||
| 113 | |||
| 114 | #ident "$Id$" | ||
| 115 | |||
| 116 | +/* Disable use of syslog since we're running this command against a sysroot */ | ||
| 117 | +#undef USE_SYSLOG | ||
| 118 | + | ||
| 119 | #include <ctype.h> | ||
| 120 | #include <errno.h> | ||
| 121 | #include <fcntl.h> | ||
| 122 | -- | ||
| 123 | 2.1.0 | ||
| 124 | |||
diff --git a/meta/recipes-extended/shadow/files/disable-syslog.patch b/meta/recipes-extended/shadow/files/disable-syslog.patch deleted file mode 100644 index 1943fd6faf..0000000000 --- a/meta/recipes-extended/shadow/files/disable-syslog.patch +++ /dev/null | |||
| @@ -1,34 +0,0 @@ | |||
| 1 | Disable use of syslog to prevent sysroot user and group additions from | ||
| 2 | writing entries to the host's syslog. This patch should only be used | ||
| 3 | with the shadow-native recipe. | ||
| 4 | |||
| 5 | Upstream-Status: Inappropriate [disable feature] | ||
| 6 | |||
| 7 | Signed-off-by: Scott Garman <scott.a.garman@intel.com> | ||
| 8 | |||
| 9 | diff -urN shadow-4.1.4.3.orig//src/groupadd.c shadow-4.1.4.3/src/groupadd.c | ||
| 10 | --- shadow-4.1.4.3.orig//src/groupadd.c 2011-02-13 09:58:16.000000000 -0800 | ||
| 11 | +++ shadow-4.1.4.3/src/groupadd.c 2012-04-05 10:05:59.440001758 -0700 | ||
| 12 | @@ -34,6 +34,9 @@ | ||
| 13 | |||
| 14 | #ident "$Id: groupadd.c 3015 2009-06-05 22:16:56Z nekral-guest $" | ||
| 15 | |||
| 16 | +/* Disable use of syslog since we're running this command against a sysroot */ | ||
| 17 | +#undef USE_SYSLOG | ||
| 18 | + | ||
| 19 | #include <ctype.h> | ||
| 20 | #include <fcntl.h> | ||
| 21 | #include <getopt.h> | ||
| 22 | diff -urN shadow-4.1.4.3.orig//src/useradd.c shadow-4.1.4.3/src/useradd.c | ||
| 23 | --- shadow-4.1.4.3.orig//src/useradd.c 2011-02-13 09:58:16.000000000 -0800 | ||
| 24 | +++ shadow-4.1.4.3/src/useradd.c 2012-04-05 10:06:25.076001315 -0700 | ||
| 25 | @@ -34,6 +34,9 @@ | ||
| 26 | |||
| 27 | #ident "$Id: useradd.c 3015 2009-06-05 22:16:56Z nekral-guest $" | ||
| 28 | |||
| 29 | +/* Disable use of syslog since we're running this command against a sysroot */ | ||
| 30 | +#undef USE_SYSLOG | ||
| 31 | + | ||
| 32 | #include <assert.h> | ||
| 33 | #include <ctype.h> | ||
| 34 | #include <errno.h> | ||
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc index 4313ffe952..d024b01dcb 100644 --- a/meta/recipes-extended/shadow/shadow.inc +++ b/meta/recipes-extended/shadow/shadow.inc | |||
| @@ -25,13 +25,13 @@ SRC_URI_append_class-target = " \ | |||
| 25 | " | 25 | " |
| 26 | 26 | ||
| 27 | SRC_URI_append_class-native = " \ | 27 | SRC_URI_append_class-native = " \ |
| 28 | file://disable-syslog.patch \ | 28 | file://0001-Disable-use-of-syslog-for-sysroot.patch \ |
| 29 | file://allow-for-setting-password-in-clear-text.patch \ | 29 | file://allow-for-setting-password-in-clear-text.patch \ |
| 30 | file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \ | 30 | file://commonio.c-fix-unexpected-open-failure-in-chroot-env.patch \ |
| 31 | file://0001-useradd.c-create-parent-directories-when-necessary.patch \ | 31 | file://0001-useradd.c-create-parent-directories-when-necessary.patch \ |
| 32 | " | 32 | " |
| 33 | SRC_URI_append_class-nativesdk = " \ | 33 | SRC_URI_append_class-nativesdk = " \ |
| 34 | file://disable-syslog.patch \ | 34 | file://0001-Disable-use-of-syslog-for-sysroot.patch \ |
| 35 | " | 35 | " |
| 36 | 36 | ||
| 37 | SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8" | 37 | SRC_URI[md5sum] = "2bfafe7d4962682d31b5eba65dba4fc8" |
