diff -u --recursive --new-file wu-ftpd-2.4.2-beta-14/src/config/config.aix wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/config/config.aix
--- wu-ftpd-2.4.2-beta-14/src/config/config.aix	Sun Aug 10 07:47:38 1997
+++ wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/config/config.aix	Sun Aug 24 22:12:47 1997
@@ -1,7 +1,9 @@
 #define unix
 #define HAVE_SYMLINK
 #define AIX
+ifndef _AIX41
 #define CANT_BIND
+#endif
 #undef  BSD
 #define HAVE_DIRENT
 #define HAVE_D_NAMLEN
@@ -24,6 +26,7 @@
 #undef  UPLOAD
 #define USG
 #define SVR4
+#define VIRTUAL
 #define vfork fork
 
 #include <malloc.h>
@@ -38,8 +41,4 @@
 
 #include "../config.h"
 
-
-
-
-
-
+#define QUOTA
diff -u --recursive --new-file wu-ftpd-2.4.2-beta-14/src/config/config.bdi wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/config/config.bdi
--- wu-ftpd-2.4.2-beta-14/src/config/config.bdi	Tue Aug 12 06:43:27 1997
+++ wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/config/config.bdi	Sun Aug 24 22:12:49 1997
@@ -60,4 +60,5 @@
 #define realpath realpath_on_steroids   /* hack to work around unistd.h */
 
 
-
+#define BSDI
+#define QUOTA
diff -u --recursive --new-file wu-ftpd-2.4.2-beta-14/src/config/config.dec wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/config/config.dec
--- wu-ftpd-2.4.2-beta-14/src/config/config.dec	Tue Aug 12 06:43:28 1997
+++ wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/config/config.dec	Sun Aug 24 22:12:50 1997
@@ -36,3 +36,6 @@
 typedef void	SIGNAL_TYPE;
 
 #include "../config.h"
+
+#define DIGITAL
+#define QUOTA
diff -u --recursive --new-file wu-ftpd-2.4.2-beta-14/src/config/config.s41 wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/config/config.s41
--- wu-ftpd-2.4.2-beta-14/src/config/config.s41	Sun Mar  2 03:27:20 1997
+++ wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/config/config.s41	Sun Aug 24 22:12:51 1997
@@ -31,3 +31,6 @@
 typedef void	SIGNAL_TYPE;
 
 #include "../config.h"
+
+#define SUNOS
+#define QUOTA
diff -u --recursive --new-file wu-ftpd-2.4.2-beta-14/src/config/config.sgi wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/config/config.sgi
--- wu-ftpd-2.4.2-beta-14/src/config/config.sgi	Tue Aug 12 06:43:32 1997
+++ wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/config/config.sgi	Sun Aug 24 22:12:52 1997
@@ -51,3 +51,6 @@
 #include "../config.h"
 
 #define realpath realpath_on_steroids
+
+#define IRIX
+#define QUOTA
diff -u --recursive --new-file wu-ftpd-2.4.2-beta-14/src/extensions.c wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/extensions.c
--- wu-ftpd-2.4.2-beta-14/src/extensions.c	Tue Aug 12 06:43:04 1997
+++ wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/extensions.c	Sun Aug 24 22:17:11 1997
@@ -71,6 +71,16 @@
 #include "support/ftw.h"
 #endif
 
+#ifdef QUOTA
+struct dqblk quota;
+char
+#ifdef __STDC__
+*time_quota(long curstate, long softlimit, long timelimit, char* timeleft);
+#else
+*time_quota();
+#endif
+#endif /* QUOTA */
+
 #ifdef HAVE_REGEX_H
 #include <regex.h>
 #endif
