diff options
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0023-Handle-missing-gshadow.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0023-Handle-missing-gshadow.patch | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/meta/recipes-core/systemd/systemd/0023-Handle-missing-gshadow.patch b/meta/recipes-core/systemd/systemd/0023-Handle-missing-gshadow.patch index 7da8798ebc..19ee3ff311 100644 --- a/meta/recipes-core/systemd/systemd/0023-Handle-missing-gshadow.patch +++ b/meta/recipes-core/systemd/systemd/0023-Handle-missing-gshadow.patch | |||
@@ -20,7 +20,7 @@ diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c | |||
20 | index 88b8fc2f8f..a819d41bac 100644 | 20 | index 88b8fc2f8f..a819d41bac 100644 |
21 | --- a/src/shared/user-record-nss.c | 21 | --- a/src/shared/user-record-nss.c |
22 | +++ b/src/shared/user-record-nss.c | 22 | +++ b/src/shared/user-record-nss.c |
23 | @@ -331,8 +331,10 @@ int nss_group_to_group_record( | 23 | @@ -329,8 +329,10 @@ int nss_group_to_group_record( |
24 | if (isempty(grp->gr_name)) | 24 | if (isempty(grp->gr_name)) |
25 | return -EINVAL; | 25 | return -EINVAL; |
26 | 26 | ||
@@ -31,7 +31,7 @@ index 88b8fc2f8f..a819d41bac 100644 | |||
31 | 31 | ||
32 | g = group_record_new(); | 32 | g = group_record_new(); |
33 | if (!g) | 33 | if (!g) |
34 | @@ -348,6 +350,7 @@ int nss_group_to_group_record( | 34 | @@ -346,6 +348,7 @@ int nss_group_to_group_record( |
35 | 35 | ||
36 | g->gid = grp->gr_gid; | 36 | g->gid = grp->gr_gid; |
37 | 37 | ||
@@ -39,7 +39,7 @@ index 88b8fc2f8f..a819d41bac 100644 | |||
39 | if (sgrp) { | 39 | if (sgrp) { |
40 | if (looks_like_hashed_password(utf8_only(sgrp->sg_passwd))) { | 40 | if (looks_like_hashed_password(utf8_only(sgrp->sg_passwd))) { |
41 | g->hashed_password = strv_new(sgrp->sg_passwd); | 41 | g->hashed_password = strv_new(sgrp->sg_passwd); |
42 | @@ -363,6 +366,7 @@ int nss_group_to_group_record( | 42 | @@ -361,6 +364,7 @@ int nss_group_to_group_record( |
43 | if (r < 0) | 43 | if (r < 0) |
44 | return r; | 44 | return r; |
45 | } | 45 | } |
@@ -47,7 +47,7 @@ index 88b8fc2f8f..a819d41bac 100644 | |||
47 | 47 | ||
48 | r = json_build(&g->json, JSON_BUILD_OBJECT( | 48 | r = json_build(&g->json, JSON_BUILD_OBJECT( |
49 | JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), | 49 | JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), |
50 | @@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re | 50 | @@ -387,6 +391,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re |
51 | assert(ret_sgrp); | 51 | assert(ret_sgrp); |
52 | assert(ret_buffer); | 52 | assert(ret_buffer); |
53 | 53 | ||
@@ -55,7 +55,7 @@ index 88b8fc2f8f..a819d41bac 100644 | |||
55 | for (;;) { | 55 | for (;;) { |
56 | _cleanup_free_ char *buf = NULL; | 56 | _cleanup_free_ char *buf = NULL; |
57 | struct sgrp sgrp, *result; | 57 | struct sgrp sgrp, *result; |
58 | @@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re | 58 | @@ -415,6 +420,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re |
59 | buflen *= 2; | 59 | buflen *= 2; |
60 | buf = mfree(buf); | 60 | buf = mfree(buf); |
61 | } | 61 | } |
@@ -65,7 +65,7 @@ index 88b8fc2f8f..a819d41bac 100644 | |||
65 | } | 65 | } |
66 | 66 | ||
67 | int nss_group_record_by_name( | 67 | int nss_group_record_by_name( |
68 | @@ -427,7 +435,9 @@ int nss_group_record_by_name( | 68 | @@ -426,7 +434,9 @@ int nss_group_record_by_name( |
69 | struct group grp, *result; | 69 | struct group grp, *result; |
70 | bool incomplete = false; | 70 | bool incomplete = false; |
71 | size_t buflen = 4096; | 71 | size_t buflen = 4096; |
@@ -75,7 +75,7 @@ index 88b8fc2f8f..a819d41bac 100644 | |||
75 | int r; | 75 | int r; |
76 | 76 | ||
77 | assert(name); | 77 | assert(name); |
78 | @@ -457,6 +467,7 @@ int nss_group_record_by_name( | 78 | @@ -455,6 +465,7 @@ int nss_group_record_by_name( |
79 | buf = mfree(buf); | 79 | buf = mfree(buf); |
80 | } | 80 | } |
81 | 81 | ||
@@ -83,7 +83,7 @@ index 88b8fc2f8f..a819d41bac 100644 | |||
83 | if (with_shadow) { | 83 | if (with_shadow) { |
84 | r = nss_sgrp_for_group(result, &sgrp, &sbuf); | 84 | r = nss_sgrp_for_group(result, &sgrp, &sbuf); |
85 | if (r < 0) { | 85 | if (r < 0) { |
86 | @@ -468,6 +479,9 @@ int nss_group_record_by_name( | 86 | @@ -466,6 +477,9 @@ int nss_group_record_by_name( |
87 | incomplete = true; | 87 | incomplete = true; |
88 | 88 | ||
89 | r = nss_group_to_group_record(result, sresult, ret); | 89 | r = nss_group_to_group_record(result, sresult, ret); |
@@ -93,7 +93,7 @@ index 88b8fc2f8f..a819d41bac 100644 | |||
93 | if (r < 0) | 93 | if (r < 0) |
94 | return r; | 94 | return r; |
95 | 95 | ||
96 | @@ -484,7 +498,9 @@ int nss_group_record_by_gid( | 96 | @@ -483,7 +497,9 @@ int nss_group_record_by_gid( |
97 | struct group grp, *result; | 97 | struct group grp, *result; |
98 | bool incomplete = false; | 98 | bool incomplete = false; |
99 | size_t buflen = 4096; | 99 | size_t buflen = 4096; |
@@ -102,8 +102,8 @@ index 88b8fc2f8f..a819d41bac 100644 | |||
102 | +#endif | 102 | +#endif |
103 | int r; | 103 | int r; |
104 | 104 | ||
105 | assert(ret); | 105 | for (;;) { |
106 | @@ -512,6 +528,7 @@ int nss_group_record_by_gid( | 106 | @@ -509,6 +525,7 @@ int nss_group_record_by_gid( |
107 | buf = mfree(buf); | 107 | buf = mfree(buf); |
108 | } | 108 | } |
109 | 109 | ||
@@ -111,7 +111,7 @@ index 88b8fc2f8f..a819d41bac 100644 | |||
111 | if (with_shadow) { | 111 | if (with_shadow) { |
112 | r = nss_sgrp_for_group(result, &sgrp, &sbuf); | 112 | r = nss_sgrp_for_group(result, &sgrp, &sbuf); |
113 | if (r < 0) { | 113 | if (r < 0) { |
114 | @@ -523,6 +540,9 @@ int nss_group_record_by_gid( | 114 | @@ -520,6 +537,9 @@ int nss_group_record_by_gid( |
115 | incomplete = true; | 115 | incomplete = true; |
116 | 116 | ||
117 | r = nss_group_to_group_record(result, sresult, ret); | 117 | r = nss_group_to_group_record(result, sresult, ret); |
@@ -141,7 +141,7 @@ diff --git a/src/shared/userdb.c b/src/shared/userdb.c | |||
141 | index a77eff4407..955e361d3a 100644 | 141 | index a77eff4407..955e361d3a 100644 |
142 | --- a/src/shared/userdb.c | 142 | --- a/src/shared/userdb.c |
143 | +++ b/src/shared/userdb.c | 143 | +++ b/src/shared/userdb.c |
144 | @@ -1044,13 +1044,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { | 144 | @@ -1038,13 +1038,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { |
145 | if (gr) { | 145 | if (gr) { |
146 | _cleanup_free_ char *buffer = NULL; | 146 | _cleanup_free_ char *buffer = NULL; |
147 | bool incomplete = false; | 147 | bool incomplete = false; |
@@ -158,7 +158,7 @@ index a77eff4407..955e361d3a 100644 | |||
158 | if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { | 158 | if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { |
159 | r = nss_sgrp_for_group(gr, &sgrp, &buffer); | 159 | r = nss_sgrp_for_group(gr, &sgrp, &buffer); |
160 | if (r < 0) { | 160 | if (r < 0) { |
161 | @@ -1063,6 +1065,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { | 161 | @@ -1057,6 +1059,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { |
162 | } | 162 | } |
163 | 163 | ||
164 | r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); | 164 | r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); |