summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2010-06-17 19:03:12 +0200
committerMichael Adam <obnox@samba.org>2010-08-14 02:10:53 +0200
commit3f39921e7e1175523766a108f338ea38038c5d79 (patch)
treee2befe9d9e1804af17417f1072bc3d44c2c92129
parent5518bcb840c288a4b041e1a0aa15e6cdefd9f028 (diff)
downloadsamba-3f39921e7e1175523766a108f338ea38038c5d79.tar.gz
samba-3f39921e7e1175523766a108f338ea38038c5d79.tar.bz2
samba-3f39921e7e1175523766a108f338ea38038c5d79.zip
s3:idmap_ldap: use ranges from idmap domain in idmap_ldap_allocate_id()
Second step in removing the idmap range from the idmap_ldap_alloc_context.
-rw-r--r--source3/winbindd/idmap_ldap.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source3/winbindd/idmap_ldap.c b/source3/winbindd/idmap_ldap.c
index 5d74697885..ff8509a396 100644
--- a/source3/winbindd/idmap_ldap.c
+++ b/source3/winbindd/idmap_ldap.c
@@ -325,7 +325,8 @@ static NTSTATUS idmap_ldap_alloc_init(struct idmap_domain *dom,
Allocate a new uid or gid
********************************/
-static NTSTATUS idmap_ldap_allocate_id(struct unixid *xid)
+static NTSTATUS idmap_ldap_allocate_id(struct idmap_domain *dom,
+ struct unixid *xid)
{
TALLOC_CTX *ctx;
NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
@@ -424,17 +425,17 @@ static NTSTATUS idmap_ldap_allocate_id(struct unixid *xid)
switch (xid->type) {
case ID_TYPE_UID:
- if (xid->id > idmap_alloc_ldap->high_uid) {
+ if (xid->id > dom->high_id) {
DEBUG(0,("Cannot allocate uid above %lu!\n",
- (unsigned long)idmap_alloc_ldap->high_uid));
+ (unsigned long)dom->high_id));
goto done;
}
break;
case ID_TYPE_GID:
- if (xid->id > idmap_alloc_ldap->high_gid) {
+ if (xid->id > dom->high_id) {
DEBUG(0,("Cannot allocate gid above %lu!\n",
- (unsigned long)idmap_alloc_ldap->high_uid));
+ (unsigned long)dom->high_id));
goto done;
}
break;