diff options
author | Uri Simchoni <uri@samba.org> | 2016-03-13 08:18:47 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2016-03-17 01:08:32 +0100 |
commit | 67a29a8661ca965ffa86666aee7832ef9f33dadb (patch) | |
tree | 9b662b6977724799f631c8345b606d2379d28c36 /tests | |
parent | 7d46ea44642a0fdaa6ae7ac3e545ef4d083b398f (diff) | |
download | samba-67a29a8661ca965ffa86666aee7832ef9f33dadb.tar.gz |
smbd: remove quota support for some ancient OSs
Remove quota support for SunOS4 and VxFS on Solaris 2
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/oldquotas.c | 61 |
1 files changed, 1 insertions, 60 deletions
diff --git a/tests/oldquotas.c b/tests/oldquotas.c index 0aacf2363c2..54dc242248c 100644 --- a/tests/oldquotas.c +++ b/tests/oldquotas.c @@ -12,27 +12,13 @@ #ifdef WITH_QUOTAS -#if defined(VXFS_QUOTA) /* Veritas VxFS for Solaris 2 */ - -bool disk_quotas_vxfs(const char *name, char *path, uint64_t *bsize, - uint64_t *dfree, uint64_t *dsize); - -#endif /* VXFS_QUOTA */ - -#if defined(SUNOS5) || defined(SUNOS4) +#if defined(SUNOS5) /* Solaris */ #include <fcntl.h> #include <sys/param.h> -#if defined(SUNOS5) /* Solaris */ #include <sys/fs/ufs_quota.h> #include <sys/mnttab.h> #include <sys/mntent.h> -#else /* SunOS4 */ -#include <ufs/quota.h> -#include <mntent.h> -#endif /* Solaris */ - -#if defined(SUNOS5) /* Solaris */ /**************************************************************************** Allows querying of remote hosts for quotas on NFS mounted shares. @@ -53,7 +39,6 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, uint64_t *bsize, clnt = clnt_create("host", RQUOTAPROG, RQUOTAVERS, "udp"); return true; } -#endif /* Solaris */ /**************************************************************************** try to get the disk space from disk quotas (SunOS & Solaris2 version) @@ -64,25 +49,14 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, uint64_t *dsize) { int ret; -#if defined(SUNOS5) /* Solaris */ struct quotctl command; -#else /* SunOS4 */ - struct mntent *mnt; -#endif /* Solaris */ -#if defined(SUNOS5) /* Solaris */ nfs_quotas("", 0, bsize, dfree, dsize); command.op = Q_GETQUOTA; command.uid = 0; command.addr = NULL; ret = ioctl(1, Q_QUOTACTL, &command); -#else /* SunOS4 */ - ret = quotactl(Q_GETQUOTA, "", 0, NULL); -#endif /* Solaris */ -#if defined(SUNOS5) && defined(VXFS_QUOTA) /* Solaris 2 VxFS */ - disk_quotas_vxfs("", path, bsize, dfree, dsize); -#endif /* Solaris 2 VxFS */ return true; } @@ -126,39 +100,6 @@ bool disk_quotas(const char *path, uint64_t *bsize, uint64_t *dfree, #endif /* SunOS / Solaris */ -#if defined(VXFS_QUOTA) /* Veritas for Solaris 2 */ - -#if defined(SUNOS5) - -#include <sys/fs/vx_solaris.h> -#include <sys/fs/vx_machdep.h> -#include <sys/fs/vx_layout.h> -#include <sys/fs/vx_quota.h> -#include <sys/fs/vx_aioctl.h> -#include <sys/fs/vx_ioctl.h> - -bool disk_quotas_vxfs(const char *name, char *path, uint64_t *bsize, - uint64_t *dfree, uint64_t *dsize) -{ - struct vx_dqblk D; - struct vx_quotctl quotabuf; - struct vx_genioctl genbuf; - - genbuf.ioc_cmd = VX_QUOTACTL; - genbuf.ioc_up = (void *)"abuf; - - quotabuf.cmd = VX_GETQUOTA; - quotabuf.uid = 0; - quotabuf.addr = (caddr_t)&D; - ret = ioctl(1, VX_ADMIN_IOCTL, &genbuf); - - return true; -} - -#endif /* SUNOS5 */ - -#endif /* VXFS_QUOTA */ - #else /* WITH_QUOTAS */ #error "This test should be called with WITH_QUOTAS defined" |