1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r19982: From Michael Adam (ma@sernet.de) (thanks!:-)

Metze: as noted by "shattered" and discussed on the irc,
  here is a patch to lib/sysquotas_linux.c replacing some
  "get"s by "set"s. The other lib/sysquotas*.c files look
  ok to me. But in the linux variant, the problem is not
  in the actual call of quotactl but in the preparation of
  the respective "D" structs. This makes the difference
  between the get and set calls for SMB_USER_FS_QUOTA_TYPE
  and SMB_GROUP_FS_QUOTA_TYPE.

metze
(This used to be commit d303cc7e62)
This commit is contained in:
Stefan Metzmacher 2006-12-01 15:12:22 +00:00 committed by Gerald (Jerry) Carter
parent cb0402c2d3
commit d908a897ed

View File

@ -526,9 +526,9 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
case SMB_USER_FS_QUOTA_TYPE:
id.uid = getuid();
if ((ret=sys_get_linux_gen_quota(path, bdev, qtype, id, dp))) {
if ((ret=sys_get_linux_v2_quota(path, bdev, qtype, id, dp))) {
ret=sys_get_linux_v1_quota(path, bdev, qtype, id, dp);
if ((ret=sys_set_linux_gen_quota(path, bdev, qtype, id, dp))) {
if ((ret=sys_set_linux_v2_quota(path, bdev, qtype, id, dp))) {
ret=sys_set_linux_v1_quota(path, bdev, qtype, id, dp);
}
}
@ -541,9 +541,9 @@ int sys_set_vfs_quota(const char *path, const char *bdev, enum SMB_QUOTA_TYPE qt
case SMB_GROUP_FS_QUOTA_TYPE:
id.gid = getgid();
if ((ret=sys_get_linux_gen_quota(path, bdev, qtype, id, dp))) {
if ((ret=sys_get_linux_v2_quota(path, bdev, qtype, id, dp))) {
ret=sys_get_linux_v1_quota(path, bdev, qtype, id, dp);
if ((ret=sys_set_linux_gen_quota(path, bdev, qtype, id, dp))) {
if ((ret=sys_set_linux_v2_quota(path, bdev, qtype, id, dp))) {
ret=sys_set_linux_v1_quota(path, bdev, qtype, id, dp);
}
}