[SCM] Samba Shared Repository - branch master updated

Stefan Metzmacher metze at samba.org
Sat Apr 23 04:08:02 MDT 2011


The branch, master has been updated
       via  64e7fba s3:include/vfs.h: remove very old hints for vfs modules with interface version < 8
       via  1cf715e Revert "s3-vfs: another attempt to fix the Tru64 build."
       via  4a4a774 s3:smbd/nttrans: make use of BVAL() and remove ugly LARGE_SMB_OFF_T ifdef's
       via  5186209 s3:lib/sysquota: remove ugly LARGE_SMB_OFF_T ifdef's
       via  75ad180 s3:libsmb: make use of BVAL() and remove ugly LARGE_SMB_OFF_T ifdef's
      from  bf3b2e2 Support the 'PYTHON' environment variable.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 64e7fba1be0d2897c5cee40b41f869bd9e5b272a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 10:17:27 2011 +0200

    s3:include/vfs.h: remove very old hints for vfs modules with interface version < 8
    
    The interface version is at 28 now, and this defines cause problem
    on some systems, e.g. Tru64 defines vfs_init in the system headers.
    
    metze
    
    Autobuild-User: Stefan Metzmacher <metze at samba.org>
    Autobuild-Date: Sat Apr 23 12:07:35 CEST 2011 on sn-devel-104

commit 1cf715ed214809bd43e8f5be829f65bf37686980
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 10:15:00 2011 +0200

    Revert "s3-vfs: another attempt to fix the Tru64 build."
    
    This reverts commit 52909271879d909533a86c3a448839debb6497c6.
    
    A better fix will follow.
    
    metze

commit 4a4a774e61aa5d95fa4c90485c538629ce5d0c92
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 10:30:59 2011 +0200

    s3:smbd/nttrans: make use of BVAL() and remove ugly LARGE_SMB_OFF_T ifdef's
    
    We rely on uint64_t for a long time now...
    
    metze

commit 5186209277e0fec5c9f0c4df2ac57a5e16f74470
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 10:27:37 2011 +0200

    s3:lib/sysquota: remove ugly LARGE_SMB_OFF_T ifdef's
    
    We rely on uint64_t for a long time now...
    
    metze

commit 75ad18037955b1e787e48648a09b0016b1cdce8f
Author: Stefan Metzmacher <metze at samba.org>
Date:   Sat Apr 23 10:22:32 2011 +0200

    s3:libsmb: make use of BVAL() and remove ugly LARGE_SMB_OFF_T ifdef's
    
    We rely on uint64_t for a long time now...
    
    metze

-----------------------------------------------------------------------

Summary of changes:
 source3/configure.in      |    2 -
 source3/include/vfs.h     |   12 --------
 source3/lib/sysquotas.c   |   24 -----------------
 source3/libsmb/cliquota.c |   62 +++-----------------------------------------
 source3/smbd/nttrans.c    |   49 +++--------------------------------
 source3/wscript           |    2 -
 6 files changed, 10 insertions(+), 141 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 97e69a3..b2c1856 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -5400,8 +5400,6 @@ if test x"$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT" = x"yes"; then
 fi
 AC_MSG_RESULT([$samba_cv_HAVE_EXPLICIT_LARGEFILE_SUPPORT])
 
