diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2019-03-13 11:26:31 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-03-18 11:12:26 +0000 |
commit | 2f26e0e8d558ad47ffb0cf34be0f06a5c8272bbd (patch) | |
tree | f43a3f0c68e68024e3cdddde17e53193d92580a0 /meta | |
parent | dad2a7bc3a65d3e7ba6ed9061b4200a391507bc6 (diff) | |
download | poky-2f26e0e8d558ad47ffb0cf34be0f06a5c8272bbd.tar.gz |
shadow: drop inappropriate patch
The 0001-useradd-copy-extended-attributes-of-home.patch (oe-core commit:
eed66e85af5ca6bbdd80cc3d5cf8453e8d8880bc) introduced a runtime failure
when enable SELinux.
When enable SELinux, The directory /home/user will get the extended
attributes of /etc/skel. However, the SELinux lable for /etc/skel is
etc_t which is also copied to /home/user. It will cause the user can not
write their home directory because the SELinux lable for /home/user
should be user_home_dir_t.
See discussion: http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146039.html
The solution at the moment is to drop this patch.
(From OE-Core rev: 2a8b35226edde4cd49cb5ba68c5b47aa8379eca1)
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
3 files changed, 5 insertions, 51 deletions
diff --git a/meta/recipes-extended/shadow/files/0001-useradd-copy-extended-attributes-of-home.patch b/meta/recipes-extended/shadow/files/0001-useradd-copy-extended-attributes-of-home.patch deleted file mode 100644 index 474b3a257e..0000000000 --- a/meta/recipes-extended/shadow/files/0001-useradd-copy-extended-attributes-of-home.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | Subject: [PATCH] useradd: copy extended attributes of home | ||
2 | |||
3 | The Home directory wasn't getting the extended attributes | ||
4 | of /etc/skel. This patch fixes that issue and adds the copy | ||
5 | of the extended attributes of the root of the home directory. | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: José Bollo <jose.bollo@iot.bzh> | ||
10 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
11 | --- | ||
12 | src/useradd.c | 6 ++++++ | ||
13 | 1 file changed, 6 insertions(+) | ||
14 | |||
15 | diff --git a/src/useradd.c b/src/useradd.c | ||
16 | index e721e52..c74e491 100644 | ||
17 | --- a/src/useradd.c | ||
18 | +++ b/src/useradd.c | ||
19 | @@ -54,6 +54,9 @@ | ||
20 | #include <sys/wait.h> | ||
21 | #include <time.h> | ||
22 | #include <unistd.h> | ||
23 | +#ifdef WITH_ATTR | ||
24 | +#include <attr/libattr.h> | ||
25 | +#endif | ||
26 | #include "chkname.h" | ||
27 | #include "defines.h" | ||
28 | #include "faillog.h" | ||
29 | @@ -2042,6 +2045,9 @@ static void create_home (void) | ||
30 | (void) chown (prefix_user_home, user_id, user_gid); | ||
31 | chmod (prefix_user_home, | ||
32 | 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); | ||
33 | +#ifdef WITH_ATTR | ||
34 | + attr_copy_file (def_template, user_home, NULL, NULL); | ||
35 | +#endif | ||
36 | home_added = true; | ||
37 | #ifdef WITH_AUDIT | ||
38 | audit_logger (AUDIT_ADD_USER, Prog, | ||
39 | -- | ||
40 | 2.11.0 | ||
41 | |||
diff --git a/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch index 7024136593..faa6f68ebe 100644 --- a/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch +++ b/meta/recipes-extended/shadow/files/0001-useradd.c-create-parent-directories-when-necessary.patch | |||
@@ -4,11 +4,11 @@ Upstream-Status: Inappropriate [OE specific] | |||
4 | 4 | ||
5 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 5 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
6 | --- | 6 | --- |
7 | src/useradd.c | 82 +++++++++++++++++++++++++++++++++++++++-------------------- | 7 | src/useradd.c | 80 +++++++++++++++++++++++++++++++++++++++-------------------- |
8 | 1 file changed, 54 insertions(+), 28 deletions(-) | 8 | 1 file changed, 53 insertions(+), 27 deletions(-) |
9 | 9 | ||
10 | diff --git a/src/useradd.c b/src/useradd.c | 10 | diff --git a/src/useradd.c b/src/useradd.c |
11 | index 7214e72..3aaf45c 100644 | 11 | index 00a3c30..9ecbb58 100644 |
12 | --- a/src/useradd.c | 12 | --- a/src/useradd.c |
13 | +++ b/src/useradd.c | 13 | +++ b/src/useradd.c |
14 | @@ -2021,6 +2021,35 @@ static void usr_update (void) | 14 | @@ -2021,6 +2021,35 @@ static void usr_update (void) |
@@ -47,7 +47,7 @@ index 7214e72..3aaf45c 100644 | |||
47 | * create_home - create the user's home directory | 47 | * create_home - create the user's home directory |
48 | * | 48 | * |
49 | * create_home() creates the user's home directory if it does not | 49 | * create_home() creates the user's home directory if it does not |
50 | @@ -2038,42 +2067,39 @@ static void create_home (void) | 50 | @@ -2038,39 +2067,36 @@ static void create_home (void) |
51 | fail_exit (E_HOMEDIR); | 51 | fail_exit (E_HOMEDIR); |
52 | } | 52 | } |
53 | #endif | 53 | #endif |
@@ -74,16 +74,12 @@ index 7214e72..3aaf45c 100644 | |||
74 | - (void) chown (prefix_user_home, user_id, user_gid); | 74 | - (void) chown (prefix_user_home, user_id, user_gid); |
75 | - chmod (prefix_user_home, | 75 | - chmod (prefix_user_home, |
76 | - 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); | 76 | - 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); |
77 | - home_added = true; | ||
77 | + fail_exit (E_HOMEDIR); | 78 | + fail_exit (E_HOMEDIR); |
78 | + } | 79 | + } |
79 | + (void) chown (prefix_user_home, user_id, user_gid); | 80 | + (void) chown (prefix_user_home, user_id, user_gid); |
80 | + chmod (prefix_user_home, | 81 | + chmod (prefix_user_home, |
81 | + 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); | 82 | + 0777 & ~getdef_num ("UMASK", GETDEF_DEFAULT_UMASK)); |
82 | #ifdef WITH_ATTR | ||
83 | - attr_copy_file (def_template, user_home, NULL, NULL); | ||
84 | + attr_copy_file (def_template, user_home, NULL, NULL); | ||
85 | #endif | ||
86 | - home_added = true; | ||
87 | + home_added = true; | 83 | + home_added = true; |
88 | #ifdef WITH_AUDIT | 84 | #ifdef WITH_AUDIT |
89 | - audit_logger (AUDIT_ADD_USER, Prog, | 85 | - audit_logger (AUDIT_ADD_USER, Prog, |
diff --git a/meta/recipes-extended/shadow/shadow.inc b/meta/recipes-extended/shadow/shadow.inc index 2b20bdcb25..4de21acb77 100644 --- a/meta/recipes-extended/shadow/shadow.inc +++ b/meta/recipes-extended/shadow/shadow.inc | |||
@@ -11,7 +11,6 @@ DEPENDS = "virtual/crypt" | |||
11 | UPSTREAM_CHECK_URI = "https://github.com/shadow-maint/shadow/releases" | 11 | UPSTREAM_CHECK_URI = "https://github.com/shadow-maint/shadow/releases" |
12 | SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/${PV}/${BP}.tar.gz \ | 12 | SRC_URI = "https://github.com/shadow-maint/shadow/releases/download/${PV}/${BP}.tar.gz \ |
13 | file://shadow-4.1.3-dots-in-usernames.patch \ | 13 | file://shadow-4.1.3-dots-in-usernames.patch \ |
14 | file://0001-useradd-copy-extended-attributes-of-home.patch \ | ||
15 | ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ | 14 | ${@bb.utils.contains('PACKAGECONFIG', 'pam', '${PAM_SRC_URI}', '', d)} \ |
16 | " | 15 | " |
17 | 16 | ||