[SCM] Samba Shared Repository - branch master updated

Michael Adam obnox at samba.org
Thu Feb 10 06:43:02 MST 2011


The branch, master has been updated
       via  6d3625d libwbclient: doxygen: mark wbcSetGidHwm deprecated
       via  3c6ae6d libwbclient: doxygen: mark wbcSetUidHwm deprecated
       via  3757556 libwbclient: doxygen: mark wbcRemoveGidMapping deprecated
       via  7494724 libwbclient: doxygen: mark wbcRemoveUidMapping deprecated
       via  d75ad33 libwbclient: doxygen: mark wbcSetGidMapping deprecated
       via  cb5e685 libwbclient: doxygen: mark wbcSetUidMapping deprecated
       via  6339a17 Revert "libwbclient: bump the libwbclient SOVER 0 -> 1 due to ABI changes"
       via  4242d63 Revert "wbinfo: remove --set-uid-mapping - winbindd does not implement that any more."
       via  70ebfc1 Revert "wbinfo: remove --set-gid-mapping - winbindd does not implement that any more."
       via  71ce276 Revert "wbinfo: remove --remove-uid-mapping - winbindd does not implement that any more."
       via  1ea1043 Revert "wbinfo: remove --remove-gid-mapping - winbindd does not implement that any more."
       via  0def826 Revert "libwbclient: remove two unused defines"
       via  7dca8bc Revert "libwbclient: remove wbcSetUidMapping() - not implemented any more"
       via  1f4a06e Revert "libwbclient: remove wbcSetGidMapping() - not implemented any more"
       via  ecbb223 Revert "libwbclient: remove wbcRemoveUidMapping() - not implemented any more"
       via  75b2a2f Revert "libwbclient: remove wbcRemoveGidMapping() - not implemented any more"
       via  748cccd Revert "libwbclient: remove wbcSetUidHwm() - not implemented any more"
       via  7a3bc46 Revert "libwbclient: remove wbcSetGidHwm() - not implemented any more"
       via  9bc1a7b Revert "libwbclient: bump version to 0.6 -> 1.0 due to ABI change (removed symbols)"
       via  d0ceb4c Revert "nsswitch: libwbclient has vnum 1 now."
       via  76ea4fd Revert "nsswitch: remove unused code from wbinfo.c"
      from  ad0a318 librpc: move preg.idl to main directory.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6d3625de675e3e6e91b1ac19d9323b95267acf14
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 12:48:01 2011 +0100

    libwbclient: doxygen: mark wbcSetGidHwm deprecated
    
    Autobuild-User: Michael Adam <obnox at samba.org>
    Autobuild-Date: Thu Feb 10 14:42:24 CET 2011 on sn-devel-104

commit 3c6ae6d4d77c4984c1cd454a0ae80f1b165783d5
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 12:48:01 2011 +0100

    libwbclient: doxygen: mark wbcSetUidHwm deprecated

commit 37575560bf27efdd9fafd1e1729a073b042ebeff
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 12:48:01 2011 +0100

    libwbclient: doxygen: mark wbcRemoveGidMapping deprecated

commit 7494724b845cdf3da4d1f88f2f5658410b0f1694
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 12:48:01 2011 +0100

    libwbclient: doxygen: mark wbcRemoveUidMapping deprecated

commit d75ad3359869fb2754fce35d38337f21d4ca3f07
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 12:48:01 2011 +0100

    libwbclient: doxygen: mark wbcSetGidMapping deprecated

commit cb5e685d549eb6ebc35b83908d4b7d09fca34654
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 12:48:01 2011 +0100

    libwbclient: doxygen: mark wbcSetUidMapping deprecated

commit 6339a17a93dfa8dadd115c9d9c73324734c5b9fb
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 11:08:02 2011 +0100

    Revert "libwbclient: bump the libwbclient SOVER 0 -> 1 due to ABI changes"
    
    This reverts commit 5dd63c6c1439f5dde00e56144c38771d81455ada.
    
    Undo the library version bump.

commit 4242d633d8b2812ef6017a4785f80fa9d213d326
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 11:04:51 2011 +0100

    Revert "wbinfo: remove --set-uid-mapping - winbindd does not implement that any more."
    
    This reverts commit 0e90d01d53ee197a6451b7c55c2afa74e0d8b0bb.
    
    Undo the library version bump.

