summaryrefslogtreecommitdiff
path: root/rquota_server.c
AgeCommit message (Collapse)Author
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-06-12Fix computation of dynamic rpc block sizeJan Kara
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>
2011-11-17Add support for quotas on ext4 in system filesJan Kara
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>
2011-10-04Make RPC block factor dynamicPetr Písař
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>
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)
2009-09-21Fixed mountpoint scanning when NFS mountpoint is specified on command line ↵jkar8572
(Jan Kara)
2007-08-27Removed -m option for the server. After some discussions I agree it does not ↵jkar8572
make much sense. (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-06-01Parse NFSD export table to find out pseudofilesystem root for NFSv4 (Jan Kara)jkar8572
2004-05-24Updated version to 3.12jkar8572
Fixed a few memleaks Added two manpages Fixed problem with all-zero root structure
2003-12-02Implementing alternative port for rpc.rquotad to listen on.jkar8572
2003-10-18Fixed fake error messages from rpc.rquotadjkar8572
Fixed reporting of quotas on NFS filesystem without quotas
2003-05-21Added forgotten handling of autofs mountpoints to rpc.rquotad.jkar8572
2002-05-03Fixed bug with rpc.rquotad bad path processing.jkar8572
2001-11-26Fixed initialization of mountpoint scanning (leading to rpc.rquotad SEGFAULT).jkar8572
rpc.rquotad now doesn't need mountpoint to get quota.
2001-09-27Implemented setting only limits by commit_dquot() so edquota & setquota can ↵jkar8572
operate safe on live filesystem.
2001-08-22Implemented better error handling of RPC calls.jkar8572
Implemented better host access handling (from nfsutils rquotad).
2001-08-21Updated host checking from nfsutils rquotad().jkar8572
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-18Added -V to manpages of convertquotajkar8572
Fixed SEGFAULT bug in rquota_server (when quota init failed)
2001-06-07Fixed problem in sending grace times (left time is sent, not time whenjkar8572
quota will be forced).
2001-05-02Added mntopt.h to dependencies in Makefile.in.jkar8572
Fixed MNTTYPE_REISER to proper string. sprintf->snprintf Merged Marco's patch with errstr(), configurable BSD behaviour Fixed bug in quota detection IO code now opens file only RO if possible. IO code now doesn't open file if not required. Fixed bug in quotaon. Updated all manpages.
2001-03-23Initial revisionjkar8572