Quota on groups with spaces

View: New views
2 Messages — Rating Filter:   Alert me  

Quota on groups with spaces

by Johan Karel Maria Dams :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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
Lam-public@...
https://lists.sourceforge.net/lists/listinfo/lam-public

Re: Quota on groups with spaces

by Roland Gruber (LAM) :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Johan,

Johan Karel Maria Dams schrieb:
> 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".

thanks for the hint. LAM 2.9.0 will include a fix for this.


- --

Best regards

Roland Gruber


LDAP Account Manager
http://www.ldap-account-manager.org/

Want more? Get LDAP Account Manager Pro!
http://www.ldap-account-manager.org/lamcms/lamPro
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAksj0dcACgkQq/ywNCsrGZ7OcwCfX/CLMb5WZesKpbwjU+P6D5C6
mJEAnjnxaRjPAelNcW1qBp/EOVD9KHgp
=45Dw
-----END PGP SIGNATURE-----

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