summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2012-09-06 16:35:20 +0200
committerBjoern Jacke <bj@sernet.de>2012-09-07 14:15:57 +0200
commit1f61abd322b5d93ab4d3655ca8efff3545474f1f (patch)
tree79b495e0358af54d6456fecaadf2f175a6ca0589
parent8299bd1814ae4d3b79ee649e70a9336271ccfa7a (diff)
downloadsamba-1f61abd322b5d93ab4d3655ca8efff3545474f1f.tar.gz
samba-1f61abd322b5d93ab4d3655ca8efff3545474f1f.tar.bz2
samba-1f61abd322b5d93ab4d3655ca8efff3545474f1f.zip
s3-smbd: Remove OSF1 support from old (pre-sysquotas) code
"recent" Tru64 releases had QUOTACTL_4B support
-rw-r--r--source3/smbd/quotas.c65
1 files changed, 0 insertions, 65 deletions
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c
index 3d1056d310..d9b21f548d 100644
--- a/source3/smbd/quotas.c
+++ b/source3/smbd/quotas.c
@@ -399,71 +399,6 @@ bool disk_quotas(const char *path,
}
-#elif defined(OSF1)
-#include <ufs/quota.h>
-
-/****************************************************************************
-try to get the disk space from disk quotas - OSF1 version
-****************************************************************************/
-
-bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize)
-{
- int r, save_errno;
- struct dqblk D;
- SMB_STRUCT_STAT S;
- uid_t euser_id;
-
- /*
- * This code presumes that OSF1 will only
- * give out quota info when the real uid
- * matches the effective uid. JRA.
- */
- euser_id = geteuid();
- save_re_uid();
- if (set_re_uid() != 0) return False;
-
- r= quotactl(path,QCMD(Q_GETQUOTA, USRQUOTA),euser_id,(char *) &D);
- if (r) {
- save_errno = errno;
- }
-
- restore_re_uid();
-
- *bsize = DEV_BSIZE;
-
- if (r)
- {
- if (save_errno == EDQUOT) /* disk quota exceeded */
- {
- *dfree = 0;
- *dsize = D.dqb_curblocks;
- return (True);
- }
- else
- return (False);
- }
-
- /* If softlimit is zero, set it equal to hardlimit.
- */
-
- if (D.dqb_bsoftlimit==0)
- D.dqb_bsoftlimit = D.dqb_bhardlimit;
-
- /* Use softlimit to determine disk space, except when it has been exceeded */
-
- if (D.dqb_bsoftlimit==0)
- return(False);
-
- if ((D.dqb_curblocks>D.dqb_bsoftlimit)) {
- *dfree = 0;
- *dsize = D.dqb_curblocks;
- } else {
- *dfree = D.dqb_bsoftlimit - D.dqb_curblocks;
- *dsize = D.dqb_bsoftlimit;
- }
- return (True);
-}
-
#else
#if AIX