@@ -197,6 +207,9 @@
 {
     char *inptr = inbuf;
     char *outptr = outbuf;
+#ifdef QUOTA
+    char timeleft[80];
+#endif
     char buffer[MAXPATHLEN];
     time_t curtime;
     int limit;
@@ -283,6 +296,80 @@
                 *(outptr + 24) = '\0'; 
                 break;
 
+#ifdef QUOTA		/* Eilon : cookies for quota */
+            case 'B':
+#ifdef BLOCKS	/* 1024-blocks instead of 512-blocks */
+                sprintf(outptr, "%d", quota.dqb_bhardlimit % 2 ?
+                 quota.dqb_bhardlimit / 2 + 1 : quota.dqb_bhardlimit / 2);
+#else
+                sprintf(outptr, "%d", quota.dqb_bhardlimit);
+#endif /* BLOCKS */
+                break;
+
+            case 'b':
+#ifdef BLOCKS	/* 1024-blocks instead of 512-blocks */
+                sprintf(outptr, "%d", quota.dqb_bsoftlimit % 2 ?
+                 quota.dqb_bsoftlimit / 2 + 1 : quota.dqb_bsoftlimit / 2);
+#else
+                sprintf(outptr, "%d", quota.dqb_bsoftlimit);
+#endif
+                break;
+
+            case 'Q':
+#ifdef BLOCKS	/* 1024-blocks instead of 512-blocks */
+                sprintf(outptr, "%d", quota.dqb_curblocks % 2 ?
+                 quota.dqb_curblocks / 2 + 1 : quota.dqb_curblocks / 2);
+#else
+                sprintf(outptr, "%d", quota.dqb_curblocks);
+#endif
+                break;
+
+            case 'I':
+#ifdef AIX
+                sprintf(outptr, "%d", quota.dqb_ihardlimit);
+#else
+                sprintf(outptr, "%d", quota.dqb_fhardlimit);
+#endif
+                break;
+
+            case 'i':
+#ifdef AIX
+                sprintf(outptr, "%d", quota.dqb_isoftlimit);
+#else
+                sprintf(outptr, "%d", quota.dqb_fsoftlimit);
+#endif
+                break;
+
+            case 'q':
+#ifdef AIX
+                sprintf(outptr, "%d", quota.dqb_curinodes);
+#else
+                sprintf(outptr, "%d", quota.dqb_curfiles);
+#endif
+                break;
+
+            case 'H':
+                time_quota(quota.dqb_curblocks,quota.dqb_bsoftlimit,
+#ifdef AIX
+				quota.dqb_btime, timeleft);
+#else
+				quota.dqb_btimelimit, timeleft);
+#endif
+                strcpy(outptr, timeleft);
+                break;
+
+            case 'h':
+#ifdef AIX
+                time_quota(quota.dqb_curinodes,quota.dqb_isoftlimit,
+				quota.dqb_itime, timeleft);
+#else
+                time_quota(quota.dqb_curfiles,quota.dqb_fsoftlimit,
+				quota.dqb_ftimelimit, timeleft);
+#endif
+                strcpy(outptr, timeleft);
+                break;
+#endif /* QUOTA */
+
             case '%':
                 *outptr++ = '%';
                 *outptr = '\0';
@@ -1183,7 +1270,158 @@
    return 0;
 }
 
+#ifdef QUOTA
 
+#ifdef __STDC__
+path_to_device (char *pathname,char *result)
+#else
+path_to_device (pathname, result)
+     char *pathname, *result;
+#endif
 
+{
+  FILE *fp;
+  struct mntent *mp;
+  struct mount_ent
+    {
+      char mnt_fsname[MNTMAXSTR], mnt_dir[MNTMAXSTR];
+      struct mount_ent *next;
+    }
+  mountent;
+  struct mount_ent *current, *start, *new;
+  char path[1024], mnt_dir[1024], *pos;
+  int flag = 1;
+
+  start = current = NULL;
+  fp = setmntent (MNTTAB, "r");
+
+  while (mp = getmntent (fp))
+    {
+      if (!(new = (struct mount_ent *) malloc (sizeof (mountent))))
+	{
+	  perror ("malloc");
+	  flag = 0;
+	}
+
+      if (!start)
+	start = current = new;
+      else
+	current = current->next = new;
+
+      strncpy (current->mnt_fsname, mp->mnt_fsname,
+	       strlen (mp->mnt_fsname) + 1);
+      strncpy (current->mnt_dir, mp->mnt_dir, strlen (mp->mnt_dir) + 1);
+    }
+  endmntent (fp);
+  current->next = NULL;
+
+  realpath (pathname, path);
+
+  while (*path && flag)
+    {
+      current = start;
+      while (current && flag)
+	{
+	  if (strcmp (current->mnt_dir, "swap"))
+	    {
+	      realpath (current->mnt_dir, mnt_dir);
+	      if (!strcmp (mnt_dir, path))
+		{
+		  flag = 0;
+		  /* no support for remote quota yet */
+		  if (!index (current->mnt_fsname, ':'))
+		    strcpy (result, current->mnt_fsname);
+		}
+	    }
+	  current = current->next;
+	}
+      if (!((pos = strrchr (path, '/')) - path) && strlen (path) > 1)
+	strcpy (path, "/");
+      else
+	path[pos - path] = '\0';
+    }
+    while (current)
+    {
+      new = current->next;
+      free (current);
+      current = new;
+    }
+}
+void
+#ifdef __STDC__
+get_quota(char *fs,int uid)
+#else
+get_quota(fs, uid)
+char *fs;
+int uid;
+#endif
+{
+#ifdef DEVICE
+	char mnt_fsname[MNTMAXSTR];
+
+	path_to_device (fs, mnt_fsname);
+	quotactl (Q_GETQUOTA, mnt_fsname, uid, (char *) &quota);
+#else
+  quotactl(fs,QCMD(Q_GETQUOTA,USRQUOTA),uid,&quota);
+#endif
+}
 
