summaryrefslogtreecommitdiff
path: root/rquota_client.c
AgeCommit message (Collapse)Author
2014-11-26Skip NFS mounts without rquotad RPC service silentlyPetr Písař
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>
2014-05-01Prevent from grace period overflow in RPC transportPetr Písař
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>
2012-08-20quota: Fix reporting of NFS mountpointsJan Kara
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>
2011-10-04Check set limits fit into the range supported by RPC transportPetr Písař
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>
2011-05-16Make global symbols static as possiblePetr Pisar
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>
2011-02-16Make RPC handle properly host names with colonsJan Kara
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>
2010-09-09Remove useless $Id strings from headersJan Kara
Signed-off-by: Jan Kara <jack@suse.cz>
2010-01-05* Rewritten configuration script to create config.h (Jan Kara)jkar8572
* Use /proc/mounts for mountpoint scanning (Jan Kara) * Removed use of reserved identifiers (Jan Kara)
2009-12-14* convert quota limits using rq_bsize from RPC request (Jan Kara)jkar8572
* added noreturn attribute to die to avoid false warnings (Jan Kara)
2007-08-23Added options to enable pathname mangling for NFSv4 (Jan Kara)jkar8572
2007-08-23Made possible to use quota rpc in mixed NFSv3 and NFSv4 environments -jkar8572
quota(1) and similar tools now use paths without leading / for NFSv4 mounts (Jan Kara)
2005-03-31Various tools fixes (manpages, quotacheck, NFSv4) (Jan Kara)jkar8572
2004-02-12Partially reverted changes in RPC error detection - old RPC call was not ↵jkar8572
used when it should be (Jan Kara)
2003-10-18Fixed fake error messages from rpc.rquotadjkar8572
Fixed reporting of quotas on NFS filesystem without quotas
2002-06-27Updated rpc.rquotad doc. (Jan Kara)jkar8572
Disabled setquota by default in config and daemon. (Jan Kara)
2001-08-22Implemented better error handling of RPC calls.jkar8572
Implemented better host access handling (from nfsutils rquotad).
2001-08-15Fixed a few error messages.jkar8572
Implemented new mountpoint scanning. Implemented caching for scanning in old quota format. Implemented automatic choice of appropriate units in repquota, quota.
2001-07-17Fixed overflow of used space.jkar8572
2001-06-07Fixed problem in sending grace times (left time is sent, not time whenjkar8572
quota will be forced).
2001-03-23Initial revisionjkar8572