rpms/samba/devel samba-3.0.15pre2-bug106483.patch, NONE, 1.1 samba-3.0.20-bug3010_v1.patch, NONE, 1.1 samba-3.0.20-groupname_enumeration_v3.patch, NONE, 1.1 samba-3.0.20-regcreatekey_winxp_v1.patch, NONE, 1.1 samba-3.0.20-usrmgr_groups_v1.patch, NONE, 1.1 samba-3.0.20-warnings.patch, NONE, 1.1 samba-3.0.20-winbindd_v1.patch, NONE, 1.1 samba-3.0.20pre1-man.patch, NONE, 1.1 samba-3.0.20pre1-passwd.patch, NONE, 1.1 samba-3.0.20pre1-smbspool.patch, NONE, 1.1 .cvsignore, 1.24, 1.25 samba.spec, 1.51, 1.52 sources, 1.26, 1.27 samba-3.0.10-delim.patch, 1.1, NONE samba-3.0.10-man.patch, 1.1, NONE samba-3.0.11-clitar.patch, 1.1, NONE samba-3.0.11-establish_trust.patch, 1.1, NONE samba-3.0.11-gcc4.patch, 1.1, NONE samba-3.0.11-logfiles.patch, 1.1, NONE samba-3.0.11-user_rights_v1.patch, 1.1, NONE samba-3.0.11-winbind_find_dc_v2.patch, 1.1, NONE samba-3.0.11rc1-pie.patch, 1.1, NONE samba-3.0.12pre1-quoting.patch, 1.1, NONE samba-3.0.12rc1-gcc4.patch, 1.1, NONE samba-3.0.13-man.patch, 1.1, NONE samba-3.0.4-man.patch, 1.1, NONE sa! mba-3.0.4-warning.patch, 1.1, NONE samba-3.0.5pre1-use_authtok.patch, 1.1, NONE samba-3.0.5rc1-64bit-timestamps.patch, 1.1, NONE samba-3.0.5rc1-passwd.patch, 1.1, NONE samba-3.0.7-64bit.patch, 1.1, NONE samba-3.0.8pre1-smbmnt.patch, 1.1, NONE samba-3.0.9-changetrustpw.patch, 1.1, NONE samba-3.0.9-smbspool.patch, 1.1, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Mon Sep 12 20:40:13 UTC 2005


Author: fenlason

Update of /cvs/dist/rpms/samba/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv32736

Modified Files:
	.cvsignore samba.spec sources 
Added Files:
	samba-3.0.15pre2-bug106483.patch samba-3.0.20-bug3010_v1.patch 
	samba-3.0.20-groupname_enumeration_v3.patch 
	samba-3.0.20-regcreatekey_winxp_v1.patch 
	samba-3.0.20-usrmgr_groups_v1.patch 
	samba-3.0.20-warnings.patch samba-3.0.20-winbindd_v1.patch 
	samba-3.0.20pre1-man.patch samba-3.0.20pre1-passwd.patch 
	samba-3.0.20pre1-smbspool.patch 
Removed Files:
	samba-3.0.10-delim.patch samba-3.0.10-man.patch 
	samba-3.0.11-clitar.patch samba-3.0.11-establish_trust.patch 
	samba-3.0.11-gcc4.patch samba-3.0.11-logfiles.patch 
	samba-3.0.11-user_rights_v1.patch 
	samba-3.0.11-winbind_find_dc_v2.patch 
	samba-3.0.11rc1-pie.patch samba-3.0.12pre1-quoting.patch 
	samba-3.0.12rc1-gcc4.patch samba-3.0.13-man.patch 
	samba-3.0.4-man.patch samba-3.0.4-warning.patch 
	samba-3.0.5pre1-use_authtok.patch 
	samba-3.0.5rc1-64bit-timestamps.patch 
	samba-3.0.5rc1-passwd.patch samba-3.0.7-64bit.patch 
	samba-3.0.8pre1-smbmnt.patch samba-3.0.9-changetrustpw.patch 
	samba-3.0.9-smbspool.patch 
Log Message:
* Mon Aug 22 2005 Jay Fenlason <fenlason at redhat.com> 3.0.20-2
- New upstream release
  Includes five upstream patches -bug3010_v1, -groupname_enumeration_v3,
    -regcreatekey_winxp_v1, -usrmgr_groups_v1, and -winbindd_v1          
  This obsoletes the -pie and -delim patches                   
  the -warning and -gcc4 patches are obsolete too
  The -man, -passwd, and -smbspool patches were updated to match 3.0.20pre1
  Also, the -quoting patch was implemented differently upstream
  There is now a umount.cifs executable and manpage            
  We run autogen.sh as part of the build phase     
  The testprns command is now gone
  libsmbclient now has a man page
- Include -bug106483 patch to close
  bz#106483 smbclient: -N negates the provided password, despite documentation
- Added the -warnings patch to quiet some compiler warnings.
- Removed many obsolete patches from CVS.


samba-3.0.15pre2-bug106483.patch:
 client.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE samba-3.0.15pre2-bug106483.patch ---
--- samba-3.0.15pre2/source/client/#client.c~	2005-05-23 11:51:14.000000000 -0400
+++ samba-3.0.15pre2/source/client/client.c	2005-05-23 11:52:21.000000000 -0400
@@ -3502,7 +3502,7 @@
 		}
 	}
 
-	if (poptPeekArg(pc) && !cmdline_auth_info.got_pass) { 
+	if (poptPeekArg(pc) ) { 
 		cmdline_auth_info.got_pass = True;
 		pstrcpy(cmdline_auth_info.password,poptGetArg(pc));  
 	}

samba-3.0.20-bug3010_v1.patch:
 examples/VFS/skel_opaque.c       |   12 ++++++------
 examples/VFS/skel_transparent.c  |   12 ++++++------
 source/client/client.c           |   10 +++++-----
 source/client/smbspool.c         |    6 ++++--
 source/configure.in              |   16 +++++++++++++++-
 source/include/includes.h        |   12 ++++++++++++
 source/include/vfs.h             |   15 ++++++++-------
 source/lib/system.c              |   16 ++++++++--------
 source/modules/vfs_audit.c       |    6 +++---
 source/modules/vfs_cap.c         |    4 ++--
 source/modules/vfs_catia.c       |    4 ++--
 source/modules/vfs_extd_audit.c  |    6 +++---
 source/modules/vfs_full_audit.c  |   26 +++++++++++++-------------
 source/modules/vfs_netatalk.c    |   10 +++++-----
 source/modules/vfs_shadow_copy.c |   18 +++++++++---------
 source/script/mkproto.awk        |    2 +-
 source/smbd/chgpasswd.c          |    8 ++++----
 source/smbd/dir.c                |    9 +++++++--
 source/smbd/msdfs.c              |    2 +-
 source/smbd/vfs-wrap.c           |   14 +++++++-------
 20 files changed, 121 insertions(+), 87 deletions(-)

--- NEW FILE samba-3.0.20-bug3010_v1.patch ---
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/examples/VFS/skel_opaque.c samba-3.0.20-new/examples/VFS/skel_opaque.c
--- samba-3.0.20-orig/examples/VFS/skel_opaque.c	2005-07-28 08:19:54.000000000 -0500
+++ samba-3.0.20-new/examples/VFS/skel_opaque.c	2005-08-26 09:42:08.000000000 -0500
@@ -71,27 +71,27 @@
 	return vfswrap_get_shadow_copy_data(NULL, fsp, shadow_copy_data, labels);
 }
 
-static DIR *skel_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
+static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
 {
 	return vfswrap_opendir(NULL, conn, fname, mask, attr);
 }
 
-static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp)
+static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp)
 {
 	return vfswrap_readdir(NULL, conn, dirp);
 }
 
-static void skel_seekdir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp, long offset)
+static void skel_seekdir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp, long offset)
 {
 	return vfswrap_seekdir(NULL, conn, dirp, offset);
 }
 
-static long skel_telldir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp)
+static long skel_telldir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp)
 {
 	return vfswrap_telldir(NULL, conn, dirp);
 }
 
-static void skel_rewinddir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp)
+static void skel_rewinddir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp)
 {
 	return vfswrap_rewinddir(NULL, conn, dirp);
 }
@@ -106,7 +106,7 @@
 	return vfswrap_rmdir(NULL, conn, path);
 }
 
-static int skel_closedir(vfs_handle_struct *handle, connection_struct *conn, DIR *dir)
+static int skel_closedir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dir)
 {
 	return vfswrap_closedir(NULL, conn, dir);
 }
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/examples/VFS/skel_transparent.c samba-3.0.20-new/examples/VFS/skel_transparent.c
--- samba-3.0.20-orig/examples/VFS/skel_transparent.c	2005-07-28 08:19:54.000000000 -0500
+++ samba-3.0.20-new/examples/VFS/skel_transparent.c	2005-08-26 09:42:08.000000000 -0500
@@ -70,27 +70,27 @@
 	return SMB_VFS_NEXT_GET_SHADOW_COPY_DATA(handle, fsp, shadow_copy_data, labels);
 }
 
-static DIR *skel_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
+static SMB_STRUCT_DIR *skel_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
 {
 	return SMB_VFS_NEXT_OPENDIR(handle, conn, fname, mask, attr);
 }
 
-static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp)
+static SMB_STRUCT_DIRENT *skel_readdir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp)
 {
 	return SMB_VFS_NEXT_READDIR(handle, conn, dirp);
 }
 
-static void skel_seekdir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp, long offset)
+static void skel_seekdir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp, long offset)
 {
 	return SMB_VFS_NEXT_SEEKDIR(handle, conn, dirp, offset);
 }
 
-static long skel_telldir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp)
+static long skel_telldir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp)
 {
 	return SMB_VFS_NEXT_TELLDIR(handle, conn, dirp);
 }
 
-static void skel_rewinddir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp)
+static void skel_rewinddir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp)
 {
 	return SMB_VFS_NEXT_REWINDDIR(handle, conn, dirp);
 }
@@ -105,7 +105,7 @@
 	return SMB_VFS_NEXT_RMDIR(handle, conn, path);
 }
 
-static int skel_closedir(vfs_handle_struct *handle, connection_struct *conn, DIR *dir)
+static int skel_closedir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dir)
 {
 	return SMB_VFS_NEXT_CLOSEDIR(handle, conn, dir);
 }
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/client/client.c samba-3.0.20-new/source/client/client.c
--- samba-3.0.20-orig/source/client/client.c	2005-07-28 08:19:53.000000000 -0500
+++ samba-3.0.20-new/source/client/client.c	2005-08-26 09:42:08.000000000 -0500
@@ -1379,7 +1379,7 @@
 static int file_find(struct file_list **list, const char *directory, 
 		      const char *expression, BOOL match)
 {
-	DIR *dir;
+	SMB_STRUCT_DIR *dir;
 	struct file_list *entry;
         struct stat statbuf;
         int ret;
@@ -1387,7 +1387,7 @@
 	BOOL isdir;
 	const char *dname;
 
-        dir = opendir(directory);
+        dir = sys_opendir(directory);
 	if (!dir)
 		return -1;
 	
@@ -1416,14 +1416,14 @@
 				
 				if (ret == -1) {
 					SAFE_FREE(path);
-					closedir(dir);
+					sys_closedir(dir);
 					return -1;
 				}
 			}
 			entry = SMB_MALLOC_P(struct file_list);
 			if (!entry) {
 				d_printf("Out of memory in file_find\n");
-				closedir(dir);
+				sys_closedir(dir);
 				return -1;
 			}
 			entry->file_path = path;
@@ -1434,7 +1434,7 @@
 		}
         }
 
-	closedir(dir);
+	sys_closedir(dir);
 	return 0;
 }
 
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/client/smbspool.c samba-3.0.20-new/source/client/smbspool.c
--- samba-3.0.20-orig/source/client/smbspool.c	2005-07-28 08:19:53.000000000 -0500
+++ samba-3.0.20-new/source/client/smbspool.c	2005-08-26 09:42:08.000000000 -0500
@@ -288,7 +288,7 @@
 static
 char * get_ticket_cache( uid_t uid )
 {
-  DIR *tcdir;                  /* directory where ticket caches are stored */
+  SMB_STRUCT_DIR *tcdir;                  /* directory where ticket caches are stored */
   SMB_STRUCT_DIRENT *dirent;   /* directory entry */
   char *filename = NULL;       /* holds file names on the tmp directory */
   SMB_STRUCT_STAT buf;        
@@ -298,7 +298,7 @@
   time_t t = 0;
   
   snprintf(user_cache_prefix, CC_MAX_FILE_LEN, "%s%d", CC_PREFIX, uid );
-  tcdir = opendir( TICKET_CC_DIR );
+  tcdir = sys_opendir( TICKET_CC_DIR );
   if ( tcdir == NULL ) 
     return NULL; 
   
@@ -331,6 +331,8 @@
     }
   }
 
+  sys_closedir(tcdir);
+
   if ( ticket_file == NULL )
   {
     /* no ticket cache found */
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/configure.in samba-3.0.20-new/source/configure.in
--- samba-3.0.20-orig/source/configure.in	2005-08-19 12:16:29.000000000 -0500
+++ samba-3.0.20-new/source/configure.in	2005-08-26 09:42:08.000000000 -0500
@@ -1089,8 +1089,9 @@
 AC_CHECK_FUNCS(strftime sigprocmask sigblock sigaction sigset innetgr setnetgrent getnetgrent endnetgrent)
 AC_CHECK_FUNCS(initgroups select poll rdchk getgrnam getgrent pathconf realpath)
 AC_CHECK_FUNCS(setpriv setgidx setuidx setgroups sysconf mktime rename ftruncate chsize stat64 fstat64)
-AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64 readdir64)
+AC_CHECK_FUNCS(lstat64 fopen64 atexit grantpt dup2 lseek64 ftruncate64)
 AC_CHECK_FUNCS(fseek64 fseeko64 ftell64 ftello64 setluid getpwanam setlinebuf)
+AC_CHECK_FUNCS(opendir64 readdir64 seekdir64 telldir64 rewinddir64 closedir64)
 AC_CHECK_FUNCS(srandom random srand rand setenv usleep strcasecmp fcvt fcvtl symlink readlink)
 AC_CHECK_FUNCS(syslog vsyslog timegm)
 AC_CHECK_FUNCS(setlocale nl_langinfo)
@@ -1594,6 +1595,19 @@
     AC_DEFINE(HAVE_DEV64_T,1,[Whether the 'dev64_t' type is available])
 fi
 
