Lines 265-274
Link Here
|
265 |
usernextfreeuid() { |
265 |
usernextfreeuid() { |
266 |
uidlist="$(ldap_search_getattr "${USER_BASEDN}" "(uidNumber=*)" "uidNumber" | ${SORT} -rg)" |
266 |
uidlist="$(ldap_search_getattr "${USER_BASEDN}" "(uidNumber=*)" "uidNumber" | ${SORT} -rg)" |
267 |
# if nothing was returned, the next number up is ours |
267 |
# if nothing was returned, the next number up is ours |
268 |
[ -z "${uidlist}" ] && uidlist="$((${UIDNUMBERMIN}))" |
268 |
# --> we'll return empty. |
269 |
# we do NOT do UID recycling at all, our code used to, but it turns out to be really slow |
269 |
# we do NOT do UID recycling at all, our code used to, but it turns out to be really slow |
270 |
for i in ${uidlist} ; do |
270 |
for i in ${uidlist} ; do |
271 |
if [ ${i} -lt ${UIDNUMBERMAX} -a ${i} -gt ${UIDNUMBERMIN} ]; then |
271 |
if [ ${i} -lt ${UIDNUMBERMAX} -a ${i} -ge ${UIDNUMBERMIN} ]; then |
272 |
i=$((${i}+1)) |
272 |
i=$((${i}+1)) |
273 |
if [ ${i} -lt ${UIDNUMBERMAX} -a ${i} -gt ${UIDNUMBERMIN} ]; then |
273 |
if [ ${i} -lt ${UIDNUMBERMAX} -a ${i} -gt ${UIDNUMBERMIN} ]; then |
274 |
echo $i |
274 |
echo $i |