commit 70ebfc16b4b5e6fc8f1a809aa16110b77f3c8a0e
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 11:04:47 2011 +0100

    Revert "wbinfo: remove --set-gid-mapping - winbindd does not implement that any more."
    
    This reverts commit 9de1fd4352346cb71b232b7198155e157396f6ec.
    
    Undo the library version bump.

commit 71ce276c12fc53eba90816b0667df07cbb2d6070
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 11:04:44 2011 +0100

    Revert "wbinfo: remove --remove-uid-mapping - winbindd does not implement that any more."
    
    This reverts commit 36e2baa8da3de559ce0f6c927f6262a8e4648a97.
    
    Undo the library version bump.

commit 1ea1043f8df6ad8b0606ae98a808f4006265a870
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 11:04:41 2011 +0100

    Revert "wbinfo: remove --remove-gid-mapping - winbindd does not implement that any more."
    
    This reverts commit 48ad64aa78568c4ce743345448c9d39305752d73.
    
    Undo the library version bump.

commit 0def826ec5851b88f8adbddd66993d7219a0d74c
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 11:04:35 2011 +0100

    Revert "libwbclient: remove two unused defines"
    
    This reverts commit 58bf6f9ff0b29df14eee2900fb847b96ef28411f.
    
    Undo the library version bump.

commit 7dca8bcbb9f1d95a8eeae066e944d5ea4a17aabb
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 11:04:32 2011 +0100

    Revert "libwbclient: remove wbcSetUidMapping() - not implemented any more"
    
    This reverts commit 25a0dc44f7e180d96dcccb8701e9817ecfd54955.
    
    Undo the library version bump.

commit 1f4a06e64f489f8df7b43775530b98f4bd222eb9
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 11:04:27 2011 +0100

    Revert "libwbclient: remove wbcSetGidMapping() - not implemented any more"
    
    This reverts commit 52e1be2139d370bf0ce99371bc9ab73db41c6236.
    
    Undo the library version bump.

commit ecbb2239896ac604bca38c8898c24daf05c151bb
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 11:04:23 2011 +0100

    Revert "libwbclient: remove wbcRemoveUidMapping() - not implemented any more"
    
    This reverts commit 1ed5961df2da73b61666a4565d0633e34f72d04d.
    
    Undo the library version bump.

commit 75b2a2f999ccf3983d815a4da8e161aa67c9f8a0
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 11:04:19 2011 +0100

    Revert "libwbclient: remove wbcRemoveGidMapping() - not implemented any more"
    
    This reverts commit 393c866c517636e94b48ca6030a57b712892d568.
    
    Undo the library version bump.

commit 748cccde42da69cceb4d748887c142919b77cb47
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 11:04:15 2011 +0100

    Revert "libwbclient: remove wbcSetUidHwm() - not implemented any more"
    
    This reverts commit 6558323c84cdd929716c59ba66d2ae6b699931d2.
    
    Undo the library version bump.

commit 7a3bc46e7b50331af411678eae2807f4e2569c66
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 11:04:11 2011 +0100

    Revert "libwbclient: remove wbcSetGidHwm() - not implemented any more"
    
    This reverts commit 68a9b726be84aaaaa340f19e175da448409430b3.
    
    Undo the library version bump.

commit 9bc1a7ba1639e4f029058743c548e0f1b102a2ce
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 11:04:06 2011 +0100

    Revert "libwbclient: bump version to 0.6 -> 1.0 due to ABI change (removed symbols)"
    
    This reverts commit 128bed20c4570fa23bea4d0d49deae811a67a624.
    
    Undo the library version bump.

commit d0ceb4c83a109171540218fd4090219787980095
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 11:03:59 2011 +0100

    Revert "nsswitch: libwbclient has vnum 1 now."
    
    This reverts commit c9cb42a27634a0a711d48762c779c6b2f7c338e2.
    
    Undo the library version bump.

commit 76ea4fd03a36985a5e45b5d92b585bfbd3aa53d7
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 10:59:18 2011 +0100

    Revert "nsswitch: remove unused code from wbinfo.c"
    
    This reverts commit 3bdd2efff8d11448275965b464ac194a2ee0d3ae.
    
    Undo the library version bump.

-----------------------------------------------------------------------

