Age | Commit message (Collapse) | Author |
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
One variable declaration was missing when this config option was specified.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Commit b8ab76ad19e3c284ac14bd0450662bfc41719e03 creating split_nfs_mount()
forgot to remove zeroing of pathname character. That lead to broken reporting
quotas for NFSv3 mount points.
Thanks to anonymous reporter for spotting this.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
The computation counted with block limits as being in bytes. But they are
in quota blocks. Fix the math.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Conversion to generic quota scanning introduced a bug for XFS where we
stopped scanning after quotactl reported first error. quotactl for XFS
however reports ENOENT when it has nothing to report for a particular user
/ group and we shouldn't stop scanning after that. We tried to test for this
but the test was wrong. Fix it.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
We reopened temporary file with editted quota limits in O_RDONLY mode after
user has edited the limits. This is problematic when edquota is called to
edit more users because then we cannot write limits for the next user to
the file. So reopen the file O_RDWR mode.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Add gettext magic so that quota type names get to message catalogue.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
If quota_nld is run as daemon, daemon's PID will be stored into
/var/run/${PROGNAME}.pid file and it will be deleted on receiving SIGTERM
just before program termination.
PID file is used by init scripts to find and kill forked daemon.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Three dots in warnquota manpage shouldn't be in italics.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Allow user to specify filesystems to check with warnquota on command line.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Teach quota tools to handle quotas in system files on ext4. For this to work,
we slightly rework mount option parsing to allow distinguisting between
ext4 with classical quota files and ext4 with quotas in system files.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
We check hasquota() twice needlessly when changing quota state. Remove
one of the checks.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Time units were localized when printing (e.g. individual grace times) to file
for editing but were not localized when parsing them back. Fix it.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
The when ALTFORMAT=no is specified quota tools did not compile for three
years at least and noone noticed. Thus I declare the code unused and remove
it.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Former static factor (RPC_DQBLK_SIZE_BITS) had problem to carry values
bigger than hard-coded limit (2^(32 + RPC_DQBLK_SIZE_BITS) - 1).
This patch makes the factor dynamic. It selects best value to prevent
overflow (XDR has 32b variables, some file system support 64b quotas)
and to achieve highest possible precision.
The client site uses the factor carried via RPC correctly.
There is similar problem with setquota. This patch does not address it,
however it can be easily resused and fixed.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
E.g. setquota -r root $((2**32)) 1000 10 10 /mnt/nfs/12tb
clamped the values into 32 bits and RPC server got 0 soft block limit.
This fixes simalar bug spotted in 8a4dc3612c6c170c05e5eef68dd3555baeb341c1
(Check whether set limits fit into the range supported by quota format.)
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
If no utmp record can be found there is obviously nobody to read error
message about missing TTY in sytem log in real time. Moreover the log
is usually illegible for normal user. So it's pointless to log this
fact there for user's sake. warnquota can be used instead.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
|
|
Old error messsage stated a quota file does not exist despite fact
get_qf_name() does not check the file existence. It constructs the
file name only.
This lead to misleading message when running initial `quotacheck -c'
on extended file system mounted with usrquota option only.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
There are some calls (e.g. getpwnam(3)) that can lead to dlopening
other libraries that could jump to symbol with name clashing to one of
global quota symbols. (e.g. Name server switch plug-in nss_db calls
dirname(3) that's already defined in edquota.c and tht can cause
segmentation fault.)
Although it's not possible to solve all these problems, making as much
as possible global objects and functions static is the best thing we
can do to avoid name space polution.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Some filesystem do not have quota files accessible from userspace. For these
implementing ->scan_dquots() used by repquota is problematic. What we do is
that we iterate over all users and ask for quota information for each of them.
XFS already does this so make its code generic and use it for all filesystems
using quotaio_meta.c - only OCFS2 these days.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
v2r1_mem2diskdqblk() that writes quota structure into memory block
calls tree_entry_unused() to decide the structure is in use (and
rewrites UID then). However tree_entry_unused() scan can be spoiled
because padding is not initialized and contains random value.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
The ddquot buffer is used to tranfer data from/to file. All its data are
copied from/to it, so it's not needed after return from qtree_read_dquot()/
qtree_write_dquot().
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
The check was the other way around thus making setting of grace times
impossible.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Testing revealed that it's not easy to set even individual grace times
over RPC protocol. Since the usage of it is limited, just disallow that.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Providing private domain names in default warnquota.conf can tend
some users to reply. Owners of that domain could get mad.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
NFS handles server names with colons (usually IPv6 addresses) by encapsulating
them in brackets. Handle this properly.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Otherwise `quotackech -c -F vfsold' fails with `Trying to set quota
usage out of range supported by quota format on...' because initial
boundary is zero.
Fixes SF bug #3176326.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Although GFS2 maintains quota as metadata, it sometimes might need to
check quota usage (most notably when quota is enabled for the first time).
So add support for GFS2 in quotacheck.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Add tool allowing to sync quotas for some / all filesystems.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
This option controls a leading slash, not a trailing one.
The quota(1) page talks about quota, not about setquota.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Stripping binaries may cause problems during crosscompilation.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
This copy --always-resolve option description for quota(1) into
edquota(8) and setquota(8) manuals.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Warnquota tried to stat possibly non-existing /dev/hda4.
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
The names are actually truncated to 9 characters, not 8.
Signed-off-by: Jan Kara <jack@suse.cz>
|