summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-01-26 22:00:22 +0100
committerMichael Adam <obnox@samba.org>2011-01-27 21:43:48 +0100
commit0e90d01d53ee197a6451b7c55c2afa74e0d8b0bb (patch)
treebf0276f792b486ee602e0bb74492ba9a8eb470cd /nsswitch
parent14502c545893fd8f4bc8275bb4776bc7fa5840e0 (diff)
downloadsamba-0e90d01d53ee197a6451b7c55c2afa74e0d8b0bb.tar.gz
samba-0e90d01d53ee197a6451b7c55c2afa74e0d8b0bb.tar.bz2
samba-0e90d01d53ee197a6451b7c55c2afa74e0d8b0bb.zip
wbinfo: remove --set-uid-mapping - winbindd does not implement that any more.
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/wbinfo.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index caa37f3c9e..e97abbf0ef 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -1040,35 +1040,6 @@ 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;
@@ -1952,7 +1923,6 @@ 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,
@@ -2016,7 +1986,6 @@ 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" },
@@ -2219,16 +2188,6 @@ 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) ||