From 1f61abd322b5d93ab4d3655ca8efff3545474f1f Mon Sep 17 00:00:00 2001 From: Björn Jacke Date: Thu, 6 Sep 2012 16:35:20 +0200 Subject: s3-smbd: Remove OSF1 support from old (pre-sysquotas) code "recent" Tru64 releases had QUOTACTL_4B support --- source3/smbd/quotas.c | 65 --------------------------------------------------- 1 file changed, 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 - -/**************************************************************************** -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 -- cgit