diff options
Diffstat (limited to 'poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch')
-rw-r--r-- | poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch b/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch index 068600fa4..9394eeb45 100644 --- a/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch +++ b/poky/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch @@ -17,8 +17,6 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> src/shared/userdb.c | 6 ++++++ 3 files changed, 30 insertions(+) -diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c -index 88b8fc2f8f..a819d41bac 100644 --- a/src/shared/user-record-nss.c +++ b/src/shared/user-record-nss.c @@ -331,8 +331,10 @@ int nss_group_to_group_record( @@ -48,7 +46,7 @@ index 88b8fc2f8f..a819d41bac 100644 r = json_build(&g->json, JSON_BUILD_OBJECT( JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), -@@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re +@@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct grou assert(ret_sgrp); assert(ret_buffer); @@ -56,7 +54,7 @@ index 88b8fc2f8f..a819d41bac 100644 for (;;) { _cleanup_free_ char *buf = NULL; struct sgrp sgrp, *result; -@@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re +@@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct grou buflen *= 2; buf = mfree(buf); } @@ -122,8 +120,6 @@ index 88b8fc2f8f..a819d41bac 100644 if (r < 0) return r; -diff --git a/src/shared/user-record-nss.h b/src/shared/user-record-nss.h -index 22ab04d6ee..4e52e7a911 100644 --- a/src/shared/user-record-nss.h +++ b/src/shared/user-record-nss.h @@ -2,7 +2,11 @@ @@ -138,28 +134,26 @@ index 22ab04d6ee..4e52e7a911 100644 #include <pwd.h> #include <shadow.h> -diff --git a/src/shared/userdb.c b/src/shared/userdb.c -index 613350bd46..5c821d28cd 100644 --- a/src/shared/userdb.c +++ b/src/shared/userdb.c -@@ -938,13 +938,16 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { +@@ -1047,13 +1047,15 @@ int groupdb_iterator_get(UserDBIterator if (gr) { _cleanup_free_ char *buffer = NULL; bool incomplete = false; +#if ENABLE_GSHADOW struct sgrp sgrp; +- +#endif - if (streq_ptr(gr->gr_name, "root")) iterator->synthesize_root = false; if (gr->gr_gid == GID_NOBODY) iterator->synthesize_nobody = false; +#if ENABLE_GSHADOW - if (!FLAGS_SET(iterator->flags, USERDB_AVOID_SHADOW)) { + if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { r = nss_sgrp_for_group(gr, &sgrp, &buffer); if (r < 0) { -@@ -957,6 +960,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { +@@ -1066,6 +1068,9 @@ int groupdb_iterator_get(UserDBIterator } r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); |