+char
+#ifdef __STDC__
+*time_quota(long curstate, long softlimit, long timelimit, char *timeleft)
+#else
+*time_quota(curstate, softlimit, timelimit, timeleft)
+long curstate, softlimit, timelimit;
+char *timeleft;
+#endif
+{
+	struct timeval tv;
 
+	gettimeofday(&tv, NULL);
+	if (softlimit && curstate >= softlimit) {
+		if (timelimit == 0) {
+			strcpy(timeleft, "NOT STARTED");
+		} else if (timelimit > tv.tv_sec) {
+			fmttime(timeleft, timelimit - tv.tv_sec);
+		} else {
+			strcpy(timeleft, "EXPIRED");
+		}
+	} else {
+		timeleft[0] = '\0';
+	}
+	return(timeleft);
+}
+
+int
+#ifdef __STDC__
+fmttime(char *buf, register long time)
+#else
+fmttime(buf, time)
+	char *buf;
+	register long time;
+#endif
+{
+	int i;
+	static struct {
+		int c_secs;		/* conversion units in secs */
+		char * c_str;		/* unit string */
+	} cunits [] = {
+		{60*60*24*28, "months"},
+		{60*60*24*7, "weeks"},
+		{60*60*24, "days"},
+		{60*60, "hours"},
+		{60, "mins"},
+		{1, "secs"}
+	};
+
+	if (time <= 0) {
+		strcpy(buf, "EXPIRED");
+		return;
+	}
+	for (i = 0; i < sizeof(cunits)/sizeof(cunits[0]); i++) {
+		if (time >= cunits[i].c_secs)
+			break;
+	}
+	sprintf(buf, "%.1f %s", (double)time/cunits[i].c_secs, cunits[i].c_str);
+}
+#endif /* QUOTA */
diff -u --recursive --new-file wu-ftpd-2.4.2-beta-14/src/extensions.h wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/extensions.h
--- wu-ftpd-2.4.2-beta-14/src/extensions.h	Fri Jan 10 08:14:57 1997
+++ wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/extensions.h	Sun Aug 24 22:12:54 1997
@@ -42,3 +42,32 @@
 #define ARG8    entry->arg[8]
 #define ARG9    entry->arg[9]
 #define ARG     entry->arg
+
+#ifdef QUOTA
+#include <sys/time.h>
+#include <mntent.h>
+
+#ifdef IRIX
+#define BLOCKS
+#define DEVICE
+#include <sys/quota.h>
+#endif
+
+#ifdef SUNOS
+#define BLOCKS
+#define DEVICE
+#include <ufs/quota.h>
+#endif
+
+#ifdef AIX
+#include <jfs/quota.h>
+#endif
+
+#ifdef DIGITAL
+include <ufs/quota.h>
+#endif
+
+#ifdef BSDI 
+#include <ufs/ufs/quota.h>
+#endif
+#endif /* QUOTA */
diff -u --recursive --new-file wu-ftpd-2.4.2-beta-14/src/ftpd.c wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/ftpd.c
--- wu-ftpd-2.4.2-beta-14/src/ftpd.c	Tue Aug 12 06:43:08 1997
+++ wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/ftpd.c	Sun Aug 24 22:12:59 1997
@@ -223,6 +223,10 @@
 char virtual_banner[MAXPATHLEN];
 #endif
 
+#ifdef QUOTA
+extern struct dqblk quota;
+#endif
+
 int data;
 jmp_buf errcatch,
   urgcatch;
@@ -1562,6 +1566,11 @@
     logged_in = 1;
 
     expand_id();
+
+#ifdef QUOTA
+    bzero(quota, sizeof(quota));
+    get_quota(pw->pw_dir, pw->pw_uid);
+#endif
 
     if (anonymous || guest) {
         char *sp;
diff -u --recursive --new-file wu-ftpd-2.4.2-beta-14/src/newvers.sh wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/newvers.sh
--- wu-ftpd-2.4.2-beta-14/src/newvers.sh	Mon Aug 11 11:04:20 1997
+++ wu-ftpd-2.4.2-beta-14-eilon.v2.0/src/newvers.sh	Sun Aug 24 22:12:59 1997
@@ -21,7 +21,7 @@
 if [ ! -r edit ]; then echo 0 > edit; fi
 touch edit
 awk '	{	edit = $1 + 1; }\
-END	{	printf "char version[] = \"Version wu-2.4.2-academ[BETA-14](%d) ", edit > "vers.c";\
+END	{	printf "char version[] = \"Version wu-2.4.2-academ[BETA-14]-eilon.v2.0(%d) ", edit > "vers.c";\
 #LANG=
 #LC_TIME=
 		printf "%d\n", edit > "edit"; }' < edit
