Hi all.

First post to this mailing list. I've been using LAM since recently - very 
nice piece of software!

I found out today that setting quota on groups with spaces in their name, 
such as would be the case if running a LDAP/SAMBA combination as PDC in a 
Windows environment, is not possible. For example, it works fine for group 
names such as "Administrators" but fails for "Domain Users".

I've tracked down the problem to lamdaemon.pl, specifically at

@vals = split (' ', $input);

Where the group name would be split as individual arguments.

I've made a quick workaround which just checks if the third 
element in vals is 'quota' (instead of the normal second element), which 
would mean a split has occured in a group name with a space:

#Deal with spaces in group names
if( ($vals[2] eq 'quota') ){

     #Glue the two parts of the groupname together again
     $vals[0] = $vals[0]." ".$vals[1];

     #Move everything one position back
     for($count = 1; $count < @vals-1; $count++){
       $vals[$count] = $vals[$count+1];
     }
}


Don't know if this is 100% correct and according to coding guidelines but 
it seems to work, and if anyone else is running into this problem I hope 
this will help them fix it.


Best regards,
Johan


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Lam-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lam-public

Reply via email to