[PATCHES] lib/winbind_util: Add winbind_xid_to_sid for --without-winbind (was Re: winbind_xid_to_sid)

Christof Schmitt cs at samba.org
Tue Mar 5 19:08:27 UTC 2019


On Tue, Mar 05, 2019 at 11:48:18AM -0700, Christof Schmitt via samba-technical wrote:
> On Tue, Mar 05, 2019 at 10:54:12AM -0600, Christopher O Cowan via samba-technical wrote:
> > 
> > This is minor nit, but if I do a waf configure on AIX with the
> > --without-winbind, I still get a reference to winbind_xid_to_sid from
> > libsamba-passdb.so.
> > 
> > I haven't crawled through the waf code to figure out why, and it's not a
> > big deal to just compile with winbind, but it should probably be fixed.
> 
> The Linux build has the same issue. That is tied to the recent change in
> passdb. I will post a patch shortly to fix this.

Here are the patches. The first two fix existing issues on Linux with
--picky-developer and the third one is the fix for your issue.

Christof
-------------- next part --------------
From c28fff0ebc4b4b48e4714652b5f75b850c96fe22 Mon Sep 17 00:00:00 2001
From: Christof Schmitt <cs at samba.org>
Date: Tue, 5 Mar 2019 11:50:48 -0700
Subject: [PATCH 1/3] lib/winbind_util: Move include out of ifdef

This fixes compile errors about missing prototypes with
--picky-developer and --without-winbind

Signed-off-by: Christof Schmitt <cs at samba.org>
---
 source3/lib/winbind_util.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/source3/lib/winbind_util.c b/source3/lib/winbind_util.c
index fe35a6f78d1..e3fb594091a 100644
--- a/source3/lib/winbind_util.c
+++ b/source3/lib/winbind_util.c
@@ -23,10 +23,10 @@
 #include "../lib/util/util_pw.h"
 #include "nsswitch/libwbclient/wbclient.h"
 
-#if defined(WITH_WINBIND)
-
 #include "lib/winbind_util.h"
 
+#if defined(WITH_WINBIND)
+
 struct passwd * winbind_getpwnam(const char * name)
 {
 	wbcErr result;
-- 
2.17.0


From d0626b765c9590ff7422cdded3e8f0bcf88f3923 Mon Sep 17 00:00:00 2001
From: Christof Schmitt <cs at samba.org>
Date: Tue, 5 Mar 2019 11:52:38 -0700
Subject: [PATCH 2/3] lib/winbind_util: Remove winbind_[gu]id_to_sid

Commit c906153cc7 removed these functions, now also remove them for the
--without-winbind case.

Signed-off-by: Christof Schmitt <cs at samba.org>
---
 source3/lib/winbind_util.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/source3/lib/winbind_util.c b/source3/lib/winbind_util.c
index e3fb594091a..d8c567175a8 100644
--- a/source3/lib/winbind_util.c
+++ b/source3/lib/winbind_util.c
@@ -346,13 +346,6 @@ bool winbind_sid_to_uid(uid_t *puid, const struct dom_sid *sid)
 	return false;
 }
 
-/* Call winbindd to convert uid to sid */
-
-bool winbind_uid_to_sid(struct dom_sid *sid, uid_t uid)
-{
-	return false;
-}
-
 /* Call winbindd to convert SID to gid */
 
 bool winbind_sid_to_gid(gid_t *pgid, const struct dom_sid *sid)
@@ -360,13 +353,6 @@ bool winbind_sid_to_gid(gid_t *pgid, const struct dom_sid *sid)
 	return false;
 }
 
-/* Call winbindd to convert gid to sid */
-
-bool winbind_gid_to_sid(struct dom_sid *sid, gid_t gid)
-{
-	return false;
-}
-
 /* Check for a trusted domain */
 
 wbcErr wb_is_trusted_domain(const char *domain)
-- 
2.17.0


From 794505b9356eb72ed27bdbde8eb992e4b3a610f4 Mon Sep 17 00:00:00 2001
From: Christof Schmitt <cs at samba.org>
Date: Tue, 5 Mar 2019 11:56:49 -0700
Subject: [PATCH 3/3] lib/winbind_util: Add winbind_xid_to_sid for
 --without-winbind

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13813

Signed-off-by: Christof Schmitt <cs at samba.org>
---
 source3/lib/winbind_util.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/source3/lib/winbind_util.c b/source3/lib/winbind_util.c
index d8c567175a8..7e3f8ab9eb8 100644
--- a/source3/lib/winbind_util.c
+++ b/source3/lib/winbind_util.c
@@ -353,6 +353,13 @@ bool winbind_sid_to_gid(gid_t *pgid, const struct dom_sid *sid)
 	return false;
 }
 
+/* Call winbindd to convert uid or gid to SID */
+
+bool winbind_xid_to_sid(struct dom_sid *sid, const struct unixid *xid)
+{
+	return false;
+}
+
 /* Check for a trusted domain */
 
 wbcErr wb_is_trusted_domain(const char *domain)
-- 
2.17.0



More information about the samba-technical mailing list