From: cajus Date: Fri, 2 Oct 2009 15:10:06 +0000 (+0000) Subject: Put some notes to the get_next_id function X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c4ec8162d6f81cabadba076ad17f27f30ffe58f2;p=gosa.git Put some notes to the get_next_id function git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14495 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/personal/posix/class_posixAccount.inc b/gosa-core/plugins/personal/posix/class_posixAccount.inc index f933d29fd..1ea0509e9 100644 --- a/gosa-core/plugins/personal/posix/class_posixAccount.inc +++ b/gosa-core/plugins/personal/posix/class_posixAccount.inc @@ -1361,6 +1361,30 @@ class posixAccount extends plugin } + function get_next_id_new($attrib, $dn) + { + /* ID to skip */ + $nobody= 65534; + + # again: + # Look for ID map entry (objectClass=sambaUnixIdPool) + + # If it does not exist, create one with these defaults + #dn: ou=idmap,$BASE + #objectClass: organizationalUnit + #objectClass: sambaUnixIdPool + #ou: idmap + #uidNumber: $minId + #gidNumber: $minId + + # Take $attrib, modify it to [$attrib] + 1 + # -> if $attrib does not exist -> bail out + # -> if this works, return [$attrib] + # -> if this does not work: goto again for max 3 times + # -> if this fails -> bail out + } + + function get_next_id($attrib, $dn) { $ids= array(); @@ -1416,9 +1440,9 @@ class posixAccount extends plugin msg_dialog::display(_("Error"), _("Cannot allocate a free ID!"), ERROR_DIALOG); exit; } - } + function reload() { /* Set base for all searches */