summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_dual_srv.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/winbindd/winbindd_dual_srv.c')
-rw-r--r--source3/winbindd/winbindd_dual_srv.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c
index b36bfbf93b..2a6f7ce99d 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -447,3 +447,25 @@ again:
return status;
}
+
+NTSTATUS _wbint_SetMapping(pipes_struct *p, struct wbint_SetMapping *r)
+{
+ struct id_map map;
+
+ map.sid = r->in.sid;
+ map.xid.id = r->in.id;
+ map.status = ID_MAPPED;
+
+ switch (r->in.type) {
+ case WBINT_ID_TYPE_UID:
+ map.xid.type = ID_TYPE_UID;
+ break;
+ case WBINT_ID_TYPE_GID:
+ map.xid.type = ID_TYPE_GID;
+ break;
+ default:
+ return NT_STATUS_INVALID_PARAMETER;
+ }
+
+ return idmap_set_mapping(&map);
+}