+AC_CACHE_CHECK([for struct dirent64],samba_cv_HAVE_STRUCT_DIR64,[
+AC_TRY_COMPILE([
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <dirent.h>],
+[DIR64 de;],
+samba_cv_HAVE_STRUCT_DIR64=yes,samba_cv_HAVE_STRUCT_DIR64=no)])
+if test x"$samba_cv_HAVE_STRUCT_DIR64" = x"yes" && test x"$ac_cv_func_readdir64" = x"yes"; then
+    AC_DEFINE(HAVE_STRUCT_DIR64,1,[Whether the 'DIR64' abstract data type is available])
+fi
+
 AC_CACHE_CHECK([for struct dirent64],samba_cv_HAVE_STRUCT_DIRENT64,[
 AC_TRY_COMPILE([
 #if defined(HAVE_UNISTD_H)
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/include/includes.h samba-3.0.20-new/source/include/includes.h
--- samba-3.0.20-orig/source/include/includes.h	2005-07-28 08:19:49.000000000 -0500
+++ samba-3.0.20-new/source/include/includes.h	2005-08-26 09:42:08.000000000 -0500
@@ -744,6 +744,18 @@
 #endif
 
 /*
+ * Type for DIR structure.
+ */
+
+#ifndef SMB_STRUCT_DIR
+#  if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_STRUCT_DIR64)
+#    define SMB_STRUCT_DIR DIR64
+#  else
+#    define SMB_STRUCT_DIR DIR
+#  endif
+#endif
+
+/*
  * Defines for 64 bit fcntl locks.
  */
 
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/include/vfs.h samba-3.0.20-new/source/include/vfs.h
--- samba-3.0.20-orig/source/include/vfs.h	2005-08-07 18:09:56.000000000 -0500
+++ samba-3.0.20-new/source/include/vfs.h	2005-08-26 09:42:08.000000000 -0500
@@ -59,7 +59,8 @@
 /* Changed to version 12 to add mask and attributes to opendir(). JRA 
    Also include aio calls. JRA. */
 /* Changed to version 13 as the internal structure of files_struct has changed. JRA */
-#define SMB_VFS_INTERFACE_VERSION 13
+/* Changed to version 14 as the we had to change DIR to SMB_STRUCT_DIR. JRA */
+#define SMB_VFS_INTERFACE_VERSION 14
 
 
 /* to bug old modules which are trying to compile with the old functions */
@@ -224,14 +225,14 @@
 		
 		/* Directory operations */
 		
-		DIR *(*opendir)(struct vfs_handle_struct *handle, struct connection_struct *conn, const char *fname, const char *mask, uint32 attributes);
-		SMB_STRUCT_DIRENT *(*readdir)(struct vfs_handle_struct *handle, struct connection_struct *conn, DIR *dirp);
-		void (*seekdir)(struct vfs_handle_struct *handle, struct connection_struct *conn, DIR *dirp, long offset);
-		long (*telldir)(struct vfs_handle_struct *handle, struct connection_struct *conn, DIR *dirp);
-		void (*rewind_dir)(struct vfs_handle_struct *handle, struct connection_struct *conn, DIR *dirp);
+		SMB_STRUCT_DIR *(*opendir)(struct vfs_handle_struct *handle, struct connection_struct *conn, const char *fname, const char *mask, uint32 attributes);
+		SMB_STRUCT_DIRENT *(*readdir)(struct vfs_handle_struct *handle, struct connection_struct *conn, SMB_STRUCT_DIR *dirp);
+		void (*seekdir)(struct vfs_handle_struct *handle, struct connection_struct *conn, SMB_STRUCT_DIR *dirp, long offset);
+		long (*telldir)(struct vfs_handle_struct *handle, struct connection_struct *conn, SMB_STRUCT_DIR *dirp);
+		void (*rewind_dir)(struct vfs_handle_struct *handle, struct connection_struct *conn, SMB_STRUCT_DIR *dirp);
 		int (*mkdir)(struct vfs_handle_struct *handle, struct connection_struct *conn, const char *path, mode_t mode);
 		int (*rmdir)(struct vfs_handle_struct *handle, struct connection_struct *conn, const char *path);
-		int (*closedir)(struct vfs_handle_struct *handle, struct connection_struct *conn, DIR *dir);
+		int (*closedir)(struct vfs_handle_struct *handle, struct connection_struct *conn, SMB_STRUCT_DIR *dir);
 		
 		/* File operations */
 		
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/lib/system.c samba-3.0.20-new/source/lib/system.c
--- samba-3.0.20-orig/source/lib/system.c	2005-07-28 08:19:45.000000000 -0500
+++ samba-3.0.20-new/source/lib/system.c	2005-08-26 09:42:08.000000000 -0500
@@ -366,7 +366,7 @@
  An opendir wrapper that will deal with 64 bit filesizes.
 ********************************************************************/
 
-DIR *sys_opendir(const char *name)
+SMB_STRUCT_DIR *sys_opendir(const char *name)
 {
 #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_OPENDIR64)
 	return opendir64(name);
@@ -379,7 +379,7 @@
  A readdir wrapper that will deal with 64 bit filesizes.
 ********************************************************************/
 
-SMB_STRUCT_DIRENT *sys_readdir(DIR *dirp)
+SMB_STRUCT_DIRENT *sys_readdir(SMB_STRUCT_DIR *dirp)
 {
 #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_READDIR64)
 	return readdir64(dirp);
@@ -392,7 +392,7 @@
  A seekdir wrapper that will deal with 64 bit filesizes.
 ********************************************************************/
 
-void sys_seekdir(DIR *dirp, long offset)
+void sys_seekdir(SMB_STRUCT_DIR *dirp, long offset)
 {
 #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_SEEKDIR64)
 	seekdir64(dirp, offset);
@@ -405,7 +405,7 @@
  A telldir wrapper that will deal with 64 bit filesizes.
 ********************************************************************/
 
-long sys_telldir(DIR *dirp)
+long sys_telldir(SMB_STRUCT_DIR *dirp)
 {
 #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_TELLDIR64)
 	return (long)telldir64(dirp);
@@ -418,7 +418,7 @@
  A rewinddir wrapper that will deal with 64 bit filesizes.
 ********************************************************************/
 
-void sys_rewinddir(DIR *dirp)
+void sys_rewinddir(SMB_STRUCT_DIR *dirp)
 {
 #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_REWINDDIR64)
 	rewinddir64(dirp);
@@ -431,7 +431,7 @@
  A close wrapper that will deal with 64 bit filesizes.
 ********************************************************************/
 
-int sys_closedir(DIR *dirp)
+int sys_closedir(SMB_STRUCT_DIR *dirp)
 {
 #if defined(HAVE_EXPLICIT_LARGEFILE_SUPPORT) && defined(HAVE_CLOSEDIR64)
 	return closedir64(dirp);
@@ -960,7 +960,7 @@
  Wide opendir. Just narrow and call sys_xxx.
 ****************************************************************************/
 
-DIR *wsys_opendir(const smb_ucs2_t *wfname)
+SMB_STRUCT_DIR *wsys_opendir(const smb_ucs2_t *wfname)
 {
 	pstring fname;
 	return opendir(unicode_to_unix(fname,wfname,sizeof(fname)));
@@ -970,7 +970,7 @@
  Wide readdir. Return a structure pointer containing a wide filename.
 ****************************************************************************/
 
-SMB_STRUCT_WDIRENT *wsys_readdir(DIR *dirp)
+SMB_STRUCT_WDIRENT *wsys_readdir(SMB_STRUCT_DIR *dirp)
 {
 	static SMB_STRUCT_WDIRENT retval;
 	SMB_STRUCT_DIRENT *dirval = sys_readdir(dirp);
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/modules/vfs_audit.c samba-3.0.20-new/source/modules/vfs_audit.c
--- samba-3.0.20-orig/source/modules/vfs_audit.c	2005-07-28 08:19:46.000000000 -0500
+++ samba-3.0.20-new/source/modules/vfs_audit.c	2005-08-26 09:42:08.000000000 -0500
@@ -31,7 +31,7 @@
 
 static int audit_connect(vfs_handle_struct *handle, connection_struct *conn, const char *svc, const char *user);
 static void audit_disconnect(vfs_handle_struct *handle, connection_struct *conn);
-static DIR *audit_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr);
+static SMB_STRUCT_DIR *audit_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr);
 static int audit_mkdir(vfs_handle_struct *handle, connection_struct *conn, const char *path, mode_t mode);
 static int audit_rmdir(vfs_handle_struct *handle, connection_struct *conn, const char *path);
 static int audit_open(vfs_handle_struct *handle, connection_struct *conn, const char *fname, int flags, mode_t mode);
@@ -119,9 +119,9 @@
 	return;
 }
 
-static DIR *audit_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
+static SMB_STRUCT_DIR *audit_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
 {
-	DIR *result;
+	SMB_STRUCT_DIR *result;
 	
 	result = SMB_VFS_NEXT_OPENDIR(handle, conn, fname, mask, attr);
 
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/modules/vfs_cap.c samba-3.0.20-new/source/modules/vfs_cap.c
--- samba-3.0.20-orig/source/modules/vfs_cap.c	2005-07-28 08:19:46.000000000 -0500
+++ samba-3.0.20-new/source/modules/vfs_cap.c	2005-08-26 09:42:08.000000000 -0500
@@ -38,14 +38,14 @@
 					 dfree, dsize);
 }
 
-static DIR *cap_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
+static SMB_STRUCT_DIR *cap_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
 {
         pstring capname;
         capencode(capname, fname);
 	return SMB_VFS_NEXT_OPENDIR(handle, conn, capname, mask, attr);
 }
 
-static SMB_STRUCT_DIRENT *cap_readdir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp)
+static SMB_STRUCT_DIRENT *cap_readdir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp)
 {
         SMB_STRUCT_DIRENT *result;
 	DEBUG(3,("cap: cap_readdir\n"));
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/modules/vfs_catia.c samba-3.0.20-new/source/modules/vfs_catia.c
--- samba-3.0.20-orig/source/modules/vfs_catia.c	2005-07-28 08:19:45.000000000 -0500
+++ samba-3.0.20-new/source/modules/vfs_catia.c	2005-08-26 09:42:08.000000000 -0500
@@ -71,7 +71,7 @@
         catia_string_replace(s, '\xb1', ' ');
 }
 
-static DIR *catia_opendir(vfs_handle_struct *handle, connection_struct 
+static SMB_STRUCT_DIR *catia_opendir(vfs_handle_struct *handle, connection_struct 
 			  *conn, const char *fname, const char *mask, uint32 attr)
 {
         pstring name;
@@ -82,7 +82,7 @@
 }
 
 static SMB_STRUCT_DIRENT *catia_readdir(vfs_handle_struct *handle, 
-					connection_struct *conn, DIR *dirp)
+					connection_struct *conn, SMB_STRUCT_DIR *dirp)
 {
         SMB_STRUCT_DIRENT *result = SMB_VFS_NEXT_READDIR(handle, conn, dirp);
 
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/modules/vfs_extd_audit.c samba-3.0.20-new/source/modules/vfs_extd_audit.c
--- samba-3.0.20-orig/source/modules/vfs_extd_audit.c	2005-07-28 08:19:46.000000000 -0500
+++ samba-3.0.20-new/source/modules/vfs_extd_audit.c	2005-08-26 09:42:08.000000000 -0500
@@ -34,7 +34,7 @@
 
 static int audit_connect(vfs_handle_struct *handle, connection_struct *conn, const char *svc, const char *user);
 static void audit_disconnect(vfs_handle_struct *handle, connection_struct *conn);
-static DIR *audit_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr);
+static SMB_STRUCT_DIR *audit_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr);
 static int audit_mkdir(vfs_handle_struct *handle, connection_struct *conn, const char *path, mode_t mode);
 static int audit_rmdir(vfs_handle_struct *handle, connection_struct *conn, const char *path);
 static int audit_open(vfs_handle_struct *handle, connection_struct *conn, const char *fname, int flags, mode_t mode);
@@ -125,9 +125,9 @@
 	return;
 }
 
-static DIR *audit_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
+static SMB_STRUCT_DIR *audit_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
 {
-	DIR *result;
+	SMB_STRUCT_DIR *result;
 
 	result = SMB_VFS_NEXT_OPENDIR(handle, conn, fname, mask, attr);
 
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/modules/vfs_full_audit.c samba-3.0.20-new/source/modules/vfs_full_audit.c
--- samba-3.0.20-orig/source/modules/vfs_full_audit.c	2005-07-28 08:19:45.000000000 -0500
+++ samba-3.0.20-new/source/modules/vfs_full_audit.c	2005-08-26 09:42:08.000000000 -0500
@@ -86,22 +86,22 @@
                                 struct files_struct *fsp,
                                 SHADOW_COPY_DATA *shadow_copy_data, BOOL labels);
 
-static DIR *smb_full_audit_opendir(vfs_handle_struct *handle, connection_struct *conn,
+static SMB_STRUCT_DIR *smb_full_audit_opendir(vfs_handle_struct *handle, connection_struct *conn,
 			  const char *fname, const char *mask, uint32 attr);
 static SMB_STRUCT_DIRENT *smb_full_audit_readdir(vfs_handle_struct *handle,
-				    connection_struct *conn, DIR *dirp);
+				    connection_struct *conn, SMB_STRUCT_DIR *dirp);
 static void smb_full_audit_seekdir(vfs_handle_struct *handle, connection_struct *conn,
-			DIR *dirp, long offset);
+			SMB_STRUCT_DIR *dirp, long offset);
 static long smb_full_audit_telldir(vfs_handle_struct *handle, connection_struct *conn,
-			DIR *dirp);
+			SMB_STRUCT_DIR *dirp);
 static void smb_full_audit_rewinddir(vfs_handle_struct *handle, connection_struct *conn,
-			DIR *dirp);
+			SMB_STRUCT_DIR *dirp);
 static int smb_full_audit_mkdir(vfs_handle_struct *handle, connection_struct *conn,
 		       const char *path, mode_t mode);
 static int smb_full_audit_rmdir(vfs_handle_struct *handle, connection_struct *conn,
 		       const char *path);
 static int smb_full_audit_closedir(vfs_handle_struct *handle, connection_struct *conn,
-			  DIR *dirp);
+			  SMB_STRUCT_DIR *dirp);
 static int smb_full_audit_open(vfs_handle_struct *handle, connection_struct *conn,
 		      const char *fname, int flags, mode_t mode);
 static int smb_full_audit_close(vfs_handle_struct *handle, files_struct *fsp, int fd);
@@ -845,10 +845,10 @@
 	return result;
 }
 
-static DIR *smb_full_audit_opendir(vfs_handle_struct *handle, connection_struct *conn,
+static SMB_STRUCT_DIR *smb_full_audit_opendir(vfs_handle_struct *handle, connection_struct *conn,
 			  const char *fname, const char *mask, uint32 attr)
 {
-	DIR *result;
+	SMB_STRUCT_DIR *result;
 
 	result = SMB_VFS_NEXT_OPENDIR(handle, conn, fname, mask, attr);
 
@@ -858,7 +858,7 @@
 }
 
 static SMB_STRUCT_DIRENT *smb_full_audit_readdir(vfs_handle_struct *handle,
-				    connection_struct *conn, DIR *dirp)
+				    connection_struct *conn, SMB_STRUCT_DIR *dirp)
 {
 	SMB_STRUCT_DIRENT *result;
 
@@ -873,7 +873,7 @@
 }
 
 static void smb_full_audit_seekdir(vfs_handle_struct *handle, connection_struct *conn,
-			DIR *dirp, long offset)
+			SMB_STRUCT_DIR *dirp, long offset)
 {
 	SMB_VFS_NEXT_SEEKDIR(handle, conn, dirp, offset);
 
@@ -882,7 +882,7 @@
 }
 
 static long smb_full_audit_telldir(vfs_handle_struct *handle, connection_struct *conn,
-			DIR *dirp)
+			SMB_STRUCT_DIR *dirp)
 {
 	long result;
 
@@ -894,7 +894,7 @@
 }
 
 static void smb_full_audit_rewinddir(vfs_handle_struct *handle, connection_struct *conn,
-			DIR *dirp)
+			SMB_STRUCT_DIR *dirp)
 {
 	SMB_VFS_NEXT_REWINDDIR(handle, conn, dirp);
 
@@ -927,7 +927,7 @@
 }
 
 static int smb_full_audit_closedir(vfs_handle_struct *handle, connection_struct *conn,
-			  DIR *dirp)
+			  SMB_STRUCT_DIR *dirp)
 {
 	int result;
 
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/modules/vfs_netatalk.c samba-3.0.20-new/source/modules/vfs_netatalk.c
--- samba-3.0.20-orig/source/modules/vfs_netatalk.c	2005-07-28 08:19:46.000000000 -0500
+++ samba-3.0.20-new/source/modules/vfs_netatalk.c	2005-08-26 09:42:08.000000000 -0500
@@ -148,11 +148,11 @@
 {
 	char *dpath;
 	SMB_STRUCT_DIRENT *dent = 0;
-	DIR *dir;
+	SMB_STRUCT_DIR *dir;
 
 	if (!path) return;
 
-	dir = opendir(path);
+	dir = sys_opendir(path);
 	if (!dir) return;
 
 	while (NULL != (dent = sys_readdir(dir))) {
@@ -165,16 +165,16 @@
 		atalk_unlink_file(dpath);
 	}
 
-	closedir(dir);
+	sys_closedir(dir);
 }
 
 /* Disk operations */
 
 /* Directory operations */
 
-DIR *atalk_opendir(struct vfs_handle_struct *handle, struct connection_struct *conn, const char *fname, const char *mask, uint32 attr)
+SMB_STRUCT_DIR *atalk_opendir(struct vfs_handle_struct *handle, struct connection_struct *conn, const char *fname, const char *mask, uint32 attr)
 {
-	DIR *ret = 0;
+	SMB_STRUCT_DIR *ret = 0;
 
 	ret = SMB_VFS_NEXT_OPENDIR(handle, conn, fname, mask, attr);
 
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/modules/vfs_shadow_copy.c samba-3.0.20-new/source/modules/vfs_shadow_copy.c
--- samba-3.0.20-orig/source/modules/vfs_shadow_copy.c	2005-07-28 08:19:46.000000000 -0500
+++ samba-3.0.20-new/source/modules/vfs_shadow_copy.c	2005-08-26 09:42:08.000000000 -0500
@@ -72,10 +72,10 @@
 	return False;
 }
 
-static DIR *shadow_copy_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
+static SMB_STRUCT_DIR *shadow_copy_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
 {
 	shadow_copy_Dir *dirp;
-	DIR *p = SMB_VFS_NEXT_OPENDIR(handle,conn,fname,mask,attr);
+	SMB_STRUCT_DIR *p = SMB_VFS_NEXT_OPENDIR(handle,conn,fname,mask,attr);
 
 	if (!p) {
 		DEBUG(0,("shadow_copy_opendir: SMB_VFS_NEXT_OPENDIR() failed for [%s]\n",fname));
@@ -119,10 +119,10 @@
 	}
 
 	SMB_VFS_NEXT_CLOSEDIR(handle,conn,p);
-	return((DIR *)dirp);
+	return((SMB_STRUCT_DIR *)dirp);
 }
 
-SMB_STRUCT_DIRENT *shadow_copy_readdir(vfs_handle_struct *handle, connection_struct *conn, DIR *_dirp)
+SMB_STRUCT_DIRENT *shadow_copy_readdir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *_dirp)
 {
 	shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
 
@@ -133,7 +133,7 @@
 	return NULL;
 }
 
-static void shadow_copy_seekdir(struct vfs_handle_struct *handle, struct connection_struct *conn, DIR *_dirp, long offset)
+static void shadow_copy_seekdir(struct vfs_handle_struct *handle, struct connection_struct *conn, SMB_STRUCT_DIR *_dirp, long offset)
 {
 	shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
 
@@ -142,19 +142,19 @@
 	}
 }
 
-static long shadow_copy_telldir(struct vfs_handle_struct *handle, struct connection_struct *conn, DIR *_dirp)
+static long shadow_copy_telldir(struct vfs_handle_struct *handle, struct connection_struct *conn, SMB_STRUCT_DIR *_dirp)
 {
 	shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
 	return( dirp->pos ) ;
 }
 
-static void shadow_copy_rewinddir(struct vfs_handle_struct *handle, struct connection_struct *conn, DIR *_dirp)
+static void shadow_copy_rewinddir(struct vfs_handle_struct *handle, struct connection_struct *conn, SMB_STRUCT_DIR *_dirp)
 {
 	shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
 	dirp->pos = 0 ;
 }
 
-int shadow_copy_closedir(vfs_handle_struct *handle, connection_struct *conn, DIR *_dirp)
+int shadow_copy_closedir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *_dirp)
 {
 	shadow_copy_Dir *dirp = (shadow_copy_Dir *)_dirp;
 
@@ -166,7 +166,7 @@
 
 static int shadow_copy_get_shadow_copy_data(vfs_handle_struct *handle, files_struct *fsp, SHADOW_COPY_DATA *shadow_copy_data, BOOL labels)
 {
-	DIR *p = SMB_VFS_NEXT_OPENDIR(handle,fsp->conn,fsp->conn->connectpath,NULL,0);
+	SMB_STRUCT_DIR *p = SMB_VFS_NEXT_OPENDIR(handle,fsp->conn,fsp->conn->connectpath,NULL,0);
 
 	shadow_copy_data->num_volumes = 0;
 	shadow_copy_data->labels = NULL;
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/script/mkproto.awk samba-3.0.20-new/source/script/mkproto.awk
--- samba-3.0.20-orig/source/script/mkproto.awk	2005-07-28 08:19:52.000000000 -0500
+++ samba-3.0.20-new/source/script/mkproto.awk	2005-08-26 09:42:08.000000000 -0500
@@ -136,7 +136,7 @@
     gotstart = 1;
   }
 
-  if( $0 ~ /^NODE_STATUS_STRUCT/ ) {
+  if( $0 ~ /^NODE_STATUS_STRUCT|SMB_STRUCT_DIR/ ) {
     gotstart = 1;
   }
 
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/smbd/chgpasswd.c samba-3.0.20-new/source/smbd/chgpasswd.c
--- samba-3.0.20-orig/source/smbd/chgpasswd.c	2005-07-28 08:19:42.000000000 -0500
+++ samba-3.0.20-new/source/smbd/chgpasswd.c	2005-08-26 09:42:08.000000000 -0500
@@ -64,7 +64,7 @@
 {
 	int master;
 	static fstring line;
-	DIR *dirp;
+	SMB_STRUCT_DIR *dirp;
 	const char *dpname;
 
 #if defined(HAVE_GRANTPT)
@@ -93,7 +93,7 @@
 
 	fstrcpy(line, "/dev/ptyXX");
 
-	dirp = opendir("/dev");
+	dirp = sys_opendir("/dev");
 	if (!dirp)
 		return (-1);
 	while ((dpname = readdirname(dirp)) != NULL)
@@ -110,12 +110,12 @@
 				DEBUG(3, ("pty: opened %s\n", line));
 				line[5] = 't';
 				*slave = line;
-				closedir(dirp);
+				sys_closedir(dirp);
 				return (master);
 			}
 		}
 	}
-	closedir(dirp);
+	sys_closedir(dirp);
 	return (-1);
 }
 
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/smbd/dir.c samba-3.0.20-new/source/smbd/dir.c
--- samba-3.0.20-orig/source/smbd/dir.c	2005-07-28 08:19:43.000000000 -0500
+++ samba-3.0.20-new/source/smbd/dir.c	2005-08-26 09:42:08.000000000 -0500
@@ -42,7 +42,7 @@
 
 struct smb_Dir {
 	connection_struct *conn;
-	DIR *dir;
+	SMB_STRUCT_DIR *dir;
 	long offset;
 	char *dir_path;
 	struct name_cache_entry *name_cache;
@@ -1098,6 +1098,9 @@
 		}
 		dirp->file_number++;
 		return n;
+	} else if (*poffset == END_OF_DIRECTORY_OFFSET) {
+		*poffset = dirp->offset = END_OF_DIRECTORY_OFFSET;
+		return NULL;
 	} else {
 		/* A real offset, seek to it. */
 		SeekDir(dirp, *poffset);
@@ -1120,7 +1123,7 @@
 		dirp->file_number++;
 		return e->name;
 	}
-	dirp->offset = END_OF_DIRECTORY_OFFSET;
+	*poffset = dirp->offset = END_OF_DIRECTORY_OFFSET;
 	return NULL;
 }
 
@@ -1145,6 +1148,8 @@
 	if (offset != dirp->offset) {
 		if (offset == START_OF_DIRECTORY_OFFSET || offset == DOT_DOT_DIRECTORY_OFFSET) {
 			RewindDir(dirp, &offset);
+		} else if (offset == END_OF_DIRECTORY_OFFSET) {
+			; /* Don't seek in this case. */
 		} else {
 			SMB_VFS_SEEKDIR(dirp->conn, dirp->dir, offset);
 		}
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/smbd/msdfs.c samba-3.0.20-new/source/smbd/msdfs.c
--- samba-3.0.20-orig/source/smbd/msdfs.c	2005-08-07 18:09:53.000000000 -0500
+++ samba-3.0.20-new/source/smbd/msdfs.c	2005-08-26 09:42:08.000000000 -0500
@@ -1010,7 +1010,7 @@
 static int form_junctions(TALLOC_CTX *ctx, int snum, struct junction_map *jucn, int jn_remain)
 {
 	int cnt = 0;
-	DIR *dirp;
+	SMB_STRUCT_DIR *dirp;
 	char* dname;
 	pstring connect_path;
 	char* service_name = lp_servicename(snum);
diff -uBbrN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/smbd/vfs-wrap.c samba-3.0.20-new/source/smbd/vfs-wrap.c
--- samba-3.0.20-orig/source/smbd/vfs-wrap.c	2005-07-28 08:19:43.000000000 -0500
+++ samba-3.0.20-new/source/smbd/vfs-wrap.c	2005-08-26 09:42:08.000000000 -0500
@@ -88,9 +88,9 @@
     
 /* Directory operations */
 
-DIR *vfswrap_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
+SMB_STRUCT_DIR *vfswrap_opendir(vfs_handle_struct *handle, connection_struct *conn, const char *fname, const char *mask, uint32 attr)
 {
-	DIR *result;
+	SMB_STRUCT_DIR *result;
 
 	START_PROFILE(syscall_opendir);
 	result = sys_opendir(fname);
@@ -98,7 +98,7 @@
 	return result;
 }
 
-SMB_STRUCT_DIRENT *vfswrap_readdir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp)
+SMB_STRUCT_DIRENT *vfswrap_readdir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp)
 {
 	SMB_STRUCT_DIRENT *result;
 
@@ -108,14 +108,14 @@
 	return result;
 }
 
