diff options
author | Samba Release Account <samba-bugs@samba.org> | 1997-07-08 16:54:44 +0000 |
---|---|---|
committer | Samba Release Account <samba-bugs@samba.org> | 1997-07-08 16:54:44 +0000 |
commit | 25eae02948b40667495fbb021dd130180180a05e (patch) | |
tree | d0dffa4caed0faf7473d162528551c850c9a914b /source3/smbd/quotas.c | |
parent | a67a697b3624c51d38cacd4aea134286a372b756 (diff) | |
download | samba-25eae02948b40667495fbb021dd130180180a05e.tar.gz samba-25eae02948b40667495fbb021dd130180180a05e.tar.bz2 samba-25eae02948b40667495fbb021dd130180180a05e.zip |
Makefile: Added AIX targets from Ole Holm Nielsen <Ole.H.Nielsen@uni-c.dk>
chgpasswd.c: Added Samba/GPL notice (for obvious reasons).
clitar.c: Updated Copyright date to include 1997 (for obvious reasons).
getsmbpass.c: Updated Copyright date to include 1997 (for obvious reasons).
includes.h: Added stropts for solaris.
loadparm.c: Changed comment for hide files option.
nameconf.c: Updated Copyright date to include 1997 (for obvious reasons).
nmbd.c: Updated Copyright date to include 1997 (for obvious reasons).
pcap.c: Updated Copyright date to include 1997 (for obvious reasons).
proto.h: Re-added accidentaly deleted smb_shm_ calls.
quotas.c: Added AIX quota patch from Ole Holm Nielsen <ohnielse@fysik.dtu.dk>
server.c: Optimization on calling is_hidden_path. Updated Copyrights.
smb.h: Changed DEFAULT_FILES_TO_HIDE from "*/.*" to ".*".
smbpass.c: Updated Copyright date to include 1997 (for obvious reasons).
ufc.c: Updated Copyright date to include 1997 (for obvious reasons).
util.c: Added last component code to is_in_path().
Jeremy (jallison@whistle.com)
(This used to be commit 9385ae1005f13c8ed51f1319e3949b5c8571e62d)
Diffstat (limited to 'source3/smbd/quotas.c')
-rw-r--r-- | source3/smbd/quotas.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c index e6a6f61568..262eea3100 100644 --- a/source3/smbd/quotas.c +++ b/source3/smbd/quotas.c @@ -367,7 +367,14 @@ DEBUG(5,("disk_quotas for path \"%s\" returning bsize %d, dfree %d, dsize %d\n" #ifdef __FreeBSD__ #include <ufs/ufs/quota.h> -#else +#elif AIX +/* AIX quota patch from Ole Holm Nielsen <ohnielse@fysik.dtu.dk> */ +#include <jfs/quota.h> +/* AIX 4.X: Rename members of the dqblk structure (ohnielse@fysik.dtu.dk) */ +#define dqb_curfiles dqb_curinodes +#define dqb_fhardlimit dqb_ihardlimit +#define dqb_fsoftlimit dqb_isoftlimit +#else /* !__FreeBSD__ && !AIX */ #include <sys/quota.h> #include <devnm.h> #endif @@ -380,7 +387,7 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize) uid_t euser_id; int r; struct dqblk D; -#ifndef __FreeBSD__ +#if !defined(__FreeBSD__) && !defined(AIX) char dev_disk[256]; struct stat S; /* find the block device file */ @@ -401,13 +408,17 @@ BOOL disk_quotas(char *path, int *bsize, int *dfree, int *dsize) if (setresuid(user_id,-1,-1)) DEBUG(5,("Unable to reset uid to %d\n", user_id)); } -#else +#else /* USE_SETRES */ #if defined(__FreeBSD__) r= quotactl(path,Q_GETQUOTA,euser_id,(char *) &D); -#else +#elif defined(AIX) + /* AIX has both USER and GROUP quotas: + Get the USER quota (ohnielse@fysik.dtu.dk) */ + r= quotactl(path,QCMD(Q_GETQUOTA,USRQUOTA),euser_id,(char *) &D); +#else /* !__FreeBSD__ && !AIX */ r=quotactl(Q_GETQUOTA, dev_disk, euser_id, &D); -#endif -#endif +#endif /* !__FreeBSD__ && !AIX */ +#endif /* USE_SETRES */ /* Use softlimit to determine disk space, except when it has been exceeded */ *bsize = 1024; |