X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=utils%2Frquotad%2Fhasquota.c;h=d2d81153b5c0c9e634249bfd09394759cc73cc74;hb=a021f1f459d8fd471123848c8f83a73a5fc1629e;hp=008a93f7462ffc1ed1e6d9d61e5f66d1bb8bf19b;hpb=8b7ad01b14df1e7529b9ba8a1ea17df0d6004ef9;p=nfs-utils.git diff --git a/utils/rquotad/hasquota.c b/utils/rquotad/hasquota.c index 008a93f..d2d8115 100644 --- a/utils/rquotad/hasquota.c +++ b/utils/rquotad/hasquota.c @@ -19,7 +19,11 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -#include "config.h" + +#ifdef HAVE_CONFIG_H +#include +#endif +#define _LINUX_QUOTA_VERSION 1 #include #include @@ -32,7 +36,7 @@ #define min(x,y) ((x) < (y)) ? (x) : (y) #define CORRECT_FSTYPE(type) \ -(!strcmp(type,MNTTYPE_EXT2)) +((!strcmp(type,MNTTYPE_EXT2)) || (!strcmp(type,MNTTYPE_EXT3))) char *qfextension[] = INITQFNAMES; @@ -51,7 +55,7 @@ hasquota(struct mntent *mnt, int type, char **qfnamep) if (((type == USRQUOTA) && (option = hasmntopt(mnt, MNTOPT_USRQUOTA)) != (char *)0) || ((type == GRPQUOTA) && (option = hasmntopt(mnt, MNTOPT_GRPQUOTA)) != (char *)0)) { if ((pathname = strchr(option, '=')) == (char *)0) { - *qfnamep=xmalloc(strlen(mnt->mnt_dir)+strlen(qfname)+strlen(qfextension[type])+2); + *qfnamep=xmalloc(strlen(mnt->mnt_dir)+strlen(qfname)+strlen(qfextension[type])+3); (void) sprintf(*qfnamep, "%s%s%s.%s", mnt->mnt_dir, (mnt->mnt_dir[strlen(mnt->mnt_dir) - 1] == '/') ? "" : "/", qfname, qfextension[type]);