[SCM] Samba Shared Repository - branch v3-6-test updated

Michael Adam obnox at samba.org
Thu Feb 10 06:52:34 MST 2011


The branch, v3-6-test has been updated
       via  310a478 libwbclient: doxygen: mark wbcSetGidHwm deprecated
       via  75770b8 libwbclient: doxygen: mark wbcSetUidHwm deprecated
       via  a76e707 libwbclient: doxygen: mark wbcRemoveGidMapping deprecated
       via  ea49d7c libwbclient: doxygen: mark wbcRemoveUidMapping deprecated
       via  03e8e45 libwbclient: doxygen: mark wbcSetGidMapping deprecated
       via  3d94161 libwbclient: doxygen: mark wbcSetUidMapping deprecated
       via  ed4268a Revert "libwbclient: bump the libwbclient SOVER 0 -> 1 due to ABI changes"
       via  f4ca9ef Revert "wbinfo: remove --set-uid-mapping - winbindd does not implement that any more."
       via  ce986e7 Revert "wbinfo: remove --set-gid-mapping - winbindd does not implement that any more."
       via  95b16ec Revert "wbinfo: remove --remove-uid-mapping - winbindd does not implement that any more."
       via  6284c4d Revert "wbinfo: remove --remove-gid-mapping - winbindd does not implement that any more."
       via  05d56cb Revert "libwbclient: remove two unused defines"
       via  82ea5db Revert "libwbclient: remove wbcSetUidMapping() - not implemented any more"
       via  dc260ec Revert "libwbclient: remove wbcSetGidMapping() - not implemented any more"
       via  e7c8631 Revert "libwbclient: remove wbcRemoveUidMapping() - not implemented any more"
       via  b239214 Revert "libwbclient: remove wbcRemoveGidMapping() - not implemented any more"
       via  c0a47f2 Revert "libwbclient: remove wbcSetUidHwm() - not implemented any more"
       via  d239ac8 Revert "libwbclient: remove wbcSetGidHwm() - not implemented any more"
       via  a777cc8 Revert "libwbclient: bump version to 0.6 -> 1.0 due to ABI change (removed symbols)"
       via  09640cf Revert "nsswitch: libwbclient has vnum 1 now."
       via  0572bc5 Revert "nsswitch: remove unused code from wbinfo.c"
      from  3d8a5c6 librpc: move preg.idl to main directory.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit 310a478c3df664f81add385304a4cfca38df3618
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 75770b88f07e80451fdcb16097e896a9d3e80037
Author: Michael Adam <obnox at samba.org>
Date:   Thu Feb 10 12:48:01 2011 +0100

    libwbclient: doxygen: mark wbcSetUidHwm deprecated

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

    libwbclient: doxygen: mark wbcRemoveGidMapping deprecated

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

    libwbclient: doxygen: mark wbcRemoveUidMapping deprecated

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

    libwbclient: doxygen: mark wbcSetGidMapping deprecated

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

    libwbclient: doxygen: mark wbcSetUidMapping deprecated

commit ed4268af3b041b94357e1129ad6b75840eb42c2a
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 f4ca9ef73ff2d5f859ed86bd943433ad377dc5fa
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 ce986e7999ccc6f8b8713c1b8a6e342c94a4b0a5
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 95b16ec07066aa3e8b297871d2d36208b6fee933
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 6284c4ddc0162e268567531dc52d1bf374b49956
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 05d56cbfb8e266ca0d41c68061cb2a44e92550a9
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 82ea5dbfa16b198d685410d87433494eae6dc06d
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 dc260eccafd3e08c896734e59d74e49555be2bcd
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 e7c8631101ac54d0c585bfe8fc8c3711d2830595
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 b23921462c84f61c6859a2318bd99942fc1f2288
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 c0a47f25114befe4b20873ddcf682ab0ad18cffe
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 d239ac8fc5d7fe7a2108c7e1be57093e9c7413f4
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 a777cc8ccc423e3f469f36ca66ada7fcf0cf2e27
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 09640cf2434957c62ca75c8341cd1cc2eaa44bfa
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 0572bc56993b92357bbd9d36d44c4b9ae7be3fcc
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