diff options
author | Jan Kara <jack@suse.cz> | 2022-11-01 11:45:06 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2022-11-01 11:45:06 +0100 |
commit | f7e24ee92d9bc16557132b33a34a6154aafd99d7 (patch) | |
tree | 0fe64b5db5c29afced421d8b2b57ccd9203d3c63 /edquota.c | |
parent | 037eaa6037789a3fac082ca1d6e240073943ca1a (diff) | |
download | linuxquota-f7e24ee92d9bc16557132b33a34a6154aafd99d7.tar.gz |
edquota: Fix editing of individual user grace times
When user is not over softlimit, there's no point to set the grace time.
The kernel will just ignore it. Output error message instead so that
user is not confused. Also editing of grace times when quotas are
enabled did not really work because we didn't tell the kernel grace
times have changed. Fix it.
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'edquota.c')
-rw-r--r-- | edquota.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -352,7 +352,8 @@ int main(int argc, char **argv) goto next_user; } } - if (putprivs(curprivs, COMMIT_LIMITS) == -1) + if (putprivs(curprivs, + (flags & FL_EDIT_TIMES) ? COMMIT_TIMES : COMMIT_LIMITS) == -1) ret = -1; next_user: freeprivs(curprivs); |