summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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