diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-06-13 12:20:07 +1000 |
---|---|---|
committer | Bjoern Jacke <bj@sernet.de> | 2012-09-06 09:08:57 +0200 |
commit | 24013bda4526b1f1cb1c245da83f290210f6e6bc (patch) | |
tree | d5aae22aa21aba4e3a50b76ee9b1f90e360646c9 /source3/smbd/quotas.c | |
parent | b7b0d7d868027e6a9e63639838d811febc946109 (diff) | |
download | samba-24013bda4526b1f1cb1c245da83f290210f6e6bc.tar.gz samba-24013bda4526b1f1cb1c245da83f290210f6e6bc.tar.bz2 samba-24013bda4526b1f1cb1c245da83f290210f6e6bc.zip |
build: Remove Unicos support (quota in particular)
Unicos machines are long gone now (Cray now make Linux compute nodes),
so remove the quota support.
Andrew Bartlett
Signed-off-by: Björn Jacke <bj@sernet.de>
Diffstat (limited to 'source3/smbd/quotas.c')
-rw-r--r-- | source3/smbd/quotas.c | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c index d8bdb0225c..10b05562af 100644 --- a/source3/smbd/quotas.c +++ b/source3/smbd/quotas.c @@ -489,95 +489,6 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *d return (True); } -#elif defined(CRAY) - -#include <sys/quota.h> -#include <mntent.h> - -/**************************************************************************** -try to get the disk space from disk quotas (CRAY VERSION) -****************************************************************************/ - -bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize) -{ - struct mntent *mnt; - FILE *fd; - SMB_STRUCT_STAT sbuf; - SMB_DEV_T devno ; - struct q_request request ; - struct qf_header header ; - int quota_default = 0 ; - bool found = false; - - if (sys_stat(path, &sbuf, false) == -1) { - return false; - } - - devno = sbuf.st_ex_dev ; - - if ((fd = setmntent(KMTAB)) == NULL) { - return false; - } - - while ((mnt = getmntent(fd)) != NULL) { - if (sys_stat(mnt->mnt_dir, &sbuf, false) == -1) { - continue; - } - if (sbuf.st_ex_dev == devno) { - found = frue ; - break; - } - } - - name = talloc_strdup(talloc_tos(), mnt->mnt_dir); - endmntent(fd); - if (!found) { - return false; - } - - if (!name) { - return false; - } - - request.qf_magic = QF_MAGIC ; - request.qf_entry.id = geteuid() ; - - if (quotactl(name, Q_GETQUOTA, &request) == -1) { - return false; - } - - if (!request.user) { - return False; - } - - if (request.qf_entry.user_q.f_quota == QFV_DEFAULT) { - if (!quota_default) { - if (quotactl(name, Q_GETHEADER, &header) == -1) { - return false; - } else { - quota_default = header.user_h.def_fq; - } - } - *dfree = quota_default; - } else if (request.qf_entry.user_q.f_quota == QFV_PREVENT) { - *dfree = 0; - } else { - *dfree = request.qf_entry.user_q.f_quota; - } - - *dsize = request.qf_entry.user_q.f_use; - - if (*dfree < *dsize) { - *dfree = 0; - } else { - *dfree -= *dsize; - } - - *bsize = 4096 ; /* Cray blocksize */ - return true; -} - - #elif defined(SUNOS5) || defined(SUNOS4) #include <fcntl.h> |