-AC_CHECK_TYPE(struct vfsops,[AC_DEFINE(HAVE_STRUCT_VFSOPS,1,[Whether struct vfsops exists])],,[#include <sys/mount.h>])
-
 
 #################################################
 # check for cluster extensions
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index c86fad8..185bc76 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -136,18 +136,6 @@
 /* Leave at 28 - not yet released. Rename open function to open_fn. - gd */
 #define SMB_VFS_INTERFACE_VERSION 28
 
-
-/* to bug old modules which are trying to compile with the old functions */
-
-#ifndef HAVE_STRUCT_VFSOPS /* vfsops struct on Tru64 has a vfs_init function pointer */
-#define vfs_init __ERROR_please_port_this_module_to_SMB_VFS_INTERFACE_VERSION_8_donot_use_vfs_init_anymore(void) { __ERROR_please_port_this_module_to_SMB_VFS_INTERFACE_VERSION_8_donot_use_vfs_init_anymore };
-#endif /* HAVE_STRUCT_VFSOPS */
-
-#define lp_parm_string __ERROR_please_port_lp_parm_string_to_lp_parm_const_string_or_lp_parm_talloc_string { \
-  __ERROR_please_port_lp_parm_string_to_lp_parm_const_string_or_lp_parm_talloc_string };
-#define lp_vfs_options __ERROR_please_donot_use_lp_vfs_options_anymore_use_lp_parm_xxxx_functions_instead { \
-  __ERROR_please_donot_use_lp_vfs_options_anymore_use_lp_parm_xxxx_functions_instead };
-
 /*
     All intercepted VFS operations must be declared as static functions inside module source
     in order to keep smbd namespace unpolluted. See source of audit, extd_audit, fake_perms and recycle
diff --git a/source3/lib/sysquotas.c b/source3/lib/sysquotas.c
index 6abafbd..12c34ed 100644
--- a/source3/lib/sysquotas.c
+++ b/source3/lib/sysquotas.c
@@ -303,7 +303,6 @@ static int command_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t
 
 			DEBUG (3, ("Parsed output of get_quota, ...\n"));
 
-#ifdef LARGE_SMB_OFF_T
 			DEBUGADD (5,( 
 				"qflags:%u curblocks:%llu softlimit:%llu hardlimit:%llu\n"
 				"curinodes:%llu isoftlimit:%llu ihardlimit:%llu bsize:%llu\n", 
@@ -312,16 +311,6 @@ static int command_get_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t
 				(long long unsigned)dp->curinodes,
 				(long long unsigned)dp->isoftlimit,(long long unsigned)dp->ihardlimit,
 				(long long unsigned)dp->bsize));
-#else /* LARGE_SMB_OFF_T */
-			DEBUGADD (5,( 
-				"qflags:%u curblocks:%lu softlimit:%lu hardlimit:%lu\n"
-				"curinodes:%lu isoftlimit:%lu ihardlimit:%lu bsize:%lu\n", 
-				dp->qflags,(long unsigned)dp->curblocks,
-				(long unsigned)dp->softlimit,(long unsigned)dp->hardlimit,
-				(long unsigned)dp->curinodes,
-				(long unsigned)dp->isoftlimit,(long unsigned)dp->ihardlimit,
-				(long unsigned)dp->bsize));
-#endif /* LARGE_SMB_OFF_T */
 			return 0;
 		}
 
@@ -362,7 +351,6 @@ static int command_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t
 				return -1;
 		}
 
