[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1613-g0a5d99a

Volker Lendecke vlendec at samba.org
Thu May 14 10:15:44 GMT 2009


The branch, master has been updated
       via  0a5d99ae7ddc6531895a8c34a922d17515f609bc (commit)
       via  9c23115cb887cfb8b872b4a28da9d54f44aad5af (commit)
       via  979f13b19e7558267529c42d4ca7e4373a78798e (commit)
      from  524a79b73509a356293603af83b01c98e6175a9a (commit)

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


- Log -----------------------------------------------------------------
commit 0a5d99ae7ddc6531895a8c34a922d17515f609bc
Author: Volker Lendecke <vl at samba.org>
Date:   Thu May 14 11:47:25 2009 +0200

    Fix a type-punned warning

commit 9c23115cb887cfb8b872b4a28da9d54f44aad5af
Author: Volker Lendecke <vl at samba.org>
Date:   Thu May 14 11:47:09 2009 +0200

    Add some const

commit 979f13b19e7558267529c42d4ca7e4373a78798e
Author: Volker Lendecke <vl at samba.org>
Date:   Thu May 14 12:13:24 2009 +0200

    Fix some nonempty blank lines

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

Summary of changes:
 source3/lib/system.c     |   46 +++++++++++++++++++++++-----------------------
 source3/param/loadparm.c |    3 ++-
 source3/smbd/reply.c     |    2 +-
 3 files changed, 26 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/system.c b/source3/lib/system.c
index 10b55f6..517e347 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -5,17 +5,17 @@
    Copyright (C) Jeremy Allison  1998-2005
    Copyright (C) Timur Bakeyev        2005
    Copyright (C) Bjoern Jacke    2006-2007
-   
+
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
@@ -54,7 +54,7 @@ void *sys_memalign( size_t align, size_t size )
 	int ret = posix_memalign( &p, align, size );
 	if ( ret == 0 )
 		return p;
-		
+
 	return NULL;
 #elif defined(HAVE_MEMALIGN)
 	return memalign( align, size );
@@ -814,7 +814,7 @@ static int sys_broken_setgroups(int setlen, gid_t *gidset)
 		DEBUG(0,("sys_setgroups: Malloc fail.\n"));
 		return -1;    
 	}
- 
+
 	for(i = 0; i < setlen; i++) 
 		group_list[i] = (GID_T) gidset[i]; 
 
@@ -824,7 +824,7 @@ static int sys_broken_setgroups(int setlen, gid_t *gidset)
 		errno = saved_errno;
 		return -1;
 	}
- 
+
 	SAFE_FREE(group_list);
 	return 0 ;
 }
@@ -1264,7 +1264,7 @@ ssize_t sys_getxattr (const char *path, const char *name, void *value, size_t si
 	int retval, flags = 0;
 	int valuelength = (int)size;
 	char *attrname = strchr(name,'.') + 1;
-	
+
 	if (strncmp(name, "system", 6) == 0) flags |= ATTR_ROOT;
 
 	retval = attr_get(path, attrname, (char *)value, &valuelength, flags);
@@ -1308,14 +1308,14 @@ ssize_t sys_lgetxattr (const char *path, const char *name, void *value, size_t s
 		if((retval=extattr_get_link(path, attrnamespace, attrname, value, size)) >= 0)
 			return retval;
 	}
-	
+
 	DEBUG(10,("sys_lgetxattr: extattr_get_link() failed with: %s\n", strerror(errno)));
 	return -1;
 #elif defined(HAVE_ATTR_GET)
 	int retval, flags = ATTR_DONTFOLLOW;
 	int valuelength = (int)size;
 	char *attrname = strchr(name,'.') + 1;
-	
+
 	if (strncmp(name, "system", 6) == 0) flags |= ATTR_ROOT;
 
 	retval = attr_get(path, attrname, (char *)value, &valuelength, flags);
@@ -1361,14 +1361,14 @@ ssize_t sys_fgetxattr (int filedes, const char *name, void *value, size_t size)
 		if((retval=extattr_get_fd(filedes, attrnamespace, attrname, value, size)) >= 0)
 			return retval;
 	}
-	
+
 	DEBUG(10,("sys_fgetxattr: extattr_get_fd() failed with: %s\n", strerror(errno)));
 	return -1;
 #elif defined(HAVE_ATTR_GETF)
 	int retval, flags = 0;
 	int valuelength = (int)size;
 	char *attrname = strchr(name,'.') + 1;
-	
+
 	if (strncmp(name, "system", 6) == 0) flags |= ATTR_ROOT;
 
 	retval = attr_getf(filedes, attrname, (char *)value, &valuelength, flags);
@@ -1661,7 +1661,7 @@ int sys_removexattr (const char *path, const char *name)
 #elif defined(HAVE_ATTR_REMOVE)
 	int flags = 0;
 	char *attrname = strchr(name,'.') + 1;
-	
+
 	if (strncmp(name, "system", 6) == 0) flags |= ATTR_ROOT;
 
 	return attr_remove(path, attrname, flags);
@@ -1698,7 +1698,7 @@ int sys_lremovexattr (const char *path, const char *name)
 #elif defined(HAVE_ATTR_REMOVE)
 	int flags = ATTR_DONTFOLLOW;
 	char *attrname = strchr(name,'.') + 1;
