[SCM] Samba Shared Repository - branch v3-3-stable updated - release-3-3-0pre1-314-g4b67ebe

Karolin Seeger kseeger at samba.org
Tue Sep 16 11:00:46 GMT 2008


The branch, v3-3-stable has been updated
       via  4b67ebea54ab1bb974aead28c5bf2d841013a61e (commit)
       via  e0e8de3a180c2359c5e22a0947a64bcc0fc6df91 (commit)
       via  34e4a5319d0d1574b614b1c44c2fde1d94876eb7 (commit)
       via  c98030c620581820d669c5da7c250185f0518b76 (commit)
       via  46a9089e723590e4081d5e443f8d730c4bcdd64e (commit)
       via  519349a3b2e8f06d419e8c1b8c1043f7761a0de4 (commit)
       via  e31681315f19b061f448f78f333e6514697dbc0c (commit)
       via  369aa97cc593357bf068c196f569e0fc667228ac (commit)
       via  ab47c8cb0fd4d8a84c2df73b2fbba9deabf69597 (commit)
      from  2191e1ab8f2edb0230ca822ee0604627556a5199 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-stable


- Log -----------------------------------------------------------------
commit 4b67ebea54ab1bb974aead28c5bf2d841013a61e
Author: Karolin Seeger <kseeger at samba.org>
Date:   Tue Sep 16 12:51:10 2008 +0200

    WHATSNEW: Update changes since 3.3.0pre1.
    
    Karolin
    (cherry picked from commit 798f2887913505cc038ee8aad26d2d22dba1ead4)

commit e0e8de3a180c2359c5e22a0947a64bcc0fc6df91
Author: Jeff Layton <jlayton at redhat.com>
Date:   Sun Sep 14 08:37:05 2008 -0400

    cifs.upcall: make most functions static and silence compiler warnings
    
    ...to silence -Wmissing-prototypes and some uninit'ed variable
    warnings. Thanks to GD for the extra-paranoid compiler flags.
    
    Signed-off-by: Jeff Layton <jlayton at redhat.com>
    (cherry picked from commit 3bddd55319204c930e0bdd13eb2724ae10914a78)

commit 34e4a5319d0d1574b614b1c44c2fde1d94876eb7
Author: Timur <timur at FreeBSD.org>
Date:   Mon Sep 15 18:43:59 2008 -0700

    Fix aio on FreeBSD.
    (cherry picked from commit 60db38a637c21074cc2692e9c999a7cd0dd7bba7)

commit c98030c620581820d669c5da7c250185f0518b76
Author: Timur <timur at FreeBSD.org>
Date:   Mon Sep 15 18:26:24 2008 -0700

    Fix display of POSIX ACLs.
    (cherry picked from commit cfcf1d697f4a88ec6e46d3736476639712bb0e90)

commit 46a9089e723590e4081d5e443f8d730c4bcdd64e
Author: Timur <timur at FreeBSD.org>
Date:   Mon Sep 15 18:21:32 2008 -0700

    Fix cut and paste error in quota code.
    (cherry picked from commit 02613c6ef0cf2eee69a48dff4c29cb1266abbfe3)

