summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-06-13 12:20:07 +1000
committerBjoern Jacke <bj@sernet.de>2012-09-06 09:08:57 +0200
commit24013bda4526b1f1cb1c245da83f290210f6e6bc (patch)
treed5aae22aa21aba4e3a50b76ee9b1f90e360646c9
parentb7b0d7d868027e6a9e63639838d811febc946109 (diff)
downloadsamba-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>
-rw-r--r--source3/configure.in23
-rw-r--r--source3/smbd/quotas.c89
-rw-r--r--source3/tests/sysquotas.c20
3 files changed, 0 insertions, 132 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 4cb811f85b..f1c791cfa3 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -500,13 +500,6 @@ case "$host_os" in
;;
#
-# CRAY Unicos has broken const handling
- *unicos*)
- AC_MSG_RESULT([disabling const])
- CPPFLAGS="$CPPFLAGS -Dconst="
- ;;
-
-#
# AIX4.x doesn't even admit to having large
# files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set.
#
@@ -4721,22 +4714,6 @@ if test x"$samba_cv_HAVE_QUOTACTL_4B" = x"yes"; then
fi
fi
-if test x"$samba_cv_SYSQUOTA_FOUND" != x"yes"; then
-AC_CACHE_CHECK([for CRAY int quotactl (char *spec, int request, char *arg)],samba_cv_HAVE_QUOTACTL_3,[
-AC_TRY_RUN_STRICT([
-#define HAVE_QUOTACTL_3 1
-#define AUTOCONF_TEST 1
-#include "confdefs.h"
-#include "${srcdir-.}/../tests/sysquotas.c"],[$CFLAGS $Werror_FLAGS],[$CPPFLAGS],[$LDFLAGS],
- samba_cv_HAVE_QUOTACTL_3=yes,samba_cv_HAVE_QUOTACTL_3=no,samba_cv_HAVE_QUOTACTL_3=cross)])
-if test x"$samba_cv_HAVE_QUOTACTL_3" = x"yes"; then
- echo "CRAY int quotactl (char *spec, int request, char *arg) is NOT reworked for the sys_quota api"
- samba_cv_SYSQUOTA_FOUND=yes;
- AC_DEFINE(HAVE_QUOTACTL_3,1,[Whether CRAY int quotactl (char *spec, int request, char *arg); is available])
- samba_cv_sysquotas_file="lib/sysquotas_3.c"
-fi
-fi
-
AC_CACHE_CHECK([for NFS QUOTAS],samba_cv_HAVE_NFS_QUOTAS,[
AC_TRY_COMPILE([
#include <rpc/rpc.h>
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>
diff --git a/source3/tests/sysquotas.c b/source3/tests/sysquotas.c
index 53d3a67aa1..e9a699c95a 100644
--- a/source3/tests/sysquotas.c
+++ b/source3/tests/sysquotas.c
@@ -65,26 +65,6 @@
return ret;
}
-#elif defined(HAVE_QUOTACTL_3)
-/* int quotactl (char *spec, int request, char *arg); */
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_QUOTA_H
-#include <sys/quota.h>
-#endif
-
- int autoconf_quota(void)
-{
- int ret = -1;
- struct q_request request;
-
- ret = quotactl("/", Q_GETQUOTA, &request);
-
- return ret;
-}
-
#elif defined(HAVE_QUOTACTL_2)
#error HAVE_QUOTACTL_2 not implemented