Summary of changes:
 nsswitch/libwbclient/wbc_idmap.c   |   40 ++++++++
 nsswitch/libwbclient/wbclient.h    |   89 +++++++++++++++--
 nsswitch/libwbclient/wscript_build |    2 +-
 nsswitch/wbinfo.c                  |  193 ++++++++++++++++++++++++++++++++++++
 source3/configure.in               |    2 +-
 5 files changed, 314 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/libwbclient/wbc_idmap.c b/nsswitch/libwbclient/wbc_idmap.c
index c0193ca..ab8de9f 100644
--- a/nsswitch/libwbclient/wbc_idmap.c
+++ b/nsswitch/libwbclient/wbc_idmap.c
@@ -266,3 +266,43 @@ wbcErr wbcAllocateGid(gid_t *pgid)
  done:
 	return wbc_status;
 }
+
+/* we can't include smb.h here... */
+#define _ID_TYPE_UID 1
+#define _ID_TYPE_GID 2
+
+/* Set an user id mapping - not implemented any more */
+wbcErr wbcSetUidMapping(uid_t uid, const struct wbcDomainSid *sid)
+{
+	return WBC_ERR_NOT_IMPLEMENTED;
+}
+
+/* Set a group id mapping - not implemented any more */
+wbcErr wbcSetGidMapping(gid_t gid, const struct wbcDomainSid *sid)
+{
+	return WBC_ERR_NOT_IMPLEMENTED;
+}
+
+/* Remove a user id mapping - not implemented any more */
+wbcErr wbcRemoveUidMapping(uid_t uid, const struct wbcDomainSid *sid)
+{
+	return WBC_ERR_NOT_IMPLEMENTED;
+}
+
+/* Remove a group id mapping - not implemented any more */
+wbcErr wbcRemoveGidMapping(gid_t gid, const struct wbcDomainSid *sid)
+{
+	return WBC_ERR_NOT_IMPLEMENTED;
+}
+
+/* Set the highwater mark for allocated uids - not implemented any more */
+wbcErr wbcSetUidHwm(uid_t uid_hwm)
+{
+	return WBC_ERR_NOT_IMPLEMENTED;
+}
+
+/* Set the highwater mark for allocated gids - not implemented any more */
+wbcErr wbcSetGidHwm(gid_t gid_hwm)
+{
+	return WBC_ERR_NOT_IMPLEMENTED;
+}
diff --git a/nsswitch/libwbclient/wbclient.h b/nsswitch/libwbclient/wbclient.h
index 83fe73c..bd5a51c 100644
--- a/nsswitch/libwbclient/wbclient.h
+++ b/nsswitch/libwbclient/wbclient.h
@@ -66,16 +66,9 @@ const char *wbcErrorString(wbcErr error);
  *  0.4: Added wbcSidTypeString()
  *  0.5: Added wbcChangeTrustCredentials()
  *  0.6: Made struct wbcInterfaceDetails char* members non-const
