mirror of
https://github.com/samba-team/samba.git
synced 2025-08-26 01:49:31 +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 commit is contained in:
committed by
Gerald (Jerry) Carter
parent
550f651499
commit
d303cc7e62
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user