Package: gosa
Version: 2.7.4+reloaded2-1
Severity: important
Tags: patch
User: debian-...@lists.debian.org
Usertags: debian-edu

When testing gosa 2.7.4 in Debian Edu jessie, the following issue occurred with the idGenerator parser in functions.inc (gen_uuids() function):

With:

idGenerator="{%sn[3-6]}-{%givenName[3-6]}"

the expected result (GOsa² 2.6) for a given fullname "Abcdefg Hijklmn" would be:

  hij-abc
  hijk-abc
  hijk-abcd
  hijkl-abcd
  hijkl-abcde
  hijklm-abcde
  hijklm-abcdef

In words:

  o Use the first three letters of the "SN" (surname).
  o Use the first three letters of the "givenName" (first name)
o If the resuling UID already exists in LDAP, try adding the next letter to SN
  o If that UID also exist, try adding the next letter to givenName
  o etc.
  o if 6 letters of the last name and 6 letter of the first name don't
provide you with a unique login in LDAP, provide a text field for manual login UID input

But what happens in GOsa² 2.7 is this:

  j-c
  jk-c
  jk-cd
  jkl-cd
  jkl-cde

which is complete non-sense to my mind. As you can see, the generate login ID starts at positions 3 of the givenName and sn attributes.

My proposal is to re-instate the previous behaviour of GOsa² 2.6 with GOsa² 2.7 in Debian jessie and beyond.

Patch is attached.

Mike
--

DAS-NETZWERKTEAM
mike gabriel, herweg 7, 24357 fleckeby
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: mike.gabr...@das-netzwerkteam.de, http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
Description: Re-instate GOsa² 2.6 uid-from-fullname generation
Author: Mike Gabriel <mike.gabr...@das-netzwerkteam.de>

--- a/gosa-core/include/functions.inc
+++ b/gosa-core/include/functions.inc
@@ -3831,7 +3831,7 @@
             for($i=$match[5]; $i<= $match[7]; $i++){
                 if(isset($attributes[$match[2]][$i])){
                     $tmp = " ".$attributes[$match[2]];
-                    $str .= $tmp[$i];
+                    $str = substr ($tmp, 1, $i);
                     $replacements[$match[0]][] = trim($str);
                 }
             }

Attachment: pgp_kQgwNwnQH.pgp
Description: Digitale PGP-Signatur

Reply via email to