- *  1.0: ABI change: removed the following:
- *       wbcSetUidMapping()
- *       wbcSetGidMapping()
- *       wbcRemoveUidMapping()
- *       wbcRemoveGidMapping()
- *       wbcSetUidHwm()
- *       wbcSetGidHwm()
- **/
-#define WBCLIENT_MAJOR_VERSION 1
-#define WBCLIENT_MINOR_VERSION 0
+ **/
+#define WBCLIENT_MAJOR_VERSION 0
+#define WBCLIENT_MINOR_VERSION 6
 #define WBCLIENT_VENDOR_VERSION "Samba libwbclient"
 struct wbcLibraryDetails {
 	uint16_t major_version;
@@ -793,6 +786,82 @@ wbcErr wbcAllocateUid(uid_t *puid);
  **/
 wbcErr wbcAllocateGid(gid_t *pgid);
 
+/**
+ * @brief Set an user id mapping
+ *
+ * @param uid       Uid of the desired mapping.
+ * @param *sid      Pointer to the sid of the diresired mapping.
+ *
+ * @return #wbcErr
+ *
+ * @deprecated      This method is not impemented any more and should
+ *                  be removed in the next major version change.
+ **/
+wbcErr wbcSetUidMapping(uid_t uid, const struct wbcDomainSid *sid);
+
+/**
+ * @brief Set a group id mapping
+ *
+ * @param gid       Gid of the desired mapping.
+ * @param *sid      Pointer to the sid of the diresired mapping.
+ *
+ * @return #wbcErr
+ *
+ * @deprecated      This method is not impemented any more and should
+ *                  be removed in the next major version change.
+ **/
+wbcErr wbcSetGidMapping(gid_t gid, const struct wbcDomainSid *sid);
+
+/**
+ * @brief Remove a user id mapping
+ *
+ * @param uid       Uid of the mapping to remove.
+ * @param *sid      Pointer to the sid of the mapping to remove.
+ *
+ * @return #wbcErr
+ *
+ * @deprecated      This method is not impemented any more and should
+ *                  be removed in the next major version change.
+ **/
+wbcErr wbcRemoveUidMapping(uid_t uid, const struct wbcDomainSid *sid);
+
+/**
+ * @brief Remove a group id mapping
+ *
+ * @param gid       Gid of the mapping to remove.
+ * @param *sid      Pointer to the sid of the mapping to remove.
+ *
+ * @return #wbcErr
+ *
+ * @deprecated      This method is not impemented any more and should
+ *                  be removed in the next major version change.
+ **/
+wbcErr wbcRemoveGidMapping(gid_t gid, const struct wbcDomainSid *sid);
+
+/**
+ * @brief Set the highwater mark for allocated uids.
+ *
+ * @param uid_hwm      The new uid highwater mark value
+ *
+ * @return #wbcErr
+ *
+ * @deprecated      This method is not impemented any more and should
+ *                  be removed in the next major version change.
+ **/
+wbcErr wbcSetUidHwm(uid_t uid_hwm);
+
+/**
+ * @brief Set the highwater mark for allocated gids.
+ *
+ * @param gid_hwm      The new gid highwater mark value
+ *
+ * @return #wbcErr
+ *
+ * @deprecated      This method is not impemented any more and should
+ *                  be removed in the next major version change.
+ **/
+wbcErr wbcSetGidHwm(gid_t gid_hwm);
+
 /**********************************************************
  * NSS Lookup User/Group details
  **********************************************************/
diff --git a/nsswitch/libwbclient/wscript_build b/nsswitch/libwbclient/wscript_build
index 9fffa94..896e17d 100644
--- a/nsswitch/libwbclient/wscript_build
+++ b/nsswitch/libwbclient/wscript_build
@@ -4,5 +4,5 @@ bld.SAMBA_LIBRARY('wbclient',
 	source='wbc_guid.c wbc_idmap.c wbclient.c wbc_pam.c wbc_pwd.c wbc_sid.c wbc_util.c',
 	deps='winbind-client',
 	public_headers='wbclient.h',
-	vnum='1'
+	private_library=True
 	)
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index 1056fb3..caa37f3 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -139,6 +139,31 @@ static bool parse_wbinfo_domain_user(const char *domuser, fstring domain,
 	return true;
 }
 
+/* Parse string of "uid,sid" or "gid,sid" into separate int and string values.
+ * Return true if input was valid, false otherwise. */
+static bool parse_mapping_arg(char *arg, int *id, char **sid)
+{
+	char *tmp, *endptr;
+
+	if (!arg || !*arg)
+		return false;
+
+	tmp = strtok(arg, ",");
+	*sid = strtok(NULL, ",");
+
+	if (!tmp || !*tmp || !*sid || !**sid)
+		return false;
+
+	/* Because atoi() can return 0 on invalid input, which would be a valid
+	 * UID/GID we must use strtoul() and do error checking */
+	*id = strtoul(tmp, &endptr, 10);
+
+	if (endptr[0] != '\0')
+		return false;
+
+	return true;
+}
+
 /* pull pwent info for a given user */
 
 static bool wbinfo_get_userinfo(char *user)
@@ -1015,6 +1040,122 @@ static bool wbinfo_allocate_gid(void)
 	return true;
 }
 
