libwbclient-sssd: update interface to version 0.13
This commit is contained in:
parent
8dd054482d
commit
856526f769
161
0080-libwbclient-sssd-update-interface-to-version-0.13.patch
Normal file
161
0080-libwbclient-sssd-update-interface-to-version-0.13.patch
Normal file
@ -0,0 +1,161 @@
|
||||
From 08421a1e4416e0992e95c797536864e86ea6cccc Mon Sep 17 00:00:00 2001
|
||||
From: Sumit Bose <sbose@redhat.com>
|
||||
Date: Fri, 7 Oct 2016 17:47:59 +0200
|
||||
Subject: [PATCH 80/80] libwbclient-sssd: update interface to version 0.13
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This patch adds wbcCtxUnixIdsToSids() and wbcUnixIdsToSids() to SSSD's
|
||||
libwbclient and implements the latter.
|
||||
|
||||
Resolves:
|
||||
https://fedorahosted.org/sssd/ticket/3181
|
||||
|
||||
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
|
||||
(cherry picked from commit f3347a0c72afc75b4d829e9981d1bac6b05a8306)
|
||||
---
|
||||
src/conf_macros.m4 | 4 ++--
|
||||
src/sss_client/libwbclient/wbc_ctx_sssd.c | 7 +++++++
|
||||
src/sss_client/libwbclient/wbc_idmap_sssd.c | 26 ++++++++++++++++++++++++
|
||||
src/sss_client/libwbclient/wbclient.exports | 6 ++++++
|
||||
src/sss_client/libwbclient/wbclient_sssd.h | 31 ++++++++++++++++++++++++++++-
|
||||
5 files changed, 71 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/conf_macros.m4 b/src/conf_macros.m4
|
||||
index bc295c5e79d3c699b25cebf38e8c0f0112de010d..427b0e08d400d6e5628537b28bb93bc2fc6239a4 100644
|
||||
--- a/src/conf_macros.m4
|
||||
+++ b/src/conf_macros.m4
|
||||
@@ -727,10 +727,10 @@ AC_DEFUN([WITH_LIBWBCLIENT],
|
||||
if test x"$with_libwbclient" = xyes; then
|
||||
AC_DEFINE(BUILD_LIBWBCLIENT, 1, [whether to build SSSD implementation of libwbclient])
|
||||
|
||||
- libwbclient_version="0.12"
|
||||
+ libwbclient_version="0.13"
|
||||
AC_SUBST(libwbclient_version)
|
||||
|
||||
- libwbclient_version_info="12:0:12"
|
||||
+ libwbclient_version_info="13:0:13"
|
||||
AC_SUBST(libwbclient_version_info)
|
||||
fi
|
||||
AM_CONDITIONAL([BUILD_LIBWBCLIENT], [test x"$with_libwbclient" = xyes])
|
||||
diff --git a/src/sss_client/libwbclient/wbc_ctx_sssd.c b/src/sss_client/libwbclient/wbc_ctx_sssd.c
|
||||
index 1f259ee00e48d68d8da3f6b0abc12175a70c1f20..0f5aff473e984fbc630fc0ca8aa1647de51cbde4 100644
|
||||
--- a/src/sss_client/libwbclient/wbc_ctx_sssd.c
|
||||
+++ b/src/sss_client/libwbclient/wbc_ctx_sssd.c
|
||||
@@ -167,6 +167,13 @@ wbcErr wbcCtxSidsToUnixIds(struct wbcContext *ctx,
|
||||
WBC_SSSD_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
+wbcErr wbcCtxUnixIdsToSids(struct wbcContext *ctx,
|
||||
+ const struct wbcUnixId *ids, uint32_t num_ids,
|
||||
+ struct wbcDomainSid *sids)
|
||||
+{
|
||||
+ WBC_SSSD_NOT_IMPLEMENTED;
|
||||
+}
|
||||
+
|
||||
wbcErr wbcCtxAllocateUid(struct wbcContext *ctx, uid_t *puid)
|
||||
{
|
||||
WBC_SSSD_NOT_IMPLEMENTED;
|
||||
diff --git a/src/sss_client/libwbclient/wbc_idmap_sssd.c b/src/sss_client/libwbclient/wbc_idmap_sssd.c
|
||||
index 6b5f525f0433c948e4d570d177dc6cffd82eff40..c8da9754265a1ad3ef098c545a2b2d8d3c548d4d 100644
|
||||
--- a/src/sss_client/libwbclient/wbc_idmap_sssd.c
|
||||
+++ b/src/sss_client/libwbclient/wbc_idmap_sssd.c
|
||||
@@ -202,3 +202,29 @@ wbcErr wbcSidsToUnixIds(const struct wbcDomainSid *sids, uint32_t num_sids,
|
||||
|
||||
return WBC_ERR_SUCCESS;
|
||||
}
|
||||
+
|
||||
+wbcErr wbcUnixIdsToSids(const struct wbcUnixId *ids, uint32_t num_ids,
|
||||
+ struct wbcDomainSid *sids)
|
||||
+{
|
||||
+ size_t c;
|
||||
+ wbcErr wbc_status;
|
||||
+
|
||||
+ for (c = 0; c < num_ids; c++) {
|
||||
+ switch (ids[c].type) {
|
||||
+ case WBC_ID_TYPE_UID:
|
||||
+ wbc_status = wbcUidToSid(ids[c].id.uid, &sids[c]);
|
||||
+ break;
|
||||
+ case WBC_ID_TYPE_GID:
|
||||
+ wbc_status = wbcGidToSid(ids[c].id.gid, &sids[c]);
|
||||
+ break;
|
||||
+ default:
|
||||
+ wbc_status = WBC_ERR_INVALID_PARAM;
|
||||
+ }
|
||||
+
|
||||
+ if (!WBC_ERROR_IS_OK(wbc_status)) {
|
||||
+ sids[c] = (struct wbcDomainSid){ 0 };
|
||||
+ };
|
||||
+ }
|
||||
+
|
||||
+ return WBC_ERR_SUCCESS;
|
||||
+}
|
||||
diff --git a/src/sss_client/libwbclient/wbclient.exports b/src/sss_client/libwbclient/wbclient.exports
|
||||
index 574c1d1fe232fad0a4c104de086977515a05ab84..9d3c2040e7d393c0057d44864826cefc2e3f7a31 100644
|
||||
--- a/src/sss_client/libwbclient/wbclient.exports
|
||||
+++ b/src/sss_client/libwbclient/wbclient.exports
|
||||
@@ -144,3 +144,9 @@ WBCLIENT_0.12 {
|
||||
wbcCtxPingDc;
|
||||
wbcCtxPingDc2;
|
||||
} WBCLIENT_0.11;
|
||||
+
|
||||
+WBCLIENT_0.13 {
|
||||
+ global:
|
||||
+ wbcUnixIdsToSids;
|
||||
+ wbcCtxUnixIdsToSids;
|
||||
+} WBCLIENT_0.12;
|
||||
diff --git a/src/sss_client/libwbclient/wbclient_sssd.h b/src/sss_client/libwbclient/wbclient_sssd.h
|
||||
index ec6d032814445bff0819b4de0df07ccf4008aefc..50ba7f84304df5f24a31cbbad857f22d1c70964d 100644
|
||||
--- a/src/sss_client/libwbclient/wbclient_sssd.h
|
||||
+++ b/src/sss_client/libwbclient/wbclient_sssd.h
|
||||
@@ -73,9 +73,10 @@ const char *wbcErrorString(wbcErr error);
|
||||
* 0.10: Added wbcPingDc2()
|
||||
* 0.11: Extended wbcAuthenticateUserEx to provide PAC parsing
|
||||
* 0.12: Added wbcCtxCreate and friends
|
||||
+ * 0.13: Added wbcCtxUnixIdsToSids and wbcUnixIdsToSids
|
||||
**/
|
||||
#define WBCLIENT_MAJOR_VERSION 0
|
||||
-#define WBCLIENT_MINOR_VERSION 12
|
||||
+#define WBCLIENT_MINOR_VERSION 13
|
||||
#define WBCLIENT_VENDOR_VERSION "Samba libwbclient"
|
||||
struct wbcLibraryDetails {
|
||||
uint16_t major_version;
|
||||
@@ -1031,6 +1032,34 @@ wbcErr wbcSidsToUnixIds(const struct wbcDomainSid *sids, uint32_t num_sids,
|
||||
struct wbcUnixId *ids);
|
||||
|
||||
/**
|
||||
+ * @brief Convert a list of unix ids to sids
|
||||
+ *
|
||||
+ * @param ctx wbclient Context
|
||||
+ * @param ids Pointer to an array of UNIX IDs to convert
|
||||
+ * @param num_ids Number of UNIX IDs
|
||||
+ * @param sids Preallocated output array for translated SIDs
|
||||
+ *
|
||||
+ * @return #wbcErr
|
||||
+ *
|
||||
+ **/
|
||||
+wbcErr wbcCtxUnixIdsToSids(struct wbcContext *ctx,
|
||||
+ const struct wbcUnixId *ids, uint32_t num_ids,
|
||||
+ struct wbcDomainSid *sids);
|
||||
+
|
||||
+/**
|
||||
+ * @brief Convert a list of unix ids to sids
|
||||
+ *
|
||||
+ * @param ids Pointer to an array of UNIX IDs to convert
|
||||
+ * @param num_ids Number of UNIX IDs
|
||||
+ * @param sids Preallocated output array for translated SIDs
|
||||
+ *
|
||||
+ * @return #wbcErr
|
||||
+ *
|
||||
+ **/
|
||||
+wbcErr wbcUnixIdsToSids(const struct wbcUnixId *ids, uint32_t num_ids,
|
||||
+ struct wbcDomainSid *sids);
|
||||
+
|
||||
+/**
|
||||
* @brief Obtain a new uid from Winbind
|
||||
*
|
||||
* @param *ctx wbclient Context
|
||||
--
|
||||
2.9.3
|
||||
|
@ -17,7 +17,7 @@
|
||||
%global enable_systemtap 1
|
||||
%global enable_systemtap_opt --enable-systemtap
|
||||
|
||||
%global libwbc_alternatives_version 0.12
|
||||
%global libwbc_alternatives_version 0.13
|
||||
%global libwbc_lib_version %{libwbc_alternatives_version}.0
|
||||
%global libwbc_alternatives_suffix %nil
|
||||
%if 0%{?__isa_bits} == 64
|
||||
@ -26,7 +26,7 @@
|
||||
|
||||
Name: sssd
|
||||
Version: 1.14.1
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
Group: Applications/System
|
||||
Summary: System Security Services Daemon
|
||||
License: GPLv3+
|
||||
@ -114,6 +114,7 @@ Patch0076: 0076-IFP-expose-user-and-group-unique-IDs-through-DBus.patch
|
||||
Patch0077: 0077-SSSDConfig-Do-not-fail-with-nonexisting-domains-serv.patch
|
||||
Patch0078: 0078-SPEC-Rename-python-packages-using-macro-python_provi.patch
|
||||
Patch0079: 0079-KRB5-Fixing-FQ-name-of-user-in-krb5_setup.patch
|
||||
Patch0080: 0080-libwbclient-sssd-update-interface-to-version-0.13.patch
|
||||
|
||||
### Dependencies ###
|
||||
|
||||
@ -1171,6 +1172,9 @@ fi
|
||||
%{_libdir}/%{name}/modules/libwbclient.so
|
||||
|
||||
%changelog
|
||||
* Fri Oct 14 2016 Lukas Slebodnik <lslebodn@redhat.com> - 1.14.1-4
|
||||
- libwbclient-sssd: update interface to version 0.13
|
||||
|
||||
* Thu Sep 22 2016 Lukas Slebodnik <lslebodn@redhat.com> - 1.14.1-3
|
||||
- Fix regression with krb5_map_user
|
||||
- Resolves: rhbz#1375552 - krb5_map_user doesn't seem effective anymore
|
||||
|
Loading…
Reference in New Issue
Block a user