-	
+
 	if (strncmp(name, "system", 6) == 0) flags |= ATTR_ROOT;
 
 	return attr_remove(path, attrname, flags);
@@ -1737,7 +1737,7 @@ int sys_fremovexattr (int filedes, const char *name)
 #elif defined(HAVE_ATTR_REMOVEF)
 	int flags = 0;
 	char *attrname = strchr(name,'.') + 1;
-	
+
 	if (strncmp(name, "system", 6) == 0) flags |= ATTR_ROOT;
 
 	return attr_removef(filedes, attrname, flags);
@@ -1796,7 +1796,7 @@ int sys_setxattr (const char *path, const char *name, const void *value, size_t
 #elif defined(HAVE_ATTR_SET)
 	int myflags = 0;
 	char *attrname = strchr(name,'.') + 1;
-	
+
 	if (strncmp(name, "system", 6) == 0) myflags |= ATTR_ROOT;
 	if (flags & XATTR_CREATE) myflags |= ATTR_CREATE;
 	if (flags & XATTR_REPLACE) myflags |= ATTR_REPLACE;
@@ -1860,7 +1860,7 @@ int sys_lsetxattr (const char *path, const char *name, const void *value, size_t
 #elif defined(HAVE_ATTR_SET)
 	int myflags = ATTR_DONTFOLLOW;
 	char *attrname = strchr(name,'.') + 1;
-	
+
 	if (strncmp(name, "system", 6) == 0) myflags |= ATTR_ROOT;
 	if (flags & XATTR_CREATE) myflags |= ATTR_CREATE;
 	if (flags & XATTR_REPLACE) myflags |= ATTR_REPLACE;
@@ -1925,7 +1925,7 @@ int sys_fsetxattr (int filedes, const char *name, const void *value, size_t size
 #elif defined(HAVE_ATTR_SETF)
 	int myflags = 0;
 	char *attrname = strchr(name,'.') + 1;
-	
+
 	if (strncmp(name, "system", 6) == 0) myflags |= ATTR_ROOT;
 	if (flags & XATTR_CREATE) myflags |= ATTR_CREATE;
 	if (flags & XATTR_REPLACE) myflags |= ATTR_REPLACE;
@@ -2075,7 +2075,7 @@ static int solaris_write_xattr(int attrfd, const char *value, size_t size)
 /****************************************************************************
  Return the major devicenumber for UNIX extensions.
 ****************************************************************************/
-                                                                                                                
+
 uint32 unix_dev_major(SMB_DEV_T dev)
 {
 #if defined(HAVE_DEVICE_MAJOR_FN)
@@ -2084,11 +2084,11 @@ uint32 unix_dev_major(SMB_DEV_T dev)
         return (uint32)(dev >> 8);
 #endif
 }
-                                                                                                                
+
 /****************************************************************************
  Return the minor devicenumber for UNIX extensions.
 ****************************************************************************/
-                                                                                                                
+
 uint32 unix_dev_minor(SMB_DEV_T dev)
 {
 #if defined(HAVE_DEVICE_MINOR_FN)
@@ -2103,7 +2103,7 @@ uint32 unix_dev_minor(SMB_DEV_T dev)
 /*******************************************************************
  An aio_read wrapper that will deal with 64-bit sizes.
 ********************************************************************/
-                                                                                                                                           
+
 int sys_aio_read(SMB_STRUCT_AIOCB *aiocb)
 {
 #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_AIOCB64) && defined(HAVE_AIO_READ64)
@@ -2119,7 +2119,7 @@ int sys_aio_read(SMB_STRUCT_AIOCB *aiocb)
 /*******************************************************************
  An aio_write wrapper that will deal with 64-bit sizes.
 ********************************************************************/
-                                                                                                                                           
+
 int sys_aio_write(SMB_STRUCT_AIOCB *aiocb)
 {
 #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_AIOCB64) && defined(HAVE_AIO_WRITE64)
@@ -2135,7 +2135,7 @@ int sys_aio_write(SMB_STRUCT_AIOCB *aiocb)
 /*******************************************************************
  An aio_return wrapper that will deal with 64-bit sizes.
 ********************************************************************/
-                                                                                                                                           
+
 ssize_t sys_aio_return(SMB_STRUCT_AIOCB *aiocb)
 {
 #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_AIOCB64) && defined(HAVE_AIO_RETURN64)
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index da0bf17..2ea3a16 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -8323,7 +8323,8 @@ static void set_allowed_client_auth(void)
  get their sorry ass fired.
 ***************************************************************************/
 
-static bool check_usershare_stat(const char *fname, SMB_STRUCT_STAT *psbuf)
+static bool check_usershare_stat(const char *fname,
+				 const SMB_STRUCT_STAT *psbuf)
 {
 	if (!S_ISREG(psbuf->st_mode)) {
 		DEBUG(0,("check_usershare_stat: file %s owned by uid %u is "
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 05de4d4..1f73b2f 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -477,7 +477,7 @@ static bool netbios_session_retarget(const char *name, int name_type)
 		goto fail;
 	}
 
-	in_addr = (struct sockaddr_in *)&retarget_addr;
+	in_addr = (struct sockaddr_in *)(void *)&retarget_addr;
 
 	_smb_setlen(outbuf, 6);
 	SCVAL(outbuf, 0, 0x84);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list