* Mon Aug 22 2005 Jay Fenlason <fenlason@redhat.com> 3.0.20-2

- New upstream release
  Includes five upstream patches -bug3010_v1, -groupname_enumeration_v3,
    -regcreatekey_winxp_v1, -usrmgr_groups_v1, and -winbindd_v1
  This obsoletes the -pie and -delim patches
  the -warning and -gcc4 patches are obsolete too
  The -man, -passwd, and -smbspool patches were updated to match 3.0.20pre1
  Also, the -quoting patch was implemented differently upstream
  There is now a umount.cifs executable and manpage
  We run autogen.sh as part of the build phase
  The testprns command is now gone
  libsmbclient now has a man page
- Include -bug106483 patch to close
  bz#106483 smbclient: -N negates the provided password, despite documentation
- Added the -warnings patch to quiet some compiler warnings.
- Removed many obsolete patches from CVS.
This commit is contained in:
fenlason 2005-09-12 20:40:11 +00:00
parent 04ea64f312
commit ea54ad0f60
9 changed files with 1165 additions and 68 deletions

View File

@ -1 +1 @@
samba-3.0.14a.tar.gz
samba-3.0.20.tar.gz

View File

@ -0,0 +1,11 @@
--- 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));
}

View File

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

View File

@ -0,0 +1,42 @@
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");

View File

@ -0,0 +1,124 @@
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;
}

View File

@ -0,0 +1,73 @@
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;
}
/*********************************************************************

View File

@ -0,0 +1,61 @@
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)) {

View File

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

View File

@ -1 +1 @@
ebee37e66a8b5f6fd328967dc09088e8 samba-3.0.14a.tar.gz
68e72ab16334c329901816febc43217a samba-3.0.20.tar.gz