+static bool wbinfo_set_uid_mapping(uid_t uid, const char *sid_str)
+{
+	wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
+	struct wbcDomainSid sid;
+
+	/* Send request */
+
+	wbc_status = wbcStringToSid(sid_str, &sid);
+	if (!WBC_ERROR_IS_OK(wbc_status)) {
+		d_fprintf(stderr, "failed to call wbcStringToSid: %s\n",
+			  wbcErrorString(wbc_status));
+		return false;
+	}
+
+	wbc_status = wbcSetUidMapping(uid, &sid);
+	if (!WBC_ERROR_IS_OK(wbc_status)) {
+		d_fprintf(stderr, "failed to call wbcSetUidMapping: %s\n",
+			  wbcErrorString(wbc_status));
+		return false;
+	}
+
+	/* Display response */
+
+	d_printf("uid %u now mapped to sid %s\n",
+		(unsigned int)uid, sid_str);
+
+	return true;
+}
+
+static bool wbinfo_set_gid_mapping(gid_t gid, const char *sid_str)
+{
+	wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
+	struct wbcDomainSid sid;
+
+	/* Send request */
+
+	wbc_status = wbcStringToSid(sid_str, &sid);
+	if (!WBC_ERROR_IS_OK(wbc_status)) {
+		d_fprintf(stderr, "failed to call wbcStringToSid: %s\n",
+			  wbcErrorString(wbc_status));
+		return false;
+	}
+
+	wbc_status = wbcSetGidMapping(gid, &sid);
+	if (!WBC_ERROR_IS_OK(wbc_status)) {
+		d_fprintf(stderr, "failed to call wbcSetGidMapping: %s\n",
+			  wbcErrorString(wbc_status));
+		return false;
+	}
+
+	/* Display response */
+
+	d_printf("gid %u now mapped to sid %s\n",
+		(unsigned int)gid, sid_str);
+
+	return true;
+}
+
+static bool wbinfo_remove_uid_mapping(uid_t uid, const char *sid_str)
+{
+	wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
+	struct wbcDomainSid sid;
+
+	/* Send request */
+
+	wbc_status = wbcStringToSid(sid_str, &sid);
+	if (!WBC_ERROR_IS_OK(wbc_status)) {
+		d_fprintf(stderr, "failed to call wbcStringToSid: %s\n",
+			  wbcErrorString(wbc_status));
+		return false;
+	}
+
+	wbc_status = wbcRemoveUidMapping(uid, &sid);
+	if (!WBC_ERROR_IS_OK(wbc_status)) {
+		d_fprintf(stderr, "failed to call wbcRemoveUidMapping: %s\n",
+			  wbcErrorString(wbc_status));
+		return false;
+	}
+
+	/* Display response */
+
+	d_printf("Removed uid %u to sid %s mapping\n",
+		(unsigned int)uid, sid_str);
+
+	return true;
+}
+
+static bool wbinfo_remove_gid_mapping(gid_t gid, const char *sid_str)
+{
+	wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
+	struct wbcDomainSid sid;
+
+	/* Send request */
+
+	wbc_status = wbcStringToSid(sid_str, &sid);
+	if (!WBC_ERROR_IS_OK(wbc_status)) {
+		d_fprintf(stderr, "failed to call wbcStringToSid: %s\n",
+			  wbcErrorString(wbc_status));
+		return false;
+	}
+
+	wbc_status = wbcRemoveGidMapping(gid, &sid);
+	if (!WBC_ERROR_IS_OK(wbc_status)) {
+		d_fprintf(stderr, "failed to call wbcRemoveGidMapping: %s\n",
+			  wbcErrorString(wbc_status));
+		return false;
+	}
+
+	/* Display response */
+
+	d_printf("Removed gid %u to sid %s mapping\n",
+		(unsigned int)gid, sid_str);
+
+	return true;
+}
+
 /* Convert sid to string */
 
 static bool wbinfo_lookupsid(const char *sid_str)
@@ -1811,6 +1952,10 @@ enum {
 	OPT_USERSIDS,
 	OPT_ALLOCATE_UID,
 	OPT_ALLOCATE_GID,
+	OPT_SET_UID_MAPPING,
+	OPT_SET_GID_MAPPING,
+	OPT_REMOVE_UID_MAPPING,
+	OPT_REMOVE_GID_MAPPING,
 	OPT_SEPARATOR,
 	OPT_LIST_ALL_DOMAINS,
 	OPT_LIST_OWN_DOMAIN,
@@ -1837,8 +1982,10 @@ int main(int argc, char **argv, char **envp)
 	TALLOC_CTX *frame = talloc_stackframe();
 	poptContext pc;
 	static char *string_arg;
+	char *string_subarg = NULL;
 	static char *opt_domain_name;
 	static int int_arg;
+	int int_subarg = -1;
 	int result = 1;
 	bool verbose = false;
 	bool use_ntlmv2 = false;
@@ -1869,6 +2016,10 @@ int main(int argc, char **argv, char **envp)
 		  "Get a new UID out of idmap" },
 		{ "allocate-gid", 0, POPT_ARG_NONE, 0, OPT_ALLOCATE_GID,
 		  "Get a new GID out of idmap" },
