Bug#991545: gosa: gen_uids() function not producing expected results

Mike Gabriel mike.gabriel at das-netzwerkteam.de
Tue Jul 27 08:01:45 BST 2021


Package: src:gosa
Severity: important
Version: 2.7.4+reloaded3-8+deb10u2
Tags: patch

While mass creating users these days for a school customer, I noticed  
that an idGenerator expression such as "{%sn[6-8]}{%givenName[2-4]}"  
does not produce expected results if many UIDs have already been taken.

In my case (making up names here), I had

   sn: Fresher
   givenName: Jim

The following login name was already in use:

   fresheji

So, the expected results for gen_uids() would have been:

   fresherji
   freshejim
   fresherjim

But gen_uids() returned an empty result array().

This is caused by an off-by-one string element check in gen_uids().

Patch attached.

Mike
-- 

DAS-NETZWERKTEAM
c\o Technik- und Ökologiezentrum Eckernförde
Mike Gabriel, Marienthaler Str. 17, 24340 Eckernförde
mobile: +49 (1520) 1976 148
landline: +49 (4351) 850 8940

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: mike.gabriel at das-netzwerkteam.de, http://das-netzwerkteam.de

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-include-functions.inc-Resolve-UID-generation-for-cas.patch
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-pkg-team/attachments/20210727/ba9a6a13/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 851 bytes
Desc: Digitale PGP-Signatur
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-pkg-team/attachments/20210727/ba9a6a13/attachment-0001.sig>


More information about the Debian-edu-pkg-team mailing list