quota group

Andrew Bartlett abartlet at samba.org
Wed Mar 5 10:55:33 GMT 2003


On Wed, 2003-03-05 at 20:32, Massimo Del Sarto wrote:
> I use samba on redhat linux (7.1)
> For default in redhat each user has also his own group.
> 
> I created a new group for each samba share that I defined so I can control 
> which users can access to the shares, but if I use the user quota I can't 
> control the quota on this shares.
> Using a group quota I can assign separate quota to each share (the shares 
> are on the same HD partition):
> - each user has a quota on the home share
> - each "not home" share has its own quota
> 
> The only problem is that I can't see the quota in windows box. So I 
> modified the smbd/quotas.c to read the quota group associated to the group 
> of the file/directory if the user quota result is 0 (zero). I added a 
> parameter to the function get_smb_linux_* to get an user or a group quota.

Wouldn't it be better to report the smaller of the two quotas?


> I attach the output of the commnad:
> diff -u -r samba-2.2.7a/source/smbd/quotas.c 
> samba-2.2.7amds/source/smbd/quotas.c
> 
> 
> --- samba-2.2.7a/source/smbd/quotas.c   Wed Dec 11 10:17:40 2002
> +++ samba-2.2.7amds/source/smbd/quotas.c        Tue Mar  4 09:43:05 2003
> @@ -66,13 +66,18 @@
>    Abstract out the XFS Quota Manager quota get call.
>   ****************************************************************************/
> 
> -static int get_smb_linux_xfs_quota(char *path, uid_t euser_id, 
> LINUX_SMB_DISK_QUOTA *dp)
> +static int get_smb_linux_xfs_quota(char *path, uid_t euser_id, 
> LINUX_SMB_DISK_QUOTA *dp, char type )

Make this a BOOL for type 'group_quota' or even better an enum with
values 'USER_QUOTA, GROUP_QUOTA'.

If you can repatch this against HEAD, and check with metze (Stefan
(metze) Metzmacher <metze at metzemix.de>) on how this might conflict with
his work in this area.  In particular, it might work out best that metze
picks this up into his patch.  (He is working on being able to modify
the quota from an Windows client!).

Either way, this certainly is a very nice idea!

Andrew Bartlett

-- 
Andrew Bartlett                                 abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team  abartlet at samba.org
Student Network Administrator, Hawker College   abartlet at hawkerc.net
http://samba.org     http://build.samba.org     http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20030305/f8ce6689/attachment.bin


More information about the samba-technical mailing list