-void vfswrap_seekdir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp, long offset)
+void vfswrap_seekdir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp, long offset)
 {
 	START_PROFILE(syscall_seekdir);
 	sys_seekdir(dirp, offset);
 	END_PROFILE(syscall_seekdir);
 }
 
-long vfswrap_telldir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp)
+long vfswrap_telldir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp)
 {
 	long result;
 	START_PROFILE(syscall_telldir);
@@ -124,7 +124,7 @@
 	return result;
 }
 
-void vfswrap_rewinddir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp)
+void vfswrap_rewinddir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp)
 {
 	START_PROFILE(syscall_rewinddir);
 	sys_rewinddir(dirp);
@@ -170,7 +170,7 @@
 	return result;
 }
 
-int vfswrap_closedir(vfs_handle_struct *handle, connection_struct *conn, DIR *dirp)
+int vfswrap_closedir(vfs_handle_struct *handle, connection_struct *conn, SMB_STRUCT_DIR *dirp)
 {
 	int result;
 

samba-3.0.20-groupname_enumeration_v3.patch:
 pdb_ldap.c |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

--- NEW FILE samba-3.0.20-groupname_enumeration_v3.patch ---
diff -urN --exclude-from=/misc/src/samba-cvs/diff.excludes samba-3.0.20-orig/source/passdb/pdb_ldap.c samba-3.0.20-new/source/passdb/pdb_ldap.c
--- samba-3.0.20-orig/source/passdb/pdb_ldap.c	2005-07-28 08:19:48.000000000 -0500
+++ samba-3.0.20-new/source/passdb/pdb_ldap.c	2005-08-26 14:16:00.000000000 -0500
@@ -3692,23 +3692,24 @@
 		return False;
 	}
 
-	vals = ldap_get_values(ld, entry, "cn");
-	if ((vals == NULL) || (vals[0] == NULL)) {
-		DEBUG(5, ("\"cn\" not found\n"));
-		return False;
-	}
-	pull_utf8_talloc(mem_ctx,
-			 CONST_DISCARD(char **, &result->account_name),
-			 vals[0]);
-	ldap_value_free(vals);
+	/* display name is the NT group name */
 
 	vals = ldap_get_values(ld, entry, "displayName");
-	if ((vals == NULL) || (vals[0] == NULL))
+	if ((vals == NULL) || (vals[0] == NULL)) {
 		DEBUG(8, ("\"displayName\" not found\n"));
-	else
-		pull_utf8_talloc(mem_ctx,
-				 CONST_DISCARD(char **, &result->fullname),
-				 vals[0]);
+
+		/* fallback to the 'cn' attribute */
+		vals = ldap_get_values(ld, entry, "cn");
+		if ((vals == NULL) || (vals[0] == NULL)) {
+			DEBUG(5, ("\"cn\" not found\n"));
+			return False;
+		}
+		pull_utf8_talloc(mem_ctx, CONST_DISCARD(char **, &result->account_name), vals[0]);
+	}
+	else {
+		pull_utf8_talloc(mem_ctx, CONST_DISCARD(char **, &result->account_name), vals[0]);
+	}
+
 	ldap_value_free(vals);
 
 	vals = ldap_get_values(ld, entry, "description");

samba-3.0.20-regcreatekey_winxp_v1.patch:
 confdefs.h            |    0 
 include/rpc_reg.h     |    7 +++++--
 registry/reg_db.c     |   14 ++++++++++----
 rpc_parse/parse_reg.c |   13 ++++++-------
 4 files changed, 21 insertions(+), 13 deletions(-)

--- NEW FILE samba-3.0.20-regcreatekey_winxp_v1.patch ---
diff -ubBrN --exclude-from=diff.excludes samba-3.0.20-orig/source/confdefs.h samba-3.0.20-new/source/confdefs.h
diff -ubBrN --exclude-from=diff.excludes samba-3.0.20-orig/source/include/rpc_reg.h samba-3.0.20-new/source/include/rpc_reg.h
--- samba-3.0.20-orig/source/include/rpc_reg.h	2005-07-28 08:19:50.000000000 -0500
+++ samba-3.0.20-new/source/include/rpc_reg.h	2005-09-01 09:03:30.000000000 -0500
@@ -217,14 +217,17 @@
 	POLICY_HND handle;
 	UNISTR4 name;
 	UNISTR4 key_class;
-	uint32 reserved;
+	uint32 options;
 	uint32 access;
+	
+	/* FIXME!  collapse all this into one structure */
 	uint32 *sec_info;
 	uint32 ptr2;
 	BUFHDR hdr_sec;
 	uint32 ptr3;
 	SEC_DESC_BUF *data;
-	uint32 unknown_2; /* 0x0000 0000 */
+
+	uint32 *disposition; 
 } REG_Q_CREATE_KEY_EX;
 
 typedef struct {
diff -ubBrN --exclude-from=diff.excludes samba-3.0.20-orig/source/registry/reg_db.c samba-3.0.20-new/source/registry/reg_db.c
--- samba-3.0.20-orig/source/registry/reg_db.c	2005-08-07 18:09:57.000000000 -0500
+++ samba-3.0.20-new/source/registry/reg_db.c	2005-09-01 09:05:05.000000000 -0500
@@ -49,6 +49,7 @@
 	"HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Perflib\\009",
 	"HKLM\\SYSTEM\\CurrentControlSet\\Control\\Print\\Monitors",
 	"HKLM\\SYSTEM\\CurrentControlSet\\Control\\ProductOptions",
+	"HKLM\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\DefaultUserConfiguration",
 	"HKLM\\SYSTEM\\CurrentControlSet\\Services\\TcpIp\\Parameters",
 	"HKLM\\SYSTEM\\CurrentControlSet\\Services\\Netlogon\\Parameters",
 	"HKU",
@@ -149,6 +150,11 @@
 		regval_ctr_init( &values );
 		
 		regdb_fetch_values( builtin_registry_values[i].path, &values );
+
+		/* preserve existing values across restarts.  Only add new ones */
+
+		if ( !regval_ctr_key_exists( &values, builtin_registry_values[i].valuename ) )
+		{
 		switch( builtin_registry_values[i].type ) {
 			case REG_DWORD:
 				regval_ctr_addvalue( &values, 
@@ -172,6 +178,7 @@
 					builtin_registry_values[i].type));
 		}
 		regdb_store_values( builtin_registry_values[i].path, &values );
+		}
 		
 		regval_ctr_destroy( &values );
 	}
@@ -191,8 +198,6 @@
 	if ( tdb_reg )
 		return True;
 
-	/* placeholder tdb; reinit upon startup */
-	
 	if ( !(tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600)) )
 	{
 		tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
@@ -209,14 +214,15 @@
 	vers_id = tdb_fetch_int32(tdb_reg, vstring);
 
 	if ( vers_id != REGVER_V1 ) {
+		/* any upgrade code here if needed */
+	}
 
-		/* create the registry here */
+	/* always setup the necessary keys and values */
 
 		if ( !init_registry_data() ) {
 			DEBUG(0,("init_registry: Failed to initiailize data in registry!\n"));
 			return False;
 		}
-	}
 
 	return True;
 }
diff -ubBrN --exclude-from=diff.excludes samba-3.0.20-orig/source/rpc_parse/parse_reg.c samba-3.0.20-new/source/rpc_parse/parse_reg.c
--- samba-3.0.20-orig/source/rpc_parse/parse_reg.c	2005-07-28 08:19:48.000000000 -0500
+++ samba-3.0.20-new/source/rpc_parse/parse_reg.c	2005-09-01 09:03:30.000000000 -0500
@@ -227,7 +227,7 @@
 	q_c->ptr2 = 1;
 	init_buf_hdr(&q_c->hdr_sec, sec_buf->len, sec_buf->len);
 	q_c->ptr3 = 1;
-	q_c->unknown_2 = 0x00000000;
+	q_c->disposition = TALLOC_P( get_talloc_ctx(), uint32 );
 }
 
 /*******************************************************************
@@ -259,7 +259,7 @@
 	if(!prs_align(ps))
 		return False;
 
-	if(!prs_uint32("reserved", ps, depth, &q_u->reserved))
+	if(!prs_uint32("options", ps, depth, &q_u->options))
 		return False;
 	if(!prs_uint32("access", ps, depth, &q_u->access))
 		return False;
@@ -267,16 +267,15 @@
 	if(!prs_pointer("sec_info", ps, depth, (void**)&q_u->sec_info, sizeof(uint32), (PRS_POINTER_CAST)prs_uint32))
 		return False;
 
+	if ( q_u->sec_info ) {
 	if(!prs_uint32("ptr2", ps, depth, &q_u->ptr2))
 		return False;
-	if(!reg_io_hdrbuf_sec(q_u->ptr2, &q_u->ptr3, &q_u->hdr_sec, q_u->data,
-	                      ps, depth))
+		if(!reg_io_hdrbuf_sec(q_u->ptr2, &q_u->ptr3, &q_u->hdr_sec, q_u->data, ps, depth))
 		return False;
+	}
 
-#if 0
-	if(!prs_uint32("unknown_2", ps, depth, &q_u->unknown_2))
+	if(!prs_pointer("disposition", ps, depth, (void**)&q_u->disposition, sizeof(uint32), (PRS_POINTER_CAST)prs_uint32))
 		return False;
-#endif
 
 	return True;
 }

samba-3.0.20-usrmgr_groups_v1.patch:
 srv_samr_nt.c |   40 ++++++++++++++++++++++++++++++++--------
 1 files changed, 32 insertions(+), 8 deletions(-)

--- NEW FILE samba-3.0.20-usrmgr_groups_v1.patch ---
diff -ubBrN --exclude-from=diff.excludes samba-3.0.20-orig/source/rpc_server/srv_samr_nt.c samba-3.0.20-new/source/rpc_server/srv_samr_nt.c
--- samba-3.0.20-orig/source/rpc_server/srv_samr_nt.c	2005-08-07 18:09:55.000000000 -0500
+++ samba-3.0.20-new/source/rpc_server/srv_samr_nt.c	2005-09-01 16:34:06.000000000 -0500
@@ -3927,6 +3927,8 @@
 	GROUP_MAP map;
 	GROUP_INFO_CTR *ctr;
 	uint32 acc_granted;
+	BOOL ret;
+	BOOL can_mod_accounts;
 
 	if (!get_lsa_policy_samr_sid(p, &q_u->pol, &group_sid, &acc_granted))
 		return NT_STATUS_INVALID_HANDLE;
@@ -3951,11 +3953,21 @@
 			return NT_STATUS_INVALID_INFO_CLASS;
 	}
 
-	if(!pdb_update_group_mapping_entry(&map)) {
-		return NT_STATUS_NO_SUCH_GROUP;
-	}
+	can_mod_accounts = user_has_privileges( p->pipe_user.nt_user_token, &se_add_users );
 
-	return NT_STATUS_OK;
+	/******** BEGIN SeAddUsers BLOCK *********/
+
+	if ( can_mod_accounts )
+		become_root();
+	  
+	ret = pdb_update_group_mapping_entry(&map);
+
+	if ( can_mod_accounts )
+		unbecome_root();
+
+	/******** End SeAddUsers BLOCK *********/
+
+	return ret ? NT_STATUS_OK : NT_STATUS_ACCESS_DENIED;
 }
 
 /*********************************************************************
@@ -3970,6 +3982,8 @@
 	struct acct_info info;
 	ALIAS_INFO_CTR *ctr;
 	uint32 acc_granted;
+	BOOL ret;
+	BOOL can_mod_accounts;
 
 	if (!get_lsa_policy_samr_sid(p, &q_u->alias_pol, &group_sid, &acc_granted))
 		return NT_STATUS_INVALID_HANDLE;
@@ -3992,11 +4006,21 @@
 			return NT_STATUS_INVALID_INFO_CLASS;
 	}
 
-	if(!pdb_set_aliasinfo(&group_sid, &info)) {
-		return NT_STATUS_ACCESS_DENIED;
-	}
+        can_mod_accounts = user_has_privileges( p->pipe_user.nt_user_token, &se_add_users );
 
-	return NT_STATUS_OK;
+        /******** BEGIN SeAddUsers BLOCK *********/
+
+        if ( can_mod_accounts )
+                become_root();
+
+        ret = pdb_set_aliasinfo( &group_sid, &info );
+
+        if ( can_mod_accounts )
+                unbecome_root();
+
+        /******** End SeAddUsers BLOCK *********/
+
+	return ret ? NT_STATUS_OK : NT_STATUS_ACCESS_DENIED;
 }
 
 /*********************************************************************

samba-3.0.20-warnings.patch:
 samba-3.0.20-save/source/lib/charcnv.c                |    4 
 samba-3.0.20-save/source/lib/gencache.c               |   16 ++-
 samba-3.0.20-save/source/lib/smbrun.c                 |    8 +
 samba-3.0.20-save/source/libsmb/climessage.c          |    2 
 samba-3.0.20-save/source/nsswitch/winbindd_ads.c      |    4 
 samba-3.0.20-save/source/nsswitch/winbindd_cm.c       |    2 
 samba-3.0.20-save/source/param/loadparm.c             |    5 
 samba-3.0.20-save/source/passdb/pdb_ldap.c            |    4 
 samba-3.0.20-save/source/passdb/pdb_nds.c             |    6 -
 samba-3.0.20-save/source/passdb/pdb_smbpasswd.c       |   20 ++-
 samba-3.0.20-save/source/rpc_parse/parse_prs.c        |   11 +-
 samba-3.0.20-save/source/rpc_server/srv_eventlog_nt.c |    5 
 samba-3.0.20-save/source/rpc_server/srv_lsa_nt.c      |   95 +++++++++++-------
 samba-3.0.20-save/source/rpc_server/srv_reg_nt.c      |    5 
 samba-3.0.20-save/source/rpc_server/srv_samr_nt.c     |   70 +++++++------
 samba-3.0.20-save/source/rpc_server/srv_spoolss_nt.c  |    8 +
 samba-3.0.20-save/source/rpc_server/srv_svcctl_nt.c   |    5 
 samba-3.0.20-save/source/smbd/message.c               |   15 ++
 samba-3.0.20-save/source/smbd/sesssetup.c             |    2 
 samba-3.0.20/source/client/mount.cifs.c               |    2 
 samba-3.0.20/source/include/spnego.h                  |    2 
 samba-3.0.20/source/lib/privileges.c                  |    1 
 samba-3.0.20/source/libads/ads_ldap.c                 |    4 
 samba-3.0.20/source/libads/ldap.c                     |   20 ++-
 samba-3.0.20/source/libsmb/samlogon_cache.c           |    5 
 samba-3.0.20/source/libsmb/smbencrypt.c               |    4 
 samba-3.0.20/source/libsmb/spnego.c                   |    4 
 samba-3.0.20/source/nsswitch/pam_winbind.c            |   21 ++-
 samba-3.0.20/source/pam_smbpass/pam_smb_auth.c        |   17 ++-
 samba-3.0.20/source/pam_smbpass/pam_smb_passwd.c      |   11 +-
 samba-3.0.20/source/pam_smbpass/support.c             |   36 ++++--
 samba-3.0.20/source/printing/printing.c               |   11 +-
 samba-3.0.20/source/rpc_client/cli_netlogon.c         |    2 
 samba-3.0.20/source/rpc_client/cli_pipe.c             |    3 
 samba-3.0.20/source/rpc_parse/parse_samr.c            |    4 
 samba-3.0.20/source/rpcclient/cmd_samr.c              |    2 
 samba-3.0.20/source/smbd/blocking.c                   |    4 
 samba-3.0.20/source/smbd/close.c                      |    6 -
 samba-3.0.20/source/smbd/mangle_hash2.c               |    4 
 samba-3.0.20/source/smbd/nttrans.c                    |    2 
 samba-3.0.20/source/smbd/process.c                    |    2 
 samba-3.0.20/source/smbd/reply.c                      |    4 
 samba-3.0.20/source/utils/net_rpc.c                   |    2 
 samba-3.0.20/source/utils/ntlm_auth.c                 |    1 
 44 files changed, 295 insertions(+), 166 deletions(-)

--- NEW FILE samba-3.0.20-warnings.patch ---
diff -r -u samba-3.0.20/source/lib/charcnv.c samba-3.0.20-save/source/lib/charcnv.c
--- samba-3.0.20/source/lib/charcnv.c	2005-04-18 12:38:18.000000000 -0400
+++ samba-3.0.20-save/source/lib/charcnv.c	2005-08-23 12:05:24.000000000 -0400
@@ -778,10 +778,12 @@
 size_t unix_strlower(const char *src, size_t srclen, char *dest, size_t destlen)
 {
 	size_t size;
+	void *vbuffer = NULL;
 	smb_ucs2_t *buffer = NULL;
 	
 	size = convert_string_allocate(NULL, CH_UNIX, CH_UCS2, src, srclen,
-				       (void **) &buffer, True);
+				       &vbuffer, True);
+	buffer = vbuffer;
 	if (size == (size_t)-1 || !buffer) {
 		smb_panic("failed to create UCS2 buffer");
 	}
diff -r -u samba-3.0.20/source/lib/gencache.c samba-3.0.20-save/source/lib/gencache.c
--- samba-3.0.20/source/lib/gencache.c	2005-02-25 12:59:31.000000000 -0500
+++ samba-3.0.20-save/source/lib/gencache.c	2005-08-23 12:21:23.000000000 -0400
@@ -251,11 +251,17 @@
 		char* entry_buf = SMB_STRNDUP(databuf.dptr, databuf.dsize);
 		char *v;
 		time_t t;
+		unsigned u;
+		int status;
 
 		v = SMB_MALLOC(databuf.dsize - TIMEOUT_LEN);
 				
 		SAFE_FREE(databuf.dptr);
-		sscanf(entry_buf, CACHE_DATA_FMT, (int*)&t, v);
+		status = sscanf(entry_buf, CACHE_DATA_FMT, &u, v);
+		if ( status != 2 ) {
+		    DEBUG(0, ("gencache_get: Invalid return %d from sscanf\n", status ));
+		}
+		t = u;
 		SAFE_FREE(entry_buf);
 
 		DEBUG(10, ("Returning %s cache entry: key = %s, value = %s, "
@@ -307,6 +313,8 @@
 	TDB_DATA databuf;
 	char *keystr = NULL, *valstr = NULL, *entry = NULL;
 	time_t timeout = 0;
+	int status;
+	unsigned u;
 
 	/* fail completely if get null pointers passed */
 	SMB_ASSERT(fn && keystr_pattern);
@@ -335,7 +343,11 @@
 		entry = SMB_STRNDUP(databuf.dptr, databuf.dsize);
 		SAFE_FREE(databuf.dptr);
 		valstr = SMB_MALLOC(databuf.dsize - TIMEOUT_LEN);
-		sscanf(entry, CACHE_DATA_FMT, (int*)(&timeout), valstr);
+		status = sscanf(entry, CACHE_DATA_FMT, &u, valstr);
+		if ( status != 2 ) {
+		    DEBUG(0,("gencache_iterate: invalid return from sscanf %d\n",status));
+		}
+		timeout = u;
 		
 		DEBUG(10, ("Calling function with arguments (key = %s, value = %s, timeout = %s)\n",
 		           keystr, valstr, ctime(&timeout)));
