Age | Commit message (Collapse) | Author |
|
If NFS server does uses quotas, then it's high chance the RCP rquotad
service is not running at all. Then listing quotas for such NFS mount
point results into a warning about "connection refused".
This warning can be obtrusive if a host has mounted various mixture of
NFS exports with and without quotas.
This patch recognizes this special error state (after performing
a query to a client without running rquotad) and considers such
server as having quotas disabled. This silents the warning
effectively.
JK: Some coding style fixes, treat also rpc_set_quota() this way.
Signed-off-by: Petr Písař <ppisar@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
|
|
The RPC transports grace time as unsigned int, but the value stored
there and retrivedd from is treated as singed difference against current time.
This leads to overflow after expiring the grace time which is
presented as an enourmously large grace time instead of "none" in the
quota(1) output.
There also possible an overflow when the time difference is still
bigger than an int can represent.
This first issue is solved by explicit type cast to/from int32_t, the
second issue is fixes by limiting the value into int32_t range.
<https://sourceforge.net/p/linuxquota/bugs/115/>
Signed-off-by: Petr Písař <ppisar@redhat.com>
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>
|
|
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>
|
|
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>
|
|
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>
|
|
* Use /proc/mounts for mountpoint scanning (Jan Kara)
* Removed use of reserved identifiers (Jan Kara)
|
|
* added noreturn attribute to die to avoid false warnings (Jan Kara)
|
|
|
|
quota(1) and similar tools now use paths without leading / for NFSv4
mounts (Jan Kara)
|
|
|
|
used when it should be (Jan Kara)
|
|
Fixed reporting of quotas on NFS filesystem without quotas
|
|
Disabled setquota by default in config and daemon. (Jan Kara)
|
|
Implemented better host access handling (from nfsutils rquotad).
|
|
Implemented new mountpoint scanning.
Implemented caching for scanning in old quota format.
Implemented automatic choice of appropriate units in repquota, quota.
|
|
|
|
quota will be forced).
|
|
|