-#ifdef LARGE_SMB_OFF_T
 		if (asprintf(&syscmd,
 			"%s \"%s\" %d %d "
 			"%u %llu %llu "
@@ -373,18 +361,6 @@ static int command_set_quota(const char *path, enum SMB_QUOTA_TYPE qtype, unid_t
 			(long long unsigned)dp->bsize) < 0) {
 			return -1;
 		}
-#else /* LARGE_SMB_OFF_T */
-		if (asprintf(&syscmd,
-			"%s \"%s\" %d %d "
-			"%u %lu %lu "
-			"%lu %lu %lu ",
-			set_quota_command, path, qtype, _id, dp->qflags,
-			(long unsigned)dp->softlimit,(long unsigned)dp->hardlimit,
-			(long unsigned)dp->isoftlimit,(long unsigned)dp->ihardlimit,
-			(long unsigned)dp->bsize) < 0) {
-			return -1;
-		}
-#endif /* LARGE_SMB_OFF_T */
 
 		DEBUG (3, ("get_quota: Running command %s\n", syscmd));
 
diff --git a/source3/libsmb/cliquota.c b/source3/libsmb/cliquota.c
index e05b64e..e5c8c83 100644
--- a/source3/libsmb/cliquota.c
+++ b/source3/libsmb/cliquota.c
@@ -80,43 +80,13 @@ static bool parse_user_quota_record(const uint8_t *rdata,
 	 */
 
 	/* the used space 8 bytes (uint64_t)*/
-	qt.usedspace = (uint64_t)IVAL(rdata,16);
-#ifdef LARGE_SMB_OFF_T
-	qt.usedspace |= (((uint64_t)IVAL(rdata,20)) << 32);
-#else /* LARGE_SMB_OFF_T */
-	if ((IVAL(rdata,20) != 0)&&
-		((qt.usedspace != 0xFFFFFFFF)||
-		 (IVAL(rdata,20)!=0xFFFFFFFF))) {
-		/* more than 32 bits? */
-		return False;
-	}
-#endif /* LARGE_SMB_OFF_T */
+	qt.usedspace = BVAL(rdata,16);
 
 	/* the soft quotas 8 bytes (uint64_t)*/
-	qt.softlim = (uint64_t)IVAL(rdata,24);
-#ifdef LARGE_SMB_OFF_T
-	qt.softlim |= (((uint64_t)IVAL(rdata,28)) << 32);
-#else /* LARGE_SMB_OFF_T */
-	if ((IVAL(rdata,28) != 0)&&
-		((qt.softlim != 0xFFFFFFFF)||
-		 (IVAL(rdata,28)!=0xFFFFFFFF))) {
-		/* more than 32 bits? */
-		return False;
-	}
-#endif /* LARGE_SMB_OFF_T */
+	qt.softlim = BVAL(rdata,24);
 
 	/* the hard quotas 8 bytes (uint64_t)*/
-	qt.hardlim = (uint64_t)IVAL(rdata,32);
-#ifdef LARGE_SMB_OFF_T
-	qt.hardlim |= (((uint64_t)IVAL(rdata,36)) << 32);
-#else /* LARGE_SMB_OFF_T */
-	if ((IVAL(rdata,36) != 0)&&
-		((qt.hardlim != 0xFFFFFFFF)||
-		 (IVAL(rdata,36)!=0xFFFFFFFF))) {
-		/* more than 32 bits? */
-		return False;
-	}
-#endif /* LARGE_SMB_OFF_T */
+	qt.hardlim = BVAL(rdata,32);
 
 	if (!sid_parse((char *)rdata+40,sid_len,&qt.sid)) {
 		return false;
@@ -421,32 +391,10 @@ NTSTATUS cli_get_fs_quota_info(struct cli_state *cli, int quota_fnum,
 	/* unknown_1 24 NULL bytes in pdata*/
 
 	/* the soft quotas 8 bytes (uint64_t)*/
-	qt.softlim = (uint64_t)IVAL(rdata,24);
-#ifdef LARGE_SMB_OFF_T
-	qt.softlim |= (((uint64_t)IVAL(rdata,28)) << 32);
-#else /* LARGE_SMB_OFF_T */
-	if ((IVAL(rdata,28) != 0)&&
-		((qt.softlim != 0xFFFFFFFF)||
-		 (IVAL(rdata,28)!=0xFFFFFFFF))) {
-		/* more than 32 bits? */
-		status = NT_STATUS_INVALID_NETWORK_RESPONSE;
-		goto cleanup;
-	}
-#endif /* LARGE_SMB_OFF_T */
+	qt.softlim = BVAL(rdata,24);
 
 	/* the hard quotas 8 bytes (uint64_t)*/
-	qt.hardlim = (uint64_t)IVAL(rdata,32);
-#ifdef LARGE_SMB_OFF_T
-	qt.hardlim |= (((uint64_t)IVAL(rdata,36)) << 32);
-#else /* LARGE_SMB_OFF_T */
-	if ((IVAL(rdata,36) != 0)&&
-		((qt.hardlim != 0xFFFFFFFF)||
-		 (IVAL(rdata,36)!=0xFFFFFFFF))) {
-		/* more than 32 bits? */
-		status = NT_STATUS_INVALID_NETWORK_RESPONSE;
-		goto cleanup;
-	}
-#endif /* LARGE_SMB_OFF_T */
+	qt.hardlim = BVAL(rdata,32);
 
 	/* quota_flags 2 bytes **/
 	qt.qflags = SVAL(rdata,40);
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index e1358c6..71f20ac 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -480,10 +480,7 @@ void reply_ntcreate_and_X(struct smb_request *req)
 	create_options = IVAL(req->vwv+19, 1);
 	root_dir_fid = (uint16)IVAL(req->vwv+5, 1);
 
-	allocation_size = (uint64_t)IVAL(req->vwv+9, 1);
-#ifdef LARGE_SMB_OFF_T
-	allocation_size |= (((uint64_t)IVAL(req->vwv+11, 1)) << 32);
-#endif
+	allocation_size = BVAL(req->vwv+9, 1);
 
 	srvstr_get_path_req(ctx, req, &fname, (const char *)req->buf,
 			    STR_TERMINATE, &status);
@@ -1032,10 +1029,7 @@ static void call_nt_transact_create(connection_struct *conn,
 	sd_len = IVAL(params,36);
 	ea_len = IVAL(params,40);
 	root_dir_fid = (uint16)IVAL(params,4);
-	allocation_size = (uint64_t)IVAL(params,12);
-#ifdef LARGE_SMB_OFF_T
-	allocation_size |= (((uint64_t)IVAL(params,16)) << 32);
-#endif
+	allocation_size = BVAL(params,12);
 
 	/*
 	 * we need to remove ignored bits when they come directly from the client
@@ -2834,46 +2828,13 @@ static void call_nt_transact_set_user_quota(connection_struct *conn,
 	 */
 
 	/* the used space 8 bytes (uint64_t)*/
-	qt.usedspace = (uint64_t)IVAL(pdata,16);
-#ifdef LARGE_SMB_OFF_T
-	qt.usedspace |= (((uint64_t)IVAL(pdata,20)) << 32);
-#else /* LARGE_SMB_OFF_T */
-	if ((IVAL(pdata,20) != 0)&&
-		((qt.usedspace != 0xFFFFFFFF)||
-		(IVAL(pdata,20)!=0xFFFFFFFF))) {
-		/* more than 32 bits? */
-		reply_nterror(req, NT_STATUS_INVALID_LEVEL);
-		return;
-	}
-#endif /* LARGE_SMB_OFF_T */
+	qt.usedspace = BVAL(pdata,16);
 
 	/* the soft quotas 8 bytes (uint64_t)*/
-	qt.softlim = (uint64_t)IVAL(pdata,24);
-#ifdef LARGE_SMB_OFF_T
-	qt.softlim |= (((uint64_t)IVAL(pdata,28)) << 32);
-#else /* LARGE_SMB_OFF_T */
-	if ((IVAL(pdata,28) != 0)&&
-		((qt.softlim != 0xFFFFFFFF)||
-		(IVAL(pdata,28)!=0xFFFFFFFF))) {
-		/* more than 32 bits? */
-		reply_nterror(req, NT_STATUS_INVALID_LEVEL);
-		return;
-	}
-#endif /* LARGE_SMB_OFF_T */
+	qt.softlim = BVAL(pdata,24);
 
 	/* the hard quotas 8 bytes (uint64_t)*/
-	qt.hardlim = (uint64_t)IVAL(pdata,32);
-#ifdef LARGE_SMB_OFF_T
-	qt.hardlim |= (((uint64_t)IVAL(pdata,36)) << 32);
-#else /* LARGE_SMB_OFF_T */
-	if ((IVAL(pdata,36) != 0)&&
-		((qt.hardlim != 0xFFFFFFFF)||
-		(IVAL(pdata,36)!=0xFFFFFFFF))) {
-		/* more than 32 bits? */
-		reply_nterror(req, NT_STATUS_INVALID_LEVEL);
-		return;
-	}
-#endif /* LARGE_SMB_OFF_T */
+	qt.hardlim = BVAL(pdata,32);
 
 	if (!sid_parse(pdata+40,sid_len,&sid)) {
 		reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
diff --git a/source3/wscript b/source3/wscript
index 672fcbb..49f11f2 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1634,8 +1634,6 @@ main() {
 		    headers='sys/types.h dirent.h',
 		    msg='Checking whether seekdir returns void')
 
-    conf.CHECK_TYPE_IN('struct vfsops', 'sys/mount.h')
-
     if Options.options.with_profiling_data:
         conf.DEFINE('WITH_PROFILE', 1);
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list