diff -r -u samba-3.0.20/source/lib/smbrun.c samba-3.0.20-save/source/lib/smbrun.c
--- samba-3.0.20/source/lib/smbrun.c	2005-02-25 12:59:32.000000000 -0500
+++ samba-3.0.20-save/source/lib/smbrun.c	2005-08-23 12:13:25.000000000 -0400
@@ -225,10 +225,16 @@
 		 */
 		int status = 0;
 		pid_t wpid;
+		size_t towrite;
+		ssize_t wrote;
 		
 		close(ifd[0]);
 		/* send the secret */
-		write(ifd[1], secret, strlen(secret));
+		towrite = strlen(secret);
+		wrote = write(ifd[1], secret, towrite);
+		if ( wrote != towrite ) {
+		    DEBUG(0,("smbrunsecret: wrote %ld of %lu bytes\n",(long)wrote,(unsigned long)towrite));
+		}
 		fsync(ifd[1]);
 		close(ifd[1]);
 
diff -r -u samba-3.0.20/source/libsmb/climessage.c samba-3.0.20-save/source/libsmb/climessage.c
--- samba-3.0.20/source/libsmb/climessage.c	2005-07-28 09:19:46.000000000 -0400
+++ samba-3.0.20-save/source/libsmb/climessage.c	2005-08-22 16:54:06.000000000 -0400
@@ -70,7 +70,7 @@
 ****************************************************************************/
 int cli_message_text_build(struct cli_state *cli, char *msg, int len, int grp)
 {
-	char *msgdos;
+	void *msgdos;
 	int lendos;
 	char *p;
 
diff -r -u samba-3.0.20/source/nsswitch/winbindd_ads.c samba-3.0.20-save/source/nsswitch/winbindd_ads.c
--- samba-3.0.20/source/nsswitch/winbindd_ads.c	2005-08-19 13:16:27.000000000 -0400
+++ samba-3.0.20-save/source/nsswitch/winbindd_ads.c	2005-08-24 10:58:59.000000000 -0400
@@ -542,6 +542,7 @@
 	const char *attrs[] = {"tokenGroups", "primaryGroupID", NULL};
 	ADS_STATUS rc;
 	int count;
+	void *vmsg;
 	LDAPMessage *msg = NULL;
 	char *user_dn;
 	DOM_SID *sids;
@@ -568,7 +569,8 @@
 		goto done;
 	}
 
-	rc = ads_search_retry_dn(ads, (void**)&msg, user_dn, attrs);
+	rc = ads_search_retry_dn(ads, &vmsg, user_dn, attrs);
+	msg = vmsg;
 	if (!ADS_ERR_OK(rc)) {
 		status = ads_ntstatus(rc);
 		DEBUG(1,("lookup_usergroups(sid=%s) ads_search tokenGroups: %s\n", 
diff -r -u samba-3.0.20/source/nsswitch/winbindd_cm.c samba-3.0.20-save/source/nsswitch/winbindd_cm.c
--- samba-3.0.20/source/nsswitch/winbindd_cm.c	2005-07-28 09:19:44.000000000 -0400
+++ samba-3.0.20-save/source/nsswitch/winbindd_cm.c	2005-08-24 10:57:51.000000000 -0400
@@ -721,7 +721,7 @@
 	for (retries = 0; retries < 3; retries++) {
 
 		int fd = -1;
-		BOOL retry;
+		BOOL retry = False;
 
 		result = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
 
diff -r -u samba-3.0.20/source/param/loadparm.c samba-3.0.20-save/source/param/loadparm.c
--- samba-3.0.20/source/param/loadparm.c	2005-08-24 11:01:56.000000000 -0400
+++ samba-3.0.20-save/source/param/loadparm.c	2005-08-22 16:46:06.000000000 -0400
@@ -3347,7 +3347,10 @@
 			break;
 
 		case P_OCTAL:
-			sscanf(pszParmValue, "%o", (int *)parm_ptr);
+			i = sscanf(pszParmValue, "%o", (int *)parm_ptr);
+			if ( i != 1 ) {
+			    DEBUG ( 0, ("Invalid octal number %s\n", pszParmName ));
+			}
 			break;
 
 		case P_LIST:
diff -r -u samba-3.0.20/source/passdb/pdb_ldap.c samba-3.0.20-save/source/passdb/pdb_ldap.c
--- samba-3.0.20/source/passdb/pdb_ldap.c	2005-07-28 09:19:48.000000000 -0400
+++ samba-3.0.20-save/source/passdb/pdb_ldap.c	2005-08-23 11:55:45.000000000 -0400
@@ -694,8 +694,8 @@
 
 	if (ldap_state->is_nds_ldap) {
 		char *user_dn;
-		int pwd_len;
-		char clear_text_pw[512];
+		size_t pwd_len;
+		unsigned char clear_text_pw[512];
 
 		/* Make call to Novell eDirectory ldap extension to get clear text password.
 			NOTE: This will only work if we have an SSL connection to eDirectory. */
diff -r -u samba-3.0.20/source/passdb/pdb_nds.c samba-3.0.20-save/source/passdb/pdb_nds.c
--- samba-3.0.20/source/passdb/pdb_nds.c	2005-07-28 09:19:48.000000000 -0400
+++ samba-3.0.20-save/source/passdb/pdb_nds.c	2005-08-23 11:58:59.000000000 -0400
@@ -550,7 +550,7 @@
 	LDAP	 *ld,
 	char     *objectDN,
 	size_t   *pwdSize,	/* in bytes */
-	char     *pwd )
+	unsigned char     *pwd )
 {
 	int err = 0;
 
@@ -663,8 +663,8 @@
 int pdb_nds_get_password(
 	struct smbldap_state *ldap_state,
 	char *object_dn,
-	int *pwd_len,
-	char *pwd )
+	size_t *pwd_len,
+	unsigned char *pwd )
 {
 	LDAP *ld = ldap_state->ldap_struct;
 	int rc = -1;
diff -r -u samba-3.0.20/source/passdb/pdb_smbpasswd.c samba-3.0.20-save/source/passdb/pdb_smbpasswd.c
--- samba-3.0.20/source/passdb/pdb_smbpasswd.c	2005-02-25 12:59:35.000000000 -0500
+++ samba-3.0.20-save/source/passdb/pdb_smbpasswd.c	2005-08-23 12:03:44.000000000 -0400
@@ -313,10 +313,11 @@
 	unsigned char *smbpwd = smbpasswd_state->smbpwd;
 	unsigned char *smbntpwd = smbpasswd_state->smbntpwd;
 	char linebuf[256];
-	unsigned char c;
+	int c;
 	unsigned char *p;
 	long uidval;
 	size_t linebuf_len;
+	char *status;
 
 	if(fp == NULL) {
 		DEBUG(0,("getsmbfilepwent: Bad password file pointer.\n"));
@@ -329,11 +330,12 @@
 	/*
 	 * Scan the file, a line at a time and check if the name matches.
 	 */
-	while (!feof(fp)) {
+	status = linebuf;
+	while (status && !feof(fp)) {
 		linebuf[0] = '\0';
 
-		fgets(linebuf, 256, fp);
-		if (ferror(fp)) {
+		status = fgets(linebuf, 256, fp);
+		if (status == NULL && ferror(fp)) {
 			return NULL;
 		}
 
@@ -689,9 +691,10 @@
 	/* Static buffers we will return. */
 	pstring user_name;
 
+	char *status;
 	char linebuf[256];
 	char readbuf[1024];
-	unsigned char c;
+	int c;
 	fstring ascii_p16;
 	fstring encode_bits;
 	unsigned char *p = NULL;
@@ -738,13 +741,14 @@
 	/*
 	 * Scan the file, a line at a time and check if the name matches.
 	 */
-	while (!feof(fp)) {
+	status = linebuf;
+	while (status && !feof(fp)) {
 		pwd_seekpos = sys_ftell(fp);
 
 		linebuf[0] = '\0';
 
-		fgets(linebuf, sizeof(linebuf), fp);
-		if (ferror(fp)) {
+		status = fgets(linebuf, sizeof(linebuf), fp);
+		if (status == NULL && ferror(fp)) {
 			pw_file_unlock(lockfd, &smbpasswd_state->pw_file_lock_depth);
 			fclose(fp);
 			return False;
diff -r -u samba-3.0.20/source/rpc_parse/parse_prs.c samba-3.0.20-save/source/rpc_parse/parse_prs.c
--- samba-3.0.20/source/rpc_parse/parse_prs.c	2005-07-28 09:19:48.000000000 -0400
+++ samba-3.0.20-save/source/rpc_parse/parse_prs.c	2005-08-22 16:56:38.000000000 -0400
@@ -52,6 +52,7 @@
 {
 	int fd, i;
 	pstring fname;
+	ssize_t sz;
 	if (DEBUGLEVEL < 50) return;
 	for (i=1;i<100;i++) {
 		if (v != -1) {
@@ -63,9 +64,13 @@
 		if (fd != -1 || errno != EEXIST) break;
 	}
 	if (fd != -1) {
-		write(fd, ps->data_p + from_off, to_off - from_off);
-		close(fd);
-		DEBUG(0,("created %s\n", fname));
+		sz = write(fd, ps->data_p + from_off, to_off - from_off);
+		i = close(fd);
+		if ( sz != to_off - from_off || i != 0 ) {
+			DEBUG(0,("Error writing/closing %s: %ld!=%ld %d\n", fname, sz, to_off - from_off, i ));
+		} else {
+			DEBUG(0,("created %s\n", fname));
+		}
 	}
 }
 
diff -r -u samba-3.0.20/source/rpc_server/srv_eventlog_nt.c samba-3.0.20-save/source/rpc_server/srv_eventlog_nt.c
--- samba-3.0.20/source/rpc_server/srv_eventlog_nt.c	2005-07-28 09:19:47.000000000 -0400
+++ samba-3.0.20-save/source/rpc_server/srv_eventlog_nt.c	2005-08-23 11:13:20.000000000 -0400
@@ -48,13 +48,14 @@
 static Eventlog_info *find_eventlog_info_by_hnd(pipes_struct *p,
 						POLICY_HND *handle)
 {
+    void *v;
     Eventlog_info *info = NULL;
     
-    if(!(find_policy_by_hnd(p,handle,(void **)&info)))
+    if(!(find_policy_by_hnd(p,handle,&v)))
     {
 	DEBUG(2,("find_eventlog_info_by_hnd: eventlog not found.\n"));
     }
-
+    info = v;
     return info;
 }
 
diff -r -u samba-3.0.20/source/rpc_server/srv_lsa_nt.c samba-3.0.20-save/source/rpc_server/srv_lsa_nt.c
--- samba-3.0.20/source/rpc_server/srv_lsa_nt.c	2005-08-07 19:09:55.000000000 -0400
+++ samba-3.0.20-save/source/rpc_server/srv_lsa_nt.c	2005-08-22 17:41:57.000000000 -0400
@@ -488,6 +488,7 @@
 NTSTATUS _lsa_enum_trust_dom(pipes_struct *p, LSA_Q_ENUM_TRUST_DOM *q_u, LSA_R_ENUM_TRUST_DOM *r_u)
 {
 	struct lsa_info *info;
+	void *vinfo;
 	uint32 enum_context = q_u->enum_context;
 
 	/*
@@ -501,9 +502,10 @@
 	uint32 num_domains;
 	NTSTATUS nt_status;
 
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
 
+	info = vinfo;
 	/* check if the user have enough rights */
 	if (!(info->access & POLICY_VIEW_LOCAL_INFORMATION))
 		return NT_STATUS_ACCESS_DENIED;
@@ -531,6 +533,7 @@
 
 NTSTATUS _lsa_query_info(pipes_struct *p, LSA_Q_QUERY_INFO *q_u, LSA_R_QUERY_INFO *r_u)
 {
+	void *vhandle;
 	struct lsa_info *handle;
 	LSA_INFO_UNION *info = &r_u->dom;
 	DOM_SID domain_sid;
@@ -539,9 +542,10 @@
 
 	r_u->status = NT_STATUS_OK;
 
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&handle))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vhandle))
 		return NT_STATUS_INVALID_HANDLE;
 
+	handle = vhandle;
 	switch (q_u->info_class) {
 	case 0x02:
 		{
@@ -641,6 +645,7 @@
 
 NTSTATUS _lsa_lookup_sids(pipes_struct *p, LSA_Q_LOOKUP_SIDS *q_u, LSA_R_LOOKUP_SIDS *r_u)
 {
+	void *vhandle;
 	struct lsa_info *handle;
 	DOM_SID2 *sid = q_u->sids.sid;
 	int num_entries = q_u->sids.num_entries;
@@ -657,10 +662,11 @@
 	ref = TALLOC_ZERO_P(p->mem_ctx, DOM_R_REF);
 	names = TALLOC_ZERO_P(p->mem_ctx, LSA_TRANS_NAME_ENUM);
 
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&handle)) {
+	if (!find_policy_by_hnd(p, &q_u->pol, &vhandle)) {
 		r_u->status = NT_STATUS_INVALID_HANDLE;
 		goto done;
 	}
+	handle = vhandle;
 
 	/* check if the user have enough rights */
 	if (!(handle->access & POLICY_LOOKUP_NAMES)) {
@@ -691,6 +697,7 @@
 
 NTSTATUS _lsa_lookup_names(pipes_struct *p,LSA_Q_LOOKUP_NAMES *q_u, LSA_R_LOOKUP_NAMES *r_u)
 {
+	void *vhandle;
 	struct lsa_info *handle;
 	UNISTR2 *names = q_u->uni_name;
 	int num_entries = q_u->num_entries;
@@ -706,11 +713,12 @@
 	ref = TALLOC_ZERO_P(p->mem_ctx, DOM_R_REF);
 	rids = TALLOC_ZERO_ARRAY(p->mem_ctx, DOM_RID2, num_entries);
 
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&handle)) {
+	if (!find_policy_by_hnd(p, &q_u->pol, &vhandle)) {
 		r_u->status = NT_STATUS_INVALID_HANDLE;
 		goto done;
 	}
 
+	handle = vhandle;
 	/* check if the user have enough rights */
 	if (!(handle->access & POLICY_LOOKUP_NAMES)) {
 		r_u->status = NT_STATUS_ACCESS_DENIED;
@@ -802,6 +810,7 @@
 
 NTSTATUS _lsa_enum_privs(pipes_struct *p, LSA_Q_ENUM_PRIVS *q_u, LSA_R_ENUM_PRIVS *r_u)
 {
+	void *vhandle;
 	struct lsa_info *handle;
 	uint32 i;
 	uint32 enum_context = q_u->enum_context;
@@ -822,9 +831,9 @@
 	DEBUG(10,("_lsa_enum_privs: enum_context:%d total entries:%d\n", 
 		enum_context, num_privs));
 	
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&handle))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vhandle))
 		return NT_STATUS_INVALID_HANDLE;
-
+	handle = vhandle;
 	/* check if the user have enough rights
 	   I don't know if it's the right one. not documented.  */
 
@@ -865,12 +874,14 @@
 
 NTSTATUS _lsa_priv_get_dispname(pipes_struct *p, LSA_Q_PRIV_GET_DISPNAME *q_u, LSA_R_PRIV_GET_DISPNAME *r_u)
 {
+	void *vhandle;
 	struct lsa_info *handle;
 	fstring name_asc;
 	const char *description;
 
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&handle))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vhandle))
 		return NT_STATUS_INVALID_HANDLE;
+	handle = vhandle;
 
 	/* check if the user have enough rights */
 
@@ -911,15 +922,16 @@
 
 NTSTATUS _lsa_enum_accounts(pipes_struct *p, LSA_Q_ENUM_ACCOUNTS *q_u, LSA_R_ENUM_ACCOUNTS *r_u)
 {
+	void *vhandle;
 	struct lsa_info *handle;
 	DOM_SID *sid_list;
 	int i, j, num_entries;
 	LSA_SID_ENUM *sids=&r_u->sids;
 	NTSTATUS ret;
 
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&handle))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vhandle))
 		return NT_STATUS_INVALID_HANDLE;
-
+	handle = vhandle;
 	if (!(handle->access & POLICY_VIEW_LOCAL_INFORMATION))
 		return NT_STATUS_ACCESS_DENIED;
 
@@ -989,13 +1001,14 @@
 
 NTSTATUS _lsa_create_account(pipes_struct *p, LSA_Q_CREATEACCOUNT *q_u, LSA_R_CREATEACCOUNT *r_u)
 {
+	void *vhandle;
 	struct lsa_info *handle;
 	struct lsa_info *info;
 
 	/* find the connection policy handle. */
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&handle))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vhandle))
 		return NT_STATUS_INVALID_HANDLE;
-
+	handle = vhandle;
 	/* check if the user have enough rights */
 
 	/*
@@ -1037,13 +1050,14 @@
 
 NTSTATUS _lsa_open_account(pipes_struct *p, LSA_Q_OPENACCOUNT *q_u, LSA_R_OPENACCOUNT *r_u)
 {
+	void *vhandle;
 	struct lsa_info *handle;
 	struct lsa_info *info;
 
 	/* find the connection policy handle. */
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&handle))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vhandle))
 		return NT_STATUS_INVALID_HANDLE;
-
+	handle = vhandle;
 	/* check if the user have enough rights */
 
 	/*
@@ -1079,14 +1093,15 @@
 
 NTSTATUS _lsa_enum_privsaccount(pipes_struct *p, prs_struct *ps, LSA_Q_ENUMPRIVSACCOUNT *q_u, LSA_R_ENUMPRIVSACCOUNT *r_u)
 {
+	void *vinfo;
 	struct lsa_info *info=NULL;
 	SE_PRIV mask;
 	PRIVILEGE_SET privileges;
 
 	/* find the connection policy handle. */
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-
+	info = vinfo;
 	if ( !get_privileges_for_sids( &mask, &info->sid, 1 ) ) 
 		return NT_STATUS_OBJECT_NAME_NOT_FOUND;
 
@@ -1113,15 +1128,16 @@
 
 NTSTATUS _lsa_getsystemaccount(pipes_struct *p, LSA_Q_GETSYSTEMACCOUNT *q_u, LSA_R_GETSYSTEMACCOUNT *r_u)
 {
+	void *vinfo;
 	struct lsa_info *info=NULL;
 	fstring name, dom_name;
 	enum SID_NAME_USE type;
 
 	/* find the connection policy handle. */
 
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-
+	info = vinfo;
 	if (!lookup_sid(&info->sid, dom_name, name, &type))
 		return NT_STATUS_ACCESS_DENIED;
 
@@ -1145,14 +1161,15 @@
 
 NTSTATUS _lsa_setsystemaccount(pipes_struct *p, LSA_Q_SETSYSTEMACCOUNT *q_u, LSA_R_SETSYSTEMACCOUNT *r_u)
 {
+	void *vinfo;
 	struct lsa_info *info=NULL;
 	GROUP_MAP map;
 	r_u->status = NT_STATUS_OK;
 
 	/* find the connection policy handle. */
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-
+	info = vinfo;
 	/* check to see if the pipe_user is a Domain Admin since 
 	   account_pol.tdb was already opened as root, this is all we have */
 	   
@@ -1174,15 +1191,16 @@
 
 NTSTATUS _lsa_addprivs(pipes_struct *p, LSA_Q_ADDPRIVS *q_u, LSA_R_ADDPRIVS *r_u)
 {
+	void *vinfo;
 	struct lsa_info *info = NULL;
 	SE_PRIV mask;
 	PRIVILEGE_SET *set = NULL;
 	struct current_user user;
 
 	/* find the connection policy handle. */
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-		
+	info = vinfo;
 	/* check to see if the pipe_user is root or a Domain Admin since 
 	   account_pol.tdb was already opened as root, this is all we have */
 	   
@@ -1215,15 +1233,16 @@
 
 NTSTATUS _lsa_removeprivs(pipes_struct *p, LSA_Q_REMOVEPRIVS *q_u, LSA_R_REMOVEPRIVS *r_u)
 {
+	void *vinfo;
 	struct lsa_info *info = NULL;
 	SE_PRIV mask;
 	PRIVILEGE_SET *set = NULL;
 	struct current_user user;
 
 	/* find the connection policy handle. */
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-
+	info = vinfo;
 	/* check to see if the pipe_user is root or a Domain Admin since 
 	   account_pol.tdb was already opened as root, this is all we have */
 	   
@@ -1256,6 +1275,7 @@
 
 NTSTATUS _lsa_query_secobj(pipes_struct *p, LSA_Q_QUERY_SEC_OBJ *q_u, LSA_R_QUERY_SEC_OBJ *r_u)
 {
+	void *vhandle;
 	struct lsa_info *handle=NULL;
 	SEC_DESC *psd = NULL;
 	size_t sd_size;
@@ -1264,9 +1284,9 @@
 	r_u->status = NT_STATUS_OK;
 
 	/* find the connection policy handle. */
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&handle))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vhandle))
 		return NT_STATUS_INVALID_HANDLE;
-
+	handle = vhandle;
 	/* check if the user have enough rights */
 	if (!(handle->access & POLICY_VIEW_LOCAL_INFORMATION))
 		return NT_STATUS_ACCESS_DENIED;
@@ -1310,6 +1330,7 @@
 
 NTSTATUS _lsa_query_info2(pipes_struct *p, LSA_Q_QUERY_INFO2 *q_u, LSA_R_QUERY_INFO2 *r_u)
 {
+	void *vhandle;
 	struct lsa_info *handle;
 	const char *nb_name;
 	char *dns_name = NULL;
@@ -1321,9 +1342,9 @@
 	ZERO_STRUCT(guid);
 	r_u->status = NT_STATUS_OK;
 
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&handle))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vhandle))
 		return NT_STATUS_INVALID_HANDLE;