+		{ "set-uid-mapping", 0, POPT_ARG_STRING, &string_arg, OPT_SET_UID_MAPPING, "Create or modify uid to sid mapping in idmap", "UID,SID" },
+		{ "set-gid-mapping", 0, POPT_ARG_STRING, &string_arg, OPT_SET_GID_MAPPING, "Create or modify gid to sid mapping in idmap", "GID,SID" },
+		{ "remove-uid-mapping", 0, POPT_ARG_STRING, &string_arg, OPT_REMOVE_UID_MAPPING, "Remove uid to sid mapping in idmap", "UID,SID" },
+		{ "remove-gid-mapping", 0, POPT_ARG_STRING, &string_arg, OPT_REMOVE_GID_MAPPING, "Remove gid to sid mapping in idmap", "GID,SID" },
 		{ "check-secret", 't', POPT_ARG_NONE, 0, 't', "Check shared secret" },
 		{ "change-secret", 'c', POPT_ARG_NONE, 0, 'c', "Change shared secret" },
 		{ "ping-dc", 'P', POPT_ARG_NONE, 0, 'P',
@@ -2068,6 +2219,48 @@ int main(int argc, char **argv, char **envp)
 				goto done;
 			}
 			break;
+		case OPT_SET_UID_MAPPING:
+			if (!parse_mapping_arg(string_arg, &int_subarg,
+				&string_subarg) ||
+			    !wbinfo_set_uid_mapping(int_subarg, string_subarg))
+			{
+				d_fprintf(stderr, "Could not create or modify "
+					  "uid to sid mapping\n");
+				goto done;
+			}
+			break;
+		case OPT_SET_GID_MAPPING:
+			if (!parse_mapping_arg(string_arg, &int_subarg,
+			        &string_subarg) ||
+			    !wbinfo_set_gid_mapping(int_subarg, string_subarg))
+			{
+				d_fprintf(stderr, "Could not create or modify "
+					  "gid to sid mapping\n");
+				goto done;
+			}
+			break;
+		case OPT_REMOVE_UID_MAPPING:
+			if (!parse_mapping_arg(string_arg, &int_subarg,
+				&string_subarg) ||
+			    !wbinfo_remove_uid_mapping(int_subarg,
+				string_subarg))
+			{
+				d_fprintf(stderr, "Could not remove uid to sid "
+				    "mapping\n");
+				goto done;
+			}
+			break;
+		case OPT_REMOVE_GID_MAPPING:
+			if (!parse_mapping_arg(string_arg, &int_subarg,
+			        &string_subarg) ||
+			    !wbinfo_remove_gid_mapping(int_subarg,
+			        string_subarg))
+			{
+				d_fprintf(stderr, "Could not remove gid to sid "
+				    "mapping\n");
+				goto done;
+			}
+			break;
 		case 't':
 			if (!wbinfo_check_secret(opt_domain_name)) {
 				d_fprintf(stderr, "Could not check secret\n");
diff --git a/source3/configure.in b/source3/configure.in
index 363fbac..d102ea5 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6322,7 +6322,7 @@ else
 
 	LIBWBCLIENT_SHARED_TARGET=bin/libwbclient.$SHLIBEXT
 	LIBWBCLIENT_STATIC_TARGET=bin/libwbclient.a
-	LIBWBCLIENT_SOVER=1
+	LIBWBCLIENT_SOVER=0
 	if test $BLDSHARED = true -a x"$HAVE_WINBIND" = x"yes" -a x"$BUILD_LIBWBCLIENT_SHARED" = x"yes"; then
 		NSS_MODULES="${WINBIND_NSS} ${WINBIND_WINS_NSS}"
 		## Only worry about libwbclient if we have shared


-- 
Samba Shared Repository


More information about the samba-cvs mailing list