build: Remove Unicos support (quota in particular)
authorAndrew Bartlett <abartlet@samba.org>
Wed, 13 Jun 2012 02:20:07 +0000 (12:20 +1000)
committerBjoern Jacke <bj@sernet.de>
Thu, 6 Sep 2012 07:08:57 +0000 (09:08 +0200)
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>
source3/configure.in
source3/smbd/quotas.c
source3/tests/sysquotas.c

index 4cb811f85b9561f51263312f214b108d2040591d..f1c791cfa36dd48a1b48a034a143cf612ee10791 100644 (file)
@@ -499,13 +499,6 @@ case "$host_os" in
       esac
       ;;
 
-#
-# 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>
index d8bdb0225ca0296927bd29da7290fc68f62c11f9..10b05562af63dd90032c3ef2902976092762781d 100644 (file)
@@ -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>
index 53d3a67aa1bc73fefde5d81f1324f590428545b0..e9a699c95a9ccd2402c8c6af2facac51d7eef712 100644 (file)
        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