|
|
518b87 |
From 02a5b8945863755e8708b6a11954c1f398680e01 Mon Sep 17 00:00:00 2001
|
|
|
518b87 |
From: Sumit Bose <sbose@redhat.com>
|
|
|
518b87 |
Date: Thu, 2 Jun 2016 21:01:11 +0200
|
|
|
518b87 |
Subject: [PATCH 118/118] libwbclient: wbcSidsToUnixIds() don't fail on errors
|
|
|
518b87 |
|
|
|
518b87 |
Resolves: https://fedorahosted.org/sssd/ticket/3028
|
|
|
518b87 |
|
|
|
518b87 |
Reviewed-by: Alexander Bokovoy <abokovoy@redhat.com>
|
|
|
518b87 |
(cherry picked from commit 52f1093ef3d7c44132ec10c57436865b2cbb19d7)
|
|
|
518b87 |
(cherry picked from commit 15ad5f603a5797c61a01f67365c2581c7bddcdfa)
|
|
|
518b87 |
---
|
|
|
518b87 |
src/sss_client/libwbclient/wbc_idmap_sssd.c | 15 +++++++--------
|
|
|
518b87 |
1 file changed, 7 insertions(+), 8 deletions(-)
|
|
|
518b87 |
|
|
|
518b87 |
diff --git a/src/sss_client/libwbclient/wbc_idmap_sssd.c b/src/sss_client/libwbclient/wbc_idmap_sssd.c
|
|
|
518b87 |
index 1b0e2e10a5ce1a0c7577d391b740ff988f920903..6b5f525f0433c948e4d570d177dc6cffd82eff40 100644
|
|
|
518b87 |
--- a/src/sss_client/libwbclient/wbc_idmap_sssd.c
|
|
|
518b87 |
+++ b/src/sss_client/libwbclient/wbc_idmap_sssd.c
|
|
|
518b87 |
@@ -172,15 +172,14 @@ wbcErr wbcSidsToUnixIds(const struct wbcDomainSid *sids, uint32_t num_sids,
|
|
|
518b87 |
wbcErr wbc_status;
|
|
|
518b87 |
|
|
|
518b87 |
for (c = 0; c < num_sids; c++) {
|
|
|
518b87 |
+ type = SSS_ID_TYPE_NOT_SPECIFIED;
|
|
|
518b87 |
wbc_status = wbcSidToString(&sids[c], &sid_str);
|
|
|
518b87 |
- if (!WBC_ERROR_IS_OK(wbc_status)) {
|
|
|
518b87 |
- return wbc_status;
|
|
|
518b87 |
- }
|
|
|
518b87 |
-
|
|
|
518b87 |
- ret = sss_nss_getidbysid(sid_str, &id, &type);
|
|
|
518b87 |
- wbcFreeMemory(sid_str);
|
|
|
518b87 |
- if (ret != 0) {
|
|
|
518b87 |
- return WBC_ERR_UNKNOWN_FAILURE;
|
|
|
518b87 |
+ if (WBC_ERROR_IS_OK(wbc_status)) {
|
|
|
518b87 |
+ ret = sss_nss_getidbysid(sid_str, &id, &type);
|
|
|
518b87 |
+ wbcFreeMemory(sid_str);
|
|
|
518b87 |
+ if (ret != 0) {
|
|
|
518b87 |
+ type = SSS_ID_TYPE_NOT_SPECIFIED;
|
|
|
518b87 |
+ }
|
|
|
518b87 |
}
|
|
|
518b87 |
|
|
|
518b87 |
switch (type) {
|
|
|
518b87 |
--
|
|
|
518b87 |
2.4.11
|
|
|
518b87 |
|