-
+	handle = vhandle;
 	switch (q_u->info_class) {
 	case 0x0c:
 		/* check if the user have enough rights */
@@ -1374,6 +1395,7 @@
 
 NTSTATUS _lsa_add_acct_rights(pipes_struct *p, LSA_Q_ADD_ACCT_RIGHTS *q_u, LSA_R_ADD_ACCT_RIGHTS *r_u)
 {
+	void *vinfo;
 	struct lsa_info *info = NULL;
 	int i = 0;
 	DOM_SID sid;
@@ -1383,9 +1405,9 @@
 	
 
 	/* find the connection policy handle. */
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-		
+	info = vinfo;
 	/* check to see if the pipe_user is a Domain Admin since 
 	   account_pol.tdb was already opened as root, this is all we have */
 	   
@@ -1432,6 +1454,7 @@
 
 NTSTATUS _lsa_remove_acct_rights(pipes_struct *p, LSA_Q_REMOVE_ACCT_RIGHTS *q_u, LSA_R_REMOVE_ACCT_RIGHTS *r_u)
 {
+	void *vinfo;
 	struct lsa_info *info = NULL;
 	int i = 0;
 	DOM_SID sid;
@@ -1441,9 +1464,9 @@
 	
 
 	/* find the connection policy handle. */
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-		
+	info = vinfo;
 	/* check to see if the pipe_user is a Domain Admin since 
 	   account_pol.tdb was already opened as root, this is all we have */
 	   
@@ -1495,6 +1518,7 @@
 
 NTSTATUS _lsa_enum_acct_rights(pipes_struct *p, LSA_Q_ENUM_ACCT_RIGHTS *q_u, LSA_R_ENUM_ACCT_RIGHTS *r_u)
 {
+	void *vinfo;
 	struct lsa_info *info = NULL;
 	DOM_SID sid;
 	PRIVILEGE_SET privileges;
@@ -1503,9 +1527,9 @@
 
 	/* find the connection policy handle. */
 	
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-		
+	info = vinfo;
 	/* according to an NT4 PDC, you can add privileges to SIDs even without
 	   call_lsa_create_account() first.  And you can use any arbitrary SID. */
 	   
@@ -1537,6 +1561,7 @@
 
 NTSTATUS _lsa_lookup_priv_value(pipes_struct *p, LSA_Q_LOOKUP_PRIV_VALUE *q_u, LSA_R_LOOKUP_PRIV_VALUE *r_u)
 {
+	void *vinfo;
 	struct lsa_info *info = NULL;
 	fstring name;
 	LUID_ATTR priv_luid;
@@ -1544,9 +1569,9 @@
 	
 	/* find the connection policy handle. */
 	
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-		
+	info = vinfo;
 	unistr2_to_ascii(name, &q_u->privname.unistring, sizeof(name));
 	
 	DEBUG(10,("_lsa_lookup_priv_value: name = %s\n", name));
diff -r -u samba-3.0.20/source/rpc_server/srv_reg_nt.c samba-3.0.20-save/source/rpc_server/srv_reg_nt.c
--- samba-3.0.20/source/rpc_server/srv_reg_nt.c	2005-08-07 19:09:55.000000000 -0400
+++ samba-3.0.20-save/source/rpc_server/srv_reg_nt.c	2005-08-23 11:02:58.000000000 -0400
@@ -101,13 +101,14 @@
 
 static REGISTRY_KEY *find_regkey_index_by_hnd(pipes_struct *p, POLICY_HND *hnd)
 {
+	void *vregkey;
 	REGISTRY_KEY *regkey = NULL;
 
-	if(!find_policy_by_hnd(p,hnd,(void **)&regkey)) {
+	if(!find_policy_by_hnd(p,hnd,&vregkey)) {
 		DEBUG(2,("find_regkey_index_by_hnd: Registry Key not found: "));
 		return NULL;
 	}
-
+	regkey = vregkey;
 	return regkey;
 }
 
diff -r -u samba-3.0.20/source/rpc_server/srv_samr_nt.c samba-3.0.20-save/source/rpc_server/srv_samr_nt.c
--- samba-3.0.20/source/rpc_server/srv_samr_nt.c	2005-08-07 19:09:55.000000000 -0400
+++ samba-3.0.20-save/source/rpc_server/srv_samr_nt.c	2005-08-23 11:50:31.000000000 -0400
@@ -342,6 +342,7 @@
 
 NTSTATUS _samr_open_domain(pipes_struct *p, SAMR_Q_OPEN_DOMAIN *q_u, SAMR_R_OPEN_DOMAIN *r_u)
 {
+	void *vinfo;
 	struct    samr_info *info;
 	SEC_DESC *psd = NULL;
 	uint32    acc_granted;
@@ -354,9 +355,9 @@
 
 	/* find the connection policy handle. */
 	
-	if ( !find_policy_by_hnd(p, &q_u->pol, (void**)&info) )
+	if ( !find_policy_by_hnd(p, &q_u->pol, &vinfo) )
 		return NT_STATUS_INVALID_HANDLE;
-
+	info = vinfo;
 	status = access_check_samr_function( info->acc_granted, 
 		SA_RIGHT_SAM_OPEN_DOMAIN, "_samr_open_domain" );
 		
@@ -398,14 +399,15 @@
 
 NTSTATUS _samr_get_usrdom_pwinfo(pipes_struct *p, SAMR_Q_GET_USRDOM_PWINFO *q_u, SAMR_R_GET_USRDOM_PWINFO *r_u)
 {
+	void *vinfo;
 	struct samr_info *info = NULL;
 
 	r_u->status = NT_STATUS_OK;
 
 	/* find the policy handle.  open a policy on it. */
-	if (!find_policy_by_hnd(p, &q_u->user_pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->user_pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-
+	info = vinfo;
 	if (!sid_check_is_in_our_domain(&info->sid))
 		return NT_STATUS_OBJECT_TYPE_MISMATCH;
 
@@ -439,12 +441,13 @@
 static BOOL get_lsa_policy_samr_sid( pipes_struct *p, POLICY_HND *pol, 
                                      DOM_SID *sid, uint32 *acc_granted)
 {
+	void *vinfo;
 	struct samr_info *info = NULL;
 
 	/* find the policy handle.  open a policy on it. */
-	if (!find_policy_by_hnd(p, pol, (void **)&info))
+	if (!find_policy_by_hnd(p, pol, &vinfo))
 		return False;
-
+	info = vinfo;
 	if (!info)
 		return False;
 
@@ -572,6 +575,7 @@
 NTSTATUS _samr_enum_dom_users(pipes_struct *p, SAMR_Q_ENUM_DOM_USERS *q_u, 
 			      SAMR_R_ENUM_DOM_USERS *r_u)
 {
+	void *vinfo;
 	struct samr_info *info = NULL;
 	int num_account;
 	uint32 enum_context=q_u->start_idx;
@@ -583,9 +587,9 @@
 	r_u->status = NT_STATUS_OK;
 
 	/* find the policy handle.  open a policy on it. */
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-
+	info = vinfo;
  	if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(info->acc_granted, 
 					SA_RIGHT_DOMAIN_ENUM_ACCOUNTS, 
 					"_samr_enum_dom_users"))) {
@@ -685,6 +689,7 @@
 
 NTSTATUS _samr_enum_dom_groups(pipes_struct *p, SAMR_Q_ENUM_DOM_GROUPS *q_u, SAMR_R_ENUM_DOM_GROUPS *r_u)
 {
+	void *vinfo = NULL;
 	struct samr_info *info = NULL;
 	struct samr_displayentry *groups;
 	uint32 num_groups;
@@ -692,9 +697,9 @@
 	r_u->status = NT_STATUS_OK;
 
 	/* find the policy handle.  open a policy on it. */
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-
+	info = vinfo;
 	r_u->status = access_check_samr_function(info->acc_granted,
 						 SA_RIGHT_DOMAIN_ENUM_ACCOUNTS,
 						 "_samr_enum_dom_groups");
@@ -734,15 +739,16 @@
 
 NTSTATUS _samr_enum_dom_aliases(pipes_struct *p, SAMR_Q_ENUM_DOM_ALIASES *q_u, SAMR_R_ENUM_DOM_ALIASES *r_u)
 {
+	void *vinfo;
 	struct samr_info *info;
 	struct samr_displayentry *aliases;
 	struct pdb_search **search = NULL;
 	uint32 num_aliases = 0;
 
 	/* find the policy handle.  open a policy on it. */
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-
+	info = vinfo;
 	r_u->status = access_check_samr_function(info->acc_granted,
 						 SA_RIGHT_DOMAIN_ENUM_ACCOUNTS,
 						 "_samr_enum_dom_aliases");
@@ -791,6 +797,7 @@
 NTSTATUS _samr_query_dispinfo(pipes_struct *p, SAMR_Q_QUERY_DISPINFO *q_u, 
 			      SAMR_R_QUERY_DISPINFO *r_u)
 {
+	void *vinfo = NULL;
 	struct samr_info *info = NULL;
 	uint32 struct_size=0x20; /* W2K always reply that, client doesn't care */
 	
@@ -811,9 +818,9 @@
 	r_u->status = NT_STATUS_UNSUCCESSFUL;
 
 	/* find the policy handle.  open a policy on it. */
-	if (!find_policy_by_hnd(p, &q_u->domain_pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->domain_pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-
+	info = vinfo;
 	domain_sid = info->sid;
 
 	/*
@@ -1574,6 +1581,7 @@
 NTSTATUS _samr_query_userinfo(pipes_struct *p, SAMR_Q_QUERY_USERINFO *q_u, SAMR_R_QUERY_USERINFO *r_u)
 {
 	SAM_USERINFO_CTR *ctr;
+	void *vinfo = NULL;
 	struct samr_info *info = NULL;
 	DOM_SID domain_sid;
 	uint32 rid;
@@ -1581,9 +1589,9 @@
 	r_u->status=NT_STATUS_OK;
 
 	/* search for the handle */
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-
+	info = vinfo;
 	domain_sid = info->sid;
 
 	sid_split_rid(&domain_sid, &rid);
@@ -1788,6 +1796,7 @@
 
 NTSTATUS _samr_query_dom_info(pipes_struct *p, SAMR_Q_QUERY_DOMAIN_INFO *q_u, SAMR_R_QUERY_DOMAIN_INFO *r_u)
 {
+	void *vinfo = NULL;
 	struct samr_info *info = NULL;
 	SAM_UNK_CTR *ctr;
 	uint32 min_pass_len,pass_hist,flag;
@@ -1797,7 +1806,7 @@
 	time_t u_lock_duration, u_reset_time;
 	NTTIME nt_lock_duration, nt_reset_time;
 	uint32 lockout;
-	
+	unsigned int ui_logout;
 	time_t u_logout;
 	NTTIME nt_logout;
 
@@ -1816,9 +1825,9 @@
 	DEBUG(5,("_samr_query_dom_info: %d\n", __LINE__));
 	
 	/* find the policy handle.  open a policy on it. */
-	if (!find_policy_by_hnd(p, &q_u->domain_pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->domain_pol, (void **)&vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-	
+	info = vinfo;
 	switch (q_u->switch_value) {
 		case 0x01:
 			
@@ -1864,7 +1873,8 @@
 				       num_users, num_groups, num_aliases, nt_logout, server_role);
 			break;
 		case 0x03:
-			account_policy_get(AP_TIME_TO_LOGOUT, (unsigned int *)&u_logout);
+			account_policy_get(AP_TIME_TO_LOGOUT, &ui_logout);
+			u_logout = ui_logout;
 			unix_to_nt_time_abs(&nt_logout, u_logout);
 			
 			init_unk_info3(&ctr->info.inf3, nt_logout);
@@ -2247,15 +2257,16 @@
 
 NTSTATUS _samr_lookup_domain(pipes_struct *p, SAMR_Q_LOOKUP_DOMAIN *q_u, SAMR_R_LOOKUP_DOMAIN *r_u)
 {
+	void *vinfo;
 	struct samr_info *info;
 	fstring domain_name;
 	DOM_SID sid;
 
 	r_u->status = NT_STATUS_OK;
 
-	if (!find_policy_by_hnd(p, &q_u->connect_pol, (void**)&info))
+	if (!find_policy_by_hnd(p, &q_u->connect_pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-
+	info = vinfo;
 	/* win9x user manager likes to use SA_RIGHT_SAM_ENUM_DOMAINS here.  
 	   Reverted that change so we will work with RAS servers again */
 
@@ -2322,6 +2333,7 @@
 
 NTSTATUS _samr_enum_domains(pipes_struct *p, SAMR_Q_ENUM_DOMAINS *q_u, SAMR_R_ENUM_DOMAINS *r_u)
 {
+	void *vinfo;
 	struct samr_info *info;
 	uint32 num_entries = 2;
 	fstring dom[2];
@@ -2329,9 +2341,9 @@
 
 	r_u->status = NT_STATUS_OK;
 	
-	if (!find_policy_by_hnd(p, &q_u->pol, (void**)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-	
+	info = vinfo;
 	if (!NT_STATUS_IS_OK(r_u->status = access_check_samr_function(info->acc_granted, SA_RIGHT_SAM_ENUM_DOMAINS, "_samr_enum_domains"))) {
 		return r_u->status;
 	}
@@ -2957,6 +2969,7 @@
 {
 	int num_alias_rids;
 	uint32 *alias_rids;
+	void *vinfo = NULL;
 	struct samr_info *info = NULL;
 	int i;
 		
@@ -2971,9 +2984,9 @@
 	DEBUG(5,("_samr_query_useraliases: %d\n", __LINE__));
 
 	/* find the policy handle.  open a policy on it. */
-	if (!find_policy_by_hnd(p, &q_u->pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-		
+	info = vinfo;
 	ntstatus1 = access_check_samr_function(info->acc_granted, SA_RIGHT_DOMAIN_LOOKUP_ALIAS_BY_MEM, "_samr_query_useraliases");
 	ntstatus2 = access_check_samr_function(info->acc_granted, SA_RIGHT_DOMAIN_OPEN_ACCOUNT, "_samr_query_useraliases");
 	
@@ -4158,6 +4171,7 @@
 
 NTSTATUS _samr_unknown_2e(pipes_struct *p, SAMR_Q_UNKNOWN_2E *q_u, SAMR_R_UNKNOWN_2E *r_u)
 {
+	void *vinfo = NULL;
 	struct samr_info *info = NULL;
 	SAM_UNK_CTR *ctr;
 	uint32 min_pass_len,pass_hist,flag;
@@ -4186,9 +4200,9 @@
 	DEBUG(5,("_samr_unknown_2e: %d\n", __LINE__));
 
 	/* find the policy handle.  open a policy on it. */
-	if (!find_policy_by_hnd(p, &q_u->domain_pol, (void **)&info))
+	if (!find_policy_by_hnd(p, &q_u->domain_pol, &vinfo))
 		return NT_STATUS_INVALID_HANDLE;
-
+	info = vinfo;
 	switch (q_u->switch_value) {
 		case 0x01:
 			account_policy_get(AP_MIN_PASSWORD_LEN, &account_policy_temp);
diff -r -u samba-3.0.20/source/rpc_server/srv_spoolss_nt.c samba-3.0.20-save/source/rpc_server/srv_spoolss_nt.c
--- samba-3.0.20/source/rpc_server/srv_spoolss_nt.c	2005-08-19 13:16:27.000000000 -0400
+++ samba-3.0.20-save/source/rpc_server/srv_spoolss_nt.c	2005-08-23 11:10:35.000000000 -0400
@@ -264,13 +264,14 @@
 
 static Printer_entry *find_printer_index_by_hnd(pipes_struct *p, POLICY_HND *hnd)
 {
+	void *v;
 	Printer_entry *find_printer = NULL;
 
-	if(!find_policy_by_hnd(p,hnd,(void **)&find_printer)) {
+	if(!find_policy_by_hnd(p,hnd,&v)) {
 		DEBUG(2,("find_printer_index_by_hnd: Printer handle not found: "));
 		return NULL;
 	}
-
+	find_printer = v;
 	return find_printer;
 }
 
@@ -2072,7 +2073,10 @@
 		
 			/* this should not have failed---if it did, report to client */
 			if ( !W_ERROR_IS_OK(status_win2k) )
+			{
+				status = status_win2k;
 				goto done;
+			}
 		}
 	}
 	
diff -r -u samba-3.0.20/source/rpc_server/srv_svcctl_nt.c samba-3.0.20-save/source/rpc_server/srv_svcctl_nt.c
--- samba-3.0.20/source/rpc_server/srv_svcctl_nt.c	2005-08-07 19:09:55.000000000 -0400
+++ samba-3.0.20-save/source/rpc_server/srv_svcctl_nt.c	2005-08-23 11:06:11.000000000 -0400
@@ -154,13 +154,14 @@
 
 static SERVICE_INFO *find_service_info_by_hnd(pipes_struct *p, POLICY_HND *hnd)
 {
+	void *v;
 	SERVICE_INFO *service_info = NULL;
 
-	if( !find_policy_by_hnd( p, hnd, (void **)&service_info) ) {
+	if( !find_policy_by_hnd( p, hnd, &v) ) {
 		DEBUG(2,("find_service_info_by_hnd: handle not found"));
 		return NULL;
 	}
-
+	service_info = v;
 	return service_info;
 }
 
diff -r -u samba-3.0.20/source/smbd/message.c samba-3.0.20-save/source/smbd/message.c
--- samba-3.0.20/source/smbd/message.c	2005-02-25 12:59:26.000000000 -0500
+++ samba-3.0.20-save/source/smbd/message.c	2005-08-22 16:46:06.000000000 -0400
@@ -41,8 +41,10 @@
   pstring name;
   int i;
   int fd;
+  void *vmsg;
   char *msg;
   int len;
+  ssize_t sz;
 
   if (! (*lp_msg_command()))
     {
@@ -64,20 +66,27 @@
    * Incoming message is in DOS codepage format. Convert to UNIX.
    */
   
-  if ((len = (int)convert_string_allocate(NULL,CH_DOS, CH_UNIX, msgbuf, msgpos, (void **) &msg, True)) < 0 || !msg) {
+  if ((len = (int)convert_string_allocate(NULL,CH_DOS, CH_UNIX, msgbuf, msgpos, &vmsg, True)) < 0 || !vmsg) {
     DEBUG(3,("Conversion failed, delivering message in DOS codepage format\n"));
     for (i = 0; i < msgpos;) {
       if (msgbuf[i] == '\r' && i < (msgpos-1) && msgbuf[i+1] == '\n') {
 	i++; continue;
       }
-      write(fd, &msgbuf[i++], 1);
+      sz = write(fd, &msgbuf[i++], 1);
+      if ( sz != 1 ) {
+	DEBUG(0,("Write error to fd %d: %ld(%d)\n",fd, (long)sz, errno ));
+      }
     }
   } else {
+    msg = vmsg;
     for (i = 0; i < len;) {
       if (msg[i] == '\r' && i < (len-1) && msg[i+1] == '\n') {
 	i++; continue;
       }
-      write(fd, &msg[i++],1);
+      sz = write(fd, &msg[i++],1);
+      if ( sz != 1 ) {
+	DEBUG(0,("Write error to fd %d: %ld(%d)\n",fd, (long)sz, errno ));
+      }
     }
     SAFE_FREE(msg);
   }
diff -r -u samba-3.0.20/source/smbd/sesssetup.c samba-3.0.20-save/source/smbd/sesssetup.c
--- samba-3.0.20/source/smbd/sesssetup.c	2005-08-07 19:09:53.000000000 -0400
+++ samba-3.0.20-save/source/smbd/sesssetup.c	2005-08-22 16:47:49.000000000 -0400
@@ -660,7 +660,7 @@
 		return ret;
 	}
 
-	if (strncmp(blob1.data, "NTLMSSP", 7) == 0) {
+	if (strncmp((char *)(blob1.data), "NTLMSSP", 7) == 0) {
 		DATA_BLOB chal;
 		NTSTATUS nt_status;
 		if (!vuser->auth_ntlmssp_state) {
--- samba-3.0.20/source/include/#spnego.h~	2005-08-24 14:57:38.000000000 -0400
+++ samba-3.0.20/source/include/spnego.h	2005-08-24 14:57:38.000000000 -0400
@@ -43,7 +43,7 @@
 } negResult_t;
 
 typedef struct spnego_negTokenInit {
-	char **mechTypes;
+	const char **mechTypes;
 	int reqFlags;
 	DATA_BLOB mechToken;
 	DATA_BLOB mechListMIC;
--- samba-3.0.20/source/lib/#privileges.c~	2005-08-24 14:00:53.000000000 -0400
+++ samba-3.0.20/source/lib/privileges.c	2005-08-24 14:00:53.000000000 -0400
@@ -399,6 +399,7 @@
 	int i;
 
 	priv_luid.attr = 0;
+	priv_luid.luid.low = ~0;
 	priv_luid.luid.high = 0;
 	
 	for ( i=0; !se_priv_equal(&privs[i].se_priv, &se_priv_end); i++ ) {
--- samba-3.0.20/source/libads/#ads_ldap.c~	2005-08-24 14:22:47.000000000 -0400
+++ samba-3.0.20/source/libads/ads_ldap.c	2005-08-24 14:22:47.000000000 -0400
@@ -32,6 +32,7 @@
 			 char **dn)
 {
 	ADS_STATUS rc;
+	void *vmsg = NULL;
 	LDAPMessage *msg = NULL;
 	LDAPMessage *entry = NULL;
 	char *ldap_exp;
@@ -56,7 +57,8 @@
 		goto done;
 	}
 
-	rc = ads_search_retry(ads, (void **)&msg, ldap_exp, attr);
+	rc = ads_search_retry(ads, &vmsg, ldap_exp, attr);
+	msg = vmsg;
 
 	if (!ADS_ERR_OK(rc)) {
 		DEBUG(1,("ads_sid_to_dn ads_search: %s\n", ads_errstr(rc)));
--- samba-3.0.20/source/libads/#ldap.c~	2005-08-24 14:21:28.000000000 -0400
+++ samba-3.0.20/source/libads/ldap.c	2005-08-24 14:21:28.000000000 -0400
@@ -1140,6 +1140,7 @@
 
 uint32 ads_get_kvno(ADS_STRUCT *ads, const char *machine_name)
 {
+	void *vres = NULL;
 	LDAPMessage *res = NULL;
 	uint32 kvno = (uint32)-1;      /* -1 indicates a failure */
 	char *filter;
@@ -1151,7 +1152,8 @@
 	if (asprintf(&filter, "(samAccountName=%s$)", machine_name) == -1) {
 		return kvno;
 	}
-	ret = ads_search(ads, (void**) &res, filter, attrs);
+	ret = ads_search(ads, &vres, filter, attrs);
+	res=vres;
 	SAFE_FREE(filter);
 	if (!ADS_ERR_OK(ret) && ads_count_replies(ads, res)) {
 		DEBUG(1,("ads_get_kvno: Computer Account For %s not found.\n", machine_name));
@@ -1199,13 +1201,15 @@
 ADS_STATUS ads_clear_service_principal_names(ADS_STRUCT *ads, const char *machine_name)
 {
 	TALLOC_CTX *ctx;
+	void *vres = NULL;
 	LDAPMessage *res = NULL;
 	ADS_MODLIST mods;
 	const char *servicePrincipalName[1] = {NULL};
 	ADS_STATUS ret = ADS_ERROR(LDAP_SUCCESS);
 	char *dn_string = NULL;
 
-	ret = ads_find_machine_acct(ads, (void **)&res, machine_name);
+	ret = ads_find_machine_acct(ads, &vres, machine_name);
+	res = vres;
 	if (!ADS_ERR_OK(ret) || ads_count_replies(ads, res) != 1) {
 		DEBUG(5,("ads_clear_service_principal_names: WARNING: Host Account for %s not found... skipping operation.\n", machine_name));
 		DEBUG(5,("ads_clear_service_principal_names: WARNING: Service Principals for %s have NOT been cleared.\n", machine_name));
@@ -1266,6 +1270,7 @@
 {
 	ADS_STATUS ret;
 	TALLOC_CTX *ctx;
+	void *vres;
 	LDAPMessage *res = NULL;
 	char *host_spn, *psp1, *psp2, *psp3;
 	ADS_MODLIST mods;
@@ -1273,7 +1278,8 @@
 	char *dn_string = NULL;
 	const char *servicePrincipalName[4] = {NULL, NULL, NULL, NULL};
 
-	ret = ads_find_machine_acct(ads, (void **)&res, machine_name);
+	ret = ads_find_machine_acct(ads, &vres, machine_name);
+	res = vres;
 	if (!ADS_ERR_OK(ret) || ads_count_replies(ads, res) != 1) {
 		DEBUG(1,("ads_add_service_principal_name: WARNING: Host Account for %s not found... skipping operation.\n",
 			machine_name));
@@ -1377,6 +1383,7 @@
 	unsigned acct_control;
 	unsigned exists=0;
 	fstring my_fqdn;
+	void *vres = NULL;
 	LDAPMessage *res = NULL;
 	int i, next_spn;
 
@@ -1387,7 +1394,8 @@
 
 	name_to_fqdn(my_fqdn, machine_name);
 
-	status = ads_find_machine_acct(ads, (void **)&res, machine_name);
+	status = ads_find_machine_acct(ads, &vres, machine_name);
+	res = vres;
 	if (ADS_ERR_OK(status) && ads_count_replies(ads, res) == 1) {
 		char *dn_string = ads_get_dn(ads, res);
 		if (!dn_string) {
@@ -1733,6 +1741,7 @@
 			  uint32 account_type, const char *org_unit)
 {
 	ADS_STATUS status;
+	void *vres = NULL;
 	LDAPMessage *res = NULL;
 	char *machine;
 
@@ -1760,7 +1769,8 @@
 		return status;
 	}
 
-	status = ads_find_machine_acct(ads, (void **)&res, machine);
+	status = ads_find_machine_acct(ads, &vres, machine);
+	res = vres;
 	if (!ADS_ERR_OK(status)) {
 		DEBUG(0, ("ads_join_realm: Host account test failed for machine %s\n", machine));
 		SAFE_FREE(machine);
--- samba-3.0.20/source/libsmb/#samlogon_cache.c~	2005-08-24 14:08:06.000000000 -0400
+++ samba-3.0.20/source/libsmb/samlogon_cache.c	2005-08-24 14:08:06.000000000 -0400
@@ -117,6 +117,7 @@
 	BOOL 		result = False;
 	DOM_SID		user_sid;
 	time_t		t = time(NULL);
+	uint32		u;
 	
 
 	if (!netsamlogon_cache_init()) {
@@ -143,8 +144,8 @@
 	/* Prepare data */
 	
 	prs_init( &ps,MAX_PDU_FRAG_LEN , mem_ctx, MARSHALL);
-	
-	if ( !prs_uint32( "timestamp", &ps, 0, (uint32*)&t ) )
+	u = t;
+	if ( !prs_uint32( "timestamp", &ps, 0, &u ) )
 		return False;
 	
 	if ( net_io_user_info3("", user, &ps, 0, 3) ) 
--- samba-3.0.20/source/libsmb/#smbencrypt.c~	2005-08-24 14:16:22.000000000 -0400
+++ samba-3.0.20/source/libsmb/smbencrypt.c	2005-08-24 14:16:22.000000000 -0400
@@ -485,7 +485,7 @@
  encode a password buffer with a unicode password.  The buffer
  is filled with random data to make it harder to attack.
 ************************************************************/
-BOOL encode_pw_buffer(char buffer[516], const char *password, int string_flags)
+BOOL encode_pw_buffer(uint8 buffer[516], const char *password, int string_flags)
 {
 	uchar new_pw[512];
 	size_t new_pw_len;
@@ -496,7 +496,7 @@
 	
 	memcpy(&buffer[512 - new_pw_len], new_pw, new_pw_len);
 
-	generate_random_buffer((unsigned char *)buffer, 512 - new_pw_len);
+	generate_random_buffer(buffer, 512 - new_pw_len);
 
 	/* 
 	 * The length of the new password is in the last 4 bytes of
--- samba-3.0.20/source/nsswitch/#pam_winbind.c~	2005-08-24 15:18:23.000000000 -0400
+++ samba-3.0.20/source/nsswitch/pam_winbind.c	2005-08-24 15:18:23.000000000 -0400
@@ -66,9 +66,11 @@
 		    struct pam_response **response)
 {
     int retval;
-    struct pam_conv *conv;
+    const void *vconv;
+    const struct pam_conv *conv;
 
-    retval = pam_get_item(pamh, PAM_CONV, (const void **) &conv ) ;
+    retval = pam_get_item(pamh, PAM_CONV, &vconv ) ;
+    conv = vconv;
     if (retval == PAM_SUCCESS) {
 	retval = conv->conv(nargs, (const struct pam_message **)message,
 			    response, conv->appdata_ptr);
@@ -306,6 +308,7 @@
 {
 	int authtok_flag;
 	int retval;
+	const void *vitem;
 	const char *item;
 	char *token;
 
@@ -326,7 +329,8 @@
 	 */
 
 	if (on(WINBIND_TRY_FIRST_PASS_ARG, ctrl) || on(WINBIND_USE_FIRST_PASS_ARG, ctrl)) {
-		retval = pam_get_item(pamh, authtok_flag, (const void **) &item);
+		retval = pam_get_item(pamh, authtok_flag, &vitem);
+		item = vitem;
 		if (retval != PAM_SUCCESS) {
 			/* very strange. */
 			_pam_log(LOG_ALERT, 
@@ -430,15 +434,14 @@
 	retval = pam_set_item(pamh, authtok_flag, token);
 	_pam_delete(token);	/* clean it up */
 	if (retval != PAM_SUCCESS
-	    || (retval = pam_get_item(pamh, authtok_flag
-				      ,(const void **) &item))
+	    || (retval = pam_get_item(pamh, authtok_flag, &vitem))
 	    != PAM_SUCCESS) {
 		
 		_pam_log(LOG_CRIT, "error manipulating password");
 		return retval;
 		
 	}
-
+	item = vitem;
 	*pass = item;
 	item = NULL;		/* break link to password */
 
@@ -601,6 +604,7 @@
 	/* <DO NOT free() THESE> */
 	const char *user;
 	const char *member = NULL;
+	const void *vpass_old;
 	char *pass_old, *pass_new;
 	/* </DO NOT free() THESE> */
 
@@ -687,9 +691,8 @@
 		 * get the old token back. 
 		 */
 		
-		retval = pam_get_item(pamh, PAM_OLDAUTHTOK
-				      ,(const void **) &pass_old);
-		
+		retval = pam_get_item(pamh, PAM_OLDAUTHTOK, &vpass_old);
+		pass_old = vpass_old;
 		if (retval != PAM_SUCCESS) {
 			_pam_log(LOG_NOTICE, "user not authenticated");
 			return retval;
--- samba-3.0.20/source/pam_smbpass/#pam_smb_auth.c~	2005-08-24 15:05:57.000000000 -0400
+++ samba-3.0.20/source/pam_smbpass/pam_smb_auth.c	2005-08-24 15:05:57.000000000 -0400
@@ -84,6 +84,11 @@
        pam_sm_setcred(). */
     ret_data = SMB_MALLOC_P(int);
 
+    /* we need to do this before we call AUTH_RETURN */
+    /* Getting into places that might use LDAP -- protect the app
+       from a SIGPIPE it's not expecting */
+    oldsig_handler = CatchSignal(SIGPIPE, SIGNAL_CAST SIG_IGN);
+
     /* get the username */
     retval = pam_get_user( pamh, &name, "Username: " );
     if ( retval != PAM_SUCCESS ) {
@@ -96,10 +101,6 @@
         _log_err( LOG_DEBUG, "username [%s] obtained", name );
     }
 
-    /* Getting into places that might use LDAP -- protect the app
-       from a SIGPIPE it's not expecting */
-    oldsig_handler = CatchSignal(SIGPIPE, SIGNAL_CAST SIG_IGN);
-
     if (!initialize_password_db(True)) {
         _log_err( LOG_ALERT, "Cannot access samba password database" );
         retval = PAM_AUTHINFO_UNAVAIL;
@@ -158,11 +159,13 @@
 int pam_sm_setcred(pam_handle_t *pamh, int flags,
                    int argc, const char **argv)
 {
+    const void *vpretval = NULL;
     int retval, *pretval = NULL;
 
     retval = PAM_SUCCESS;
 
-    pam_get_data(pamh, "smb_setcred_return", (const void **) &pretval);
+    pam_get_data(pamh, "smb_setcred_return", &vpretval);
+    pretval = vpretval;
     if(pretval) {
 	retval = *pretval;
 	SAFE_FREE(pretval);
@@ -179,6 +182,7 @@
 {
     pstring err_str;
     pstring msg_str;
+    const void *vpass = NULL;
     const char *pass = NULL;
     int retval;
 
@@ -186,7 +190,8 @@
     msg_str[0] = '\0';
 
     /* Get the authtok; if we don't have one, silently fail. */
-    retval = pam_get_item( pamh, PAM_AUTHTOK, (const void **) &pass );
+    retval = pam_get_item( pamh, PAM_AUTHTOK, &vpass );
+    pass = vpass;
 
     if (retval != PAM_SUCCESS) {
 	_log_err( LOG_ALERT
--- samba-3.0.20/source/pam_smbpass/#pam_smb_passwd.c~	2005-08-24 15:07:34.000000000 -0400
+++ samba-3.0.20/source/pam_smbpass/pam_smb_passwd.c	2005-08-24 15:07:34.000000000 -0400
@@ -99,6 +99,7 @@
     SAM_ACCOUNT *sampass = NULL;
     void (*oldsig_handler)(int);
     const char *user;
+    const void *vpass_old;
     char *pass_old;
     char *pass_new;
 
@@ -221,11 +222,13 @@
 
         if (off( SMB_NOT_SET_PASS, ctrl )) {
             retval = pam_get_item( pamh, PAM_OLDAUTHTOK,
-                                   (const void **)&pass_old );
-        } else {
+                                   &vpass_old );
+	    pass_old = vpass_old;
+	} else {
             retval = pam_get_data( pamh, _SMB_OLD_AUTHTOK,
-                                   (const void **)&pass_old );
-            if (retval == PAM_NO_MODULE_DATA) {
+                                   &vpass_old );
+	    pass_old = vpass_old;
+	    if (retval == PAM_NO_MODULE_DATA) {
 		pass_old = NULL;
                 retval = PAM_SUCCESS;
             }
--- samba-3.0.20/source/pam_smbpass/#support.c~	2005-08-24 15:14:43.000000000 -0400
+++ samba-3.0.20/source/pam_smbpass/support.c	2005-08-24 15:14:43.000000000 -0400
@@ -86,9 +86,11 @@
 		      , struct pam_response **response )
 	{
 		int retval;
+		const void *vconv;
 		struct pam_conv *conv;
 
-		retval = pam_get_item(pamh, PAM_CONV, (const void **) &conv);
+		retval = pam_get_item(pamh, PAM_CONV, &vconv);
+		conv = vconv;
 		if (retval == PAM_SUCCESS) {
 
 			retval = conv->conv(nargs, (const struct pam_message **) message
@@ -258,6 +260,7 @@
 void _cleanup_failures( pam_handle_t * pamh, void *fl, int err )
 {
     int quiet;
+    const void *vservice = NULL;
     const char *service = NULL;
     struct _pam_failed_auth *failure;
 
@@ -281,7 +284,8 @@
 
             /* log the number of authentication failures */
             if (failure->count != 0) {
-                pam_get_item( pamh, PAM_SERVICE, (const void **) &service );
+                pam_get_item( pamh, PAM_SERVICE, &vservice );
+		service = vservice;
                 _log_err( LOG_NOTICE
                           , "%d authentication %s "
                             "from %s for service %s as %s(%d)"
@@ -335,9 +339,11 @@
         { /* this means we've succeeded */
             return PAM_SUCCESS;
         } else {
+	    const void *vservice;
             const char *service;
 
-            pam_get_item( pamh, PAM_SERVICE, (const void **)&service );
+            pam_get_item( pamh, PAM_SERVICE, &vservice );
+	    service = vservice;
             _log_err( LOG_NOTICE, "failed auth request by %s for service %s as %s",
                       uidtoname(getuid()), service ? service : "**unknown**", name);
             return PAM_AUTH_ERR;
@@ -369,9 +375,11 @@
         }
     } else {
 
+	const void *vservice;
         const char *service;
 
-        pam_get_item( pamh, PAM_SERVICE, (const void **)&service );
+        pam_get_item( pamh, PAM_SERVICE, &vservice );
+	service = vservice;
 
         if (data_name != NULL) {
             struct _pam_failed_auth *newauth = NULL;
@@ -379,7 +387,7 @@
 
             /* get a failure recorder */
 
-            newauth = SMB_MALLOC_P( struct _pam_failed_auth );
+            newauth = SMB_MALLOC_P( const struct _pam_failed_auth );
 
             if (newauth != NULL) {
 
@@ -468,7 +476,9 @@
 {
     int authtok_flag;
     int retval;
+    const void *vitem = NULL;
     char *item = NULL;
+    const void *vtoken;
     char *token;
 
     struct pam_message msg[3], *pmsg[3];
@@ -487,7 +497,8 @@
     /* should we obtain the password from a PAM item ? */
 
     if (on(SMB_TRY_FIRST_PASS, ctrl) || on(SMB_USE_FIRST_PASS, ctrl)) {
-        retval = pam_get_item( pamh, authtok_flag, (const void **) &item );
+        retval = pam_get_item( pamh, authtok_flag, &vitem );
+	item = vitem;
         if (retval != PAM_SUCCESS) {
             /* very strange. */
             _log_err( LOG_ALERT
@@ -577,7 +588,8 @@
 
         /* we store this password as an item */
 
-        retval = pam_set_item( pamh, authtok_flag, (const void *)token );
+	vtoken = token;
+        retval = pam_set_item( pamh, authtok_flag, vtoken );
         _pam_delete( token );		/* clean it up */
         if (retval != PAM_SUCCESS
             || (retval = pam_get_item( pamh, authtok_flag
@@ -591,8 +603,8 @@
          * then store it as data specific to this module. pam_end()
          * will arrange to clean it up.
          */
-
-        retval = pam_set_data( pamh, data_name, (void *) token, _cleanup );
+	vtoken = token;
+        retval = pam_set_data( pamh, data_name, token, _cleanup );
         if (retval != PAM_SUCCESS
             || (retval = pam_get_data( pamh, data_name, (const void **)&item ))
                              != PAM_SUCCESS)
--- samba-3.0.20/source/printing/#printing.c~	2005-08-24 14:06:49.000000000 -0400
+++ samba-3.0.20/source/printing/printing.c	2005-08-24 14:06:49.000000000 -0400
@@ -91,7 +91,7 @@
 	if (rap_jobid == 0)
 		rap_jobid = ++next_rap_jobid;
 	SSVAL(buf,0,rap_jobid);
-	data.dptr = buf;
+	data.dptr = (char *)buf;
 	data.dsize = sizeof(rap_jobid);
 	tdb_store(rap_tdb, key, data, TDB_REPLACE);
 	tdb_store(rap_tdb, data, key, TDB_REPLACE);
@@ -112,7 +112,7 @@
 		return False;
 
 	SSVAL(buf,0,rap_jobid);
-	key.dptr = buf;
+	key.dptr = (char *)buf;
 	key.dsize = sizeof(rap_jobid);
 	data = tdb_fetch(rap_tdb, key);
 	if ( data.dptr && data.dsize == sizeof(struct rap_jobid_key) ) 
@@ -164,7 +164,7 @@
 	rap_jobid = SVAL(data.dptr, 0);
 	SAFE_FREE(data.dptr);
 	SSVAL(buf,0,rap_jobid);
-	data.dptr=buf;
+	data.dptr=(char *)buf;
 	data.dsize = sizeof(rap_jobid);
 	tdb_delete(rap_tdb, key);
 	tdb_delete(rap_tdb, data);
@@ -1018,6 +1018,7 @@
 		|| (time_now - last_qscan_time) >= lp_lpqcachetime() 
 		|| last_qscan_time > (time_now + MAX_CACHE_VALID_TIME)) 
 	{
+		uint32 u;
 		time_t msg_pending_time;
 
 		DEBUG(4, ("print_cache_expired: cache expired for queue %s " 
@@ -1033,8 +1034,8 @@
 		snprintf(key, sizeof(key), "MSG_PENDING/%s", sharename);
 
 		if ( check_pending 
-			&& tdb_fetch_uint32( pdb->tdb, key, (uint32*)&msg_pending_time ) 
-			&& msg_pending_time > 0
+			&& tdb_fetch_uint32( pdb->tdb, key, &u ) 
+			&& (msg_pending_time=u) > 0
 			&& msg_pending_time <= time_now 
 			&& (time_now - msg_pending_time) < 60 ) 
 		{
--- samba-3.0.20/source/rpc_client/#cli_netlogon.c~	2005-08-24 14:17:34.000000000 -0400
+++ samba-3.0.20/source/rpc_client/cli_netlogon.c	2005-08-24 14:17:34.000000000 -0400
@@ -892,7 +892,7 @@
 	DOM_CRED new_clnt_cred;
 	NET_Q_SRV_PWSET q_s;
 	uint16 sec_chan_type = 2;
-	NTSTATUS nt_status;
+	NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
 
 	gen_next_creds( cli, &new_clnt_cred);
 	
--- samba-3.0.20/source/rpc_client/#cli_pipe.c~	2005-08-24 14:18:34.000000000 -0400
+++ samba-3.0.20/source/rpc_client/cli_pipe.c	2005-08-24 14:18:34.000000000 -0400
@@ -320,7 +320,8 @@
 			nt_status = ntlmssp_check_packet(cli->ntlmssp_pipe_state, 
 								(const unsigned char *)reply_data, data_len,
 								&sig);
-		}
+		} else
+			nt_status = NT_STATUS_UNSUCCESSFUL;
 
 		data_blob_free(&sig);
 
--- samba-3.0.20/source/rpc_parse/#parse_samr.c~	2005-08-24 14:11:55.000000000 -0400
+++ samba-3.0.20/source/rpc_parse/parse_samr.c	2005-08-24 14:11:55.000000000 -0400
@@ -7038,9 +7038,9 @@
 
 void init_samr_q_chgpasswd_user(SAMR_Q_CHGPASSWD_USER * q_u,
 				const char *dest_host, const char *user_name,
-				const char nt_newpass[516],
+				const uchar nt_newpass[516],
 				const uchar nt_oldhash[16],
-				const char lm_newpass[516],
+				const uchar lm_newpass[516],
 				const uchar lm_oldhash[16])
 {
 	DEBUG(5, ("init_samr_q_chgpasswd_user\n"));
--- samba-3.0.20/source/utils/#net_rpc.c~	2005-08-24 14:52:06.000000000 -0400
+++ samba-3.0.20/source/utils/net_rpc.c	2005-08-24 14:52:06.000000000 -0400
@@ -3036,7 +3036,7 @@
 BOOL copy_top_level_perms(struct copy_clistate *cp_clistate, 
 				const char *sharename)
 {
-	NTSTATUS nt_status;
+	NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
 
 	switch (net_mode_share) {
 	case NET_MODE_SHARE_MIGRATE:
--- samba-3.0.20/source/utils/#ntlm_auth.c~	2005-08-24 14:59:04.000000000 -0400
+++ samba-3.0.20/source/utils/ntlm_auth.c	2005-08-24 14:59:04.000000000 -0400
@@ -858,6 +858,7 @@
 			return;
 		}
 
+		status = NT_STATUS_UNSUCCESSFUL;
 		if (strcmp(request.negTokenInit.mechTypes[0], OID_NTLMSSP) == 0) {
 
 			if ( request.negTokenInit.mechToken.data == NULL ) {
--- samba-3.0.20/source/client/#mount.cifs.c~	2005-08-24 16:33:18.000000000 -0400
+++ samba-3.0.20/source/client/mount.cifs.c	2005-08-24 16:33:18.000000000 -0400
@@ -694,7 +694,7 @@
 	int length = strnlen(unc_name,1024);
 	char * share;
 	char * ipaddress_string = NULL;
-	struct hostent * host_entry;
+	struct hostent * host_entry = NULL;
 	struct in_addr server_ipaddr;
 
 	if(length > 1023) {
--- samba-3.0.20/source/rpcclient/#cmd_samr.c~	2005-08-24 17:16:19.000000000 -0400
+++ samba-3.0.20/source/rpcclient/cmd_samr.c	2005-08-24 17:16:19.000000000 -0400
@@ -194,7 +194,7 @@
 	
 	printf("Sequence No:\t%d\n", info2->seq_num.low);
 
-	printf("Force Logoff:\t%d\n", (int)nt_time_to_unix_abs(&info2->logout));
+	printf("Force Logoff:\t%s\n", http_timestring(nt_time_to_unix_abs(&info2->logout)));
 
 	printf("Unknown 4:\t0x%x\n", info2->unknown_4);
 	printf("Server Role:\t%s\n", server_role_str(info2->server_role));
--- samba-3.0.20/source/smbd/#process.c~	2005-08-24 17:28:15.000000000 -0400
+++ samba-3.0.20/source/smbd/process.c	2005-08-24 17:28:15.000000000 -0400
@@ -1302,7 +1302,7 @@
  Check if services need reloading.
 ****************************************************************************/
 
-void check_reload(int t)
+void check_reload(time_t t)
 {
 	static pid_t mypid = 0;
 	static time_t last_smb_conf_reload_time = 0;
--- samba-3.0.20/source/smbd/#close.c~	2005-08-31 21:05:54.000000000 -0400
+++ samba-3.0.20/source/smbd/close.c	2005-08-31 21:05:55.000000000 -0400
@@ -149,7 +149,7 @@
 static int close_normal_file(files_struct *fsp, BOOL normal_close)
 {
 	share_mode_entry *share_entry = NULL;
-	size_t share_entry_count = 0;
+	ssize_t share_entry_count = 0;
 	BOOL delete_file = False;
 	connection_struct *conn = fsp->conn;
 	int saved_errno = 0;
@@ -199,8 +199,8 @@
 	share_entry_count = del_share_mode(fsp, &share_entry,
 					   &delete_file);
 
-	DEBUG(10,("close_normal_file: share_entry_count = %lu for file %s\n",
-		(unsigned long)share_entry_count, fsp->fsp_name ));
+	DEBUG(10,("close_normal_file: share_entry_count = %ld for file %s\n",
+		(long)share_entry_count, fsp->fsp_name ));
 
 	if (share_entry_count != 0) {
 		/* We're not the last ones -- don't delete */
--- samba-3.0.20/source/smbd/#blocking.c~	2005-08-31 21:14:30.000000000 -0400
+++ samba-3.0.20/source/smbd/blocking.c	2005-08-31 21:14:34.000000000 -0400
@@ -351,8 +351,8 @@
 	SSVAL(p,0,nread); p += 2;
 	set_message_end(outbuf, p+nread);
 	
-	DEBUG(3, ( "process_lockread file = %s, fnum=%d num=%d nread=%d\n",
-		   fsp->fsp_name, fsp->fnum, (int)numtoread, (int)nread ) );
+	DEBUG(3, ( "process_lockread file = %s, fnum=%d num=%lu nread=%ld\n",
+		   fsp->fsp_name, fsp->fnum, (unsigned long)numtoread, (long)nread ) );
 	
 	send_blocking_reply(outbuf,outsize);
 	return True;
--- samba-3.0.20/source/smbd/#mangle_hash2.c~	2005-08-31 21:16:21.000000000 -0400
+++ samba-3.0.20/source/smbd/mangle_hash2.c	2005-08-31 21:16:21.000000000 -0400
@@ -212,7 +212,7 @@
 {
 	unsigned int i;
 
-	M_DEBUG(10,("is_mangled_component %s (len %u) ?\n", name, (unsigned int)len));
+	M_DEBUG(10,("is_mangled_component %s (len %lu) ?\n", name, (unsigned long)len));
 
 	/* check the length */
 	if (len > 12 || len < 8)
@@ -250,7 +250,7 @@
 		}
 	}
 
-	M_DEBUG(10,("is_mangled_component %s (len %u) -> yes\n", name, (unsigned int)len));
+	M_DEBUG(10,("is_mangled_component %s (len %lu) -> yes\n", name, (unsigned long)len));
 
 	return True;
 }
--- samba-3.0.20/source/smbd/#nttrans.c~	2005-08-31 21:24:22.000000000 -0400
+++ samba-3.0.20/source/smbd/nttrans.c	2005-08-31 21:24:27.000000000 -0400
@@ -1989,7 +1989,7 @@
 		return(UNIXERROR(ERRDOS,ERRnoaccess));
 	}
 
-	DEBUG(3,("call_nt_transact_query_security_desc: sd_size = %d.\n",(int)sd_size));
+	DEBUG(3,("call_nt_transact_query_security_desc: sd_size = %lu.\n",(unsigned long)sd_size));
 
 	SIVAL(params,0,(uint32)sd_size);
 
--- samba-3.0.20/source/smbd/#reply.c~	2005-08-31 21:30:37.000000000 -0400
+++ samba-3.0.20/source/smbd/reply.c	2005-08-31 21:30:45.000000000 -0400
@@ -2298,8 +2298,8 @@
 		nread = 0;
 #endif
   
-	DEBUG( 3, ( "readbraw fnum=%d start=%.0f max=%d min=%d nread=%d\n", fsp->fnum, (double)startpos,
-				(int)maxcount, (int)mincount, (int)nread ) );
+	DEBUG( 3, ( "readbraw fnum=%d start=%.0f max=%lu min=%lu nread=%lu\n", fsp->fnum, (double)startpos,
+				(unsigned long)maxcount, (unsigned long)mincount, (unsigned long)nread ) );
   
 	send_file_readbraw(conn, fsp, startpos, nread, mincount, outbuf, out_buffsize);
 
--- samba-3.0.20/source/libsmb/#spnego.c~	2005-08-24 16:29:57.000000000 -0400
+++ samba-3.0.20/source/libsmb/spnego.c	2005-08-24 16:29:57.000000000 -0400
@@ -42,11 +42,11 @@
 			asn1_start_tag(asn1, ASN1_CONTEXT(0));
 			asn1_start_tag(asn1, ASN1_SEQUENCE(0));
 
-			token->mechTypes = SMB_MALLOC_P(char *);
+			token->mechTypes = SMB_MALLOC_P(const char *);
 			for (i = 0; !asn1->has_error &&
 				     0 < asn1_tag_remaining(asn1); i++) {
 				token->mechTypes = 
-					SMB_REALLOC_ARRAY(token->mechTypes, char *, i + 2);
+					SMB_REALLOC_ARRAY(token->mechTypes, const char *, i + 2);
 				asn1_read_OID(asn1, &token->mechTypes[i]);
 			}
 			token->mechTypes[i] = NULL;
--- samba-3.0.20/source/pam_smbpass/#support.c~	2005-08-24 16:29:57.000000000 -0400
+++ samba-3.0.20/source/pam_smbpass/support.c	2005-08-24 16:29:57.000000000 -0400
@@ -593,7 +593,7 @@
         _pam_delete( token );		/* clean it up */
         if (retval != PAM_SUCCESS
             || (retval = pam_get_item( pamh, authtok_flag
-                            ,(const void **)&item )) != PAM_SUCCESS)
+                            ,&vitem )) != PAM_SUCCESS)
         {
             _log_err( LOG_CRIT, "error manipulating password" );
             return retval;
@@ -606,7 +606,7 @@
 	vtoken = token;
         retval = pam_set_data( pamh, data_name, token, _cleanup );
         if (retval != PAM_SUCCESS
-            || (retval = pam_get_data( pamh, data_name, (const void **)&item ))
+            || (retval = pam_get_data( pamh, data_name, &vitem ))
                              != PAM_SUCCESS)
         {
             _log_err( LOG_CRIT, "error manipulating password data [%s]"
@@ -617,7 +617,7 @@
         }
         token = NULL;			/* break link to password */
     }
-
+    item = vitem;
     *pass = item;
     item = NULL;			/* break link to password */
 

samba-3.0.20-winbindd_v1.patch:
 winbindd_dual.c |    6 ++----
 winbindd_user.c |    5 ++++-
 winbindd_util.c |    2 ++
 3 files changed, 8 insertions(+), 5 deletions(-)

--- NEW FILE samba-3.0.20-winbindd_v1.patch ---
diff -urBbN --exclude-from=diff.excludes samba-3.0.20-orig/source/nsswitch/winbindd_dual.c samba-3.0.20-new/source/nsswitch/winbindd_dual.c
--- samba-3.0.20-orig/source/nsswitch/winbindd_dual.c	2005-08-19 12:16:27.000000000 -0500
+++ samba-3.0.20-new/source/nsswitch/winbindd_dual.c	2005-08-29 13:34:16.000000000 -0500
@@ -158,7 +158,6 @@
 		return;
 	}
 
-	if (state->response->result == WINBINDD_OK)
 		SMB_ASSERT(cache_retrieve_response(child->pid,
 						   state->response));
 
@@ -486,12 +485,11 @@
 			DEBUG(4,("child daemon request %d\n",
 				 (int)state.request.cmd));
 
+			ZERO_STRUCT(state.response);
 			state.request.null_term = '\0';
 			child_process_request(child->domain, &state);
 
-			if (state.response.result == WINBINDD_OK)
-				cache_store_response(sys_getpid(),
-						     &state.response);
+			cache_store_response(sys_getpid(), &state.response);
 
 			SAFE_FREE(state.response.extra_data);
 
diff -urBbN --exclude-from=diff.excludes samba-3.0.20-orig/source/nsswitch/winbindd_user.c samba-3.0.20-new/source/nsswitch/winbindd_user.c
--- samba-3.0.20-orig/source/nsswitch/winbindd_user.c	2005-07-28 08:19:44.000000000 -0500
+++ samba-3.0.20-new/source/nsswitch/winbindd_user.c	2005-08-29 16:04:22.000000000 -0500
@@ -230,6 +230,7 @@
 				    const char *shell,
 				    uint32 group_rid)
 {
+	fstring username;
 	struct getpwsid_state *s =
 		talloc_get_type_abort(private_data, struct getpwsid_state);
 
@@ -240,7 +241,9 @@
 		return;
 	}
 
-	s->username = talloc_strdup(s->state->mem_ctx, acct_name);
+	fstrcpy( username, acct_name );
+	strlower_m( username );
+	s->username = talloc_strdup(s->state->mem_ctx, username);
 	s->fullname = talloc_strdup(s->state->mem_ctx, full_name);
 	s->homedir = talloc_strdup(s->state->mem_ctx, homedir);
 	s->shell = talloc_strdup(s->state->mem_ctx, shell);
diff -urBbN --exclude-from=diff.excludes samba-3.0.20-orig/source/nsswitch/winbindd_util.c samba-3.0.20-new/source/nsswitch/winbindd_util.c
--- samba-3.0.20-orig/source/nsswitch/winbindd_util.c	2005-07-28 08:19:44.000000000 -0500
+++ samba-3.0.20-new/source/nsswitch/winbindd_util.c	2005-08-29 13:34:16.000000000 -0500
@@ -444,7 +444,9 @@
 	state->request.data.init_conn.dcname
 		[sizeof(state->request.data.init_conn.dcname)-1]='\0';
 
+	if (strlen(state->request.data.init_conn.dcname) > 0) {
 	fstrcpy(domain->dcname, state->request.data.init_conn.dcname);
+	}
 
 	if (strlen(domain->dcname) > 0) {
 		if (!resolve_name(domain->dcname, &ipaddr, 0x20)) {

samba-3.0.20pre1-man.patch:
 ntlm_auth.1 |   26 +++++++++++++-------------
 1 files changed, 13 insertions(+), 13 deletions(-)

--- NEW FILE samba-3.0.20pre1-man.patch ---
--- samba-3.0.12/docs/manpages/ntlm_auth.1.man	2005-03-17 16:12:35.000000000 -0500
+++ samba-3.0.12/docs/manpages/ntlm_auth.1	2005-03-18 13:30:56.000000000 -0500
@@ -96,63 +96,63 @@
 Username
 The username, expected to be in Samba's unix charset\&.
 
-Example 1. Username: bob
+Example 1. Username: bob
 
-Example 2. Username:: Ym9i
+Example 2. Username:: Ym9i
 
 .TP
 Username
 The user's domain, expected to be in Samba's unix charset\&.
 
-Example 3. Domain: WORKGROUP
+Example 3. Domain: WORKGROUP
 
-Example 4. Domain:: V09SS0dST1VQ
+Example 4. Domain:: V09SS0dST1VQ
 
 .TP
 Full\-Username
 The fully qualified username, expected to be in Samba's  and qualified with the winbind separator\&.
 
-Example 5. Full\-Username: WORKGROUP\\bob
+Example 5. Full\-Username: WORKGROUP\\bob
 
-Example 6. Full\-Username:: V09SS0dST1VQYm9i
+Example 6. Full\-Username:: V09SS0dST1VQYm9i
 
 .TP
 LANMAN\-Challenge
 The 8 byte \fBLANMAN Challenge\fR value, generated randomly by the server, or (in cases such as MSCHAPv2) generated in some way by both the server and the client\&.
 
-Example 7. LANMAN\-Challege: 0102030405060708
+Example 7. LANMAN\-Challege: 0102030405060708
 
 .TP
 LANMAN\-Response
 The 24 byte \fBLANMAN Response\fR value, calculated from the user's password and the supplied \fBLANMAN Challenge\fR\&. Typically, this is provided over the network by a client wishing to authenticate\&.
 
-Example 8. LANMAN\-Response: 0102030405060708090A0B0C0D0E0F101112131415161718
+Example 8. LANMAN\-Response: 0102030405060708090A0B0C0D0E0F101112131415161718
 
 .TP
 NT\-Response
 The >= 24 byte \fBNT Response\fR calculated from the user's password and the supplied \fBLANMAN Challenge\fR\&. Typically, this is provided over the network by a client wishing to authenticate\&.
 
-Example 9. NT\-Response: 0102030405060708090A0B0C0D0E0F101112131415161718
+Example 9. NT\-Response: 0102030405060708090A0B0C0D0E0F101112131415161718
 
 .TP
 Password
 The user's password\&. This would be provided by a network client, if the helper is being used in a legacy situation that exposes plaintext passwords in this way\&.
 
-Example 10. Password: samba2
+Example 10. Password: samba2
 
-Example 11. Password:: c2FtYmEy
+Example 11. Password:: c2FtYmEy
 
 .TP
 Request\-User\-Session\-Key
 Apon sucessful authenticaiton, return the user session key associated with the login\&.
 
-Example 12. Request\-User\-Session\-Key: Yes
+Example 12. Request\-User\-Session\-Key: Yes
 
 .TP
 Request\-LanMan\-Session\-Key
 Apon sucessful authenticaiton, return the LANMAN session key associated with the login\&.
 
-Example 13. Request\-LanMan\-Session\-Key: Yes
+Example 13. Request\-LanMan\-Session\-Key: Yes
 .RS .Sh "Warning" Implementors should take care to base64 encode any data (such as usernames/passwords) that may contain malicous user data, such as a newline\&. They may also need to decode strings from the helper, which likewise may have been base64 encoded\&. .RE
 
 .RE

samba-3.0.20pre1-passwd.patch:
 winbindd_group.c |    2 +-
 winbindd_user.c  |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

--- NEW FILE samba-3.0.20pre1-passwd.patch ---
--- samba-3.0.20pre1/source/nsswitch/#winbindd_group.c~	2005-06-22 15:08:05.000000000 -0400
+++ samba-3.0.20pre1/source/nsswitch/winbindd_group.c	2005-06-22 15:08:05.000000000 -0400
@@ -49,7 +49,7 @@
 	/* Group name and password */
     
 	safe_strcpy(gr->gr_name, full_group_name, sizeof(gr->gr_name) - 1);
-	safe_strcpy(gr->gr_passwd, "x", sizeof(gr->gr_passwd) - 1);
+	safe_strcpy(gr->gr_passwd, "*", sizeof(gr->gr_passwd) - 1);
 
 	return True;
 }
--- samba-3.0.20pre1/source/nsswitch/#winbindd_user.c~	2005-06-22 15:08:05.000000000 -0400
+++ samba-3.0.20pre1/source/nsswitch/winbindd_user.c	2005-06-22 15:08:05.000000000 -0400
@@ -98,10 +98,10 @@
 	
 	SAFE_FREE(shell);
 
-	/* Password - set to "x" as we can't generate anything useful here.
+	/* Password - set to "*" as we can't generate anything useful here.
 	   Authentication can be done using the pam_winbind module. */
 
-	safe_strcpy(pw->pw_passwd, "x", sizeof(pw->pw_passwd) - 1);
+	safe_strcpy(pw->pw_passwd, "*", sizeof(pw->pw_passwd) - 1);
 
 	return True;
 }
@@ -283,10 +283,10 @@
 	safe_strcpy(pw->pw_shell, shell, sizeof(pw->pw_shell) - 1);
 	SAFE_FREE(shell);
 
-	/* Password - set to "x" as we can't generate anything useful here.
+	/* Password - set to "*" as we can't generate anything useful here.
 	   Authentication can be done using the pam_winbind module. */
 
-	safe_strcpy(pw->pw_passwd, "x", sizeof(pw->pw_passwd) - 1);
+	safe_strcpy(pw->pw_passwd, "*", sizeof(pw->pw_passwd) - 1);
 
 	request_ok(s->state);
 	return;

samba-3.0.20pre1-smbspool.patch:
 smbspool.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

--- NEW FILE samba-3.0.20pre1-smbspool.patch ---
--- samba-3.0.20pre1/source/client/#smbspool.c~	2005-06-22 15:14:19.000000000 -0400
+++ samba-3.0.20pre1/source/client/smbspool.c	2005-06-22 15:14:19.000000000 -0400
@@ -164,7 +164,7 @@
   }
   else
   {
-    username = "";
+    username = "dummy";
     password = "";
     server   = uri + 6;
   }


Index: .cvsignore
===================================================================
RCS file: /cvs/dist/rpms/samba/devel/.cvsignore,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- .cvsignore	2 May 2005 19:36:01 -0000	1.24
+++ .cvsignore	12 Sep 2005 20:40:11 -0000	1.25
@@ -1 +1 @@
-samba-3.0.14a.tar.gz
+samba-3.0.20.tar.gz


Index: samba.spec
===================================================================
RCS file: /cvs/dist/rpms/samba/devel/samba.spec,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- samba.spec	2 May 2005 19:36:01 -0000	1.51
+++ samba.spec	12 Sep 2005 20:40:11 -0000	1.52
@@ -2,7 +2,7 @@
 
 Summary: The Samba SMB server.
 Name: samba
-Version: 3.0.14a
+Version: 3.0.20
 Release: 2
 Epoch: 0
 License: GNU GPL Version 2
@@ -10,7 +10,7 @@
 URL: http://www.samba.org/
 
 #TAG: change for non-pre
-#Source: ftp://us2.samba.org/pub/samba/%{name}-%{version}pre2.tar.gz
+#Source: ftp://us2.samba.org/pub/samba/%{name}-%{version}rc2.tar.gz
 Source: ftp://us2.samba.org/pub/samba/%{name}-%{version}.tar.gz
 
 # Red Hat specific replacement-files
@@ -26,23 +26,34 @@
 # Don't depend on Net::LDAP
 Source999: filter-requires-samba.sh
 
+# upstream patches.  Applied first so that they'll break our patches rather
+# than the other way around
+#Patch0: http://www.samba.org/samba/patches/groupname_enumeration_v3.patch
+Patch0: samba-3.0.20-groupname_enumeration_v3.patch
+#Patch1: http://www.samba.org/samba/patches/bug3010_v1.patch
+Patch1: samba-3.0.20-bug3010_v1.patch
+#Patch2: http://www.samba.org/samba/patches/winbindd_v1.patch
+Patch2: samba-3.0.20-winbindd_v1.patch
+#Patch3: http://www.samba.org/samba/patches/regcreatekey_winxp_v1.patch
+Patch3: samba-3.0.20-regcreatekey_winxp_v1.patch
+#Patch4: http://www.samba.org/samba/patches/usrmgr_groups_v1.patch
+Patch4: samba-3.0.20-usrmgr_groups_v1.patch
+
+
 # generic patches
-Patch1: samba-2.2.0-smbw.patch
-Patch2: samba-3.0.0beta1-pipedir.patch
-Patch3: samba-3.0.12pre1-logfiles.patch
-Patch4: samba-3.0.11rc1-pie.patch
-Patch5: samba-3.0.0rc3-nmbd-netbiosname.patch
-Patch6: samba-3.0.4-smb.conf.patch
-Patch7: samba-3.0.13-man.patch
-Patch8: samba-3.0.4-warning.patch
-Patch9: samba-3.0.5rc1-passwd.patch
-#Patch11: samba-3.0.8-non-ascii-domain.patch
-Patch12: samba-3.0.4-install.mount.smbfs.patch
-Patch13: samba-3.0.10-delim.patch
-Patch14: samba-3.0.9-smbspool.patch
-Patch15: samba-3.0.12rc1-gcc4.patch
-Patch16: samba-3.0.12pre1-quoting.patch
-Patch17: samba-3.0.13-smbclient.patch
+Patch101: samba-2.2.0-smbw.patch
+Patch102: samba-3.0.0beta1-pipedir.patch
+Patch103: samba-3.0.12pre1-logfiles.patch
+Patch104: samba-3.0.0rc3-nmbd-netbiosname.patch
+Patch105: samba-3.0.4-smb.conf.patch
+Patch106: samba-3.0.20pre1-man.patch
+Patch107: samba-3.0.20pre1-passwd.patch
+#Patch108: samba-3.0.8-non-ascii-domain.patch
+Patch109: samba-3.0.4-install.mount.smbfs.patch
+Patch110: samba-3.0.20pre1-smbspool.patch
+Patch111: samba-3.0.13-smbclient.patch
+Patch112: samba-3.0.15pre2-bug106483.patch
+Patch113: samba-3.0.20-warnings.patch
 
 Requires: pam >= 0:0.64 %{auth} samba-common = %{epoch}:%{version} 
 Requires: logrotate >= 0:3.4 initscripts >= 0:5.54-1 
@@ -98,7 +109,7 @@
 
 %prep
 # TAG: change for non-pre
-#% setup -q -n samba-3.0.15pre2
+# % setup -q -n samba-3.0.20rc2
 %setup -q
 
 # copy Red Hat specific scripts
@@ -107,22 +118,26 @@
 cp %{SOURCE7} packaging/RedHat/
 cp %{SOURCE8} packaging/RedHat/winbind.init
 
-%patch1 -p1 -b .smbw
-%patch2 -p1 -b .pipedir
-%patch3 -p1 -b .logfiles
-%patch4 -p1 -b .pie
-%patch5 -p1 -b .nmbd-netbiosname
-%patch6 -p1 -b .upstream
-%patch7 -p1 -b .man
-%patch8 -p1 -b .warning
-%patch9 -p1 -b .passwd
-#%patch11 -p1 -b .non-ascii-domain
-%patch12 -p1 -b .install.mount.smbfs
-%patch13 -p1 -b .delim
-%patch14 -p1 -b .smbspool
-%patch15 -p1 -b .gcc4
-%patch16 -p1 -b .quoting
-%patch17 -p1 -b .smbclient
+# Upstream patches
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+
+%patch101 -p1 -b .smbw
+%patch102 -p1 -b .pipedir
+%patch103 -p1 -b .logfiles
+%patch104 -p1 -b .nmbd-netbiosname
+%patch105 -p1 -b .upstream
+%patch106 -p1 -b .man
+%patch107 -p1 -b .passwd
+#%patch108 -p1 -b .non-ascii-domain
+%patch109 -p1 -b .install.mount.smbfs
+%patch110 -p1 -b .smbspool
+%patch111 -p1 -b .smbclient
+%patch112 -p1 -b .bug106483
+%patch113 -p1 -b .warnings
 
 # crap
 rm -f examples/VFS/.cvsignore
@@ -133,8 +148,8 @@
 cd ..
 
 %build
-
 cd source
+sh autogen.sh
 %ifarch i386 sparc
 RPM_OPT_FLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64"
 %endif
@@ -180,6 +195,9 @@
 	smbfilter
 
 ( cd client ; gcc -o mount.cifs $RPM_OPT_FLAGS -Wall -O -D_GNU_SOURCE -D_LARGEFILE64_SOURCE mount.cifs.c )
+( cd client ; gcc -o umount.cifs $RPM_OPT_FLAGS -Wall -O -D_GNU_SOURCE -D_LARGEFILE64_SOURCE umount.cifs.c )
+
+
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -222,7 +240,7 @@
 install -m755 packaging/RedHat/smbprint $RPM_BUILD_ROOT%{_bindir}
 install -m755 packaging/RedHat/smb.init $RPM_BUILD_ROOT%{_initrddir}/smb
 install -m755 packaging/RedHat/winbind.init $RPM_BUILD_ROOT%{_initrddir}/winbind
-ln -s ../..%{_initrddir}/smb  $RPM_BUILD_ROOT%{_sbindir}/samba
+#ln -s ../..%{_initrddir}/smb  $RPM_BUILD_ROOT%{_sbindir}/samba
 install -m644 packaging/RedHat/samba.pamd.stack $RPM_BUILD_ROOT/etc/pam.d/samba
 install -m644 %{SOURCE1} $RPM_BUILD_ROOT/etc/logrotate.d/samba
 ln -s ../usr/bin/smbmount $RPM_BUILD_ROOT/sbin/mount.smb
@@ -258,13 +276,14 @@
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
 install -m644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/samba
 install -m755 source/client/mount.cifs $RPM_BUILD_ROOT/sbin/mount.cifs
+install -m755 source/client/umount.cifs $RPM_BUILD_ROOT/sbin/umount.cifs
 
 rm -f $RPM_BUILD_ROOT/%{_mandir}/man1/editreg.1*
 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/log2pcap.1*
 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/smbsh.1*
 rm -f $RPM_BUILD_ROOT%{_mandir}/man1/smbget.1*
 rm -f $RPM_BUILD_ROOT%{_mandir}/man5/smbgetrc.5*
-#rm -f $RPM_BUILD_ROOT/%{_mandir}/man8/mount.cifs.8*
+rm -f $RPM_BUILD_ROOT%{_mandir}/man1/testprns.1*
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -307,8 +326,8 @@
 %defattr(-,root,root)
 %doc README COPYING Manifest 
 %doc WHATSNEW.txt Roadmap
-%doc docs/REVISION docs/Samba-Developers-Guide.pdf docs/Samba-Guide.pdf
-%doc docs/Samba-HOWTO-Collection.pdf docs/THANKS docs/history
+%doc docs/REVISION docs/Samba3-Developers-Guide.pdf docs/Samba3-ByExample.pdf
+%doc docs/Samba3-HOWTO.pdf docs/THANKS docs/history
 %doc docs/htmldocs
 %doc docs/registry
 %doc examples/autofs examples/LDAP examples/libsmbclient examples/misc examples/printer-accounting
@@ -316,11 +335,9 @@
 
 %{_sbindir}/smbd
 %{_sbindir}/nmbd
-# %{_bindir}/make_unicodemap
 %{_bindir}/mksmbpasswd.sh
 %{_bindir}/smbcontrol
 %{_bindir}/smbstatus
-# %{_bindir}/smbadduser
 %{_bindir}/tdbbackup
 %{_bindir}/tdbdump
 %{_bindir}/tdbtool
@@ -329,7 +346,6 @@
 %attr(755,root,root) %config %{_initrddir}/smb
 %config(noreplace) %{_sysconfdir}/logrotate.d/samba
 %config(noreplace) %{_sysconfdir}/pam.d/samba
-# %{_mandir}/man1/make_unicodemap.1*
 %{_mandir}/man1/smbcontrol.1*
 %{_mandir}/man1/smbstatus.1*
 %{_mandir}/man5/smbpasswd.5*
@@ -339,11 +355,6 @@
 %{_mandir}/man8/smbd.8*
 %{_mandir}/man8/tdbbackup.8*
 %{_mandir}/man8/tdbdump.8*
-#%{_mandir}/ja/man1/smbstatus.1*
-#%{_mandir}/ja/man5/smbpasswd.5*
-#%{_mandir}/ja/man7/samba.7*
-#%{_mandir}/ja/man8/smbd.8*
-#%{_mandir}/ja/man8/nmbd.8*
 %{_libdir}/samba/vfs
 
 %attr(1777,root,root) %dir /var/spool/samba
@@ -354,7 +365,6 @@
 %{_datadir}/swat
 %{_sbindir}/swat
 %{_mandir}/man8/swat.8*
-#%{_mandir}/ja/man8/swat.8*
 %attr(755,root,root) %{_libdir}/samba/*.msg
 
 %files client
@@ -362,6 +372,7 @@
 /sbin/mount.smb
 /sbin/mount.smbfs
 /sbin/mount.cifs
+/sbin/umount.cifs
 %{_bindir}/rpcclient
 %{_bindir}/smbcacls
 %{_bindir}/smbmount
@@ -373,6 +384,7 @@
 %{_mandir}/man8/smbumount.8*
 %{_mandir}/man8/smbspool.8*
 %{_mandir}/man8/mount.cifs.8*
+%{_mandir}/man8/umount.cifs.8*
 %{_bindir}/nmblookup
 %{_bindir}/smbclient
 %{_bindir}/smbprint
@@ -386,9 +398,6 @@
 %{_mandir}/man1/smbclient.1*
 %{_mandir}/man1/smbtar.1*
 %{_mandir}/man1/smbtree.1*
-#%{_mandir}/ja/man1/smbtar.1*
-#%{_mandir}/ja/man1/smbclient.1*
-#%{_mandir}/ja/man1/nmblookup.1*
 
 %files common
 %defattr(-,root,root)
@@ -405,20 +414,17 @@
 /%{_lib}/security/pam_winbind.so
 %{_libdir}/libsmbclient.a
 %{_libdir}/libsmbclient.so
+%{_libdir}/libsmbclient.so.0
 %{_libdir}/samba/charset/CP*.so
 %{_includedir}/libsmbclient.h
 %{_bindir}/net
 %{_bindir}/testparm
-%{_bindir}/testprns
 %{_bindir}/smbpasswd
-# %{_bindir}/make_printerdef
 %{_bindir}/wbinfo
-# %{_bindir}/editreg
 %{_bindir}/ntlm_auth
 %{_bindir}/pdbedit
 %{_bindir}/profiles
 %{_bindir}/smbcquotas
-#%{_bindir}/vfstest
 %{_sbindir}/winbindd
 %dir /var/cache/samba
 %dir /var/run/winbindd
@@ -430,13 +436,10 @@
 %dir %{_sysconfdir}/samba
 %attr(0700,root,root) %dir /var/log/samba
 %{_initrddir}/winbind
-# %{_datadir}/samba/codepages/*
-# %{_mandir}/man1/make_smbcodepage.1*
 %{_mandir}/man1/ntlm_auth.1*
 %{_mandir}/man1/profiles.1*
 %{_mandir}/man1/smbcquotas.1*
 %{_mandir}/man1/testparm.1*
-%{_mandir}/man1/testprns.1*
 %{_mandir}/man5/smb.conf.5*
 %{_mandir}/man5/lmhosts.5*
 %{_mandir}/man8/smbpasswd.8*
@@ -445,15 +448,21 @@
 %{_mandir}/man8/net.8*
 %{_mandir}/man1/vfstest.1*
 %{_mandir}/man8/pam_winbind.8*
-
-# #%lang(ja) %{_mandir}/ja/man1/make_smbcodepage.1*
-#%lang(ja) %{_mandir}/ja/man1/testparm.1*
-#%lang(ja) %{_mandir}/ja/man1/testprns.1*
-#%lang(ja) %{_mandir}/ja/man5/smb.conf.5*
-#%lang(ja) %{_mandir}/ja/man5/lmhosts.5*
-#%lang(ja) %{_mandir}/ja/man8/smbpasswd.8*
+%{_mandir}/man8/libsmbclient.8*
 
 %changelog
+* Mon Aug 22 2005 Jay Fenlason <fenlason at redhat.com> 3.0.20-2
+- New upstream release
+  This obsoletes the -pie and -delim patches
+  the -warning and -gcc4 patches are obsolete too
+  Also, the -quoting patch was implemented differently upstream
+  There is now a umount.cifs executable and manpage
+  We run autogen.sh as part of the build phase
+  The testprns command is now gone
+  libsmbclient now has a man page
+- Include -bug106483 patch to close
+  bz#106483 smbclient: -N negates the provided password, despite documentation
+
 * Mon May 2 2005 Jay Fenlason <fenlason at redhat.com> 3.0.14a-2
 - New upstream release.
 - the -64bit-timestamps, -clitar, -establish_trust, user_rights_v1,


Index: sources
===================================================================
RCS file: /cvs/dist/rpms/samba/devel/sources,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- sources	2 May 2005 19:36:01 -0000	1.26
+++ sources	12 Sep 2005 20:40:11 -0000	1.27
@@ -1 +1 @@
-ebee37e66a8b5f6fd328967dc09088e8  samba-3.0.14a.tar.gz
+68e72ab16334c329901816febc43217a  samba-3.0.20.tar.gz


--- samba-3.0.10-delim.patch DELETED ---


--- samba-3.0.10-man.patch DELETED ---


--- samba-3.0.11-clitar.patch DELETED ---


--- samba-3.0.11-establish_trust.patch DELETED ---


--- samba-3.0.11-gcc4.patch DELETED ---


--- samba-3.0.11-logfiles.patch DELETED ---


--- samba-3.0.11-user_rights_v1.patch DELETED ---


--- samba-3.0.11-winbind_find_dc_v2.patch DELETED ---


--- samba-3.0.11rc1-pie.patch DELETED ---


--- samba-3.0.12pre1-quoting.patch DELETED ---


--- samba-3.0.12rc1-gcc4.patch DELETED ---


--- samba-3.0.13-man.patch DELETED ---


--- samba-3.0.4-man.patch DELETED ---


--- samba-3.0.4-warning.patch DELETED ---


--- samba-3.0.5pre1-use_authtok.patch DELETED ---


--- samba-3.0.5rc1-64bit-timestamps.patch DELETED ---


--- samba-3.0.5rc1-passwd.patch DELETED ---


--- samba-3.0.7-64bit.patch DELETED ---


--- samba-3.0.8pre1-smbmnt.patch DELETED ---


--- samba-3.0.9-changetrustpw.patch DELETED ---


--- samba-3.0.9-smbspool.patch DELETED ---




More information about the fedora-cvs-commits mailing list