All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: nfs@lists.sourceforge.net
Subject: rquota overflow fix never applied ?
Date: Tue, 30 Aug 2005 01:08:52 -0400	[thread overview]
Message-ID: <200508300108.52636.vapier@gentoo.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

Gentoo and Fedora both apply an old patch to resolve an overflow issue ... is 
this just a case of fixes never going upstream or is there a reason this 
hasnt been applied ... if so, can someone please clue me in ;)
-mike

[-- Attachment #2: nfs-utils-0.3.3-rquotad-overflow.patch --]
[-- Type: text/x-diff, Size: 1243 bytes --]

--- nfs-utils-0.3.3/utils/rquotad/rquota_server.c.orig	Wed Jun 27 12:45:56 2001
+++ nfs-utils-0.3.3/utils/rquotad/rquota_server.c	Thu Nov 11 14:36:39 2004
@@ -76,6 +76,7 @@ getquota_rslt *getquotainfo(int flags, c
    char *pathname, *qfpathname;
    int fd, err, id, type;
    struct stat stm, stn;
+   struct rquota *rquota;
 
    /*
     * First check authentication.
@@ -168,8 +169,16 @@ getquota_rslt *getquotainfo(int flags, c
           * Make a copy of the info into the last part of the remote quota
           * struct which is exactly the same.
           */
-         memcpy((caddr_t *)&result.getquota_rslt_u.gqr_rquota.rq_bhardlimit,
-                (caddr_t *)&dq_dqb, sizeof(struct dqblk));
+
+         rquota = &result.getquota_rslt_u.gqr_rquota;
+         rquota->rq_bhardlimit = dq_dqb.dqb_bhardlimit;
+         rquota->rq_bsoftlimit = dq_dqb.dqb_bsoftlimit;;
+         rquota->rq_curblocks = dq_dqb.dqb_curblocks;
+         rquota->rq_fhardlimit = dq_dqb.dqb_ihardlimit;
+         rquota->rq_fsoftlimit = dq_dqb.dqb_isoftlimit;
+         rquota->rq_curfiles = dq_dqb.dqb_curinodes;
+         rquota->rq_btimeleft = dq_dqb.dqb_btime;
+         rquota->rq_ftimeleft = dq_dqb.dqb_itime;
 
          return(&result);
       }

             reply	other threads:[~2005-08-30  5:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-30  5:08 Mike Frysinger [this message]
2005-08-30  6:09 ` rquota overflow fix never applied ? Neil Brown
2005-08-30 13:20   ` Mike Frysinger
2005-08-30 16:05   ` Trond Myklebust
2005-09-02  6:42     ` Neil Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200508300108.52636.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=nfs@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.