summaryrefslogtreecommitdiff
path: root/source3/winbindd/idmap_ldap.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-06-17 20:18:27 +0200
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:54 +0200
commit4ed6f315d93213154a39748c4ecc68d3d51df488 (patch)
tree70bab494b6f52fe74cc87e34f9df6e4923dcfb00 /source3/winbindd/idmap_ldap.c
parent5f77570bb6ba0a8e8233e5f8081acac48829e772 (diff)
downloadsamba-4ed6f315d93213154a39748c4ecc68d3d51df488.tar.gz
s3:idmap_ldap: add idmap_ldap_get_new_id() to allocate a new id given a domain
Currently this only works with the default domain, calling out to idmap_ldap_allocate_id(). In the future this will be extended to also work for non-default domains.
Diffstat (limited to 'source3/winbindd/idmap_ldap.c')
-rw-r--r--source3/winbindd/idmap_ldap.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index c7bc80f98a8..1079de1e1d7 100644
--- a/source3/winbindd/idmap_ldap.c
+++ b/source3/winbindd/idmap_ldap.c
@@ -497,6 +497,31 @@ done:
return ret;
}
+/**
+ * Allocate a new unix-ID.
+ * For now this is for the default idmap domain only.
+ * Should be extended later on.
+ */
+static NTSTATUS idmap_ldap_get_new_id(struct idmap_domain *dom,
+ struct unixid *id)
+{
+ NTSTATUS ret;
+
+ if (!strequal(dom->name, "*")) {
+ DEBUG(3, ("idmap_ldap_get_new_id: "
+ "Refusing allocation of a new unixid for domain'%s'. "
+ "Currently only supported for the default "
+ "domain \"*\".\n",
+ dom->name));
+ return NT_STATUS_NOT_IMPLEMENTED;
+ }
+
+ ret = idmap_ldap_allocate_id(dom, id);
+
+ return ret;
+}
+
+
/**********************************************************************
IDMAP MAPPING LDAP BACKEND
**********************************************************************/