commit 519349a3b2e8f06d419e8c1b8c1043f7761a0de4
Author: Steven Danneman <steven.danneman at isilon.com>
Date:   Mon Sep 15 17:54:21 2008 -0700

    Simple fix for warning:
    
    Compiling utils/sharesec.c
    utils/sharesec.c: In function `change_share_sec':
    utils/sharesec.c:404: warning: 'sd' might be used uninitialized in this function
    (cherry picked from commit da582a6e5d95c54d284fbe9d713ede9ef8a9793d)

commit e31681315f19b061f448f78f333e6514697dbc0c
Author: Steven Danneman <steven.danneman at isilon.com>
Date:   Mon Sep 15 16:21:04 2008 -0700

    Fixed "uninitialized variable" build warning
    
    With gcc 4.1.3 on Ubuntu 7.10 the following build warning occurs:
    
    Compiling libnet/libnet_samsync_keytab.c
    cc1: warnings being treated as errors
    libnet/libnet_samsync_keytab.c: In function â\200\230fetch_sam_entries_keytabâ\200\231:
    libnet/libnet_samsync_keytab.c:102: warning: â\200\230entry.enctypeâ\200\231 is used uninitialized in this function
    
    Fixed by initializing to ENCTYPE_NULL
    (cherry picked from commit 52f8463962d266d904b60919a6a40c0b76de34ef)

commit 369aa97cc593357bf068c196f569e0fc667228ac
Author: Steven Danneman <steven.danneman at isilon.com>
Date:   Mon Sep 15 16:17:03 2008 -0700

    Fix build warning on FreeBSD
    
    Fix for the following build warning:
    
    Compiling torture/cmd_vfs.c
    torture/cmd_vfs.c: In function `cmd_open':
    torture/cmd_vfs.c:275: warning: unsigned int format, different type arg (arg 3)
    torture/cmd_vfs.c: In function `cmd_mknod':
    torture/cmd_vfs.c:992: warning: unsigned int format, different type arg (arg 3)
    
    sccanf had mismatched types for mode_t between formating parameter and var args.
    (cherry picked from commit 86f6815c5d971ed5bc25f72a0faa29c143dcafba)

commit ab47c8cb0fd4d8a84c2df73b2fbba9deabf69597
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Sep 15 14:14:18 2008 -0700

    Fix bug 5761 "open of mangled directory name results in 'is a stream name'"
    reported by Regan Heath <Regan.Heath at BridgeHeadSoftware.com>.
    Jeremy.
    (cherry picked from commit b06b8d5479566deb0e59050fd6b44f247de7cdf4)

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

Summary of changes:
 WHATSNEW.txt                          |   16 +++++++++++++++-
 source/client/cifs.upcall.c           |   18 +++++++++++-------
 source/client/client.c                |    4 ++--
 source/configure.in                   |   15 +++++++++++++++
 source/libnet/libnet_samsync_keytab.c |    1 +
 source/smbd/aio.c                     |   17 ++++++++++++++++-
 source/smbd/open.c                    |   10 +++++++---
 source/smbd/quotas.c                  |    4 ++--
 source/torture/cmd_vfs.c              |    4 ++--
 source/utils/sharesec.c               |    2 +-
 10 files changed, 72 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 9a69641..3135cd5 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,6 +1,6 @@
                    =================================
                    Release Notes for Samba 3.3.0pre2
-                            
+                          September 30, 2008
                    =================================
 
 This is the second preview release of Samba 3.3.0.  This is *not*
@@ -98,6 +98,8 @@ o   Michael Adam <obnox at samba.org>
 o   Jeremy Allison <jra at samba.org>
     * BUG 5729: Explicitly allow "-valid".
     * BUG 5751: Fix showing of ACLs on DFS in (lib)smbclient.
+    * BUG 5762: Fix opening of mangled directory name (resulted
+      'is a stream name').
     * Add st_birthtime and friends for accurate create times on *BSD
       and MacOSX).
     * Fix the wcache_invalidate_samlogon calls.
@@ -108,6 +110,7 @@ o   Jeremy Allison <jra at samba.org>
 
 
 o   Steven Danneman <steven.danneman at isilon.com>
+    * Fix build warnings.
     * Cleanup of DC enumeration in get_dcs().
 
 
@@ -140,6 +143,17 @@ o   Stefan Metzmacher <metze at samba.org>
     * Some write time fixes.
 
 
+o   Simo Sorce <idra at samba.org>
+    * Fix enumeration of nested group memberships in Winbind.
+      This affected only setups using "security = ads".
+
+
+o   Timur <timur at FreeBSD.org>
+    * Fix cut and paste error in quota code.
+    * Fix display of POSIX ACLs.
+    * Fix aio on FreeBSD.
+
+
 o   Andrew Tridgell <tridge at samba.org>
     * Fix permissions of group_mapping.ldb (CVE-2008-3789).
     * Avoid a race condition in glibc between AIO and setresuid().
diff --git a/source/client/cifs.upcall.c b/source/client/cifs.upcall.c
index 7cb5166..4110de3 100644
--- a/source/client/cifs.upcall.c
+++ b/source/client/cifs.upcall.c
@@ -32,6 +32,7 @@ create dns_resolver * * /usr/local/sbin/cifs.upcall %k
 const char *CIFSSPNEGO_VERSION = "1.2";
 static const char *prog = "cifs.upcall";
 typedef enum _secType {
+	NONE = 0,
 	KRB5,
 	MS_KRB5
 } secType_t;
@@ -56,7 +57,8 @@ typedef enum _secType {
  *
  * ret: 0 - success, others - failure
 */
-int handle_krb5_mech(const char *oid, const char *principal,
+static int
+handle_krb5_mech(const char *oid, const char *principal,
 		     DATA_BLOB * secblob, DATA_BLOB * sess_key)
 {
 	int retval;
@@ -88,7 +90,8 @@ int handle_krb5_mech(const char *oid, const char *principal,
 #define DKD_HAVE_UID		32
 #define DKD_MUSTHAVE_SET (DKD_HAVE_HOSTNAME|DKD_HAVE_VERSION|DKD_HAVE_SEC)
 
-int decode_key_description(const char *desc, int *ver, secType_t * sec,
+static int
+decode_key_description(const char *desc, int *ver, secType_t * sec,
 			   char **hostname, uid_t * uid)
 {
 	int retval = 0;
@@ -151,7 +154,8 @@ int decode_key_description(const char *desc, int *ver, secType_t * sec,
 	return retval;
 }
 
-int cifs_resolver(const key_serial_t key, const char *key_descr)
+static int
+cifs_resolver(const key_serial_t key, const char *key_descr)
 {
 	int c;
 	struct addrinfo *addr;
@@ -203,7 +207,7 @@ int cifs_resolver(const key_serial_t key, const char *key_descr)
 	return 0;
 }
 
-void
+static void
 usage(void)
 {
 	syslog(LOG_WARNING, "Usage: %s [-c] [-v] key_serial", prog);
@@ -215,12 +219,12 @@ int main(const int argc, char *const argv[])
 	struct cifs_spnego_msg *keydata = NULL;
 	DATA_BLOB secblob = data_blob_null;
 	DATA_BLOB sess_key = data_blob_null;
-	secType_t sectype;
+	secType_t sectype = NONE;
 	key_serial_t key = 0;
 	size_t datalen;
 	long rc = 1;
-	uid_t uid;
-	int kernel_upcall_version;
+	uid_t uid = 0;
+	int kernel_upcall_version = 0;
 	int c, use_cifs_service_prefix = 0;
 	char *buf, *hostname = NULL;
 	const char *oid;
diff --git a/source/client/client.c b/source/client/client.c
index bcd3324..f5207e4 100644
--- a/source/client/client.c
+++ b/source/client/client.c
@@ -3036,7 +3036,7 @@ static int cmd_getfacl(void)
 				break;
 			case SMB_POSIX_ACL_GROUP:
 				uorg = IVAL(retbuf,SMB_POSIX_ACL_HEADER_SIZE+(i*SMB_POSIX_ACL_ENTRY_SIZE)+2);
-				d_printf("group:%u", uorg);
+				d_printf("group:%u:", uorg);
 				break;
 			case SMB_POSIX_ACL_MASK:
 				d_printf("mask::");
@@ -3073,7 +3073,7 @@ static int cmd_getfacl(void)
 				break;
 			case SMB_POSIX_ACL_GROUP:
 				uorg = IVAL(retbuf,SMB_POSIX_ACL_HEADER_SIZE+((i+num_file_acls)*SMB_POSIX_ACL_ENTRY_SIZE)+2);
-				d_printf("default:group:%u", uorg);
+				d_printf("default:group:%u:", uorg);
 				break;
 			case SMB_POSIX_ACL_MASK:
 				d_printf("default:mask::");
diff --git a/source/configure.in b/source/configure.in
index 240a44b..e7b2aff 100644
--- a/source/configure.in
+++ b/source/configure.in
@@ -878,6 +878,21 @@ if test x"$samba_cv_sig_atomic_t" = x"yes"; then
    AC_DEFINE(HAVE_SIG_ATOMIC_T_TYPE,1,[Whether we have the atomic_t variable type])
 fi
 
+AC_CACHE_CHECK([for struct sigevent type],samba_cv_struct_sigevent, [
+    AC_TRY_COMPILE([
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#include <signal.h>],[struct sigevent s;],
+	samba_cv_struct_sigevent=yes,samba_cv_struct_sigevent=no)])
+if test x"$samba_cv_struct_sigevent" = x"yes"; then
+   AC_DEFINE(HAVE_STRUCT_SIGEVENT,1,[Whether we have the struct sigevent])
+   AC_CHECK_MEMBERS([struct sigevent.sigev_value.sival_ptr,struct sigevent.sigev_value.sigval_ptr], , ,
+	[#include <signal.h>])
+fi
+
 AC_CACHE_CHECK([for struct timespec type],samba_cv_struct_timespec, [
     AC_TRY_COMPILE([
 #include <sys/types.h>
diff --git a/source/libnet/libnet_samsync_keytab.c b/source/libnet/libnet_samsync_keytab.c
index f284f08..9e666ce 100644
--- a/source/libnet/libnet_samsync_keytab.c
+++ b/source/libnet/libnet_samsync_keytab.c
@@ -93,6 +93,7 @@ static NTSTATUS fetch_sam_entry_keytab(TALLOC_CTX *mem_ctx,
 					  ctx->dns_domain_name);
 	entry.password = data_blob_talloc(mem_ctx, nt_passwd, 16);
 	entry.kvno = ads_get_kvno(ctx->ads, entry.name);
+	entry.enctype = ENCTYPE_NULL;
 
 	NT_STATUS_HAVE_NO_MEMORY(entry.name);
 	NT_STATUS_HAVE_NO_MEMORY(entry.principal);
diff --git a/source/smbd/aio.c b/source/smbd/aio.c
index 7427536..c3fd0a2 100644
--- a/source/smbd/aio.c
+++ b/source/smbd/aio.c
@@ -24,7 +24,17 @@
 
 /* The signal we'll use to signify aio done. */
 #ifndef RT_SIGNAL_AIO
-#define RT_SIGNAL_AIO (SIGRTMIN+3)
+#ifndef SIGRTMIN
+#define SIGRTMIN	NSIG
+#endif
+#define RT_SIGNAL_AIO	(SIGRTMIN+3)
+#endif
+
+#ifndef HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIVAL_PTR
+#ifdef HAVE_STRUCT_SIGEVENT_SIGEV_VALUE_SIGVAL_PTR
+#define sival_int	sigval_int
+#define sival_ptr	sigval_ptr
+#endif
 #endif
 
 /****************************************************************************
@@ -581,6 +591,11 @@ static bool handle_aio_completed(struct aio_extra *aio_ex, int *perr)
 {
 	int err;
 
+	if(!aio_ex) {
+	        DEBUG(3, ("handle_aio_completed: Non-existing aio_ex passed\n"));
+		return false;
+	}
+
 	/* Ensure the operation has really completed. */
 	if (SMB_VFS_AIO_ERROR(aio_ex->fsp, &aio_ex->acb) == EINPROGRESS) {
 		DEBUG(10,( "handle_aio_completed: operation mid %u still in "
diff --git a/source/smbd/open.c b/source/smbd/open.c
index 8b32907..7119147 100644
--- a/source/smbd/open.c
+++ b/source/smbd/open.c
@@ -1852,7 +1852,8 @@ NTSTATUS open_file_ntcreate(connection_struct *conn,
 
 	/* Handle strange delete on close create semantics. */
 	if ((create_options & FILE_DELETE_ON_CLOSE)
-	    && (is_ntfs_stream_name(fname)
+	    && (((conn->fs_capabilities & FILE_NAMED_STREAMS)
+			&& is_ntfs_stream_name(fname))
 		|| can_set_initial_delete_on_close(lck))) {
 		status = can_set_delete_on_close(fsp, True, new_dos_attributes);
 
@@ -2116,7 +2117,9 @@ NTSTATUS open_directory(connection_struct *conn,
 		 (unsigned int)create_disposition,
 		 (unsigned int)file_attributes));
 
-	if (!(file_attributes & FILE_FLAG_POSIX_SEMANTICS) && is_ntfs_stream_name(fname)) {
+	if (!(file_attributes & FILE_FLAG_POSIX_SEMANTICS) &&
+			(conn->fs_capabilities & FILE_NAMED_STREAMS) &&
+			is_ntfs_stream_name(fname)) {
 		DEBUG(2, ("open_directory: %s is a stream name!\n", fname));
 		return NT_STATUS_NOT_A_DIRECTORY;
 	}
@@ -2907,7 +2910,8 @@ NTSTATUS create_file(connection_struct *conn,
 			 * Check to see if this is a mac fork of some kind.
 			 */
 
-			if (is_ntfs_stream_name(fname)) {
+			if ((conn->fs_capabilities & FILE_NAMED_STREAMS) &&
+					is_ntfs_stream_name(fname)) {
 				status = NT_STATUS_OBJECT_PATH_NOT_FOUND;
 				goto fail;
 			}
diff --git a/source/smbd/quotas.c b/source/smbd/quotas.c
index f47e89b..b6f748d 100644
--- a/source/smbd/quotas.c
+++ b/source/smbd/quotas.c
@@ -544,7 +544,7 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, SMB_BIG_UINT *bsize, SMB_B
 	*bsize = gqr.getquota_rslt_u.gqr_rquota.rq_bsize;
 	*dsize = D.dqb_bsoftlimit;
 
-	if (D.dqb_curblocks == D.dqb_curblocks == 1)
+	if (D.dqb_curblocks == 1)
 		*bsize = 512;
 
 	if (D.dqb_curblocks > D.dqb_bsoftlimit) {
@@ -1104,7 +1104,7 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, SMB_BIG_UINT *bsize, SMB_B
 	*bsize = gqr.getquota_rslt_u.gqr_rquota.rq_bsize;
 	*dsize = D.dqb_bsoftlimit;
 
-	if (D.dqb_curblocks == D.dqb_curblocks == 1)
+	if (D.dqb_curblocks == 1)
 		*bsize = DEV_BSIZE;
 
 	if (D.dqb_curblocks > D.dqb_bsoftlimit) {
diff --git a/source/torture/cmd_vfs.c b/source/torture/cmd_vfs.c
index 2840088..dddd5be 100644
--- a/source/torture/cmd_vfs.c
+++ b/source/torture/cmd_vfs.c
@@ -272,7 +272,7 @@ static NTSTATUS cmd_open(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c
 		flagstr++;
 	}
 	if ((flags & O_CREAT) && argc == 4) {
-		if (sscanf(argv[3], "%o", &mode) == 0) {
+		if (sscanf(argv[3], "%ho", (unsigned short *)&mode) == 0) {
 			printf("open: error=-1 (invalid mode!)\n");
 			return NT_STATUS_UNSUCCESSFUL;
 		}
@@ -989,7 +989,7 @@ static NTSTATUS cmd_mknod(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
 		return NT_STATUS_OK;
 	}
 
-	if (sscanf(argv[2], "%o", &mode) == 0) {
+	if (sscanf(argv[2], "%ho", (unsigned short *)&mode) == 0) {
 		printf("open: error=-1 (invalid mode!)\n");
 		return NT_STATUS_UNSUCCESSFUL;
 	}
diff --git a/source/utils/sharesec.c b/source/utils/sharesec.c
index 9409690..46f9ecd 100644
--- a/source/utils/sharesec.c
+++ b/source/utils/sharesec.c
@@ -401,7 +401,7 @@ static void sort_acl(SEC_ACL *the_acl)
 
 static int change_share_sec(TALLOC_CTX *mem_ctx, const char *sharename, char *the_acl, enum acl_mode mode)
 {
-	SEC_DESC *sd;
+	SEC_DESC *sd = NULL;
 	SEC_DESC *old = NULL;
 	size_t sd_size = 0;
 	uint32 i, j;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list