From 99b92beb724b497ce15f08c19d6c4c9bda1e42ec Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 26 Jun 2007 18:15:03 +0000 Subject: [PATCH] Upgrade to 3.0.25b, this release contains a number of necessary fixes over the 3.0.25a release. --- .cvsignore | 3 +- samba-2.2.0-smbw.patch | 10 - samba-3.0.15pre2-bug106483.patch | 11 - samba-3.0.20-bug3010_v1.patch | 777 -------- samba-3.0.20-groupname_enumeration_v3.patch | 42 - samba-3.0.20-regcreatekey_winxp_v1.patch | 124 -- samba-3.0.20-usrmgr_groups_v1.patch | 73 - samba-3.0.20-winbindd_v1.patch | 61 - samba-3.0.20a-warnings.patch | 1989 ------------------- samba-3.0.23-smb.conf.patch | 12 - samba-3.0.23d-man.patch | 83 - samba-3.0.24-arch_macro.patch | 23 - samba-3.0.24-enable_pam_nss_tests.patch | 39 - samba-3.0.24-fhs-compliance.patch | 1134 ----------- samba-3.0.24-msdfs-root-no.patch | 11 - samba-3.0.24-nss_wins.patch | 23 - samba-3.0.24-pam_winbind-fixes.patch | 118 -- samba-3.0.24-tar_options.patch | 135 -- samba-3.0.25a-pam_smbpass.patch | 45 - samba.spec | 20 +- sources | 2 +- 21 files changed, 8 insertions(+), 4727 deletions(-) delete mode 100644 samba-2.2.0-smbw.patch delete mode 100644 samba-3.0.15pre2-bug106483.patch delete mode 100644 samba-3.0.20-bug3010_v1.patch delete mode 100644 samba-3.0.20-groupname_enumeration_v3.patch delete mode 100644 samba-3.0.20-regcreatekey_winxp_v1.patch delete mode 100644 samba-3.0.20-usrmgr_groups_v1.patch delete mode 100644 samba-3.0.20-winbindd_v1.patch delete mode 100644 samba-3.0.20a-warnings.patch delete mode 100644 samba-3.0.23-smb.conf.patch delete mode 100644 samba-3.0.23d-man.patch delete mode 100644 samba-3.0.24-arch_macro.patch delete mode 100644 samba-3.0.24-enable_pam_nss_tests.patch delete mode 100644 samba-3.0.24-fhs-compliance.patch delete mode 100644 samba-3.0.24-msdfs-root-no.patch delete mode 100644 samba-3.0.24-nss_wins.patch delete mode 100644 samba-3.0.24-pam_winbind-fixes.patch delete mode 100644 samba-3.0.24-tar_options.patch delete mode 100644 samba-3.0.25a-pam_smbpass.patch diff --git a/.cvsignore b/.cvsignore index a6d3305..b178bb7 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1 @@ -samba-3.0.25.tar.gz -samba-3.0.25a.tar.gz +samba-3.0.25b.tar.gz diff --git a/samba-2.2.0-smbw.patch b/samba-2.2.0-smbw.patch deleted file mode 100644 index 0abbfdf..0000000 --- a/samba-2.2.0-smbw.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- samba-2.0.0/source/smbwrapper/smbsh.in.orig Mon Oct 5 22:37:01 1998 -+++ samba-2.0.0/source/smbwrapper/smbsh.in Mon Oct 5 22:37:51 1998 -@@ -1,6 +1,6 @@ - #! /bin/sh - --SMBW_LIBDIR=${SMBW_LIBDIR-@builddir@/smbwrapper} -+SMBW_LIBDIR=${SMBW_LIBDIR-/usr/bin} - - if [ ! -f ${SMBW_LIBDIR}/smbwrapper.so ]; then - echo You need to set LIBDIR in smbsh diff --git a/samba-3.0.15pre2-bug106483.patch b/samba-3.0.15pre2-bug106483.patch deleted file mode 100644 index b6cf8a1..0000000 --- a/samba-3.0.15pre2-bug106483.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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)); - } diff --git a/samba-3.0.20-bug3010_v1.patch b/samba-3.0.20-bug3010_v1.patch deleted file mode 100644 index bcd8bb5..0000000 --- a/samba-3.0.20-bug3010_v1.patch +++ /dev/null @@ -1,777 +0,0 @@ -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 -+#endif -+#include -+#include ], -+[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; - diff --git a/samba-3.0.20-groupname_enumeration_v3.patch b/samba-3.0.20-groupname_enumeration_v3.patch deleted file mode 100644 index 8c27733..0000000 --- a/samba-3.0.20-groupname_enumeration_v3.patch +++ /dev/null @@ -1,42 +0,0 @@ -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"); diff --git a/samba-3.0.20-regcreatekey_winxp_v1.patch b/samba-3.0.20-regcreatekey_winxp_v1.patch deleted file mode 100644 index 528a4fa..0000000 --- a/samba-3.0.20-regcreatekey_winxp_v1.patch +++ /dev/null @@ -1,124 +0,0 @@ -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; - } diff --git a/samba-3.0.20-usrmgr_groups_v1.patch b/samba-3.0.20-usrmgr_groups_v1.patch deleted file mode 100644 index ba03233..0000000 --- a/samba-3.0.20-usrmgr_groups_v1.patch +++ /dev/null @@ -1,73 +0,0 @@ -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; - } - - /********************************************************************* diff --git a/samba-3.0.20-winbindd_v1.patch b/samba-3.0.20-winbindd_v1.patch deleted file mode 100644 index 32d65ba..0000000 --- a/samba-3.0.20-winbindd_v1.patch +++ /dev/null @@ -1,61 +0,0 @@ -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)) { diff --git a/samba-3.0.20a-warnings.patch b/samba-3.0.20a-warnings.patch deleted file mode 100644 index 5bdb16d..0000000 --- a/samba-3.0.20a-warnings.patch +++ /dev/null @@ -1,1989 +0,0 @@ -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/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_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 **)®key)) { -+ 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_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 @@ - /* */ - const char *user; - const char *member = NULL; -+ const void *vpass_old; - char *pass_old, *pass_new; - /* */ - -@@ -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/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.20a/source/passdb/pdb_nds.c.warnings 2005-09-29 17:52:45.000000000 -0400 -+++ samba-3.0.20a/source/passdb/pdb_nds.c 2005-09-30 14:41:33.000000000 -0400 -@@ -550,7 +550,7 @@ - LDAP *ld, - char *objectDN, - size_t *pwdSize, /* in bytes */ -- char *pwd ) -+ unsigned char *pwd ) - { - int err = 0; - -@@ -664,7 +664,7 @@ - struct smbldap_state *ldap_state, - char *object_dn, - size_t *pwd_len, -- char *pwd ) -+ unsigned char *pwd ) - { - LDAP *ld = ldap_state->ldap_struct; - int rc = -1; ---- samba-3.0.20a/source/printing/printing.c.warnings 2005-09-29 17:52:42.000000000 -0400 -+++ samba-3.0.20a/source/printing/printing.c 2005-09-30 14:40:42.000000000 -0400 -@@ -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.20a/source/pam_smbpass/general.h.warnings 2005-09-30 16:17:16.000000000 -0400 -+++ samba-3.0.20a/source/pam_smbpass/general.h 2005-09-30 16:17:55.000000000 -0400 -@@ -117,7 +117,7 @@ - - struct _pam_failed_auth { - char *user; /* user that's failed to be authenticated */ -- int id; /* uid of requested user */ -+ uid_t id; /* uid of requested user */ - char *agent; /* attempt from user with name */ - int count; /* number of failures so far */ - }; ---- samba-3.0.20a/source/pam_smbpass/pam_smb_passwd.c.warnings 2005-07-28 09:19:44.000000000 -0400 -+++ samba-3.0.20a/source/pam_smbpass/pam_smb_passwd.c 2005-09-30 16:23:56.000000000 -0400 -@@ -99,8 +99,9 @@ - SAM_ACCOUNT *sampass = NULL; - void (*oldsig_handler)(int); - const char *user; -- char *pass_old; -- char *pass_new; -+ const void *vpass_old; -+ const char *pass_old; -+ const char *pass_new; - - NTSTATUS nt_status; - -@@ -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.20a/source/pam_smbpass/pam_smb_auth.c.warnings 2005-07-28 09:19:44.000000000 -0400 -+++ samba-3.0.20a/source/pam_smbpass/pam_smb_auth.c 2005-09-30 16:28:31.000000000 -0400 -@@ -71,7 +71,7 @@ - BOOL found; - - /* Points to memory managed by the PAM library. Do not free. */ -- char *p = NULL; -+ const char *p = NULL; - - - /* Samba initialization. */ -@@ -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.20a/source/rpc_server/srv_samr_nt.c.warnings 2005-09-29 17:52:45.000000000 -0400 -+++ samba-3.0.20a/source/rpc_server/srv_samr_nt.c 2005-09-30 15:38:25.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 */ - -@@ -810,8 +817,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, (void **)&vinfo)) - return NT_STATUS_INVALID_HANDLE; -+ info = vinfo; - - /* - * calculate how many entries we will return. -@@ -939,6 +947,7 @@ - break; - default: - smb_panic("info class changed"); -+ disp_ret = NT_STATUS_UNSUCCESSFUL; - break; - } - -@@ -1571,6 +1580,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; -@@ -1578,9 +1588,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); -@@ -1785,6 +1795,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; -@@ -1794,7 +1805,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; - -@@ -1813,9 +1824,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: - -@@ -1861,7 +1872,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); -@@ -2244,15 +2256,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 */ - -@@ -2319,6 +2332,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]; -@@ -2326,9 +2340,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; - } -@@ -2954,6 +2968,7 @@ - { - int num_alias_rids; - uint32 *alias_rids; -+ void *vinfo = NULL; - struct samr_info *info = NULL; - int i; - -@@ -2968,9 +2983,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"); - -@@ -4179,6 +4194,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; -@@ -4207,9 +4223,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); ---- samba-3.0.20a/source/libads/ldap_utils.c.warnings 2005-09-30 15:41:47.000000000 -0400 -+++ samba-3.0.20a/source/libads/ldap_utils.c 2005-09-30 15:41:50.000000000 -0400 -@@ -48,7 +48,7 @@ - return ADS_ERROR_NT(NT_STATUS_NO_MEMORY); - } - -- while (count--) { -+ do { - *res = NULL; - status = ads_do_search_all(ads, bp, scope, expr, attrs, res); - if (ADS_ERR_OK(status)) { -@@ -79,7 +79,7 @@ - SAFE_FREE(bp); - return status; - } -- } -+ } while (--count); - SAFE_FREE(bp); - - if (!ADS_ERR_OK(status)) ---- samba-3.0.20a/source/nmbd/nmbd_namelistdb.c.warnings 2005-09-30 15:45:06.000000000 -0400 -+++ samba-3.0.20a/source/nmbd/nmbd_namelistdb.c 2005-09-30 15:45:11.000000000 -0400 -@@ -76,9 +76,11 @@ - static void update_name_in_namelist( struct subnet_record *subrec, - struct name_record *namerec ) - { -+ void *voldrec = NULL; - struct name_record *oldrec = NULL; - -- ubi_trInsert( subrec->namelist, namerec, &(namerec->name), &oldrec ); -+ ubi_trInsert( subrec->namelist, namerec, &(namerec->name), &voldrec ); -+ oldrec = voldrec; - if( oldrec ) { - SAFE_FREE( oldrec->data.ip ); - SAFE_FREE( oldrec ); ---- samba-3.0.20a/source/nsswitch/winbindd_cm.c.warnings 2005-09-29 17:52:42.000000000 -0400 -+++ samba-3.0.20a/source/nsswitch/winbindd_cm.c 2005-09-30 15:46:23.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; - -@@ -965,6 +965,7 @@ - return; - } - -+#ifndef DISABLE_SCHANNEL_WIN2K3_SP1 - static BOOL cm_get_schannel_key(struct winbindd_domain *domain, - TALLOC_CTX *mem_ctx, - unsigned char **session_key) -@@ -979,6 +980,7 @@ - &cli, session_key, - &credentials)); - } -+#endif - - NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, - struct rpc_pipe_client **cli, POLICY_HND *sam_handle) ---- samba-3.0.20a/source/client/clitar.c.warnings 2005-09-30 15:47:43.000000000 -0400 -+++ samba-3.0.20a/source/client/clitar.c 2005-09-30 15:56:25.000000000 -0400 -@@ -122,7 +122,7 @@ - static void oct_it(SMB_BIG_UINT value, int ndgs, char *p); - static void fixtarname(char *tptr, const char *fp, size_t l); - static int dotarbuf(int f, char *b, int n); --static void dozerobuf(int f, int n); -+static int dozerobuf(int f, int n); - static void dotareof(int f); - static void initarbuf(void); - -@@ -356,22 +356,27 @@ - Write zeros to buffer / tape - ****************************************************************************/ - --static void dozerobuf(int f, int n) -+static int dozerobuf(int f, int n) - { -+ ssize_t wrote; -+ -+ - /* short routine just to write out n zeros to buffer - - * used to round files to nearest block - * and to do tar EOFs */ - - if (dry_run) -- return; -+ return 0; - - if (n+tp >= tbufsiz) { - memset(tarbuf+tp, 0, tbufsiz-tp); -- write(f, tarbuf, tbufsiz); -+ wrote = write(f, tarbuf, tbufsiz); - memset(tarbuf, 0, (tp+=n-tbufsiz)); -+ return wrote == tbufsiz; - } else { - memset(tarbuf+tp, 0, n); - tp+=n; -+ return 0; - } - } - -@@ -395,14 +400,17 @@ - - static void dotareof(int f) - { -+ int failed; -+ size_t towrite; -+ ssize_t wrote; - SMB_STRUCT_STAT stbuf; - /* Two zero blocks at end of file, write out full buffer */ - - if (dry_run) - return; - -- (void) dozerobuf(f, TBLOCK); -- (void) dozerobuf(f, TBLOCK); -+ failed = dozerobuf(f, TBLOCK); -+ failed |= dozerobuf(f, TBLOCK); - - if (sys_fstat(f, &stbuf) == -1) { - DEBUG(0, ("Couldn't stat file handle\n")); -@@ -411,8 +419,15 @@ - - /* Could be a pipe, in which case S_ISREG should fail, - * and we should write out at full size */ -- if (tp > 0) -- write(f, tarbuf, S_ISREG(stbuf.st_mode) ? tp : tbufsiz); -+ if (tp > 0) { -+ towrite = S_ISREG(stbuf.st_mode) ? tp : tbufsiz; -+ wrote = write(f, tarbuf, towrite ); -+ if ( wrote < 0 || wrote != towrite ) -+ failed = 1; -+ } -+ if ( failed ) { -+ DEBUG ( 0, ("Writing out EOF blocks failed\n")); -+ } - } - - /**************************************************************************** -@@ -1111,7 +1126,7 @@ - } - - DEBUG(5, ("Reading the next header ...\n")); -- -+ memset ( &finfo, 0, sizeof(finfo) ); - switch (readtarheader((union hblock *) buffer_p, &finfo, cur_dir)) { - case -2: /* Hmm, not good, but not fatal */ - DEBUG(0, ("Skipping %s...\n", finfo.name)); ---- samba-3.0.20a/source/utils/net_lookup.c.warnings 2005-09-30 15:56:49.000000000 -0400 -+++ samba-3.0.20a/source/utils/net_lookup.c 2005-09-30 16:00:59.000000000 -0400 -@@ -39,6 +39,7 @@ - int name_type = 0x20; - const char *name = argv[0]; - char *p; -+ int n; - - if (argc == 0) - return net_lookup_usage(argc, argv); -@@ -46,7 +47,11 @@ - p = strchr_m(name,'#'); - if (p) { - *p = '\0'; -- sscanf(++p,"%x",&name_type); -+ n = sscanf(++p,"%x",&name_type); -+ if ( n != 1 ) { -+ DEBUG(0,("Invalid name_type %s\n",p)); -+ return -1; -+ } - } - - if (!resolve_name(name, &ip, name_type)) { -@@ -180,6 +185,7 @@ - #ifdef HAVE_KRB5 - krb5_error_code rc; - krb5_context ctx; -+ void *vaddrs; - struct sockaddr_in *addrs; - int num_kdcs,i; - krb5_data realm; -@@ -209,11 +215,12 @@ - realm.length = strlen(realm.data); - } - -- rc = krb5_locate_kdc(ctx, &realm, (struct sockaddr **) &addrs, &num_kdcs, 0); -+ rc = krb5_locate_kdc(ctx, &realm, &vaddrs, &num_kdcs, 0); - if (rc) { - DEBUG(1, ("krb5_locate_kdc failed (%s)\n", error_message(rc))); - return -1; - } -+ addrs = vaddrs; - for (i=0;iconv(nargs, (const struct pam_message **) message - ,response, conv->appdata_ptr); - -@@ -258,7 +259,8 @@ - void _cleanup_failures( pam_handle_t * pamh, void *fl, int err ) - { - int quiet; -- const char *service = NULL; -+ const void *vservice = NULL; -+ const char *service; - struct _pam_failed_auth *failure; - - #ifdef PAM_DATA_SILENT -@@ -281,7 +283,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 +338,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; -@@ -368,23 +373,25 @@ - pam_set_data(pamh, data_name, NULL, _cleanup_failures); - } - } 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; -- const struct _pam_failed_auth *old = NULL; - - /* get a failure recorder */ - - newauth = SMB_MALLOC_P( struct _pam_failed_auth ); - - if (newauth != NULL) { -+ const void *vold = NULL; -+ const struct _pam_failed_auth *old; - - /* any previous failures for this user ? */ -- pam_get_data(pamh, data_name, (const void **) &old); -+ pam_get_data(pamh, data_name, &vold); -+ old = vold; - - if (old != NULL) { - newauth->count = old->count + 1; -@@ -464,12 +471,14 @@ - - int _smb_read_password( pam_handle_t * pamh, unsigned int ctrl, - const char *comment, const char *prompt1, -- const char *prompt2, const char *data_name, char **pass ) -+ const char *prompt2, const char *data_name, const char **pass ) - { - int authtok_flag; - int retval; -- char *item = NULL; -- char *token; -+ const void *vitem = NULL; -+ const char *item; -+ const void *vtoken; -+ const char *token; - - struct pam_message msg[3], *pmsg[3]; - struct pam_response *resp; -@@ -487,7 +496,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,11 +587,12 @@ - - /* 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 -- ,(const void **)&item )) != PAM_SUCCESS) -+ ,&vitem )) != PAM_SUCCESS) - { - _log_err( LOG_CRIT, "error manipulating password" ); - return retval; -@@ -591,10 +602,10 @@ - * 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 )) -+ || (retval = pam_get_data( pamh, data_name, &vitem )) - != PAM_SUCCESS) - { - _log_err( LOG_CRIT, "error manipulating password data [%s]" -@@ -604,8 +615,9 @@ - return retval; - } - token = NULL; /* break link to password */ -+ vtoken = NULL; - } -- -+ item = vitem; - *pass = item; - item = NULL; /* break link to password */ - ---- samba-3.0.20a/source/pam_smbpass/#support.h~ 2005-10-04 11:52:56.000000000 -0400 -+++ samba-3.0.20a/source/pam_smbpass/support.h 2005-10-04 11:52:56.000000000 -0400 -@@ -44,7 +44,7 @@ - - /* obtain a password from the user */ - extern int _smb_read_password( pam_handle_t *, unsigned int, const char*, -- const char *, const char *, const char *, char **); -+ const char *, const char *, const char *, const char **); - - extern int _pam_smb_approve_pass(pam_handle_t *, unsigned int, const char *, - const char *); diff --git a/samba-3.0.23-smb.conf.patch b/samba-3.0.23-smb.conf.patch deleted file mode 100644 index f088f9d..0000000 --- a/samba-3.0.23-smb.conf.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- samba-3.0.23/packaging/Fedora/smb.conf.upstream 2006-07-11 11:29:05.000000000 -0400 -+++ samba-3.0.23/packaging/Fedora/smb.conf 2006-07-11 11:30:45.000000000 -0400 -@@ -57,6 +57,9 @@ - # bsd, cups, sysv, plp, lprng, aix, hpux, qnx - ; printing = cups - -+# This option tells cups that the data has already been rasterized -+cups options = raw -+ - # Uncomment this if you want a guest account, you must add this to /etc/passwd - # otherwise the user "nobody" is used - ; guest account = pcguest diff --git a/samba-3.0.23d-man.patch b/samba-3.0.23d-man.patch deleted file mode 100644 index 59a9df3..0000000 --- a/samba-3.0.23d-man.patch +++ /dev/null @@ -1,83 +0,0 @@ ---- samba-3.0.23d/docs/manpages/ntlm_auth.1.man 2006-11-14 05:01:51.000000000 -0500 -+++ samba-3.0.23d/docs/manpages/ntlm_auth.1 2006-11-15 15:59:59.000000000 -0500 -@@ -105,17 +105,17 @@ - The username, expected to be in Samba's - unix charset. - .sp --\fBExample 1. \fRUsername: bob -+\fBExample 1.\fR Username: bob - .sp --\fBExample 2. \fRUsername:: Ym9i -+\fBExample 2.\fR Username:: Ym9i - .TP 3n - Username - The user's domain, expected to be in Samba's - unix charset. - .sp --\fBExample 3. \fRDomain: WORKGROUP -+\fBExample 3.\fR Domain: WORKGROUP - .sp --\fBExample 4. \fRDomain:: V09SS0dST1VQ -+\fBExample 4.\fR Domain:: V09SS0dST1VQ - .TP 3n - Full-Username - The fully qualified username, expected to be in Samba's -@@ -123,16 +123,16 @@ - and qualified with the - winbind separator. - .sp --\fBExample 5. \fRFull-Username: WORKGROUP\bob -+\fBExample 5.\fR Full-Username: WORKGROUP\bob - .sp --\fBExample 6. \fRFull-Username:: V09SS0dST1VQYm9i -+\fBExample 6.\fR Full-Username:: V09SS0dST1VQYm9i - .TP 3n - 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. - .sp --\fBExample 7. \fRLANMAN-Challege: 0102030405060708 -+\fBExample 7.\fR LANMAN-Challege: 0102030405060708 - .TP 3n - LANMAN-Response - The 24 byte -@@ -140,7 +140,7 @@ - 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. - .sp --\fBExample 8. \fRLANMAN-Response: 0102030405060708090A0B0C0D0E0F101112131415161718 -+\fBExample 8.\fR LANMAN-Response: 0102030405060708090A0B0C0D0E0F101112131415161718 - .TP 3n - NT-Response - The >= 24 byte -@@ -148,24 +148,24 @@ - 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. - .sp --\fBExample 9. \fRNT-Response: 0102030405060708090A0B0C0D0E0F101112131415161718 -+\fBExample 9.\fR NT-Response: 0102030405060708090A0B0C0D0E0F101112131415161718 - .TP 3n - 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. - .sp --\fBExample 10. \fRPassword: samba2 -+\fBExample 10.\fR Password: samba2 - .sp --\fBExample 11. \fRPassword:: c2FtYmEy -+\fBExample 11.\fR Password:: c2FtYmEy - .TP 3n - Request-User-Session-Key - Apon sucessful authenticaiton, return the user session key associated with the login. - .sp --\fBExample 12. \fRRequest-User-Session-Key: Yes -+\fBExample 12.\fR Request-User-Session-Key: Yes - .TP 3n - Request-LanMan-Session-Key - Apon sucessful authenticaiton, return the LANMAN session key associated with the login. - .sp --\fBExample 13. \fRRequest-LanMan-Session-Key: Yes -+\fBExample 13.\fR Request-LanMan-Session-Key: Yes - .sp - .it 1 an-trap - .nr an-no-space-flag 1 diff --git a/samba-3.0.24-arch_macro.patch b/samba-3.0.24-arch_macro.patch deleted file mode 100644 index 7ee617b..0000000 --- a/samba-3.0.24-arch_macro.patch +++ /dev/null @@ -1,23 +0,0 @@ ------------------------------------------------------------------------- -r21857 | gd | 2007-03-16 17:20:47 +0100 (Fri, 16 Mar 2007) | 4 lines - -Stop pretending to be Vista in the %a macro towards Samba clients. - -Guenther - ------------------------------------------------------------------------- -Index: source/smbd/negprot.c -=================================================================== ---- source/smbd/negprot.c (revision 21856) -+++ source/smbd/negprot.c (revision 21857) -@@ -259,7 +259,9 @@ static int reply_nt1(char *inbuf, char * - if ( (SVAL(inbuf, smb_flg2) & FLAGS2_EXTENDED_SECURITY) && - ((SVAL(inbuf, smb_flg2) & FLAGS2_UNKNOWN_BIT4) == 0) ) - { -- set_remote_arch( RA_VISTA ); -+ if (get_remote_arch() != RA_SAMBA) { -+ set_remote_arch( RA_VISTA ); -+ } - } - - /* do spnego in user level security if the client diff --git a/samba-3.0.24-enable_pam_nss_tests.patch b/samba-3.0.24-enable_pam_nss_tests.patch deleted file mode 100644 index aff29aa..0000000 --- a/samba-3.0.24-enable_pam_nss_tests.patch +++ /dev/null @@ -1,39 +0,0 @@ ---- source/Makefile.in -+++ source/Makefile.in -@@ -160,6 +160,8 @@ - - PAM_MODULES = @PAM_MODULES@ - -+NSS_MODULES = @WINBIND_WINS_NSS@ @WINBIND_NSS@ -+ - SCRIPTS = $(srcdir)/script/smbtar $(builddir)/script/findsmb - - VFS_MODULES = @VFS_MODULES@ -@@ -769,6 +771,12 @@ - all : SHOWFLAGS proto_exists $(SBIN_PROGS) $(BIN_PROGS) $(ROOT_SBIN_PROGS) \ - $(SHLIBS) $(MODULES) $(PAM_MODULES) @EXTRA_ALL_TARGETS@ - -+nss_modules : $(NSS_MODULES) -+ -+libnss_winbind : SHOWFLAGS proto_exists nsswitch/libnss_winbind.@SHLIBEXT@ -+ -+libnss_wins : SHOWFLAGS proto_exists nsswitch/libnss_wins.@SHLIBEXT@ -+ - pam_modules : $(PAM_MODULES) - - pam_smbpass : SHOWFLAGS proto_exists bin/pam_smbpass.@SHLIBEXT@ -@@ -1736,6 +1744,14 @@ - ###################################################################### - # Samba Testing Framework - -+# Check for NSS module problems. -+test_nss_modules: nss_modules -+ @echo "Testing $(NSS_MODULES) " -+ @for module in $(NSS_MODULES); do \ -+ ./script/tests/dlopen.sh $${module} \ -+ || exit 1; \ -+ done -+ - # Check for PAM module problems. Specifically, check that every module we - # built can actually be loaded by a minimal PAM-aware application. - test_pam_modules: pam_modules diff --git a/samba-3.0.24-fhs-compliance.patch b/samba-3.0.24-fhs-compliance.patch deleted file mode 100644 index 9d8e9ee..0000000 --- a/samba-3.0.24-fhs-compliance.patch +++ /dev/null @@ -1,1134 +0,0 @@ -diff -uPr samba-3.0.24.old/source/configure.in samba-3.0.24.new/source/configure.in ---- samba-3.0.24.old/source/configure.in 2007-02-04 13:59:28.000000000 -0500 -+++ samba-3.0.24.new/source/configure.in 2007-03-06 15:16:27.000000000 -0500 -@@ -23,7 +23,8 @@ - AC_PREFIX_DEFAULT(/usr/local/samba) - - rootsbindir="\${SBINDIR}" --lockdir="\${VARDIR}/locks" -+cachedir="\${VARDIR}/locks" -+statedir="\${VARDIR}/locks" - piddir="\${VARDIR}/locks" - test "${mandir}" || mandir="\${prefix}/man" - logfilebase="\${VARDIR}" -@@ -37,7 +38,8 @@ - [ --with-fhs Use FHS-compliant paths (default=no)], - [ case "$withval" in - yes) -- lockdir="\${VARDIR}/lib/samba" -+ cachedir="\${VARDIR}/cache/samba" -+ statedir="\${VARDIR}/lib/samba" - piddir="\${VARDIR}/run" - mandir="\${prefix}/share/man" - logfilebase="\${VARDIR}/log/samba" -@@ -81,18 +83,34 @@ - esac]) - - ################################################# --# set lock directory location --AC_ARG_WITH(lockdir, --[ --with-lockdir=DIR Where to put lock files ($ac_default_prefix/var/locks)], -+# set cache directory location -+AC_ARG_WITH(cachedir, -+[ --with-cachedir=DIR Where to put persistent files ($ac_default_prefix/var/locks)], - [ case "$withval" in - yes|no) - # - # Just in case anybody calls it without argument - # -- AC_MSG_WARN([--with-lockdir called without argument - will use default]) -+ AC_MSG_WARN([--with-cachedir called without argument - will use default]) - ;; - * ) -- lockdir="$withval" -+ cachedir="$withval" -+ ;; -+ esac]) -+ -+################################################# -+# set state directory location -+AC_ARG_WITH(statedir, -+[ --with-statedir=DIR Where to put persistent files ($ac_default_prefix/var/locks)], -+[ case "$withval" in -+ yes|no) -+ # -+ # Just in case anybody calls it without argument -+ # -+ AC_MSG_WARN([--with-statedir called without argument - will use default]) -+ ;; -+ * ) -+ statedir="$withval" - ;; - esac]) - -@@ -228,7 +246,8 @@ - ]) - - AC_SUBST(configdir) --AC_SUBST(lockdir) -+AC_SUBST(cachedir) -+AC_SUBST(statedir) - AC_SUBST(piddir) - AC_SUBST(logfilebase) - AC_SUBST(privatedir) -diff -uPr samba-3.0.24.old/source/dynconfig.c samba-3.0.24.new/source/dynconfig.c ---- samba-3.0.24.old/source/dynconfig.c 2007-02-04 13:59:28.000000000 -0500 -+++ samba-3.0.24.new/source/dynconfig.c 2007-03-06 15:31:22.000000000 -0500 -@@ -65,7 +65,8 @@ - * - * Not writable, but used to set a default in the parameter table. - **/ --pstring dyn_LOCKDIR = LOCKDIR; -+pstring dyn_STATEDIR = STATEDIR; -+pstring dyn_CACHEDIR = CACHEDIR; - pstring dyn_PIDDIR = PIDDIR; - - pstring dyn_SMB_PASSWD_FILE = SMB_PASSWD_FILE; -diff -uPr samba-3.0.24.old/source/groupdb/mapping.c samba-3.0.24.new/source/groupdb/mapping.c ---- samba-3.0.24.old/source/groupdb/mapping.c 2007-02-04 13:59:14.000000000 -0500 -+++ samba-3.0.24.new/source/groupdb/mapping.c 2007-03-06 15:55:49.000000000 -0500 -@@ -56,7 +56,7 @@ - if (tdb) - return True; - -- tdb = tdb_open_log(lock_path("group_mapping.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); -+ tdb = tdb_open_log(state_path("group_mapping.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); - if (!tdb) { - DEBUG(0,("Failed to open group mapping database\n")); - return False; -diff -uPr samba-3.0.24.old/source/include/dynconfig.h samba-3.0.24.new/source/include/dynconfig.h ---- samba-3.0.24.old/source/include/dynconfig.h 2007-02-04 13:59:23.000000000 -0500 -+++ samba-3.0.24.new/source/include/dynconfig.h 2007-03-06 15:53:36.000000000 -0500 -@@ -32,7 +32,8 @@ - extern pstring dyn_LOGFILEBASE, dyn_LMHOSTSFILE; - extern pstring dyn_LIBDIR; - extern fstring dyn_SHLIBEXT; --extern pstring dyn_LOCKDIR; -+extern pstring dyn_CACHEDIR; -+extern pstring dyn_STATEDIR; - extern pstring dyn_PIDDIR; - extern pstring dyn_SMB_PASSWD_FILE; - extern pstring dyn_PRIVATE_DIR; -diff -uPr samba-3.0.24.old/source/intl/lang_tdb.c samba-3.0.24.new/source/intl/lang_tdb.c ---- samba-3.0.24.old/source/intl/lang_tdb.c 2006-04-19 22:29:23.000000000 -0400 -+++ samba-3.0.24.new/source/intl/lang_tdb.c 2007-03-06 15:56:14.000000000 -0500 -@@ -139,7 +139,7 @@ - goto done; - } - -- asprintf(&path, "%s%s.tdb", lock_path("lang_"), lang); -+ asprintf(&path, "%s%s.tdb", state_path("lang_"), lang); - - DEBUG(10, ("lang_tdb_init: loading %s\n", path)); - -diff -uPr samba-3.0.24.old/source/lib/account_pol.c samba-3.0.24.new/source/lib/account_pol.c ---- samba-3.0.24.old/source/lib/account_pol.c 2007-02-04 13:59:18.000000000 -0500 -+++ samba-3.0.24.new/source/lib/account_pol.c 2007-03-06 15:56:23.000000000 -0500 -@@ -262,7 +262,7 @@ - return True; - } - -- tdb = tdb_open_log(lock_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); -+ tdb = tdb_open_log(state_path("account_policy.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); - if (!tdb) { - DEBUG(0,("Failed to open account policy database\n")); - return False; -diff -uPr samba-3.0.24.old/source/lib/gencache.c samba-3.0.24.new/source/lib/gencache.c ---- samba-3.0.24.old/source/lib/gencache.c 2007-02-04 13:59:17.000000000 -0500 -+++ samba-3.0.24.new/source/lib/gencache.c 2007-03-06 15:56:34.000000000 -0500 -@@ -56,7 +56,7 @@ - /* skip file open if it's already opened */ - if (cache) return True; - -- cache_fname = lock_path("gencache.tdb"); -+ cache_fname = cache_path("gencache.tdb"); - - DEBUG(5, ("Opening cache file at %s\n", cache_fname)); - -diff -uPr samba-3.0.24.old/source/lib/messages.c samba-3.0.24.new/source/lib/messages.c ---- samba-3.0.24.old/source/lib/messages.c 2007-02-04 13:59:18.000000000 -0500 -+++ samba-3.0.24.new/source/lib/messages.c 2007-03-06 15:56:43.000000000 -0500 -@@ -119,7 +119,7 @@ - { - if (tdb) return True; - -- tdb = tdb_open_log(lock_path("messages.tdb"), -+ tdb = tdb_open_log(cache_path("messages.tdb"), - 0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT, - O_RDWR|O_CREAT,0600); - -diff -uPr samba-3.0.24.old/source/lib/popt_common.c samba-3.0.24.new/source/lib/popt_common.c ---- samba-3.0.24.old/source/lib/popt_common.c 2007-02-04 13:59:17.000000000 -0500 -+++ samba-3.0.24.new/source/lib/popt_common.c 2007-03-06 15:38:15.000000000 -0500 -@@ -156,6 +156,8 @@ - * --lmhostsfile - * --libdir - * --shlibext -+ * --statedir -+ * --cachedir - * --lockdir - * --piddir - * --smb-passwd-file -@@ -169,6 +171,8 @@ - DYN_LMHOSTSFILE, - DYN_LIBDIR, - DYN_SHLIBEXT, -+ DYN_STATEDIR, -+ DYN_CACHEDIR, - DYN_LOCKDIR, - DYN_PIDDIR, - DYN_SMB_PASSWD_FILE, -@@ -219,9 +223,22 @@ - } - break; - -+ case DYN_STATEDIR: -+ if (arg) { -+ pstrcpy(dyn_STATEDIR, arg); -+ } -+ break; -+ -+ case DYN_CACHEDIR: -+ if (arg) { -+ pstrcpy(dyn_CACHEDIR, arg); -+ } -+ break; -+ - case DYN_LOCKDIR: - if (arg) { -- pstrcpy(dyn_LOCKDIR, arg); -+ pstrcpy(dyn_STATEDIR, arg); -+ pstrcpy(dyn_CACHEDIR, arg); - } - break; - -@@ -262,8 +279,12 @@ - "Path to shared library directory", "LIBDIR" }, - { "shlibext", '\0' , POPT_ARG_STRING, NULL, DYN_SHLIBEXT, - "Shared library extension", "SHLIBEXT" }, -+ { "statedir", '\0' , POPT_ARG_STRING, NULL, DYN_STATEDIR, -+ "Path to state file directory", "STATEDIR" }, -+ { "cachedir", '\0' , POPT_ARG_STRING, NULL, DYN_CACHEDIR, -+ "Path to cache file directory", "CACHEDIR" }, - { "lockdir", '\0' , POPT_ARG_STRING, NULL, DYN_LOCKDIR, -- "Path to lock file directory", "LOCKDIR" }, -+ "Path to lock(cache and state) file directory", "LOCKDIR" }, - { "piddir", '\0' , POPT_ARG_STRING, NULL, DYN_PIDDIR, - "Path to PID file directory", "PIDDIR" }, - { "smb-passwd-file", '\0' , POPT_ARG_STRING, NULL, DYN_SMB_PASSWD_FILE, -diff -uPr samba-3.0.24.old/source/lib/sharesec.c samba-3.0.24.new/source/lib/sharesec.c ---- samba-3.0.24.old/source/lib/sharesec.c 2006-04-19 22:29:23.000000000 -0400 -+++ samba-3.0.24.new/source/lib/sharesec.c 2007-03-06 15:56:59.000000000 -0500 -@@ -47,10 +47,10 @@ - return True; - } - -- share_tdb = tdb_open_log(lock_path("share_info.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); -+ share_tdb = tdb_open_log(state_path("share_info.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); - if (!share_tdb) { - DEBUG(0,("Failed to open share info database %s (%s)\n", -- lock_path("share_info.tdb"), strerror(errno) )); -+ state_path("share_info.tdb"), strerror(errno) )); - return False; - } - -diff -uPr samba-3.0.24.old/source/lib/util.c samba-3.0.24.new/source/lib/util.c ---- samba-3.0.24.old/source/lib/util.c 2007-02-04 13:59:17.000000000 -0500 -+++ samba-3.0.24.new/source/lib/util.c 2007-03-06 15:55:29.000000000 -0500 -@@ -2519,14 +2519,34 @@ - } - - /***************************************************************** -- A useful function for returning a path in the Samba lock directory. -+ A useful function for returning a path in the Samba cache directory. - *****************************************************************/ - --char *lock_path(const char *name) -+char *cache_path(const char *name) - { - static pstring fname; - -- pstrcpy(fname,lp_lockdir()); -+ pstrcpy(fname,lp_cachedir()); -+ trim_char(fname,'\0','/'); -+ -+ if (!directory_exist(fname,NULL)) -+ mkdir(fname,0755); -+ -+ pstrcat(fname,"/"); -+ pstrcat(fname,name); -+ -+ return fname; -+} -+ -+/***************************************************************** -+ A useful function for returning a path in the Samba state directory. -+*****************************************************************/ -+ -+char *state_path(const char *name) -+{ -+ static pstring fname; -+ -+ pstrcpy(fname,lp_statedir()); - trim_char(fname,'\0','/'); - - if (!directory_exist(fname,NULL)) -diff -uPr samba-3.0.24.old/source/libsmb/gpo.c samba-3.0.24.new/source/libsmb/gpo.c ---- samba-3.0.24.old/source/libsmb/gpo.c 2006-04-19 22:29:25.000000000 -0400 -+++ samba-3.0.24.new/source/libsmb/gpo.c 2007-03-06 15:57:10.000000000 -0500 -@@ -76,7 +76,7 @@ - return NT_STATUS_NO_MEMORY; - } - -- local_file = talloc_asprintf(mem_ctx, "%s/%s", lock_path("gpo_cache"), "gpt.ini"); -+ local_file = talloc_asprintf(mem_ctx, "%s/%s", cache_path("gpo_cache"), "gpt.ini"); - if (local_file == NULL) { - return NT_STATUS_NO_MEMORY; - } -diff -uPr samba-3.0.24.old/source/libsmb/samlogon_cache.c samba-3.0.24.new/source/libsmb/samlogon_cache.c ---- samba-3.0.24.old/source/libsmb/samlogon_cache.c 2007-02-04 13:59:20.000000000 -0500 -+++ samba-3.0.24.new/source/libsmb/samlogon_cache.c 2007-03-06 15:57:27.000000000 -0500 -@@ -34,7 +34,7 @@ - BOOL netsamlogon_cache_init(void) - { - if (!netsamlogon_tdb) { -- netsamlogon_tdb = tdb_open_log(lock_path(NETSAMLOGON_TDB), 0, -+ netsamlogon_tdb = tdb_open_log(cache_path(NETSAMLOGON_TDB), 0, - TDB_DEFAULT, O_RDWR | O_CREAT, 0600); - } - -@@ -67,7 +67,7 @@ - winbindd_cache.tdb open. Open the tdb if a NULL is passed. */ - - if (!tdb) { -- tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 5000, -+ tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), 5000, - TDB_DEFAULT, O_RDWR, 0600); - if (!tdb) { - DEBUG(5, ("netsamlogon_clear_cached_user: failed to open cache\n")); -diff -uPr samba-3.0.24.old/source/libsmb/unexpected.c samba-3.0.24.new/source/libsmb/unexpected.c ---- samba-3.0.24.old/source/libsmb/unexpected.c 2005-02-25 12:59:32.000000000 -0500 -+++ samba-3.0.24.new/source/libsmb/unexpected.c 2007-03-06 15:57:43.000000000 -0500 -@@ -46,7 +46,7 @@ - int len=0; - - if (!tdbd) { -- tdbd = tdb_open_log(lock_path("unexpected.tdb"), 0, -+ tdbd = tdb_open_log(cache_path("unexpected.tdb"), 0, - TDB_CLEAR_IF_FIRST|TDB_DEFAULT, - O_RDWR | O_CREAT, 0644); - if (!tdbd) { -@@ -148,7 +148,7 @@ - { - TDB_CONTEXT *tdb2; - -- tdb2 = tdb_open_log(lock_path("unexpected.tdb"), 0, 0, O_RDONLY, 0); -+ tdb2 = tdb_open_log(cache_path("unexpected.tdb"), 0, 0, O_RDONLY, 0); - if (!tdb2) return NULL; - - matched_packet = NULL; -diff -uPr samba-3.0.24.old/source/locking/brlock.c samba-3.0.24.new/source/locking/brlock.c ---- samba-3.0.24.old/source/locking/brlock.c 2007-02-04 13:59:23.000000000 -0500 -+++ samba-3.0.24.new/source/locking/brlock.c 2007-03-06 15:58:11.000000000 -0500 -@@ -270,13 +270,13 @@ - if (tdb) { - return; - } -- tdb = tdb_open_log(lock_path("brlock.tdb"), -+ tdb = tdb_open_log(cache_path("brlock.tdb"), - lp_open_files_db_hash_size(), - TDB_DEFAULT|(read_only?0x0:TDB_CLEAR_IF_FIRST), - read_only?O_RDONLY:(O_RDWR|O_CREAT), 0644 ); - if (!tdb) { - DEBUG(0,("Failed to open byte range locking database %s\n", -- lock_path("brlock.tdb"))); -+ cache_path("brlock.tdb"))); - return; - } - } -diff -uPr samba-3.0.24.old/source/locking/locking.c samba-3.0.24.new/source/locking/locking.c ---- samba-3.0.24.old/source/locking/locking.c 2007-02-04 13:59:23.000000000 -0500 -+++ samba-3.0.24.new/source/locking/locking.c 2007-03-06 15:58:19.000000000 -0500 -@@ -369,7 +369,7 @@ - if (tdb) - return True; - -- tdb = tdb_open_log(lock_path("locking.tdb"), -+ tdb = tdb_open_log(cache_path("locking.tdb"), - lp_open_files_db_hash_size(), - TDB_DEFAULT|(read_only?0x0:TDB_CLEAR_IF_FIRST), - read_only?O_RDONLY:O_RDWR|O_CREAT, -diff -uPr samba-3.0.24.old/source/Makefile.in samba-3.0.24.new/source/Makefile.in ---- samba-3.0.24.old/source/Makefile.in 2007-02-04 13:59:28.000000000 -0500 -+++ samba-3.0.24.new/source/Makefile.in 2007-03-06 15:40:03.000000000 -0500 -@@ -98,7 +98,8 @@ - SWATDIR = @swatdir@ - - # the directory where lock files go --LOCKDIR = @lockdir@ -+STATEDIR = @statedir@ -+CACHEDIR = @cachedir@ - - # the directory where pid files go - PIDDIR = @piddir@ -@@ -126,7 +127,7 @@ - PATH_FLAGS1 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DSBINDIR=\"$(SBINDIR)\" - PATH_FLAGS2 = $(PATH_FLAGS1) -DBINDIR=\"$(BINDIR)\" -DDRIVERFILE=\"$(DRIVERFILE)\" - PATH_FLAGS3 = $(PATH_FLAGS2) -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" --PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\" -+PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\" -DSTATEDIR=\"$(STATEDIR)\" -DCACHEDIR=\"$(CACHEEDIR)\" -DPIDDIR=\"$(PIDDIR)\" - PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" \ - -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"@SHLIBEXT@\" - PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\" -@@ -1437,7 +1438,7 @@ - # is not used - - installdirs: -- @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(BINDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(PRIVATEDIR) $(PIDDIR) $(LOCKDIR) $(MANDIR) -+ @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(BINDIR) $(SBINDIR) $(LIBDIR) $(VARDIR) $(PRIVATEDIR) $(PIDDIR) $(STATEDIR) $(CACHEDIR) $(MANDIR) - - installservers: all installdirs - @$(SHELL) script/installbin.sh $(INSTALLPERMS) $(DESTDIR) $(prefix) $(SBINDIR) $(SBIN_PROGS) -@@ -1549,7 +1550,8 @@ - @echo " mandir: $(MANDIR)" - @echo " privatedir: $(PRIVATE_DIR)" - @echo " configdir: $(CONFIGDIR)" -- @echo " lockdir: $(LOCKDIR)" -+ @echo " statedir: $(STATEDIR)" -+ @echo " cachedir: $(CACHEDIR)" - @echo " piddir: $(PIDDIR)" - @echo " swatdir: $(SWATDIR)" - -diff -uPr samba-3.0.24.old/source/nmbd/nmbd.c samba-3.0.24.new/source/nmbd/nmbd.c ---- samba-3.0.24.old/source/nmbd/nmbd.c 2007-02-04 13:59:23.000000000 -0500 -+++ samba-3.0.24.new/source/nmbd/nmbd.c 2007-03-06 15:21:15.000000000 -0500 -@@ -741,8 +741,8 @@ - } - #endif - -- if (!directory_exist(lp_lockdir(), NULL)) { -- mkdir(lp_lockdir(), 0755); -+ if (!directory_exist(lp_statedir(), NULL)) { -+ mkdir(lp_statedir(), 0755); - } - - pidfile_create("nmbd"); -diff -uPr samba-3.0.24.old/source/nmbd/nmbd_namelistdb.c samba-3.0.24.new/source/nmbd/nmbd_namelistdb.c ---- samba-3.0.24.old/source/nmbd/nmbd_namelistdb.c 2007-02-04 13:59:23.000000000 -0500 -+++ samba-3.0.24.new/source/nmbd/nmbd_namelistdb.c 2007-03-06 15:58:37.000000000 -0500 -@@ -626,7 +626,7 @@ - XFILE *fp; - struct subnet_record *subrec; - -- fp = x_fopen(lock_path("namelist.debug"),O_WRONLY|O_CREAT|O_TRUNC, 0644); -+ fp = x_fopen(cache_path("namelist.debug"),O_WRONLY|O_CREAT|O_TRUNC, 0644); - - if (!fp) { - DEBUG(0,("dump_all_namelists: Can't open file %s. Error was %s\n", -diff -uPr samba-3.0.24.old/source/nmbd/nmbd_processlogon.c samba-3.0.24.new/source/nmbd/nmbd_processlogon.c ---- samba-3.0.24.old/source/nmbd/nmbd_processlogon.c 2005-02-25 12:59:38.000000000 -0500 -+++ samba-3.0.24.new/source/nmbd/nmbd_processlogon.c 2007-03-06 15:58:56.000000000 -0500 -@@ -40,7 +40,7 @@ - { - TDB_CONTEXT *tdb; - -- tdb = tdb_open_log(lock_path("connections.tdb"), 0, -+ tdb = tdb_open_log(cache_path("connections.tdb"), 0, - TDB_DEFAULT, O_RDONLY, 0); - - if (!tdb) { -diff -uPr samba-3.0.24.old/source/nmbd/nmbd_serverlistdb.c samba-3.0.24.new/source/nmbd/nmbd_serverlistdb.c ---- samba-3.0.24.old/source/nmbd/nmbd_serverlistdb.c 2007-02-04 13:59:23.000000000 -0500 -+++ samba-3.0.24.new/source/nmbd/nmbd_serverlistdb.c 2007-03-06 15:21:25.000000000 -0500 -@@ -325,7 +325,7 @@ - - updatecount++; - -- pstrcpy(fname,lp_lockdir()); -+ pstrcpy(fname,lp_statedir()); - trim_char(fname,'\0' ,'/'); - pstrcat(fname,"/"); - pstrcat(fname,SERVER_LIST); -diff -uPr samba-3.0.24.old/source/nmbd/nmbd_synclists.c samba-3.0.24.new/source/nmbd/nmbd_synclists.c ---- samba-3.0.24.old/source/nmbd/nmbd_synclists.c 2005-10-17 22:45:04.000000000 -0400 -+++ samba-3.0.24.new/source/nmbd/nmbd_synclists.c 2007-03-06 15:21:33.000000000 -0500 -@@ -154,7 +154,7 @@ - s->ip = ip; - - slprintf(s->fname, sizeof(pstring)-1, -- "%s/sync.%d", lp_lockdir(), counter++); -+ "%s/sync.%d", lp_statedir(), counter++); - all_string_sub(s->fname,"//", "/", 0); - - DLIST_ADD(syncs, s); -diff -uPr samba-3.0.24.old/source/nmbd/nmbd_winsserver.c samba-3.0.24.new/source/nmbd/nmbd_winsserver.c ---- samba-3.0.24.old/source/nmbd/nmbd_winsserver.c 2007-02-04 13:59:23.000000000 -0500 -+++ samba-3.0.24.new/source/nmbd/nmbd_winsserver.c 2007-03-06 15:59:13.000000000 -0500 -@@ -574,7 +574,7 @@ - } - - /* Open the wins.tdb. */ -- wins_tdb = tdb_open_log(lock_path("wins.tdb"), 0, TDB_DEFAULT|TDB_CLEAR_IF_FIRST, O_CREAT|O_RDWR, 0600); -+ wins_tdb = tdb_open_log(state_path("wins.tdb"), 0, TDB_DEFAULT|TDB_CLEAR_IF_FIRST, O_CREAT|O_RDWR, 0600); - if (!wins_tdb) { - DEBUG(0,("initialise_wins: failed to open wins.tdb. Error was %s\n", - strerror(errno) )); -@@ -585,7 +585,7 @@ - - add_samba_names_to_subnet(wins_server_subnet); - -- if((fp = x_fopen(lock_path(WINS_LIST),O_RDONLY,0)) == NULL) { -+ if((fp = x_fopen(state_path(WINS_LIST),O_RDONLY,0)) == NULL) { - DEBUG(2,("initialise_wins: Can't open wins database file %s. Error was %s\n", - WINS_LIST, strerror(errno) )); - return True; -@@ -2337,7 +2337,7 @@ - } - } - -- slprintf(fname,sizeof(fname)-1,"%s/%s", lp_lockdir(), WINS_LIST); -+ slprintf(fname,sizeof(fname)-1,"%s/%s", lp_statedir(), WINS_LIST); - all_string_sub(fname,"//", "/", 0); - slprintf(fnamenew,sizeof(fnamenew)-1,"%s.%u", fname, (unsigned int)sys_getpid()); - -diff -uPr samba-3.0.24.old/source/nsswitch/winbindd_cache.c samba-3.0.24.new/source/nsswitch/winbindd_cache.c ---- samba-3.0.24.old/source/nsswitch/winbindd_cache.c 2007-02-04 13:59:14.000000000 -0500 -+++ samba-3.0.24.new/source/nsswitch/winbindd_cache.c 2007-03-06 15:59:32.000000000 -0500 -@@ -1942,7 +1942,7 @@ - return True; - - /* when working offline we must not clear the cache on restart */ -- wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), -+ wcache->tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), - WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE, - lp_winbind_offline_logon() ? TDB_DEFAULT : (TDB_DEFAULT | TDB_CLEAR_IF_FIRST), - O_RDWR|O_CREAT, 0600); -@@ -2186,7 +2186,7 @@ - return; - - /* when working offline we must not clear the cache on restart */ -- wcache->tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), -+ wcache->tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), - WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE, - lp_winbind_offline_logon() ? TDB_DEFAULT : (TDB_DEFAULT | TDB_CLEAR_IF_FIRST), - O_RDWR|O_CREAT, 0600); -diff -uPr samba-3.0.24.old/source/nsswitch/winbindd_util.c samba-3.0.24.new/source/nsswitch/winbindd_util.c ---- samba-3.0.24.old/source/nsswitch/winbindd_util.c 2007-02-04 13:59:14.000000000 -0500 -+++ samba-3.0.24.new/source/nsswitch/winbindd_util.c 2007-03-06 15:59:59.000000000 -0500 -@@ -911,7 +911,7 @@ - - char *get_winbind_priv_pipe_dir(void) - { -- return lock_path(WINBINDD_PRIV_SOCKET_SUBDIR); -+ return state_path(WINBINDD_PRIV_SOCKET_SUBDIR); - } - - /* Open the winbindd socket */ -@@ -1182,7 +1182,7 @@ - SMB_STRUCT_STAT stbuf; - TDB_CONTEXT *idmap_tdb; - -- pstrcpy(idmap_name, lock_path("winbindd_idmap.tdb")); -+ pstrcpy(idmap_name, state_path("winbindd_idmap.tdb")); - - if (!file_exist(idmap_name, &stbuf)) { - /* nothing to convert return */ -diff -uPr samba-3.0.24.old/source/param/loadparm.c samba-3.0.24.new/source/param/loadparm.c ---- samba-3.0.24.old/source/param/loadparm.c 2007-02-04 13:59:13.000000000 -0500 -+++ samba-3.0.24.new/source/param/loadparm.c 2007-03-06 15:52:22.000000000 -0500 -@@ -107,7 +107,8 @@ - char *szAddPrinterCommand; - char *szDeletePrinterCommand; - char *szOs2DriverMap; -- char *szLockDir; -+ char *szCacheDir; -+ char *szStateDir; - char *szPidDir; - char *szRootdir; - char *szDefaultService; -@@ -621,6 +622,7 @@ - static BOOL handle_netbios_scope( int snum, const char *pszParmValue, char **ptr ); - static BOOL handle_charset( int snum, const char *pszParmValue, char **ptr ); - static BOOL handle_printing( int snum, const char *pszParmValue, char **ptr); -+static BOOL handle_lock_dir( int snum, const char *pszParmValue, char **ptr); - - static void set_server_role(void); - static void set_default_server_announce_type(void); -@@ -1186,8 +1188,10 @@ - {"config file", P_STRING, P_GLOBAL, &Globals.szConfigFile, NULL, NULL, FLAG_HIDE}, - {"preload", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED}, - {"auto services", P_STRING, P_GLOBAL, &Globals.szAutoServices, NULL, NULL, FLAG_ADVANCED}, -- {"lock directory", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, FLAG_ADVANCED}, -- {"lock dir", P_STRING, P_GLOBAL, &Globals.szLockDir, NULL, NULL, FLAG_HIDE}, -+ {"cache directory", P_STRING, P_GLOBAL, &Globals.szCacheDir, NULL, NULL, FLAG_ADVANCED}, -+ {"state directory", P_STRING, P_GLOBAL, &Globals.szStateDir, NULL, NULL, FLAG_ADVANCED}, -+ {"lock directory", P_STRING, P_GLOBAL, &Globals.szCacheDir, handle_lock_dir, NULL, FLAG_HIDE | FLAG_DEPRECATED}, -+ {"lock dir", P_STRING, P_GLOBAL, &Globals.szCacheDir, NULL, NULL, FLAG_HIDE | FLAG_DEPRECATED }, - {"pid directory", P_STRING, P_GLOBAL, &Globals.szPidDir, NULL, NULL, FLAG_ADVANCED}, - #ifdef WITH_UTMP - {"utmp directory", P_STRING, P_GLOBAL, &Globals.szUtmpDir, NULL, NULL, FLAG_ADVANCED}, -@@ -1445,7 +1449,8 @@ - - string_set(&Globals.szPasswdProgram, ""); - string_set(&Globals.szPidDir, dyn_PIDDIR); -- string_set(&Globals.szLockDir, dyn_LOCKDIR); -+ string_set(&Globals.szCacheDir, dyn_CACHEDIR); -+ string_set(&Globals.szStateDir, dyn_STATEDIR); - string_set(&Globals.szSocketAddress, "0.0.0.0"); - pstrcpy(s, "Samba "); - pstrcat(s, SAMBA_VERSION_STRING); -@@ -1642,7 +1647,7 @@ - Globals.bASUSupport = False; - - /* User defined shares. */ -- pstrcpy(s, dyn_LOCKDIR); -+ pstrcpy(s, dyn_STATEDIR); - pstrcat(s, "/usershares"); - string_set(&Globals.szUsersharePath, s); - string_set(&Globals.szUsershareTemplateShare, ""); -@@ -1761,7 +1766,8 @@ - FN_GLOBAL_STRING(lp_addprinter_cmd, &Globals.szAddPrinterCommand) - FN_GLOBAL_STRING(lp_deleteprinter_cmd, &Globals.szDeletePrinterCommand) - FN_GLOBAL_STRING(lp_os2_driver_map, &Globals.szOs2DriverMap) --FN_GLOBAL_STRING(lp_lockdir, &Globals.szLockDir) -+FN_GLOBAL_STRING(lp_cachedir, &Globals.szCacheDir) -+FN_GLOBAL_STRING(lp_statedir, &Globals.szStateDir) - FN_GLOBAL_STRING(lp_piddir, &Globals.szPidDir) - FN_GLOBAL_STRING(lp_mangling_method, &Globals.szManglingMethod) - FN_GLOBAL_INTEGER(lp_mangle_prefix, &Globals.mangle_prefix) -@@ -3333,6 +3339,14 @@ - return True; - } - -+/************** handle deprecated lock directory paramter ***************/ -+ -+static BOOL handle_lock_dir(int snum, const char *pszParmValue, char **ptr) -+{ -+ /* set also the state dir */ -+ string_set(&Globals.szStateDir, pszParmValue); -+} -+ - - /*************************************************************************** - Initialise a copymap. -diff -uPr samba-3.0.24.old/source/passdb/login_cache.c samba-3.0.24.new/source/passdb/login_cache.c ---- samba-3.0.24.old/source/passdb/login_cache.c 2007-02-04 13:59:21.000000000 -0500 -+++ samba-3.0.24.new/source/passdb/login_cache.c 2007-03-06 15:27:15.000000000 -0500 -@@ -36,7 +36,7 @@ - /* skip file open if it's already opened */ - if (cache) return True; - -- asprintf(&cache_fname, "%s/%s", lp_lockdir(), LOGIN_CACHE_FILE); -+ asprintf(&cache_fname, "%s/%s", lp_cachedir(), LOGIN_CACHE_FILE); - if (cache_fname) - DEBUG(5, ("Opening cache file at %s\n", cache_fname)); - else { -diff -uPr samba-3.0.24.old/source/passdb/pdb_tdb.c samba-3.0.24.new/source/passdb/pdb_tdb.c ---- samba-3.0.24.old/source/passdb/pdb_tdb.c 2007-02-04 13:59:21.000000000 -0500 -+++ samba-3.0.24.new/source/passdb/pdb_tdb.c 2007-03-06 16:00:05.000000000 -0500 -@@ -1548,7 +1548,7 @@ - uint32 rid; - BOOL ret = False; - -- tdb = tdb_open_log(lock_path("winbindd_idmap.tdb"), 0, -+ tdb = tdb_open_log(state_path("winbindd_idmap.tdb"), 0, - TDB_DEFAULT, O_RDWR | O_CREAT, 0644); - - if (tdb == NULL) { -diff -uPr samba-3.0.24.old/source/printing/nt_printing.c samba-3.0.24.new/source/printing/nt_printing.c ---- samba-3.0.24.old/source/printing/nt_printing.c 2007-02-04 14:09:01.000000000 -0500 -+++ samba-3.0.24.new/source/printing/nt_printing.c 2007-03-06 16:01:19.000000000 -0500 -@@ -551,28 +551,28 @@ - - if (tdb_drivers) - tdb_close(tdb_drivers); -- tdb_drivers = tdb_open_log(lock_path("ntdrivers.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); -+ tdb_drivers = tdb_open_log(state_path("ntdrivers.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); - if (!tdb_drivers) { - DEBUG(0,("nt_printing_init: Failed to open nt drivers database %s (%s)\n", -- lock_path("ntdrivers.tdb"), strerror(errno) )); -+ state_path("ntdrivers.tdb"), strerror(errno) )); - return False; - } - - if (tdb_printers) - tdb_close(tdb_printers); -- tdb_printers = tdb_open_log(lock_path("ntprinters.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); -+ tdb_printers = tdb_open_log(state_path("ntprinters.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); - if (!tdb_printers) { - DEBUG(0,("nt_printing_init: Failed to open nt printers database %s (%s)\n", -- lock_path("ntprinters.tdb"), strerror(errno) )); -+ state_path("ntprinters.tdb"), strerror(errno) )); - return False; - } - - if (tdb_forms) - tdb_close(tdb_forms); -- tdb_forms = tdb_open_log(lock_path("ntforms.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); -+ tdb_forms = tdb_open_log(state_path("ntforms.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); - if (!tdb_forms) { - DEBUG(0,("nt_printing_init: Failed to open nt forms database %s (%s)\n", -- lock_path("ntforms.tdb"), strerror(errno) )); -+ state_path("ntforms.tdb"), strerror(errno) )); - return False; - } - -@@ -2348,7 +2348,7 @@ - close_all_print_db(); - - if (geteuid() == 0) { -- pstrcpy(printdb_path, lock_path("printing/")); -+ pstrcpy(printdb_path, state_path("printing/")); - pstrcat(printdb_path, sharename); - pstrcat(printdb_path, ".tdb"); - -diff -uPr samba-3.0.24.old/source/printing/printing.c samba-3.0.24.new/source/printing/printing.c ---- samba-3.0.24.old/source/printing/printing.c 2007-02-04 13:59:13.000000000 -0500 -+++ samba-3.0.24.new/source/printing/printing.c 2007-03-06 16:01:54.000000000 -0500 -@@ -183,9 +183,9 @@ - int services = lp_numservices(); - int snum; - -- unlink(lock_path("printing.tdb")); -- pstrcpy(printing_path,lock_path("printing")); -- mkdir(printing_path,0755); -+ unlink(state_path("printing.tdb")); -+ pstrcpy(printing_path, state_path("printing")); -+ mkdir(printing_path, 0755); - - /* handle a Samba upgrade */ - -diff -uPr samba-3.0.24.old/source/printing/printing_db.c samba-3.0.24.new/source/printing/printing_db.c ---- samba-3.0.24.old/source/printing/printing_db.c 2007-02-04 13:59:13.000000000 -0500 -+++ samba-3.0.24.new/source/printing/printing_db.c 2007-03-06 16:02:04.000000000 -0500 -@@ -91,7 +91,7 @@ - DLIST_ADD(print_db_head, p); - } - -- pstrcpy(printdb_path, lock_path("printing/")); -+ pstrcpy(printdb_path, state_path("printing/")); - pstrcat(printdb_path, printername); - pstrcat(printdb_path, ".tdb"); - -diff -uPr samba-3.0.24.old/source/registry/reg_db.c samba-3.0.24.new/source/registry/reg_db.c ---- samba-3.0.24.old/source/registry/reg_db.c 2006-04-19 22:29:45.000000000 -0400 -+++ samba-3.0.24.new/source/registry/reg_db.c 2007-03-06 16:02:35.000000000 -0500 -@@ -205,12 +205,12 @@ - if ( tdb_reg ) - return True; - -- if ( !(tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600)) ) -+ if ( !(tdb_reg = tdb_open_log(state_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); -+ tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600); - if ( !tdb_reg ) { - DEBUG(0,("regdb_init: Failed to open registry %s (%s)\n", -- lock_path("registry.tdb"), strerror(errno) )); -+ state_path("registry.tdb"), strerror(errno) )); - return False; - } - -@@ -252,11 +252,11 @@ - - become_root(); - -- tdb_reg = tdb_open_log(lock_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600); -+ tdb_reg = tdb_open_log(state_path("registry.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600); - if ( !tdb_reg ) { - result = ntstatus_to_werror( map_nt_error_from_unix( errno ) ); - DEBUG(0,("regdb_open: Failed to open %s! (%s)\n", -- lock_path("registry.tdb"), strerror(errno) )); -+ state_path("registry.tdb"), strerror(errno) )); - } - - unbecome_root(); -diff -uPr samba-3.0.24.old/source/registry/reg_perfcount.c samba-3.0.24.new/source/registry/reg_perfcount.c ---- samba-3.0.24.old/source/registry/reg_perfcount.c 2007-02-04 13:59:26.000000000 -0500 -+++ samba-3.0.24.new/source/registry/reg_perfcount.c 2007-03-06 16:03:22.000000000 -0500 -@@ -44,7 +44,7 @@ - - fstr_sprintf( path, "%s/%s", PERFCOUNTDIR, dbname ); - -- pstrcpy( fname, lock_path( path ) ); -+ pstrcpy( fname, state_path( path ) ); - - return fname; - } -@@ -54,7 +54,7 @@ - - void perfcount_init_keys( void ) - { -- char *p = lock_path(PERFCOUNTDIR); -+ char *p = state_path(PERFCOUNTDIR); - - /* no registry keys; just create the perfmon directory */ - -diff -uPr samba-3.0.24.old/source/rpc_server/srv_eventlog_lib.c samba-3.0.24.new/source/rpc_server/srv_eventlog_lib.c ---- samba-3.0.24.old/source/rpc_server/srv_eventlog_lib.c 2007-02-04 13:59:21.000000000 -0500 -+++ samba-3.0.24.new/source/rpc_server/srv_eventlog_lib.c 2007-03-06 16:03:50.000000000 -0500 -@@ -67,7 +67,7 @@ - { - fstring path; - char *tdb_fullpath; -- char *eventlogdir = lock_path( "eventlog" ); -+ char *eventlogdir = state_path( "eventlog" ); - - pstr_sprintf( path, "%s/%s.tdb", eventlogdir, name ); - strlower_m( path ); -@@ -349,7 +349,7 @@ - - /* make sure that the eventlog dir exists */ - -- eventlogdir = lock_path( "eventlog" ); -+ eventlogdir = state_path( "eventlog" ); - if ( !directory_exist( eventlogdir, NULL ) ) - mkdir( eventlogdir, 0755 ); - -diff -uPr samba-3.0.24.old/source/rpc_server/srv_netlog_nt.c samba-3.0.24.new/source/rpc_server/srv_netlog_nt.c ---- samba-3.0.24.old/source/rpc_server/srv_netlog_nt.c 2007-02-04 13:59:21.000000000 -0500 -+++ samba-3.0.24.new/source/rpc_server/srv_netlog_nt.c 2007-03-06 16:07:25.000000000 -0500 -@@ -77,7 +77,7 @@ - { - TDB_CONTEXT *tdb; - -- tdb = tdb_open_log(lock_path("connections.tdb"), 0, -+ tdb = tdb_open_log(cache_path("connections.tdb"), 0, - TDB_DEFAULT, O_RDONLY, 0); - - if (!tdb) { -diff -uPr samba-3.0.24.old/source/sam/idmap_tdb.c samba-3.0.24.new/source/sam/idmap_tdb.c ---- samba-3.0.24.old/source/sam/idmap_tdb.c 2006-04-19 22:29:35.000000000 -0400 -+++ samba-3.0.24.new/source/sam/idmap_tdb.c 2007-03-06 16:04:00.000000000 -0500 -@@ -449,7 +449,7 @@ - BOOL tdb_is_new = False; - - /* use the old database if present */ -- tdbfile = SMB_STRDUP(lock_path("winbindd_idmap.tdb")); -+ tdbfile = SMB_STRDUP(state_path("winbindd_idmap.tdb")); - if (!tdbfile) { - DEBUG(0, ("idmap_init: out of memory!\n")); - return NT_STATUS_NO_MEMORY; -diff -uPr samba-3.0.24.old/source/script/mkbuildoptions.awk samba-3.0.24.new/source/script/mkbuildoptions.awk ---- samba-3.0.24.old/source/script/mkbuildoptions.awk 2007-02-04 13:59:25.000000000 -0500 -+++ samba-3.0.24.new/source/script/mkbuildoptions.awk 2007-03-06 15:40:45.000000000 -0500 -@@ -86,7 +86,8 @@ - print " output(screen,\" LIBDIR: %s\\n\",dyn_LIBDIR);"; - print " output(screen,\" SHLIBEXT: %s\\n\",dyn_SHLIBEXT);"; - -- print " output(screen,\" LOCKDIR: %s\\n\",dyn_LOCKDIR);"; -+ print " output(screen,\" STATEDIR: %s\\n\",dyn_STATEDIR);"; -+ print " output(screen,\" CACHEDIR: %s\\n\",dyn_CACHEDIR);"; - print " output(screen,\" PIDDIR: %s\\n\", dyn_PIDDIR);"; - - print " output(screen,\" SMB_PASSWD_FILE: %s\\n\",dyn_SMB_PASSWD_FILE);"; -diff -uPr samba-3.0.24.old/source/script/tests/selftest.sh samba-3.0.24.new/source/script/tests/selftest.sh ---- samba-3.0.24.old/source/script/tests/selftest.sh 2007-02-04 13:59:25.000000000 -0500 -+++ samba-3.0.24.new/source/script/tests/selftest.sh 2007-03-06 15:42:00.000000000 -0500 -@@ -41,13 +41,14 @@ - SERVERCONFFILE=$LIBDIR/server.conf - COMMONCONFFILE=$LIBDIR/common.conf - PRIVATEDIR=$PREFIX_ABS/private --LOCKDIR=$PREFIX_ABS/lockdir -+STATEDIR=$PREFIX_ABS/lockdir -+CACHEDIR=$PREFIX_ABS/lockdir - LOGDIR=$PREFIX_ABS/logs - SOCKET_WRAPPER_DIR=$PREFIX/sw - CONFIGURATION="-s $CONFFILE" - - export PREFIX PREFIX_ABS CONFIGURATION CONFFILE PATH SOCKET_WRAPPER_DIR DOMAIN --export PRIVATEDIR LIBDIR PIDDIR LOCKDIR LOGDIR SERVERCONFFILE -+export PRIVATEDIR LIBDIR PIDDIR STATEDIR CACHEDIR LOGDIR SERVERCONFFILE - export SRCDIR SCRIPTDIR - export USERNAME PASSWORD - export SMBTORTURE4 -@@ -73,7 +74,7 @@ - ## - echo -n "CREATE TEST ENVIRONMENT IN '$PREFIX'"... - /bin/rm -rf $PREFIX/* --mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $LOCKDIR $LOGDIR $SOCKET_WRAPPER_DIR -+mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $STATEDIR $CACHEDIR $LOGDIR $SOCKET_WRAPPER_DIR - mkdir -p $PREFIX_ABS/tmp - chmod 777 $PREFIX_ABS/tmp - -@@ -86,7 +87,8 @@ - - private dir = $PRIVATEDIR - pid directory = $PIDDIR -- lock directory = $LOCKDIR -+ state directory = $STATEDIR -+ cache directory = $CACHEDIR - log file = $LOGDIR/log.%m - log level = 0 - -diff -uPr samba-3.0.24.old/source/smbd/connection.c samba-3.0.24.new/source/smbd/connection.c ---- samba-3.0.24.old/source/smbd/connection.c 2005-10-17 22:44:57.000000000 -0400 -+++ samba-3.0.24.new/source/smbd/connection.c 2007-03-06 16:04:14.000000000 -0500 -@@ -29,7 +29,7 @@ - TDB_CONTEXT *conn_tdb_ctx(void) - { - if (!tdb) -- tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT, -+ tdb = tdb_open_log(cache_path("connections.tdb"), 0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT, - O_RDWR | O_CREAT, 0644); - - return tdb; -@@ -131,7 +131,7 @@ - TDB_DATA kbuf, dbuf; - - if (!tdb) -- tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT, -+ tdb = tdb_open_log(cache_path("connections.tdb"), 0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT, - O_RDWR | O_CREAT, 0644); - - if (!tdb) -diff -uPr samba-3.0.24.old/source/smbd/lanman.c samba-3.0.24.new/source/smbd/lanman.c ---- samba-3.0.24.old/source/smbd/lanman.c 2007-02-04 13:59:13.000000000 -0500 -+++ samba-3.0.24.new/source/smbd/lanman.c 2007-03-06 16:04:30.000000000 -0500 -@@ -1052,9 +1052,9 @@ - BOOL local_list_only; - int i; - -- lines = file_lines_load(lock_path(SERVER_LIST), NULL, 0); -+ lines = file_lines_load(state_path(SERVER_LIST), NULL, 0); - if (!lines) { -- DEBUG(4,("Can't open %s - %s\n",lock_path(SERVER_LIST),strerror(errno))); -+ DEBUG(4,("Can't open %s - %s\n",state_path(SERVER_LIST),strerror(errno))); - return 0; - } - -diff -uPr samba-3.0.24.old/source/smbd/oplock_irix.c samba-3.0.24.new/source/smbd/oplock_irix.c ---- samba-3.0.24.old/source/smbd/oplock_irix.c 2007-02-04 13:59:13.000000000 -0500 -+++ samba-3.0.24.new/source/smbd/oplock_irix.c 2007-03-06 15:27:35.000000000 -0500 -@@ -38,7 +38,7 @@ - - set_effective_capability(KERNEL_OPLOCK_CAPABILITY); - -- slprintf(tmpname,sizeof(tmpname)-1, "%s/koplock.%d", lp_lockdir(), (int)sys_getpid()); -+ slprintf(tmpname,sizeof(tmpname)-1, "%s/koplock.%d", lp_cachedir(), (int)sys_getpid()); - - if(pipe(pfd) != 0) { - DEBUG(0,("check_kernel_oplocks: Unable to create pipe. Error was %s\n", -diff -uPr samba-3.0.24.old/source/smbd/server.c samba-3.0.24.new/source/smbd/server.c ---- samba-3.0.24.old/source/smbd/server.c 2007-02-04 13:59:13.000000000 -0500 -+++ samba-3.0.24.new/source/smbd/server.c 2007-03-06 15:28:08.000000000 -0500 -@@ -902,8 +902,11 @@ - setpgid( (pid_t)0, (pid_t)0); - #endif - -- if (!directory_exist(lp_lockdir(), NULL)) -- mkdir(lp_lockdir(), 0755); -+ if (!directory_exist(lp_cachedir(), NULL)) -+ mkdir(lp_cachedir(), 0755); -+ -+ if (!directory_exist(lp_statedir(), NULL)) -+ mkdir(lp_statedir(), 0755); - - if (is_daemon) - pidfile_create("smbd"); -diff -uPr samba-3.0.24.old/source/smbd/session.c samba-3.0.24.new/source/smbd/session.c ---- samba-3.0.24.old/source/smbd/session.c 2006-04-19 22:29:19.000000000 -0400 -+++ samba-3.0.24.new/source/smbd/session.c 2007-03-06 16:04:55.000000000 -0500 -@@ -34,7 +34,7 @@ - if (tdb) - return True; - -- tdb = tdb_open_log(lock_path("sessionid.tdb"), 0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT, -+ tdb = tdb_open_log(cache_path("sessionid.tdb"), 0, TDB_CLEAR_IF_FIRST|TDB_DEFAULT, - O_RDWR | O_CREAT, 0644); - if (!tdb) { - DEBUG(1,("session_init: failed to open sessionid tdb\n")); -diff -uPr samba-3.0.24.old/source/utils/net_idmap.c samba-3.0.24.new/source/utils/net_idmap.c ---- samba-3.0.24.old/source/utils/net_idmap.c 2007-02-04 13:59:25.000000000 -0500 -+++ samba-3.0.24.new/source/utils/net_idmap.c 2007-03-06 16:05:03.000000000 -0500 -@@ -136,7 +136,7 @@ - return NT_STATUS_UNSUCCESSFUL; - } - -- tdbfile = SMB_STRDUP(lock_path("winbindd_idmap.tdb")); -+ tdbfile = SMB_STRDUP(state_path("winbindd_idmap.tdb")); - if (!tdbfile) { - DEBUG(0, ("idmap_init: out of memory!\n")); - return NT_STATUS_NO_MEMORY; -diff -uPr samba-3.0.24.old/source/utils/net_status.c samba-3.0.24.new/source/utils/net_status.c ---- samba-3.0.24.old/source/utils/net_status.c 2007-02-04 13:59:25.000000000 -0500 -+++ samba-3.0.24.new/source/utils/net_status.c 2007-03-06 16:05:45.000000000 -0500 -@@ -70,11 +70,11 @@ - "------------------------\n"); - } - -- tdb = tdb_open_log(lock_path("sessionid.tdb"), 0, -+ tdb = tdb_open_log(cache_path("sessionid.tdb"), 0, - TDB_DEFAULT, O_RDONLY, 0); - - if (tdb == NULL) { -- d_fprintf(stderr, "%s not initialised\n", lock_path("sessionid.tdb")); -+ d_fprintf(stderr, "%s not initialised\n", cache_path("sessionid.tdb")); - return -1; - } - -@@ -186,22 +186,22 @@ - ids.num_entries = 0; - ids.entries = NULL; - -- tdb = tdb_open_log(lock_path("sessionid.tdb"), 0, -+ tdb = tdb_open_log(cache_path("sessionid.tdb"), 0, - TDB_DEFAULT, O_RDONLY, 0); - - if (tdb == NULL) { -- d_fprintf(stderr, "%s not initialised\n", lock_path("sessionid.tdb")); -+ d_fprintf(stderr, "%s not initialised\n", cache_path("sessionid.tdb")); - return -1; - } - - tdb_traverse(tdb, collect_pid, &ids); - tdb_close(tdb); - -- tdb = tdb_open_log(lock_path("connections.tdb"), 0, -+ tdb = tdb_open_log(cache_path("connections.tdb"), 0, - TDB_DEFAULT, O_RDONLY, 0); - - if (tdb == NULL) { -- d_fprintf(stderr, "%s not initialised\n", lock_path("connections.tdb")); -+ d_fprintf(stderr, "%s not initialised\n", cache_path("connections.tdb")); - d_fprintf(stderr, "This is normal if no SMB client has ever " - "connected to your server.\n"); - return -1; -@@ -226,12 +226,12 @@ - d_printf("-------------------------------------" - "------------------\n"); - -- tdb = tdb_open_log(lock_path("connections.tdb"), 0, -+ tdb = tdb_open_log(cache_path("connections.tdb"), 0, - TDB_DEFAULT, O_RDONLY, 0); - - if (tdb == NULL) { - d_fprintf(stderr, "%s not initialised\n", -- lock_path("connections.tdb")); -+ cache_path("connections.tdb")); - d_fprintf(stderr, "This is normal if no SMB client has " - "ever connected to your server.\n"); - return -1; -diff -uPr samba-3.0.24.old/source/utils/smbcontrol.c samba-3.0.24.new/source/utils/smbcontrol.c ---- samba-3.0.24.old/source/utils/smbcontrol.c 2007-02-04 13:59:25.000000000 -0500 -+++ samba-3.0.24.new/source/utils/smbcontrol.c 2007-03-06 16:06:33.000000000 -0500 -@@ -61,7 +61,7 @@ - if (procid_to_pid(&pid) != 0) - return message_send_pid(pid, msg_type, buf, len, duplicates); - -- tdb = tdb_open_log(lock_path("connections.tdb"), 0, -+ tdb = tdb_open_log(cache_path("connections.tdb"), 0, - TDB_DEFAULT, O_RDWR, 0); - if (!tdb) { - fprintf(stderr,"Failed to open connections database" -@@ -286,7 +286,7 @@ - } else { - TDB_CONTEXT * tdb; - -- tdb = tdb_open_log(lock_path("connections.tdb"), 0, -+ tdb = tdb_open_log(cache_path("connections.tdb"), 0, - TDB_DEFAULT, O_RDONLY, 0); - if (!tdb) { - fprintf(stderr, -@@ -828,10 +828,10 @@ - /* Remove the entry in the winbindd_cache tdb to tell a later - starting winbindd that we're online. */ - -- tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600); -+ tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), 0, TDB_DEFAULT, O_RDWR, 0600); - if (!tdb) { - fprintf(stderr, "Cannot open the tdb %s for writing.\n", -- lock_path("winbindd_cache.tdb")); -+ cache_path("winbindd_cache.tdb")); - return False; - } - -@@ -864,13 +864,13 @@ - starting winbindd that we're offline. We may actually create - it here... */ - -- tdb = tdb_open_log(lock_path("winbindd_cache.tdb"), -+ tdb = tdb_open_log(cache_path("winbindd_cache.tdb"), - WINBINDD_CACHE_TDB_DEFAULT_HASH_SIZE, - TDB_DEFAULT /* TDB_CLEAR_IF_FIRST */, O_RDWR|O_CREAT, 0600); - - if (!tdb) { - fprintf(stderr, "Cannot open the tdb %s for writing.\n", -- lock_path("winbindd_cache.tdb")); -+ cache_path("winbindd_cache.tdb")); - return False; - } - -diff -uPr samba-3.0.24.old/source/utils/status.c samba-3.0.24.new/source/utils/status.c ---- samba-3.0.24.old/source/utils/status.c 2007-02-04 13:59:25.000000000 -0500 -+++ samba-3.0.24.new/source/utils/status.c 2007-03-06 16:07:00.000000000 -0500 -@@ -669,7 +669,7 @@ - } - - if ( show_processes ) { -- tdb = tdb_open_log(lock_path("sessionid.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0); -+ tdb = tdb_open_log(cache_path("sessionid.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0); - if (!tdb) { - d_printf("sessionid.tdb not initialised\n"); - } else { -@@ -686,13 +686,13 @@ - } - - if ( show_shares ) { -- tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0); -+ tdb = tdb_open_log(cache_path("connections.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0); - if (!tdb) { -- d_printf("%s not initialised\n", lock_path("connections.tdb")); -+ d_printf("%s not initialised\n", cache_path("connections.tdb")); - d_printf("This is normal if an SMB client has never connected to your server.\n"); - } else { - if (verbose) { -- d_printf("Opened %s\n", lock_path("connections.tdb")); -+ d_printf("Opened %s\n", cache_path("connections.tdb")); - } - - if (brief) -diff -uPr samba-3.0.24.old/source/utils/testparm.c samba-3.0.24.new/source/utils/testparm.c ---- samba-3.0.24.old/source/utils/testparm.c 2007-02-04 13:59:25.000000000 -0500 -+++ samba-3.0.24.new/source/utils/testparm.c 2007-03-06 15:29:34.000000000 -0500 -@@ -57,13 +57,23 @@ - ret = 1; - } - -- if (!directory_exist(lp_lockdir(), &st)) { -- fprintf(stderr, "ERROR: lock directory %s does not exist\n", -- lp_lockdir()); -+ if (!directory_exist(lp_cachedir(), &st)) { -+ fprintf(stderr, "ERROR: cache directory %s does not exist\n", -+ lp_cachedir()); - ret = 1; - } else if ((st.st_mode & 0777) != 0755) { -- fprintf(stderr, "WARNING: lock directory %s should have permissions 0755 for browsing to work\n", -- lp_lockdir()); -+ fprintf(stderr, "WARNING: cache directory %s should have permissions 0755 for browsing to work\n", -+ lp_cachedir()); -+ ret = 1; -+ } -+ -+ if (!directory_exist(lp_statedir(), &st)) { -+ fprintf(stderr, "ERROR: state directory %s does not exist\n", -+ lp_statedir()); -+ ret = 1; -+ } else if ((st.st_mode & 0777) != 0755) { -+ fprintf(stderr, "WARNING: state directory %s should have permissions 0755 for browsing to work\n", -+ lp_statedir()); - ret = 1; - } - -diff -uPr samba-3.0.24.old/source/web/statuspage.c samba-3.0.24.new/source/web/statuspage.c ---- samba-3.0.24.old/source/web/statuspage.c 2007-02-04 13:59:21.000000000 -0500 -+++ samba-3.0.24.new/source/web/statuspage.c 2007-03-06 16:07:08.000000000 -0500 -@@ -319,7 +319,7 @@ - PID_or_Machine = 0; - } - -- tdb = tdb_open_log(lock_path("connections.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0); -+ tdb = tdb_open_log(cache_path("connections.tdb"), 0, TDB_DEFAULT, O_RDONLY, 0); - if (tdb) tdb_traverse(tdb, traverse_fn1, NULL); - - initPid2Machine (); diff --git a/samba-3.0.24-msdfs-root-no.patch b/samba-3.0.24-msdfs-root-no.patch deleted file mode 100644 index 1005217..0000000 --- a/samba-3.0.24-msdfs-root-no.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- samba-3.0.24.orig/source/param/loadparm.c 2007-02-04 13:59:13.000000000 -0500 -+++ samba-3.0.24/source/param/loadparm.c 2007-02-20 14:03:49.000000000 -0500 -@@ -570,7 +570,7 @@ - False, /* bInheritPerms */ - False, /* bInheritACLS */ - False, /* bInheritOwner */ -- True, /* bMSDfsRoot */ -+ False, /* bMSDfsRoot */ - False, /* bUseClientDriver */ - True, /* bDefaultDevmode */ - False, /* bForcePrintername */ diff --git a/samba-3.0.24-nss_wins.patch b/samba-3.0.24-nss_wins.patch deleted file mode 100644 index d36dd7c..0000000 --- a/samba-3.0.24-nss_wins.patch +++ /dev/null @@ -1,23 +0,0 @@ -Index: source/Makefile.in -=================================================================== ---- source/Makefile.in.orig -+++ source/Makefile.in -@@ -687,7 +687,8 @@ PROTO_OBJ = $(SMBD_OBJ_MAIN) \ - $(RPC_NTSVCS_OBJ) utils/passwd_util.o - - WINBIND_WINS_NSS_OBJ = nsswitch/wins.o $(PARAM_OBJ) \ -- $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(NSSWINS_OBJ) $(KRBCLIENT_OBJ) -+ $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(NSSWINS_OBJ) $(KRBCLIENT_OBJ) \ -+ $(SECRETS_OBJ) - - WINBIND_WINS_NSS_PICOBJS = $(WINBIND_WINS_NSS_OBJ:.o=.@PICSUFFIX@) - -@@ -1231,7 +1232,7 @@ bin/winbindd@EXEEXT@: $(WINBINDD_OBJ) @B - @WINBIND_WINS_NSS@: $(WINBIND_WINS_NSS_PICOBJS) - @echo "Linking $@" - @$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_WINS_NSS_PICOBJS) \ -- $(LDAP_LIBS) $(KRB5LIBS) \ -+ $(LDAP_LIBS) $(KRB5LIBS) $(LIBS) \ - @SONAMEFLAG@`basename $@`@NSSSONAMEVERSIONSUFFIX@ - - bin/pam_winbind.@SHLIBEXT@: $(PAM_WINBIND_OBJ:.o=.@PICSUFFIX@) bin/.dummy diff --git a/samba-3.0.24-pam_winbind-fixes.patch b/samba-3.0.24-pam_winbind-fixes.patch deleted file mode 100644 index fdd3866..0000000 --- a/samba-3.0.24-pam_winbind-fixes.patch +++ /dev/null @@ -1,118 +0,0 @@ ------------------------------------------------------------------------- -r21143 | gd | 2007-02-05 15:34:12 +0100 (Mon, 05 Feb 2007) | 7 lines - -Fix wrong check for pam error codes for getpwnam and lookup winbind -requests in pam_winbind (Bug #4094). - -Inspired by fix from Lars Heete. - -Guenther - ------------------------------------------------------------------------- -Index: source/nsswitch/pam_winbind.c -=================================================================== ---- source/nsswitch/pam_winbind.c (revision 21142) -+++ source/nsswitch/pam_winbind.c (revision 21143) -@@ -444,21 +444,34 @@ static int pam_winbind_request(pam_handl - close_sock(); - - /* Copy reply data from socket */ -- if (response->result != WINBINDD_OK) { -- if (response->data.auth.pam_error != PAM_SUCCESS) { -- _pam_log(LOG_ERR, "request failed: %s, PAM error was %s (%d), NT error was %s", -- response->data.auth.error_string, -- pam_strerror(pamh, response->data.auth.pam_error), -- response->data.auth.pam_error, -- response->data.auth.nt_status_string); -- return response->data.auth.pam_error; -- } else { -- _pam_log(LOG_ERR, "request failed, but PAM error 0!"); -- return PAM_SERVICE_ERR; -- } -+ if (response->result == WINBINDD_OK) { -+ return PAM_SUCCESS; - } - -- return PAM_SUCCESS; -+ /* no need to check for pam_error codes for getpwnam() */ -+ switch (req_type) { -+ -+ case WINBINDD_GETPWNAM: -+ case WINBINDD_LOOKUPNAME: -+ _pam_log(LOG_ERR, "request failed: %s, NT error was %s", -+ response->data.auth.nt_status_string); -+ return PAM_USER_UNKNOWN; -+ default: -+ break; -+ } -+ -+ if (response->data.auth.pam_error != PAM_SUCCESS) { -+ _pam_log(LOG_ERR, "request failed: %s, PAM error was %s (%d), NT error was %s", -+ response->data.auth.error_string, -+ pam_strerror(pamh, response->data.auth.pam_error), -+ response->data.auth.pam_error, -+ response->data.auth.nt_status_string); -+ return response->data.auth.pam_error; -+ } -+ -+ _pam_log(LOG_ERR, "request failed, but PAM error 0!"); -+ -+ return PAM_SERVICE_ERR; - } - - static int pam_winbind_request_log(pam_handle_t * pamh, ------------------------------------------------------------------------- -r21310 | gd | 2007-02-13 12:04:10 +0100 (Tue, 13 Feb 2007) | 4 lines - -Fix invalid printfs in pam_winbind. - -Guenther - ------------------------------------------------------------------------- -Index: source/nsswitch/pam_winbind.c -=================================================================== ---- source/nsswitch/pam_winbind.c (revision 21309) -+++ source/nsswitch/pam_winbind.c (revision 21310) -@@ -461,8 +461,12 @@ static int pam_winbind_request(pam_handl - - case WINBINDD_GETPWNAM: - case WINBINDD_LOOKUPNAME: -- _pam_log(LOG_ERR, "request failed: %s, NT error was %s", -+ if (strlen(response->data.auth.nt_status_string) > 0) { -+ _pam_log(LOG_ERR, "request failed, NT error was %s", - response->data.auth.nt_status_string); -+ } else { -+ _pam_log(LOG_ERR, "request failed"); -+ } - return PAM_USER_UNKNOWN; - default: - break; -@@ -518,15 +522,19 @@ static int pam_winbind_request_log(pam_h - } - return retval; - case PAM_SUCCESS: -- if (req_type == WINBINDD_PAM_AUTH) { -- /* Otherwise, the authentication looked good */ -- _pam_log(LOG_NOTICE, "user '%s' granted access", user); -- } else if (req_type == WINBINDD_PAM_CHAUTHTOK) { -- /* Otherwise, the authentication looked good */ -- _pam_log(LOG_NOTICE, "user '%s' password changed", user); -- } else { -- /* Otherwise, the authentication looked good */ -- _pam_log(LOG_NOTICE, "user '%s' OK", user); -+ /* Otherwise, the authentication looked good */ -+ switch (req_type) { -+ case WINBINDD_INFO: -+ break; -+ case WINBINDD_PAM_AUTH: -+ _pam_log(LOG_NOTICE, "user '%s' granted access", user); -+ break; -+ case WINBINDD_PAM_CHAUTHTOK: -+ _pam_log(LOG_NOTICE, "user '%s' password changed", user); -+ break; -+ default: -+ _pam_log(LOG_NOTICE, "user '%s' OK", user); -+ break; - } - - return retval; diff --git a/samba-3.0.24-tar_options.patch b/samba-3.0.24-tar_options.patch deleted file mode 100644 index 51b751d..0000000 --- a/samba-3.0.24-tar_options.patch +++ /dev/null @@ -1,135 +0,0 @@ -Index: source/client/client.c -=================================================================== ---- source/client/client.c (revision 21990) -+++ source/client/client.c (working copy) -@@ -3847,6 +3847,8 @@ - char *p; - int rc = 0; - fstring new_workgroup; -+ BOOL tar_opt = False; -+ BOOL service_opt = False; - struct poptOption long_options[] = { - POPT_AUTOHELP - -@@ -3893,13 +3895,43 @@ - x_setbuf( dbf, NULL ); - } - -- pc = poptGetContext("smbclient", argc, (const char **) argv, long_options, -- POPT_CONTEXT_KEEP_FIRST); -+ /* skip argv(0) */ -+ pc = poptGetContext("smbclient", argc, (const char **) argv, long_options, 0); - poptSetOtherOptionHelp(pc, "service "); - - in_client = True; /* Make sure that we tell lp_load we are */ - - while ((opt = poptGetNextOpt(pc)) != -1) { -+ -+ /* if the tar option has been called previouslt, now we need to eat out the leftovers */ -+ /* I see no other way to keep things sane --SSS */ -+ if (tar_opt == True) { -+ while (poptPeekArg(pc)) { -+ poptGetArg(pc); -+ } -+ tar_opt = False; -+ } -+ -+ /* if the service has not yet been specified lets see if it is available in the popt stack */ -+ if (!service_opt && poptPeekArg(pc)) { -+ pstrcpy(service, poptGetArg(pc)); -+ /* Convert any '/' characters in the service name to '\' characters */ -+ string_replace(service, '/','\\'); -+ -+ if (count_chars(service,'\\') < 3) { -+ d_printf("\n%s: Not enough '\\' characters in service\n",service); -+ poptPrintUsage(pc, stderr, 0); -+ exit(1); -+ } -+ service_opt = True; -+ } -+ -+ /* if the service has already been retrieved then check if we have also a password */ -+ if (service_opt && (!cmdline_auth_info.got_pass) && poptPeekArg(pc)) { -+ pstrcpy(cmdline_auth_info.password, poptGetArg(pc)); -+ cmdline_auth_info.got_pass = True; -+ } -+ - switch (opt) { - case 'M': - /* Messages are sent to NetBIOS name type 0x3 -@@ -3954,13 +3986,9 @@ - poptPrintUsage(pc, stderr, 0); - exit(1); - } -- /* Now we must eat (optnum - i) options - they have -- * been processed by tar_parseargs(). -- */ -- optnum -= i; -- for (i = 0; i < optnum; i++) -- poptGetOptArg(pc); - } -+ /* this must be the last option, mark we have parsed it so that we know we have */ -+ tar_opt = True; - break; - case 'D': - pstrcpy(base_directory,poptGetOptArg(pc)); -@@ -3971,8 +3999,34 @@ - } - } - -- poptGetArg(pc); -+ /* We may still have some leftovers after the last popt option has been called */ -+ if (tar_opt == True) { -+ while (poptPeekArg(pc)) { -+ poptGetArg(pc); -+ } -+ tar_opt = False; -+ } - -+ /* if the service has not yet been specified lets see if it is available in the popt stack */ -+ if (!service_opt && poptPeekArg(pc)) { -+ pstrcpy(service, poptGetArg(pc)); -+ /* Convert any '/' characters in the service name to '\' characters */ -+ string_replace(service, '/','\\'); -+ -+ if (count_chars(service,'\\') < 3) { -+ d_printf("\n%s: Not enough '\\' characters in service\n",service); -+ poptPrintUsage(pc, stderr, 0); -+ exit(1); -+ } -+ service_opt = True; -+ } -+ -+ /* if the service has already been retrieved then check if we have also a password */ -+ if (service_opt && (!cmdline_auth_info.got_pass) && poptPeekArg(pc)) { -+ pstrcpy(cmdline_auth_info.password, poptGetArg(pc)); -+ cmdline_auth_info.got_pass = True; -+ } -+ - /* check for the -P option */ - - if ( port != 0 ) -@@ -4011,23 +4065,6 @@ - else - pstrcpy( calling_name, global_myname() ); - -- if(poptPeekArg(pc)) { -- pstrcpy(service,poptGetArg(pc)); -- /* Convert any '/' characters in the service name to '\' characters */ -- string_replace(service, '/','\\'); -- -- if (count_chars(service,'\\') < 3) { -- d_printf("\n%s: Not enough '\\' characters in service\n",service); -- poptPrintUsage(pc, stderr, 0); -- exit(1); -- } -- } -- -- if (poptPeekArg(pc) && !cmdline_auth_info.got_pass) { -- cmdline_auth_info.got_pass = True; -- pstrcpy(cmdline_auth_info.password,poptGetArg(pc)); -- } -- - init_names(); - - if(new_name_resolve_order) diff --git a/samba-3.0.25a-pam_smbpass.patch b/samba-3.0.25a-pam_smbpass.patch deleted file mode 100644 index c94e0d0..0000000 --- a/samba-3.0.25a-pam_smbpass.patch +++ /dev/null @@ -1,45 +0,0 @@ -Author: gd -Revision: r23121 -Modified: source/Makefile.in source/pam_smbpass/general.h source/pam_smbpass/pam_smb_acct.c source/pam_smbpass/pam_smb_auth.c source/pam_smbpass/pam_smb_passwd.c /branches/SAMBA_3_0_25/source/Makefile.in /branches/SAMBA_3_0_25/source/pam_smbpass/general.h /branches/SAMBA_3_0_26/source/Makefile.in /branches/SAMBA_3_0_26/source/pam_smbpass/general.h -Added: -Removed: - - -Fix Bug #2727 and let pam_smbpass at least link and dlopen correctly again. - -Thanks to Bartlomiej Solarz-Niesluchowski <Bartlomiej.Solarz-Niesluchowski@wit.edu.pl>. - -Guenther - - -Index: source/Makefile.in -=================================================================== ---- source/Makefile.in (revision 23120) -+++ source/Makefile.in (revision 23121) -@@ -750,10 +750,10 @@ - $(LIBSMB_OBJ) $(LIB_NONSMBD_OBJ) $(NSSWINS_OBJ) $(KRBCLIENT_OBJ) $(SECRETS_OBJ) - - PAM_SMBPASS_OBJ_0 = pam_smbpass/pam_smb_auth.o pam_smbpass/pam_smb_passwd.o \ -- pam_smbpass/pam_smb_acct.o pam_smbpass/support.o \ -- $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ -+ pam_smbpass/pam_smb_acct.o pam_smbpass/support.o -+PAM_SMBPASS_OBJ = $(PAM_SMBPASS_OBJ_0) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) $(PASSDB_OBJ) $(GROUPDB_OBJ) \ - $(SECRETS_OBJ) $(SMBLDAP_OBJ) $(LIBSAMBA_OBJ) \ -- $(RPC_PARSE_OBJ1) $(DOSERR_OBJ) -+ $(RPC_PARSE_OBJ1) $(DOSERR_OBJ) $(ERRORMAP_OBJ) - - IDMAP_OBJ = nsswitch/idmap.o nsswitch/idmap_cache.o nsswitch/idmap_util.o @IDMAP_STATIC@ - -Index: source/pam_smbpass/general.h -=================================================================== ---- source/pam_smbpass/general.h (revision 23120) -+++ source/pam_smbpass/general.h (revision 23121) -@@ -121,7 +121,7 @@ - - struct _pam_failed_auth { - char *user; /* user that's failed to be authenticated */ -- int id; /* uid of requested user */ -+ uid_t id; /* uid of requested user */ - char *agent; /* attempt from user with name */ - int count; /* number of failures so far */ - }; diff --git a/samba.spec b/samba.spec index 6772f48..83b94e8 100644 --- a/samba.spec +++ b/samba.spec @@ -1,8 +1,8 @@ Summary: The Samba Suite of programs Name: samba Epoch: 0 -Version: 3.0.25a -Release: 2%{?dist} +Version: 3.0.25b +Release: 1%{?dist} License: GPL Group: System Environment/Daemons URL: http://www.samba.org/ @@ -32,21 +32,15 @@ Source999: filter-requires-samba.sh # (none right now) # generic patches -#Patch101: samba-2.2.0-smbw.patch Patch102: samba-3.0.0beta1-pipedir.patch #Patch103: samba-3.0.23-logfiles.patch Patch104: samba-3.0.0rc3-nmbd-netbiosname.patch -#Patch105: samba-3.0.23-smb.conf.patch -#Patch106: samba-3.0.23d-man.patch # The passwd part has been applied, but not the group part Patch107: samba-3.0.23rc3-passwd.patch #Patch108: samba-3.0.8-non-ascii-domain.patch Patch110: samba-3.0.21pre1-smbspool.patch Patch111: samba-3.0.13-smbclient.patch -#Patch112: samba-3.0.15pre2-bug106483.patch -#Patch113: samba-3.0.21-warnings.patch Patch200: samba-3.0.25rc1-inotifiy.patch -Patch201: samba-3.0.25a-pam_smbpass.patch Requires(pre): samba-common = %{epoch}:%{version}-%{release} @@ -156,20 +150,14 @@ cp %{SOURCE11} packaging/Fedora/ # Upstream patches #(none) # generic patches -#%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 %patch110 -p1 -b .smbspool %patch111 -p1 -b .smbclient -#%patch112 -p1 -b .bug106483 -#%patch113 -p1 -b .warnings %patch200 -p0 -b .inotify -%patch201 -p0 -b .pam_smbpass # crap rm -f examples/VFS/.cvsignore @@ -631,6 +619,10 @@ exit 0 #%{_includedir}/libmsrpc.h %changelog +* Tue Jun 26 2007 Simo Sorce 3.0.25b-1.fc8 +- update to 3.0.25b +- better error codes for init scripts: #244823 + * Tue May 29 2007 Günther Deschner - fix pam_smbpass patch. diff --git a/sources b/sources index 0694bdb..56678da 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cbd33bb5d904ccd8a294a4019743745d samba-3.0.25a.tar.gz +69d3d6661f37f2525486cc834c4e24e7 samba-3.0.25b.tar.gz