[SCM] Samba Shared Repository - branch v3-5-test updated

2009-10-07 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  879c3b8... Oops. Don't break the build.. Jeremy.
  from  48fee26... Make the logic a lot clearer and fix the comment to 
match. Jeremy

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


- Log -
commit 879c3bb9a77136777b269ad730d4b3ca223b
Author: Jeremy Allison j...@samba.org
Date:   Wed Oct 7 15:43:43 2009 -0700

Oops. Don't break the build..
Jeremy.

---

Summary of changes:
 source3/smbd/files.c |5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/files.c b/source3/smbd/files.c
index f7509d7..2bc5ba6 100644
--- a/source3/smbd/files.c
+++ b/source3/smbd/files.c
@@ -405,14 +405,13 @@ bool file_find_subpath(files_struct *dir_fsp)
files_struct *fsp;
size_t dlen;
char *d_fullname = NULL;
-   bool ret = false;
 
d_fullname = talloc_asprintf(talloc_tos(), %s/%s,
 dir_fsp-conn-connectpath,
 dir_fsp-fsp_name-base_name);
 
if (!d_fullname) {
-   goto out;
+   return false;
}
 
dlen = strlen(d_fullname);
@@ -443,7 +442,7 @@ bool file_find_subpath(files_struct *dir_fsp)
}
 
TALLOC_FREE(d_fullname);
-   return ret;
+   return false;
 }
 
 /


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated

2009-10-07 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  d294fd3... Exteded RAW-RENAME test to catch regressions in bug 
6781. Jeremy.
  from  879c3b8... Oops. Don't break the build.. Jeremy.

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


- Log -
commit d294fd3a0c152e5bde491d39219c54c113db9afe
Author: Jeremy Allison j...@samba.org
Date:   Wed Oct 7 16:52:29 2009 -0700

Exteded RAW-RENAME test to catch regressions in bug 6781.
Jeremy.

---

Summary of changes:
 source4/torture/raw/rename.c |   44 ++---
 1 files changed, 40 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/raw/rename.c b/source4/torture/raw/rename.c
index 15fed0e..5402fed 100644
--- a/source4/torture/raw/rename.c
+++ b/source4/torture/raw/rename.c
@@ -528,8 +528,9 @@ static bool test_dir_rename(struct torture_context *tctx, 
struct smbcli_state *c
NTSTATUS status;
 const char *dname1 = BASEDIR \\dir_for_rename;
 const char *dname2 = BASEDIR \\renamed_dir;
+const char *dname1_long = BASEDIR \\dir_for_rename_long;
 const char *fname = BASEDIR \\dir_for_rename\\file.txt;
-   const char *sname = BASEDIR \\dir_for_rename:a stream:$DATA;
+   const char *sname = BASEDIR \\renamed_dir:a stream:$DATA;
bool ret = true;
int fnum = -1;
 
@@ -542,8 +543,10 @@ static bool test_dir_rename(struct torture_context *tctx, 
struct smbcli_state *c
 /* create a directory */
 smbcli_rmdir(cli-tree, dname1);
 smbcli_rmdir(cli-tree, dname2);
+smbcli_rmdir(cli-tree, dname1_long);
 smbcli_unlink(cli-tree, dname1);
 smbcli_unlink(cli-tree, dname2);
+smbcli_unlink(cli-tree, dname1_long);
 
 ZERO_STRUCT(io);
 io.generic.level = RAW_OPEN_NTCREATEX;
@@ -561,6 +564,14 @@ static bool test_dir_rename(struct torture_context *tctx, 
struct smbcli_state *c
 fnum = io.ntcreatex.out.file.fnum;
smbcli_close(cli-tree, fnum);
 
+/* create the longname directory */
+io.ntcreatex.in.fname = dname1_long;
+status = smb_raw_open(cli-tree, tctx, io);
+CHECK_STATUS(status, NT_STATUS_OK);
+
+fnum = io.ntcreatex.out.file.fnum;
+   smbcli_close(cli-tree, fnum);
+
 /* Now create and hold open a file. */
 ZERO_STRUCT(io);
 
@@ -625,6 +636,31 @@ static bool test_dir_rename(struct torture_context *tctx, 
struct smbcli_state *c
/* close our handle to the directory. */
smbcli_close(cli-tree, fnum);
 
+   /* Open a handle on the long name, and then
+* try a rename. This would catch a regression
+* in bug #6781.
+*/
+   io.ntcreatex.in.fname = dname1_long;
+   io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN_IF;
+
+   io.ntcreatex.in.access_mask = SEC_STD_READ_CONTROL |
+   SEC_FILE_READ_ATTRIBUTE | SEC_FILE_READ_EA | SEC_FILE_READ_DATA;
+
+   status = smb_raw_open(cli-tree, tctx, io);
+CHECK_STATUS(status, NT_STATUS_OK);
+fnum = io.ntcreatex.out.file.fnum;
+
+   ren_io.generic.level = RAW_RENAME_RENAME;
+   ren_io.rename.in.pattern1 = dname1;
+   ren_io.rename.in.pattern2 = dname2;
+   ren_io.rename.in.attrib = 0;
+
+   status = smb_raw_rename(cli-tree, ren_io);
+   CHECK_STATUS(status, NT_STATUS_OK);
+
+   /* close our handle to the longname directory. */
+   smbcli_close(cli-tree, fnum);
+
/*
 * Now try opening a stream on the directory and holding it open
 * across a rename.  This should be allowed.
@@ -636,15 +672,15 @@ static bool test_dir_rename(struct torture_context *tctx, 
struct smbcli_state *c
 fnum = io.ntcreatex.out.file.fnum;
 
ren_io.generic.level = RAW_RENAME_RENAME;
-   ren_io.rename.in.pattern1 = dname1;
-   ren_io.rename.in.pattern2 = dname2;
+   ren_io.rename.in.pattern1 = dname2;
+   ren_io.rename.in.pattern2 = dname1;
ren_io.rename.in.attrib = 0;
 
status = smb_raw_rename(cli-tree, ren_io);
CHECK_STATUS(status, NT_STATUS_OK);
 
 done:
-   
+
if (fnum != -1) {
smbcli_close(cli-tree, fnum);
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-951-g2a9accd

2009-10-06 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  2a9accd85e992798ee36cb1ea74ed06f5379be3d (commit)
   via  d76c914adc17e4374c9e21b6733514fd7ad9bdac (commit)
  from  2fa98946d9eb3d0b6973dfaeadc55c8112ec30e1 (commit)

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


- Log -
commit 2a9accd85e992798ee36cb1ea74ed06f5379be3d
Author: Günther Deschner g...@samba.org
Date:   Mon Oct 5 17:05:38 2009 +0200

s3-winbindd: make sure to reset connections when machine account password 
change chain was broken.

Guenther
(cherry picked from commit c344bf0184be484fff8bb5ed93b5c2ca6de58611)

commit d76c914adc17e4374c9e21b6733514fd7ad9bdac
Author: Günther Deschner g...@samba.org
Date:   Mon Oct 5 17:04:52 2009 +0200

s3-netlogon: setup NETLOGON credential chain in 
rpccli_netlogon_set_trust_password() only when needed.

Guenther
(cherry picked from commit 0c2fc9eedf241746067d1625f643c894bfa11394)

---

Summary of changes:
 source3/rpc_client/cli_netlogon.c |   27 ++-
 source3/winbindd/winbindd_dual.c  |8 
 2 files changed, 22 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_client/cli_netlogon.c 
b/source3/rpc_client/cli_netlogon.c
index 911a50f..6caffd7 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -518,19 +518,20 @@ NTSTATUS rpccli_netlogon_set_trust_password(struct 
rpc_pipe_client *cli,
uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS;
struct netr_Authenticator clnt_creds, srv_cred;
 
-   result = rpccli_netlogon_setup_creds(cli,
-cli-desthost, /* server name */
-lp_workgroup(), /* domain */
-global_myname(), /* client name */
-global_myname(), /* machine 
account name */
-orig_trust_passwd_hash,
-sec_channel_type,
-neg_flags);
-
-   if (!NT_STATUS_IS_OK(result)) {
-   DEBUG(3,(rpccli_netlogon_set_trust_password: unable to setup 
creds (%s)!\n,
-nt_errstr(result)));
-   return result;
+   if (!cli-dc) {
+   result = rpccli_netlogon_setup_creds(cli,
+cli-desthost, /* server 
name */
+lp_workgroup(), /* domain 
*/
+global_myname(), /* client 
name */
+global_myname(), /* 
machine account name */
+orig_trust_passwd_hash,
+sec_channel_type,
+neg_flags);
+   if (!NT_STATUS_IS_OK(result)) {
+   DEBUG(3,(rpccli_netlogon_set_trust_password: unable to 
setup creds (%s)!\n,
+nt_errstr(result)));
+   return result;
+   }
}
 
netlogon_creds_client_authenticator(cli-dc, clnt_creds);
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index edf784c..a832451 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -1100,6 +1100,14 @@ static void machine_password_change_handler(struct 
event_context *ctx,
DEBUG(10,(machine_password_change_handler: 
failed to change machine password: %s\n,
 nt_errstr(result)));
+   if (NT_STATUS_EQUAL(result, NT_STATUS_ACCESS_DENIED) ) {
+   DEBUG(3,(machine_password_change_handler: password set 
returned 
+   ACCESS_DENIED.  Maybe the trust account 
+   password was changed and we didn't know it. 
+   Killing connections to domain %s\n,
+   child-domain-name));
+   invalidate_cm_connection(child-domain-conn);
+   }
} else {
DEBUG(10,(machine_password_change_handler: 
successfully changed machine password\n));


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-952-g763c95c

2009-10-06 Thread Volker Lendecke
The branch, v3-5-test has been updated
   via  763c95c145b6313a1460a7e45685a7f966e8bd4d (commit)
  from  2a9accd85e992798ee36cb1ea74ed06f5379be3d (commit)

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


- Log -
commit 763c95c145b6313a1460a7e45685a7f966e8bd4d
Author: Abhidnya P Chirmule achir...@in.ibm.com
Date:   Tue Oct 6 17:14:56 2009 +0200

s3: Add access_mask to the flock VFS call

---

Summary of changes:
 source3/include/proto.h  |2 +-
 source3/include/vfs.h|6 --
 source3/include/vfs_macros.h |8 
 source3/lib/system.c |2 +-
 source3/modules/onefs_open.c |2 +-
 source3/modules/vfs_default.c|4 ++--
 source3/modules/vfs_full_audit.c |4 ++--
 source3/modules/vfs_gpfs.c   |6 +++---
 source3/smbd/open.c  |2 +-
 source3/smbd/vfs.c   |6 --
 10 files changed, 23 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index c8e4fe1..d31483a 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -937,7 +937,7 @@ SMB_OFF_T sys_ftell(FILE *fp);
 int sys_creat(const char *path, mode_t mode);
 int sys_open(const char *path, int oflag, mode_t mode);
 FILE *sys_fopen(const char *path, const char *type);
-void kernel_flock(int fd, uint32 share_mode);
+void kernel_flock(int fd, uint32 share_mode, uint32 access_mask);
 SMB_STRUCT_DIR *sys_opendir(const char *name);
 SMB_STRUCT_DIRENT *sys_readdir(SMB_STRUCT_DIR *dirp);
 void sys_seekdir(SMB_STRUCT_DIR *dirp, long offset);
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index ed49d1f..f9c1f0a 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -247,7 +247,8 @@ struct vfs_fn_pointers {
  struct smb_file_time *ft);
int (*ftruncate)(struct vfs_handle_struct *handle, struct files_struct 
*fsp, SMB_OFF_T offset);
bool (*lock)(struct vfs_handle_struct *handle, struct files_struct 
*fsp, int op, SMB_OFF_T offset, SMB_OFF_T count, int type);
-   int (*kernel_flock)(struct vfs_handle_struct *handle, struct 
files_struct *fsp, uint32 share_mode);
+   int (*kernel_flock)(struct vfs_handle_struct *handle, struct 
files_struct *fsp,
+   uint32 share_mode, uint32_t access_mask);
int (*linux_setlease)(struct vfs_handle_struct *handle, struct 
files_struct *fsp, int leasetype);
bool (*getlock)(struct vfs_handle_struct *handle, struct files_struct 
*fsp, SMB_OFF_T *poffset, SMB_OFF_T *pcount, int *ptype, pid_t *ppid);
int (*symlink)(struct vfs_handle_struct *handle, const char *oldpath, 
const char *newpath);
@@ -598,7 +599,8 @@ bool smb_vfs_call_lock(struct vfs_handle_struct *handle,
   struct files_struct *fsp, int op, SMB_OFF_T offset,
   SMB_OFF_T count, int type);
 int smb_vfs_call_kernel_flock(struct vfs_handle_struct *handle,
- struct files_struct *fsp, uint32 share_mode);
+ struct files_struct *fsp, uint32 share_mode,
+ uint32_t access_mask);
 int smb_vfs_call_linux_setlease(struct vfs_handle_struct *handle,
struct files_struct *fsp, int leasetype);
 bool smb_vfs_call_getlock(struct vfs_handle_struct *handle,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 8ca7f37..7206bf4 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -250,10 +250,10 @@
 #define SMB_VFS_NEXT_LOCK(handle, fsp, op, offset, count, type) \
smb_vfs_call_lock((handle)-next, (fsp), (op), (offset), (count), 
(type))
 
-#define SMB_VFS_KERNEL_FLOCK(fsp, share_mode) \
-   smb_vfs_call_kernel_flock((fsp)-conn-vfs_handles, (fsp), (share_mode))
-#define SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, share_mode) \
-   smb_vfs_call_kernel_flock((handle)-next, (fsp), (share_mode))
+#define SMB_VFS_KERNEL_FLOCK(fsp, share_mode, access_mask) \
+   smb_vfs_call_kernel_flock((fsp)-conn-vfs_handles, (fsp), 
(share_mode), (access_mask))
+#define SMB_VFS_NEXT_KERNEL_FLOCK(handle, fsp, share_mode, access_mask)
\
+   smb_vfs_call_kernel_flock((handle)-next, (fsp), (share_mode), 
(access_mask))
 
 #define SMB_VFS_LINUX_SETLEASE(fsp, leasetype) \
smb_vfs_call_linux_setlease((fsp)-conn-vfs_handles, (fsp), 
(leasetype))
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 2c6894f..f9cd4a2 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -702,7 +702,7 @@ FILE *sys_fopen(const char *path, const char *type)
  A flock() wrapper that will perform the kernel flock.
 /
 
-void kernel_flock(int fd, uint32 share_mode)
+void 

[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-953-g22d2628

2009-10-06 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  22d26287cf3f89c9294c285aff12736c47b85896 (commit)
  from  763c95c145b6313a1460a7e45685a7f966e8bd4d (commit)

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


- Log -
commit 22d26287cf3f89c9294c285aff12736c47b85896
Author: Jeremy Allison j...@samba.org
Date:   Tue Oct 6 17:18:15 2009 -0700

Test creating and deleting a bad symlink using the POSIX calls. Ensure
we don't regress on bug 6769.
Jeremy.

---

Summary of changes:
 source3/script/tests/test_smbclient_s3.sh |   42 +
 1 files changed, 42 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/test_smbclient_s3.sh 
b/source3/script/tests/test_smbclient_s3.sh
index f60c7d7..b0199a3 100755
--- a/source3/script/tests/test_smbclient_s3.sh
+++ b/source3/script/tests/test_smbclient_s3.sh
@@ -86,6 +86,44 @@ EOF
 fi
 }
 
+# Test creating a bad symlink and deleting it.
+test_bad_symlink()
+{
+prompt=posix_unlink deleted file /newname
+tmpfile=/tmp/smbclient.in.$$
+
+cat  $tmpfile EOF
+posix
+symlink badname newname
+posix_unlink newname
+quit
+EOF
+
+cmd='CLI_FORCE_INTERACTIVE=yes $SMBCLIENT $CONFIGURATION $@ 
-U$USERNAME%$PASSWORD //$SERVER/tmp -I $SERVER_IP $ADDARGS  $tmpfile 21'
+eval echo $cmd
+out=`eval $cmd`
+ret=$?
+rm -f $tmpfile
+
+if [ $ret != 0 ] ; then
+   echo $out
+   echo failed create then delete bad symlink
+   false
+   return
+fi
+
+echo $out | grep $prompt /dev/null 21
+
+if [ $? = 0 ] ; then
+   # got the correct prompt .. succeed
+   true
+else
+   echo failed create then delete bad symlink
+   false
+fi
+}
+
+
 testit smbclient -L $SERVER_IP $SMBCLIENT $CONFIGURATION -L $SERVER_IP -N -p 
139 || failed=`expr $failed + 1`
 testit smbclient -L $SERVER -I $SERVER_IP $SMBCLIENT $CONFIGURATION -L 
$SERVER -I $SERVER_IP -N -p 139 || failed=`expr $failed + 1`
 
@@ -105,4 +143,8 @@ testit interactive smbclient -l prompts on stdout \
test_interactive_prompt_stdout -l /tmp || \
 failed=`expr $failed + 1`
 
+testit creating a bad symlink and deleting it \
+   test_bad_symlink || \
+   failed=`expr $failed + 1`
+
 testok $0 $failed


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-948-gcb65590

2009-10-05 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  cb6559062909f365b32cd8e3986269e38701c78c (commit)
   via  fb0b85b59c4a7db846d66d6db816c2c4dee1b887 (commit)
   via  b5117b18fdcbbc64e583264085f08c76b587c43b (commit)
   via  804be72c085b3add97043149c78b767820d182f5 (commit)
   via  805d851a7d45fbcd74f9a85a8c33d111fd53e763 (commit)
   via  a272430e74f390c35ee525156753346115f7895f (commit)
  from  a86f80beefb11fdebc00b0442d7735d6e1081995 (commit)

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


- Log -
commit cb6559062909f365b32cd8e3986269e38701c78c
Author: Günther Deschner g...@samba.org
Date:   Mon Oct 5 13:01:53 2009 +0200

s3-net: print error when net rpc changetrustpw has failed.

Guenther
(cherry picked from commit 55b12d032c82b280bc0fda43bff8e5b05b934ecf)

commit fb0b85b59c4a7db846d66d6db816c2c4dee1b887
Author: Volker Lendecke v...@samba.org
Date:   Sun Oct 4 15:19:19 2009 +0200

s3: Remove a scary error message -- talloc_move can not fail :-)

Signed-off-by: Günther Deschner g...@samba.org
(cherry picked from commit 84de81b4786bed411199f2785a1eafc7c86db478)

commit b5117b18fdcbbc64e583264085f08c76b587c43b
Author: Volker Lendecke v...@samba.org
Date:   Sun Oct 4 15:13:44 2009 +0200

s3: Fix nonempty blank lines

Signed-off-by: Günther Deschner g...@samba.org
(cherry picked from commit d696f9a7ed0bb42c6d9de99ab07af27b00fe2d40)

commit 804be72c085b3add97043149c78b767820d182f5
Author: Günther Deschner g...@samba.org
Date:   Fri Oct 2 01:25:13 2009 +0200

lib/tdr: get rid of build warning when using TDR_ALLOC macro.

Guenther
(cherry picked from commit ab8a16c77f8222115493bbc295318a7d9ceb6d38)

commit 805d851a7d45fbcd74f9a85a8c33d111fd53e763
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 1 13:42:29 2009 +0200

s3: remove unused PRS_POINTER_CAST macro.

Guenther
(cherry picked from commit 926457ec9565c980c14a658b34291e41317d404b)

commit a272430e74f390c35ee525156753346115f7895f
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 1 12:52:46 2009 +0200

s3: remove unused SYSTEMTIME struct.

Guenther
(cherry picked from commit 2497f70257bd7b5523c65d342e68d8a1c85c41c2)

---

Summary of changes:
 lib/tdr/tdr.h |2 +-
 source3/include/rpc_misc.h|   20 
 source3/libsmb/trusts_util.c  |8 
 source3/rpc_client/cli_pipe.c |5 -
 source3/utils/net_rpc.c   |   10 +-
 5 files changed, 14 insertions(+), 31 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdr/tdr.h b/lib/tdr/tdr.h
index 1eedc58..84f3e50 100644
--- a/lib/tdr/tdr.h
+++ b/lib/tdr/tdr.h
@@ -55,7 +55,7 @@ struct tdr_print {
 } while (0)
 
 #define TDR_ALLOC(ctx, s, n) do { \
-  (s) = talloc_array_size(ctx, sizeof(*(s)), n); \
+  (s) = talloc_array_ptrtype(ctx, (s), n); \
if ((n)  !(s)) return NT_STATUS_NO_MEMORY; \
} while (0)
 
diff --git a/source3/include/rpc_misc.h b/source3/include/rpc_misc.h
index aff9b1c..58ea916 100644
--- a/source3/include/rpc_misc.h
+++ b/source3/include/rpc_misc.h
@@ -24,7 +24,6 @@
 #define _RPC_MISC_H 
 
 #define SMB_RPC_INTERFACE_VERSION 1
-#define PRS_POINTER_CAST bool (*)(const char*, prs_struct*, int, void*)
 
 
 /** 
@@ -104,23 +103,4 @@ typedef struct {   /* UNISTR - unicode string size 
and buffer */
   little-endian. ***MUST*** be null-terminated 
*/
 } UNISTR;
 
-/*
- * I'm really wondering how many different time formats
- * I will have to cope with
- *
- * JFM, 09/13/98 In a mad mood ;-(
-*/
-typedef struct systemtime
-{
-   uint16 year;
-   uint16 month;
-   uint16 dayofweek;
-   uint16 day;
-   uint16 hour;
-   uint16 minute;
-   uint16 second;
-   uint16 milliseconds;
-}
-SYSTEMTIME;
-
 #endif /* _RPC_MISC_H */
diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c
index 929816e..adf1525 100644
--- a/source3/libsmb/trusts_util.c
+++ b/source3/libsmb/trusts_util.c
@@ -35,7 +35,7 @@ NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client 
*cli, TALLOC_CTX *m
unsigned char new_trust_passwd_hash[16];
char *new_trust_passwd;
NTSTATUS nt_status;
-   
+
/* Create a random machine account password */
new_trust_passwd = generate_random_str(mem_ctx, 
DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
 
@@ -43,7 +43,7 @@ NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client 
*cli, TALLOC_CTX *m
DEBUG(0, (talloc_strdup failed\n));
return NT_STATUS_NO_MEMORY;
}
-   
+

[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-949-g2fa9894

2009-10-05 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  2fa98946d9eb3d0b6973dfaeadc55c8112ec30e1 (commit)
  from  cb6559062909f365b32cd8e3986269e38701c78c (commit)

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


- Log -
commit 2fa98946d9eb3d0b6973dfaeadc55c8112ec30e1
Author: Jeremy Allison j...@samba.org
Date:   Mon Oct 5 10:27:48 2009 -0700

Fix bug 6776 - Running overlapping Byte Lock test will core dump Samba 
daemon.
Re-write core of POSIX locking logic.
Jeremy.

---

Summary of changes:
 source3/locking/brlock.c |  367 +++---
 1 files changed, 219 insertions(+), 148 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/locking/brlock.c b/source3/locking/brlock.c
index 05d6c7f..18a7981 100644
--- a/source3/locking/brlock.c
+++ b/source3/locking/brlock.c
@@ -390,10 +390,9 @@ NTSTATUS brl_lock_windows_default(struct byte_range_lock 
*br_lck,
  Cope with POSIX range splits and merges.
 /
 
-static unsigned int brlock_posix_split_merge(struct lock_struct *lck_arr,  
/* Output array. */
-   const struct lock_struct *ex,   
/* existing lock. */
-   const struct lock_struct 
*plock,/* proposed lock. */
-   bool *lock_was_added)
+static unsigned int brlock_posix_split_merge(struct lock_struct *lck_arr,  
/* Output array. */
+   struct lock_struct *ex, 
/* existing lock. */
+   struct lock_struct *plock)  
/* proposed lock. */
 {
bool lock_types_differ = (ex-lock_type != plock-lock_type);
 
@@ -410,21 +409,23 @@ static unsigned int brlock_posix_split_merge(struct 
lock_struct *lck_arr, /* Ou
/* Did we overlap ? */
 
 /*
- +-+
- | ex  |
- +-+
-  +---+
-  | plock |
-  +---+
++-+
+| ex  |
++-+
+ +---+
+ | plock |
+ +---+
 OR
- +-+
- |  ex |
- +-+
++-+
+|  ex |
++-+
 **/
 
if ( (ex-start  (plock-start + plock-size)) ||
-   (plock-start  (ex-start + ex-size))) {
+   (plock-start  (ex-start + ex-size))) {
+
/* No overlap with this lock - copy existing. */
+
memcpy(lck_arr[0], ex, sizeof(struct lock_struct));
return 1;
}
@@ -436,26 +437,109 @@ OR
 +---+
 |   plock   | - replace with plock.
 +---+
+OR
+ +---+
+ |   ex  |
+ +---+
++---+
+|   plock   | - replace with plock.
++---+
+
 **/
 
if ( (ex-start = plock-start) 
-   (ex-start + ex-size = plock-start + plock-size) ) {
-   memcpy(lck_arr[0], plock, sizeof(struct lock_struct));
-   *lock_was_added = True;
-   return 1;
+   (ex-start + ex-size = plock-start + plock-size) ) {
+
+   /* Replace - discard existing lock. */
+
+   return 0;
}
 
 /*
+Adjacent after.
++---+
+|  ex   |
++---+
++---+
+|   plock   |
++---+
+
+BECOMES
++---+---+
+|   plock   | ex| - different lock types.
++---+---+
+OR (merge)
++---+
+|   plock   | - same lock type.
++---+
+**/
+
+   if (plock-start + plock-size == ex-start) {
+
+   /* If the lock types are the same, we merge, if different, we
+  add the remainder of the old lock. */
+
+   if (lock_types_differ) {
+   /* 

[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-929-g8b5fddf

2009-10-02 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  8b5fddf729d73fa2c0e4496fa5aa0d1093c70a05 (commit)
  from  f1470f7e46e2a33b40b9660f2c46996174d8c849 (commit)

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


- Log -
commit 8b5fddf729d73fa2c0e4496fa5aa0d1093c70a05
Author: Jeremy Allison j...@samba.org
Date:   Fri Oct 2 11:05:03 2009 -0700

Fix more use of VFS_STAT when posix pathnames selected.
Jeremy.

---

Summary of changes:
 source3/modules/nfs4_acls.c |2 +-
 source3/smbd/posix_acls.c   |   62 ++
 source3/smbd/vfs.c  |7 -
 3 files changed, 51 insertions(+), 20 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c
index cf96061..658f2b4 100644
--- a/source3/modules/nfs4_acls.c
+++ b/source3/modules/nfs4_acls.c
@@ -170,7 +170,7 @@ static int smbacl4_GetFileOwner(struct connection_struct 
*conn,
/* Get the stat struct for the owner info. */
if (vfs_stat_smb_fname(conn, filename, psbuf) != 0)
{
-   DEBUG(8, (SMB_VFS_STAT failed with error %s\n,
+   DEBUG(8, (vfs_stat_smb_fname failed with error %s\n,
strerror(errno)));
return -1;
}
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index b61421d..e289e51 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -3377,6 +3377,7 @@ NTSTATUS posix_get_nt_acl(struct connection_struct *conn, 
const char *name,
struct pai_val *pal;
struct smb_filename *smb_fname = NULL;
NTSTATUS status;
+   int ret;
 
*ppdesc = NULL;
 
@@ -3389,7 +3390,13 @@ NTSTATUS posix_get_nt_acl(struct connection_struct 
*conn, const char *name,
}
 
/* Get the stat struct for the owner info. */
-   if(SMB_VFS_STAT(conn, smb_fname) != 0) {
+   if (lp_posix_pathnames()) {
+   ret = SMB_VFS_LSTAT(conn, smb_fname);
+   } else {
+   ret = SMB_VFS_STAT(conn, smb_fname);
+   }
+
+   if (ret == -1) {
status = map_nt_error_from_unix(errno);
goto out;
}
@@ -3435,7 +3442,12 @@ int try_chown(connection_struct *conn, struct 
smb_filename *smb_fname,
 
/* Case (1). */
/* try the direct way first */
-   ret = SMB_VFS_CHOWN(conn, smb_fname-base_name, uid, gid);
+   if (lp_posix_pathnames()) {
+   ret = SMB_VFS_LCHOWN(conn, smb_fname-base_name, uid, gid);
+   } else {
+   ret = SMB_VFS_CHOWN(conn, smb_fname-base_name, uid, gid);
+   }
+
if (ret == 0)
return 0;
 
@@ -3454,8 +3466,13 @@ int try_chown(connection_struct *conn, struct 
smb_filename *smb_fname,
 
become_root();
/* Keep the current file gid the same - take ownership 
doesn't imply group change. */
-   ret = SMB_VFS_CHOWN(conn, smb_fname-base_name, uid,
-   (gid_t)-1);
+   if (lp_posix_pathnames()) {
+   ret = SMB_VFS_LCHOWN(conn, 
smb_fname-base_name, uid,
+   (gid_t)-1);
+   } else {
+   ret = SMB_VFS_CHOWN(conn, smb_fname-base_name, 
uid,
+   (gid_t)-1);
+   }
unbecome_root();
return ret;
}
@@ -3476,7 +3493,13 @@ int try_chown(connection_struct *conn, struct 
smb_filename *smb_fname,
return -1;
}
 
-   if (SMB_VFS_STAT(conn, smb_fname)) {
+   if (lp_posix_pathnames()) {
+   ret = SMB_VFS_STAT(conn, smb_fname);
+   } else {
+   ret = SMB_VFS_STAT(conn, smb_fname);
+   }
+
+   if (ret == -1) {
return -1;
}
 
@@ -3716,6 +3739,7 @@ NTSTATUS set_nt_acl(files_struct *fsp, uint32 
security_info_sent, const SEC_DESC
bool set_acl_as_root = false;
bool acl_set_support = false;
bool ret = false;
+   int sret;
 
DEBUG(10,(set_nt_acl: called for file %s\n,
  fsp_str_dbg(fsp)));
@@ -3730,7 +3754,12 @@ NTSTATUS set_nt_acl(files_struct *fsp, uint32 
security_info_sent, const SEC_DESC
 */
 
if(fsp-is_directory || fsp-fh-fd == -1) {
-   if(SMB_VFS_STAT(fsp-conn, fsp-fsp_name) != 0) {
+   if (fsp-posix_open) {
+   sret = SMB_VFS_LSTAT(fsp-conn, fsp-fsp_name);
+   } else {
+   sret = SMB_VFS_STAT(fsp-conn, fsp-fsp_name);
+   }
+   if (sret == -1) {
return map_nt_error_from_unix(errno);

[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-930-g00738a2

2009-10-02 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  00738a2c92ab9e8d35976b49f1809e88f77d1e9d (commit)
  from  8b5fddf729d73fa2c0e4496fa5aa0d1093c70a05 (commit)

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


- Log -
commit 00738a2c92ab9e8d35976b49f1809e88f77d1e9d
Author: Jeremy Allison j...@samba.org
Date:   Fri Oct 2 11:07:17 2009 -0700

Missed one VFS_STAT - VFS_LSTAT
Jeremy.

---

Summary of changes:
 source3/smbd/posix_acls.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index e289e51..6b5a9af 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -3494,7 +3494,7 @@ int try_chown(connection_struct *conn, struct 
smb_filename *smb_fname,
}
 
if (lp_posix_pathnames()) {
-   ret = SMB_VFS_STAT(conn, smb_fname);
+   ret = SMB_VFS_LSTAT(conn, smb_fname);
} else {
ret = SMB_VFS_STAT(conn, smb_fname);
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-931-gda45a3c

2009-10-02 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  da45a3ca779d3441265837167b021ea4920edb01 (commit)
  from  00738a2c92ab9e8d35976b49f1809e88f77d1e9d (commit)

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


- Log -
commit da45a3ca779d3441265837167b021ea4920edb01
Author: Jeremy Allison j...@samba.org
Date:   Fri Oct 2 13:45:38 2009 -0700

Remove lots of duplicate code and move it into one
function vfs_stat_fsp(). Stops code looking at fsp-posix_open
except for exceptional circumstances.
Jeremy.

---

Summary of changes:
 source3/include/proto.h  |1 +
 source3/modules/vfs_acl_common.c |   30 ++
 source3/modules/vfs_acl_tdb.c|   50 ---
 source3/smbd/close.c |   29 +++--
 source3/smbd/posix_acls.c|   32 +++
 source3/smbd/reply.c |   81 ++
 source3/smbd/vfs.c   |   25 
 7 files changed, 91 insertions(+), 157 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index c9f57b4..c8e4fe1 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -7116,6 +7116,7 @@ int vfs_stat_smb_fname(struct connection_struct *conn, 
const char *fname,
   SMB_STRUCT_STAT *psbuf);
 int vfs_lstat_smb_fname(struct connection_struct *conn, const char *fname,
SMB_STRUCT_STAT *psbuf);
+NTSTATUS vfs_stat_fsp(files_struct *fsp);
 
 /* The following definitions come from torture/denytest.c  */
 
diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 5fdd2b4..39fd2ad 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -380,21 +380,26 @@ static NTSTATUS inherit_new_acl(vfs_handle_struct *handle,
}
 
if (!psd || psd-dacl == NULL) {
-   int ret;
 
TALLOC_FREE(psd);
-   if (fsp  !fsp-is_directory  fsp-fh-fd != -1) {
-   ret = SMB_VFS_FSTAT(fsp, smb_fname-st);
+   if (fsp) {
+   status = vfs_stat_fsp(fsp);
+   smb_fname-st = fsp-fsp_name-st;
} else {
-   if (fsp  fsp-posix_open) {
+   int ret;
+   if (lp_posix_pathnames()) {
ret = SMB_VFS_LSTAT(handle-conn, smb_fname);
} else {
ret = SMB_VFS_STAT(handle-conn, smb_fname);
}
+   if (ret == -1) {
+   status = map_nt_error_from_unix(errno);
+   }
}
-   if (ret == -1) {
-   return map_nt_error_from_unix(errno);
+   if (!NT_STATUS_IS_OK(status)) {
+   return status;
}
+
psd = default_file_sd(ctx, smb_fname-st);
if (!psd) {
return NT_STATUS_NO_MEMORY;
@@ -580,23 +585,14 @@ static NTSTATUS fset_nt_acl_common(vfs_handle_struct 
*handle, files_struct *fsp,
 
/* Ensure owner and group are set. */
if (!psd-owner_sid || !psd-group_sid) {
-   int ret;
DOM_SID owner_sid, group_sid;
struct security_descriptor *nc_psd = dup_sec_desc(talloc_tos(), 
psd);
 
if (!nc_psd) {
return NT_STATUS_OK;
}
-   if (fsp-is_directory || fsp-fh-fd == -1) {
-   if (fsp-posix_open) {
-   ret = SMB_VFS_LSTAT(fsp-conn, fsp-fsp_name);
-   } else {
-   ret = SMB_VFS_STAT(fsp-conn, fsp-fsp_name);
-   }
-   } else {
-   ret = SMB_VFS_FSTAT(fsp, fsp-fsp_name-st);
-   }
-   if (ret == -1) {
+   status = vfs_stat_fsp(fsp);
+   if (!NT_STATUS_IS_OK(status)) {
/* Lower level acl set succeeded,
 * so still return OK. */
return NT_STATUS_OK;
diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index 285c58e..424ecbf 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -147,24 +147,26 @@ static NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
TDB_DATA data;
struct file_id id;
struct db_context *db;
-   int ret = -1;
+   NTSTATUS status;
SMB_STRUCT_STAT sbuf;
 
SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context,
return NT_STATUS_INTERNAL_DB_CORRUPTION);
 
-   if (fsp  fsp-fh-fd != -1) {
-   ret = 

[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-942-ga86f80b

2009-10-02 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  a86f80beefb11fdebc00b0442d7735d6e1081995 (commit)
   via  fdd52658643ca27b07302eba423d22c12c6df8fd (commit)
   via  2fbb07239af249a3adc0435248c4a8702e35f8a1 (commit)
   via  0d4a5b63f0c96df6db46032f4280a707273438de (commit)
   via  d0dca4a3075e87f10a557167d680781b85af237d (commit)
   via  f60f3c9dec1dd413399755b0d5cb0dda3d0a5467 (commit)
   via  c87c5fa7c9c3405c2c717697ae14056bc9450988 (commit)
   via  9bcb2f1ad1665673cece0450ca9937898e17585a (commit)
   via  4e344314fdffe6211f5056451f38d218a2dafb85 (commit)
   via  aaced534fb00445e4efa70392b6c0b22ab59b3cc (commit)
   via  06aba9680f84364da10489d174105ef4c4796450 (commit)
  from  da45a3ca779d3441265837167b021ea4920edb01 (commit)

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


- Log -
commit a86f80beefb11fdebc00b0442d7735d6e1081995
Author: Björn Jacke b...@sernet.de
Date:   Sat Oct 3 00:19:30 2009 +0200

s3:Makefile: minor clean up

commit fdd52658643ca27b07302eba423d22c12c6df8fd
Author: Björn Jacke b...@sernet.de
Date:   Sat Oct 3 00:15:19 2009 +0200

s3:Makefile: fix libnetapi dependencies with static build

analogical to previous libtalloc fix

commit 2fbb07239af249a3adc0435248c4a8702e35f8a1
Author: Björn Jacke b...@sernet.de
Date:   Fri Oct 2 23:08:11 2009 +0200

s3:Makefile: eventlogadm dependency cleanup

no need to link against popt lib

commit 0d4a5b63f0c96df6db46032f4280a707273438de
Author: Björn Jacke b...@sernet.de
Date:   Fri Oct 2 23:05:27 2009 +0200

s3:Makefile: fix libwbclient dependencies with static build

analogical to previous libtalloc fix

commit d0dca4a3075e87f10a557167d680781b85af237d
Author: Björn Jacke b...@sernet.de
Date:   Fri Oct 2 23:01:18 2009 +0200

s3:Makefile: fix libtdb dependencies with static build

analogical to previous libtalloc fix

commit f60f3c9dec1dd413399755b0d5cb0dda3d0a5467
Author: Björn Jacke b...@sernet.de
Date:   Fri Oct 2 22:43:14 2009 +0200

s3:Makefile: fix talloc dependencies with static build (2nd try)

When configure options --with-libtalloc=no --enable-shared-libs=no are used,
LIBTALLOC_TARGET stays empty. Actually LIBTALLOC_TARGET which is only used 
for
Makefile dependencies is obsolete as LIBTALLOC contains exactly the targets
that we depend on, libtalloc finally is the target to depend on.

commit c87c5fa7c9c3405c2c717697ae14056bc9450988
Author: Björn Jacke b...@sernet.de
Date:   Fri Oct 2 22:00:50 2009 +0200

Revert s3:Makefile: fix talloc dependencies with static build

This reverts commit 2af2334522bc3d2c44bdcf7c9f1e80d2bcbf2024.

a more correct way to fix the libtalloc dependencies follows

commit 9bcb2f1ad1665673cece0450ca9937898e17585a
Author: Björn Jacke b...@sernet.de
Date:   Fri Oct 2 02:18:50 2009 +0200

s3:Makefile: libsmbsharemode dependency cleanup

no need to link against ldap and krb5 libs

commit 4e344314fdffe6211f5056451f38d218a2dafb85
Author: Björn Jacke b...@sernet.de
Date:   Fri Oct 2 02:28:56 2009 +0200

s3:Makefile: net utility dependency cleanup

no need to link against iniparser lib

commit aaced534fb00445e4efa70392b6c0b22ab59b3cc
Author: Björn Jacke b...@sernet.de
Date:   Fri Oct 2 19:53:53 2009 +0200

s3:configure: use --aѕ-needed linker option when supported

Based on a patch from Andreas Schneider but modified that --aѕ-needed is 
also
used when own libs are not build shared (--enable-shared). Also change 
order of
options so that user supplied LDFLAGS are put *after* the automatic 
--aѕ-needed
flag. This way it's pollible to force not use as-needed by setting LDFLAGS
environment variable to -Wl,--no-as-needed.

commit 06aba9680f84364da10489d174105ef4c4796450
Author: Björn Jacke b...@sernet.de
Date:   Fri Oct 2 17:55:50 2009 +0200

s3:doc: add some detail about lanman auth parameter

add interesting detail: lm passwords will be removed from databaѕe with
lanman auth = no

---

Summary of changes:
 docs-xml/smbdotconf/security/lanmanauth.xml |7 ++
 source3/Makefile.in |  142 +--
 source3/configure.in|   20 +++-
 3 files changed, 92 insertions(+), 77 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/smbdotconf/security/lanmanauth.xml 
b/docs-xml/smbdotconf/security/lanmanauth.xml
index 4e68c5e..e055bd3 100644
--- a/docs-xml/smbdotconf/security/lanmanauth.xml
+++ b/docs-xml/smbdotconf/security/lanmanauth.xml
@@ -16,6 +16,13 @@
 case-insensitive nature, and the choice of algorithm.  Servers
 without Windows 95/98/ME or MS DOS clients are advised to disable
 this option.  /para
+
+paraWhen this parameter is set to valueno/value this
+will also 

[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-903-g54de6ac

2009-10-01 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  54de6ac85eb81aecc8b44a500f374edb95bf6a3d (commit)
   via  0293057abd8cdfc7c690cf5c8dd20b8a626d52ca (commit)
  from  5b0b93991f256d1cd5c681c60075c4b17a0bc3c9 (commit)

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


- Log -
commit 54de6ac85eb81aecc8b44a500f374edb95bf6a3d
Author: Jeff Layton jlay...@redhat.com
Date:   Fri Sep 25 07:07:40 2009 -0400

mount.cifs: don't leak passwords with verbose option

When running mount.cifs with the --verbose option, it'll print out the
option string that it passes to the kernel...including the mount
password if there is one. Print a placeholder string instead to help
ensure that this info can't be used for nefarious purposes.

Also, the --verbose option printed the option string before it was
completely assembled anyway. This patch should also make sure that
the complete option string is printed out.

Finally, strndup passwords passed in on the command line to ensure that
they aren't shown by --verbose as well. Passwords used this way can
never be truly kept private from other users on the machine of course,
but it's simple enough to do it this way for completeness sake.

Reported-by: Ronald Volgers r.c.volg...@student.utwente.nl
Signed-off-by: Jeff Layton jlay...@redhat.com
Acked-by: Steve French sfre...@us.ibm.com

commit 0293057abd8cdfc7c690cf5c8dd20b8a626d52ca
Author: Jeff Layton jlay...@redhat.com
Date:   Fri Sep 25 06:45:10 2009 -0400

mount.cifs: check access of credential files before opening

It's possible for an unprivileged user to pass a setuid mount.cifs a
credential or password file to which he does not have access. This can cause
mount.cifs to open the file on his behalf and possibly leak the info in the
first few lines of the file.

Check the access permissions of the file before opening it.

Reported-by: Ronald Volgers r.c.volg...@student.utwente.nl
Signed-off-by: Jeff Layton jlay...@redhat.com
Acked-by: Steve French sfre...@us.ibm.com

---

Summary of changes:
 client/mount.cifs.c |   57 --
 1 files changed, 41 insertions(+), 16 deletions(-)


Changeset truncated at 500 lines:

diff --git a/client/mount.cifs.c b/client/mount.cifs.c
index 1c04e13..3baaad7 100644
--- a/client/mount.cifs.c
+++ b/client/mount.cifs.c
@@ -320,6 +320,11 @@ static int open_cred_file(char * file_name)
char * temp_val;
FILE * fs;
int i, length;
+
+   i = access(file_name, R_OK);
+   if (i)
+   return i;
+
fs = fopen(file_name,r);
if(fs == NULL)
return errno;
@@ -442,6 +447,12 @@ static int get_password_from_file(int file_descript, char 
* filename)
}
 
if(filename != NULL) {
+   rc = access(filename, R_OK);
+   if (rc) {
+   fprintf(stderr, mount.cifs failed: access check of %s 
failed: %s\n,
+   filename, strerror(errno));
+   exit(EX_SYSERR);
+   }
file_descript = open(filename, O_RDONLY);
if(file_descript  0) {
fprintf(stderr, mount.cifs failed. %s attempting to 
open password file %s\n,
@@ -501,9 +512,6 @@ static int parse_options(char ** optionsp, unsigned long * 
filesys_flags)
return 1;
data = *optionsp;
 
-   if(verboseflag)
-   fprintf(stderr, parsing options: %s\n, data);
-
/* BB fixme check for separator override BB */
 
if (getuid()) {
@@ -594,14 +602,23 @@ static int parse_options(char ** optionsp, unsigned long 
* filesys_flags)
} else
got_password = 1;
} else if (strnlen(value, MOUNT_PASSWD_SIZE)  
MOUNT_PASSWD_SIZE) {
-   if(got_password)
+   if (got_password) {
fprintf(stderr, \nmount.cifs warning - 
password specified twice\n);
-   got_password = 1;
+   } else {
+   mountpassword = strndup(value, 
MOUNT_PASSWD_SIZE);
+   if (!mountpassword) {
+   fprintf(stderr, mount.cifs 
error: %s, strerror(ENOMEM));
+   SAFE_FREE(out);
+   return 1;
+   }
+   got_password = 1;
+   }
} else {

[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-904-g0b3d471

2009-10-01 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  0b3d471a289ef79a41704c0a0c8bdc479ac3d7f0 (commit)
  from  54de6ac85eb81aecc8b44a500f374edb95bf6a3d (commit)

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


- Log -
commit 0b3d471a289ef79a41704c0a0c8bdc479ac3d7f0
Author: Jeremy Allison j...@samba.org
Date:   Thu Oct 1 14:32:36 2009 +0200

Fix for CVE-2009-2906.

Summary:
Specially crafted SMB requests on
authenticated SMB connections can send smbd
into a 100% CPU loop, causing a DoS on the
Samba server.
(cherry picked from commit 8a6b90d401e3c8d4d04ade36020bfc5c31c9603e)

---

Summary of changes:
 source3/include/smb.h  |1 +
 source3/smbd/process.c |   30 +-
 2 files changed, 26 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/smb.h b/source3/include/smb.h
index 3c3ced6..cee95a9 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -727,6 +727,7 @@ struct pending_message_list {
struct smb_perfcount_data pcd;
uint32_t seqnum;
bool encrypted;
+   bool processed;
DATA_BLOB buf;
DATA_BLOB private_data;
 };
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index ccb7f9d..fbaa9de 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -417,6 +417,7 @@ static void smbd_deferred_open_timer(struct event_context 
*ev,
struct pending_message_list *msg = talloc_get_type(private_data,
   struct pending_message_list);
TALLOC_CTX *mem_ctx = talloc_tos();
+   uint16_t mid = SVAL(msg-buf.data,smb_mid);
uint8_t *inbuf;
 
inbuf = (uint8_t *)talloc_memdup(mem_ctx, msg-buf.data,
@@ -429,11 +430,21 @@ static void smbd_deferred_open_timer(struct event_context 
*ev,
/* We leave this message on the queue so the open code can
   know this is a retry. */
DEBUG(5,(smbd_deferred_open_timer: trigger mid %u.\n,
-   (unsigned int)SVAL(msg-buf.data,smb_mid)));
+   (unsigned int)mid ));
+
+   /* Mark the message as processed so this is not
+* re-processed in error. */
+   msg-processed = true;
 
process_smb(smbd_server_conn, inbuf,
msg-buf.length, 0,
msg-seqnum, msg-encrypted, msg-pcd);
+
+   /* If it's still there and was processed, remove it. */
+   msg = get_open_deferred_message(mid);
+   if (msg  msg-processed) {
+   remove_deferred_open_smb_message(mid);
+   }
 }
 
 /
@@ -466,6 +477,7 @@ static bool push_queued_message(struct smb_request *req,
msg-request_time = request_time;
msg-seqnum = req-seqnum;
msg-encrypted = req-encrypted;
+   msg-processed = false;
SMB_PERFCOUNT_DEFER_OP(req-pcd, msg-pcd);
 
if (private_data) {
@@ -507,7 +519,7 @@ void remove_deferred_open_smb_message(uint16 mid)
 
for (pml = deferred_open_queue; pml; pml = pml-next) {
if (mid == SVAL(pml-buf.data,smb_mid)) {
-   DEBUG(10,(remove_sharing_violation_open_smb_message: 
+   DEBUG(10,(remove_deferred_open_smb_message: 
  deleting mid %u len %u\n,
  (unsigned int)mid,
  (unsigned int)pml-buf.length ));
@@ -537,6 +549,15 @@ void schedule_deferred_open_smb_message(uint16 mid)
if (mid == msg_mid) {
struct timed_event *te;
 
+   if (pml-processed) {
+   /* A processed message should not be
+* rescheduled. */
+   DEBUG(0,(schedule_deferred_open_smb_message: 
LOGIC ERROR 
+   message mid %u was already 
processed\n,
+   msg_mid ));
+   continue;
+   }
+
DEBUG(10,(schedule_deferred_open_smb_message: 
scheduling mid %u\n,
mid ));
 
@@ -563,7 +584,7 @@ void schedule_deferred_open_smb_message(uint16 mid)
 }
 
 /
- Return true if this mid is on the deferred queue.
+ Return true if this mid is on the deferred queue and was not yet processed.
 /
 
 bool open_was_deferred(uint16 mid)
@@ -571,7 +592,7 @@ bool open_was_deferred(uint16 mid)
struct pending_message_list *pml;
 
for (pml = deferred_open_queue; pml; pml = pml-next) {
-   if (SVAL(pml-buf.data,smb_mid) 

[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-905-g2d4ffe2

2009-10-01 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  2d4ffe2a8cb7e0db9733a0e58b1c34e82fd40faf (commit)
  from  0b3d471a289ef79a41704c0a0c8bdc479ac3d7f0 (commit)

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


- Log -
commit 2d4ffe2a8cb7e0db9733a0e58b1c34e82fd40faf
Author: Karolin Seeger ksee...@samba.org
Date:   Thu Oct 1 14:53:55 2009 +0200

s3/docs: Set correct version number for manpages.

Karolin

---

Summary of changes:
 docs-xml/manpages-3/cifs.upcall.8.xml  |2 +-
 docs-xml/manpages-3/eventlogadm.8.xml  |2 +-
 docs-xml/manpages-3/findsmb.1.xml  |2 +-
 docs-xml/manpages-3/idmap_ad.8.xml |2 +-
 docs-xml/manpages-3/idmap_adex.8.xml   |2 +-
 docs-xml/manpages-3/idmap_hash.8.xml   |2 +-
 docs-xml/manpages-3/idmap_ldap.8.xml   |2 +-
 docs-xml/manpages-3/idmap_nss.8.xml|2 +-
 docs-xml/manpages-3/idmap_rid.8.xml|2 +-
 docs-xml/manpages-3/idmap_tdb.8.xml|2 +-
 docs-xml/manpages-3/idmap_tdb2.8.xml   |2 +-
 docs-xml/manpages-3/ldb.3.xml  |2 +-
 docs-xml/manpages-3/ldbadd.1.xml   |2 +-
 docs-xml/manpages-3/ldbdel.1.xml   |2 +-
 docs-xml/manpages-3/ldbedit.1.xml  |2 +-
 docs-xml/manpages-3/ldbmodify.1.xml|2 +-
 docs-xml/manpages-3/ldbsearch.1.xml|2 +-
 docs-xml/manpages-3/libsmbclient.7.xml |2 +-
 docs-xml/manpages-3/lmhosts.5.xml  |2 +-
 docs-xml/manpages-3/log2pcap.1.xml |2 +-
 docs-xml/manpages-3/mount.cifs.8.xml   |2 +-
 docs-xml/manpages-3/net.8.xml  |2 +-
 docs-xml/manpages-3/nmbd.8.xml |2 +-
 docs-xml/manpages-3/nmblookup.1.xml|2 +-
 docs-xml/manpages-3/ntlm_auth.1.xml|2 +-
 docs-xml/manpages-3/pam_winbind.8.xml  |2 +-
 docs-xml/manpages-3/pdbedit.8.xml  |2 +-
 docs-xml/manpages-3/profiles.1.xml |2 +-
 docs-xml/manpages-3/rpcclient.1.xml|2 +-
 docs-xml/manpages-3/samba.7.xml|2 +-
 docs-xml/manpages-3/sharesec.1.xml |2 +-
 docs-xml/manpages-3/smb.conf.5.xml |2 +-
 docs-xml/manpages-3/smbcacls.1.xml |2 +-
 docs-xml/manpages-3/smbclient.1.xml|2 +-
 docs-xml/manpages-3/smbcontrol.1.xml   |2 +-
 docs-xml/manpages-3/smbcquotas.1.xml   |2 +-
 docs-xml/manpages-3/smbd.8.xml |2 +-
 docs-xml/manpages-3/smbget.1.xml   |2 +-
 docs-xml/manpages-3/smbgetrc.5.xml |2 +-
 docs-xml/manpages-3/smbpasswd.5.xml|2 +-
 docs-xml/manpages-3/smbpasswd.8.xml|2 +-
 docs-xml/manpages-3/smbspool.8.xml |2 +-
 docs-xml/manpages-3/smbstatus.1.xml|2 +-
 docs-xml/manpages-3/smbtar.1.xml   |2 +-
 docs-xml/manpages-3/smbtree.1.xml  |2 +-
 docs-xml/manpages-3/swat.8.xml |2 +-
 docs-xml/manpages-3/tdbbackup.8.xml|2 +-
 docs-xml/manpages-3/tdbdump.8.xml  |2 +-
 docs-xml/manpages-3/tdbtool.8.xml  |2 +-
 docs-xml/manpages-3/testparm.1.xml |2 +-
 docs-xml/manpages-3/umount.cifs.8.xml  |2 +-
 docs-xml/manpages-3/vfs_acl_tdb.8.xml  |2 +-
 docs-xml/manpages-3/vfs_acl_xattr.8.xml|2 +-
 docs-xml/manpages-3/vfs_audit.8.xml|2 +-
 docs-xml/manpages-3/vfs_cacheprime.8.xml   |2 +-
 docs-xml/manpages-3/vfs_cap.8.xml  |2 +-
 docs-xml/manpages-3/vfs_catia.8.xml|2 +-
 docs-xml/manpages-3/vfs_commit.8.xml   |2 +-
 docs-xml/manpages-3/vfs_default_quota.8.xml|2 +-
 docs-xml/manpages-3/vfs_dirsort.8.xml  |2 +-
 docs-xml/manpages-3/vfs_extd_audit.8.xml   |2 +-
 docs-xml/manpages-3/vfs_fake_perms.8.xml   |2 +-
 docs-xml/manpages-3/vfs_fileid.8.xml   |2 +-
 docs-xml/manpages-3/vfs_full_audit.8.xml   |2 +-
 docs-xml/manpages-3/vfs_gpfs.8.xml |2 +-
 docs-xml/manpages-3/vfs_netatalk.8.xml |2 +-
 docs-xml/manpages-3/vfs_notify_fam.8.xml   |2 +-
 docs-xml/manpages-3/vfs_prealloc.8.xml |2 +-
 docs-xml/manpages-3/vfs_preopen.8.xml  |2 +-
 docs-xml/manpages-3/vfs_readahead.8.xml|2 +-
 docs-xml/manpages-3/vfs_readonly.8.xml |2 +-
 

[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-906-g87b31c0

2009-10-01 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  87b31c0266360f311ae6207b9ec5bce9d8e01be7 (commit)
  from  2d4ffe2a8cb7e0db9733a0e58b1c34e82fd40faf (commit)

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


- Log -
commit 87b31c0266360f311ae6207b9ec5bce9d8e01be7
Author: Jeremy Allison j...@samba.org
Date:   Thu Oct 1 10:23:29 2009 -0700

Fix for CVE-2009-2813.

===
== Subject: Misconfigured /etc/passwd file may share folders 
unexpectedly
==
== CVE ID#: CVE-2009-2813
==
== Versions:All versions of Samba later than 3.0.11
==
== Summary: If a user in /etc/passwd is misconfigured to have
==  an empty home directory then connecting to the home
==  share of this user will use the root of the filesystem
==  as the home directory.
===

---

Summary of changes:
 source3/param/loadparm.c |7 ++-
 source3/smbd/service.c   |6 +-
 2 files changed, 11 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index b278b96..b1f2a4a 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -6156,6 +6156,11 @@ bool lp_add_home(const char *pszHomename, int 
iDefaultService,
 {
int i;
 
+   if (pszHomename == NULL || user == NULL || pszHomedir == NULL ||
+   pszHomedir[0] == '\0') {
+   return false;
+   }
+
i = add_a_service(ServicePtrs[iDefaultService], pszHomename);
 
if (i  0)
@@ -8127,7 +8132,7 @@ static void lp_add_auto_services(char *str)
 
home = get_user_home_dir(talloc_tos(), p);
 
-   if (home  homes = 0)
+   if (home  home[0]  homes = 0)
lp_add_home(p, homes, p, home);
 
TALLOC_FREE(home);
diff --git a/source3/smbd/service.c b/source3/smbd/service.c
index 3520f0d..b5946f0 100644
--- a/source3/smbd/service.c
+++ b/source3/smbd/service.c
@@ -56,6 +56,10 @@ bool set_conn_connectpath(connection_struct *conn, const 
char *connectpath)
const char *s = connectpath;
 bool start_of_name_component = true;
 
+   if (connectpath == NULL || connectpath[0] == '\0') {
+   return false;
+   }
+
destname = SMB_STRDUP(connectpath);
if (!destname) {
return false;
@@ -259,7 +263,7 @@ int add_home_service(const char *service, const char 
*username, const char *home
 {
int iHomeService;
 
-   if (!service || !homedir)
+   if (!service || !homedir || homedir[0] == '\0')
return -1;
 
if ((iHomeService = lp_servicenumber(HOMES_NAME))  0) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-913-g7a98fde

2009-10-01 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  7a98fdebe454ec55e93868ca319615bf442b2ff8 (commit)
   via  f1b5d5dcab5d8249ae8dc6d26cf9e9e163b95a8d (commit)
   via  11f56f48433951046a79683eda08ab8a4246d487 (commit)
   via  ca90b480da3f5d813186d3b7be22a5a0ae1057f6 (commit)
   via  1a0db7a957682782bd915526c69c0779e7b8335f (commit)
   via  d2fd44b357f1e4aa11391b6c9f2602d90eb6d6ec (commit)
   via  62a7ea41ec40dd23ea4e70d2c3c507b37978c4f0 (commit)
  from  87b31c0266360f311ae6207b9ec5bce9d8e01be7 (commit)

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


- Log -
commit 7a98fdebe454ec55e93868ca319615bf442b2ff8
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 1 10:21:17 2009 +0200

s3-perfcount: more cleanup.

Guenther

commit f1b5d5dcab5d8249ae8dc6d26cf9e9e163b95a8d
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 1 03:39:07 2009 +0200

s3-perfcount: only pass down prs_struct when really required.

Guenther

commit 11f56f48433951046a79683eda08ab8a4246d487
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 1 02:09:33 2009 +0200

s3: add perfcount idl and generated files.

Guenther

commit ca90b480da3f5d813186d3b7be22a5a0ae1057f6
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 1 01:30:45 2009 +0200

s3-registry: move rpccli_winreg_Connect to the only file it belongs.

Guenther

commit 1a0db7a957682782bd915526c69c0779e7b8335f
Author: Günther Deschner g...@samba.org
Date:   Wed Sep 30 20:01:54 2009 +0200

s3: remove unused rpcstr_pull and rpcstr_pull_talloc.

Guenther

commit d2fd44b357f1e4aa11391b6c9f2602d90eb6d6ec
Author: Günther Deschner g...@samba.org
Date:   Wed Sep 30 20:01:35 2009 +0200

s3-printing: more use of pull_reg_sz().

Guenther

commit 62a7ea41ec40dd23ea4e70d2c3c507b37978c4f0
Author: Günther Deschner g...@samba.org
Date:   Wed Sep 30 20:00:52 2009 +0200

s3-registry: use pull_reg_sz() where appropriate.

(and move away from rpcstr_pull and rpcstr_pull_talloc).

Guenther

---

Summary of changes:
 examples/perfcounter/Makefile   |6 +-
 examples/perfcounter/perf.h |4 +-
 source3/Makefile.in |6 +-
 source3/include/includes.h  |3 +-
 source3/include/proto.h |   30 +--
 source3/include/rpc_perfcount.h |  126 
 source3/include/rpc_perfcount_defs.h|   93 --
 source3/lib/util_unistr.c   |   35 ---
 source3/librpc/gen_ndr/ndr_perfcount.c  |  493 +++
 source3/librpc/gen_ndr/ndr_perfcount.h  |   26 ++
 source3/librpc/gen_ndr/perfcount.h  |  129 
 source3/librpc/idl/perfcount.idl|  172 +++
 source3/printing/nt_printing.c  |9 +-
 source3/registry/reg_backend_printing.c |   39 ++-
 source3/registry/reg_objects.c  |9 +-
 source3/registry/reg_perfcount.c|  235 +--
 source3/rpc_client/cli_reg.c|   62 
 source3/rpc_parse/parse_misc.c  |   42 ---
 source3/rpcclient/cmd_spoolss.c |   12 +-
 source3/services/services_db.c  |   14 +-
 source3/utils/net_rpc_printer.c |   12 +-
 source3/utils/net_rpc_registry.c|   50 +++-
 22 files changed, 1071 insertions(+), 536 deletions(-)
 delete mode 100644 source3/include/rpc_perfcount.h
 delete mode 100644 source3/include/rpc_perfcount_defs.h
 create mode 100644 source3/librpc/gen_ndr/ndr_perfcount.c
 create mode 100644 source3/librpc/gen_ndr/ndr_perfcount.h
 create mode 100644 source3/librpc/gen_ndr/perfcount.h
 create mode 100644 source3/librpc/idl/perfcount.idl
 delete mode 100644 source3/rpc_client/cli_reg.c


Changeset truncated at 500 lines:

diff --git a/examples/perfcounter/Makefile b/examples/perfcounter/Makefile
index 925e2ea..bb7022e 100644
--- a/examples/perfcounter/Makefile
+++ b/examples/perfcounter/Makefile
@@ -15,10 +15,10 @@
 # along with this program; if not, see http://www.gnu.org/licenses/.
 # 
 
-SAMBA_SRC_DIR=../../source
-TDB_SRC_DIR=$(SAMBA_SRC_DIR)/tdb
+SAMBA_SRC_DIR=../../source3
+TDB_SRC_DIR=$(SAMBA_SRC_DIR)/../lib/tdb
 
-CFLAGS = -g -I$(SAMBA_SRC_DIR)/include -I$(TDB_SRC_DIR)/include
+CFLAGS = -g -I$(SAMBA_SRC_DIR) -I$(SAMBA_SRC_DIR)/include 
-I$(TDB_SRC_DIR)/include -I../../
 CC = gcc
 
 PROGS = perfcount
diff --git a/examples/perfcounter/perf.h b/examples/perfcounter/perf.h
index 2c24d31..7f06b05 100644
--- a/examples/perfcounter/perf.h
+++ b/examples/perfcounter/perf.h
@@ -36,8 +36,8 @@
 #include sys/time.h
 #include sys/wait.h
 #include limits.h
-#include tdb.h
-#include rpc_perfcount_defs.h
+#include tdb.h
+#include librpc/gen_ndr/perfcount.h
 #include sys/statfs.h
 #include sys/times.h
 #include sys/sysinfo.h
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 

[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-916-g7e3792f

2009-10-01 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  7e3792f91b9ce9ac08f99f95eaa5ab0ab7c8277d (commit)
   via  432c6203c78ad0be482b85be0b583105c8378b62 (commit)
   via  bc78a5bae3ffa1c74847adb91230afa4ea031240 (commit)
  from  7a98fdebe454ec55e93868ca319615bf442b2ff8 (commit)

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


- Log -
commit 7e3792f91b9ce9ac08f99f95eaa5ab0ab7c8277d
Author: Björn Jacke b...@sernet.de
Date:   Thu Oct 1 18:57:38 2009 +0200

s3:Makefile: fix talloc dependencies with static build

When configure options --with-libtalloc=no --enable-shared-libs=no are used,
LIBTALLOC_TARGET stays empty. Actually LIBTALLOC_TARGET which is only used 
for
Makefile dependencies is obsolete as LIBTALLOC contains exactly the targets
that make the dependencies are. Obnox, pleaѕe check!

commit 432c6203c78ad0be482b85be0b583105c8378b62
Author: Björn Jacke b...@sernet.de
Date:   Thu Oct 1 19:08:51 2009 +0200

s3:configure: don't throw away PRINT_LIBS

PRINT_LIBS might have been set before intentionally, so don't thow it away.

commit bc78a5bae3ffa1c74847adb91230afa4ea031240
Author: Björn Jacke b...@sernet.de
Date:   Wed Sep 23 14:40:25 2009 +0200

s3: update comment about (deprecated) a6 records

---

Summary of changes:
 source3/Makefile.in  |  129 +-
 source3/configure.in |2 +-
 source3/libads/dns.c |3 +-
 3 files changed, 67 insertions(+), 67 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index b552a9b..02d1bf5 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1530,7 +1530,7 @@ bin/.dummy:
  dir=bin $(MAKEDIR); fi
@:  $@ || :  $@ # what a fancy emoticon!
 
-bin/s...@exeext@: $(BINARY_PREREQS) $(SMBD_OBJ) @LIBTALLOC_TARGET@ 
@LIBTDB_TARGET@ @LIBWBCLIENT_TARGET@ @BUILD_POPT@
+bin/s...@exeext@: $(BINARY_PREREQS) $(SMBD_OBJ) $(LIBTALLOC) @LIBTDB_TARGET@ 
@LIBWBCLIENT_TARGET@ @BUILD_POPT@
@echo Linking $@
@$(CC) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LDAP_LIBS) @SMBD_FAM_LIBS@ \
$(KRB5LIBS) $(DYNEXP) $(PRINT_LIBS) $(AUTH_LIBS) \
@@ -1538,33 +1538,33 @@ bin/s...@exeext@: $(BINARY_PREREQS) $(SMBD_OBJ) 
@LIBTALLOC_TARGET@ @LIBTDB_TARGE
$(POPT_LIBS) @SMBD_LIBS@ $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
$(LIBWBCLIENT_LIBS) $(ZLIB_LIBS)
 
-bin/n...@exeext@: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ 
@LIBTALLOC_TARGET@ @LIBTDB_TARGET@
+bin/n...@exeext@: $(BINARY_PREREQS) $(NMBD_OBJ) @BUILD_POPT@ $(LIBTALLOC) 
@LIBTDB_TARGET@
@echo Linking $@
@$(CC) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) \
$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(POPT_LIBS) \
$(KRB5LIBS) $(LDAP_LIBS) $(ZLIB_LIBS)
 
-bin/s...@exeext@: $(BINARY_PREREQS) $(SWAT_OBJ) @BUILD_POPT@ 
@LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_TARGET@
+bin/s...@exeext@: $(BINARY_PREREQS) $(SWAT_OBJ) @BUILD_POPT@ $(LIBTALLOC) 
@LIBTDB_TARGET@ @LIBWBCLIENT_TARGET@
@echo Linking $@
@$(CC) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(DYNEXP) $(PRINT_LIBS) \
  $(AUTH_LIBS) $(LIBS) $(PASSDB_LIBS) $(POPT_LIBS) $(KRB5LIBS) \
  $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) 
$(ZLIB_LIBS)
 
-bin/rpccli...@exeext@: $(BINARY_PREREQS) $(RPCCLIENT_OBJ) @BUILD_POPT@ 
@LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_TARGET@
+bin/rpccli...@exeext@: $(BINARY_PREREQS) $(RPCCLIENT_OBJ) @BUILD_POPT@ 
$(LIBTALLOC) @LIBTDB_TARGET@ @LIBWBCLIENT_TARGET@
@echo Linking $@
@$(CC) -o $@ $(LDFLAGS) $(RPCCLIENT_OBJ) \
$(DYNEXP) $(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
$(KRB5LIBS) $(LDAP_LIBS) $(LIBTALLOC_LIBS) $(LIBTDB_LIBS) \
$(LIBWBCLIENT_LIBS) $(ZLIB_LIBS) $(PASSDB_LIBS)
 
-bin/smbcli...@exeext@: $(BINARY_PREREQS) $(CLIENT_OBJ) @BUILD_POPT@ 
@LIBTALLOC_TARGET@ @LIBTDB_TARGET@ @LIBWBCLIENT_TARGET@
+bin/smbcli...@exeext@: $(BINARY_PREREQS) $(CLIENT_OBJ) @BUILD_POPT@ 
$(LIBTALLOC) @LIBTDB_TARGET@ @LIBWBCLIENT_TARGET@
@echo Linking $@
@$(CC) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(DYNEXP) \
$(TERMLDFLAGS) $(TERMLIBS) $(LIBS) $(POPT_LIBS) \
$(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) $(DNSSD_LIBS) \
$(LIBTALLOC_LIBS) $(LIBTDB_LIBS) $(LIBWBCLIENT_LIBS) 
$(ZLIB_LIBS)
 
-bin/n...@exeext@: $(BINARY_PREREQS) $(NET_OBJ) @BUILD_POPT@ @LIBTALLOC_TARGET@ 
@LIBTDB_TARGET@ @LIBWBCLIENT_TARGET@ @LIBNETAPI_TARGET@
+bin/n...@exeext@: $(BINARY_PREREQS) $(NET_OBJ) @BUILD_POPT@ $(LIBTALLOC) 
@LIBTDB_TARGET@ @LIBWBCLIENT_TARGET@ @LIBNETAPI_TARGET@
@echo Linking $@
@$(CC) -o $@ $(NET_OBJ) $(DYNEXP) $(LDFLAGS) $(LIBS) \
$(POPT_LIBS) $(KRB5LIBS) $(UUID_LIBS) $(LDAP_LIBS) \
@@ -1572,12 +1572,12 @@ 

Re: [SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-913-g7a98fde

2009-10-01 Thread Guenther Deschner
On Thu, Oct 01, 2009 at 12:36:10PM -0500, Jeremy Allison wrote:
 The branch, v3-5-test has been updated
via  7a98fdebe454ec55e93868ca319615bf442b2ff8 (commit)
via  f1b5d5dcab5d8249ae8dc6d26cf9e9e163b95a8d (commit)
via  11f56f48433951046a79683eda08ab8a4246d487 (commit)
via  ca90b480da3f5d813186d3b7be22a5a0ae1057f6 (commit)
via  1a0db7a957682782bd915526c69c0779e7b8335f (commit)
via  d2fd44b357f1e4aa11391b6c9f2602d90eb6d6ec (commit)
via  62a7ea41ec40dd23ea4e70d2c3c507b37978c4f0 (commit)
   from  87b31c0266360f311ae6207b9ec5bce9d8e01be7 (commit)
 
 http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test
 
 
 - Log -
 commit 7a98fdebe454ec55e93868ca319615bf442b2ff8
 Author: Günther Deschner g...@samba.org
 Date:   Thu Oct 1 10:21:17 2009 +0200
 
 s3-perfcount: more cleanup.
 
 Guenther
 
 commit f1b5d5dcab5d8249ae8dc6d26cf9e9e163b95a8d
 Author: Günther Deschner g...@samba.org
 Date:   Thu Oct 1 03:39:07 2009 +0200
 
 s3-perfcount: only pass down prs_struct when really required.
 
 Guenther
 
 commit 11f56f48433951046a79683eda08ab8a4246d487
 Author: Günther Deschner g...@samba.org
 Date:   Thu Oct 1 02:09:33 2009 +0200
 
 s3: add perfcount idl and generated files.
 
 Guenther
 
 commit ca90b480da3f5d813186d3b7be22a5a0ae1057f6
 Author: Günther Deschner g...@samba.org
 Date:   Thu Oct 1 01:30:45 2009 +0200
 
 s3-registry: move rpccli_winreg_Connect to the only file it belongs.
 
 Guenther
 
 commit 1a0db7a957682782bd915526c69c0779e7b8335f
 Author: Günther Deschner g...@samba.org
 Date:   Wed Sep 30 20:01:54 2009 +0200
 
 s3: remove unused rpcstr_pull and rpcstr_pull_talloc.
 
 Guenther
 
 commit d2fd44b357f1e4aa11391b6c9f2602d90eb6d6ec
 Author: Günther Deschner g...@samba.org
 Date:   Wed Sep 30 20:01:35 2009 +0200
 
 s3-printing: more use of pull_reg_sz().
 
 Guenther
 
 commit 62a7ea41ec40dd23ea4e70d2c3c507b37978c4f0
 Author: Günther Deschner g...@samba.org
 Date:   Wed Sep 30 20:00:52 2009 +0200
 
 s3-registry: use pull_reg_sz() where appropriate.
 
 (and move away from rpcstr_pull and rpcstr_pull_talloc).
 
 Guenther

Hi Jeremy,

sorry for not doing that myself earlier (busy with other stuff atm.).

Be assured that I would not have forgotten it :-)

I run my pick-my-stuff-from-master-into-3-5 script frequently so that
should have catched those soon.

Thanks for looking at this!

Guenther

-- 
Günther DeschnerGPG-ID: 8EE11688
Red Hat gdesch...@redhat.com
Samba Team  g...@samba.org


pgplV1oQbWvTq.pgp
Description: PGP signature


[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-917-g2820dc5

2009-10-01 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  2820dc529a04985b7223603e826f6b9905d2611b (commit)
  from  7e3792f91b9ce9ac08f99f95eaa5ab0ab7c8277d (commit)

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


- Log -
commit 2820dc529a04985b7223603e826f6b9905d2611b
Author: Jeremy Allison j...@samba.org
Date:   Thu Oct 1 16:18:33 2009 -0700

NULL is not a valid event context.
Jeremy.

---

Summary of changes:
 lib/tevent/tevent_signal.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent_signal.c b/lib/tevent/tevent_signal.c
index d3325b6..ab170a6 100644
--- a/lib/tevent/tevent_signal.c
+++ b/lib/tevent/tevent_signal.c
@@ -92,7 +92,7 @@ static void tevent_common_signal_handler(int signum)
 
/* Write to each unique event context. */
for (sl = sig_state-sig_handlers[signum]; sl; sl = sl-next) {
-   if (sl-se-event_ctx != ev) {
+   if (sl-se-event_ctx  sl-se-event_ctx != ev) {
ev = sl-se-event_ctx;
/* doesn't matter if this pipe overflows */
res = write(ev-pipe_fds[1], c, 1);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-918-g4a70162

2009-10-01 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  4a7016200731ea3e133665568027a3c99e1fcf71 (commit)
  from  2820dc529a04985b7223603e826f6b9905d2611b (commit)

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


- Log -
commit 4a7016200731ea3e133665568027a3c99e1fcf71
Author: Jeremy Allison j...@samba.org
Date:   Thu Oct 1 16:54:06 2009 -0700

Fix bug #6769 - symlink unlink does nothing.
Always use LSTAT for POSIX pathnames.
Jeremy.

---

Summary of changes:
 source3/modules/vfs_default.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index c92bc8e..680eb12 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -1231,7 +1231,11 @@ static NTSTATUS vfswrap_streaminfo(vfs_handle_struct 
*handle,
if (!NT_STATUS_IS_OK(status)) {
return status;
}
-   ret = SMB_VFS_STAT(handle-conn, smb_fname);
+   if (lp_posix_pathnames()) {
+   ret = SMB_VFS_LSTAT(handle-conn, smb_fname);
+   } else {
+   ret = SMB_VFS_STAT(handle-conn, smb_fname);
+   }
sbuf = smb_fname-st;
TALLOC_FREE(smb_fname);
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-921-g3d98546

2009-10-01 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  3d98546ebf8c582cdd675e7e93693f54968fbc58 (commit)
   via  1febace29881995901eb5694f22ee333e7166fd7 (commit)
   via  4567a2ef52b0d04748337dc76315be277e72899a (commit)
  from  4a7016200731ea3e133665568027a3c99e1fcf71 (commit)

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


- Log -
commit 3d98546ebf8c582cdd675e7e93693f54968fbc58
Author: Günther Deschner g...@samba.org
Date:   Wed Sep 30 15:22:02 2009 +0200

s3-printing: use regval_ctr_addvalue_multi_sz.

Guenther
(cherry picked from commit bbf394f36dbf2516ba92035791ebb67380de8d6e)

commit 1febace29881995901eb5694f22ee333e7166fd7
Author: Günther Deschner g...@samba.org
Date:   Wed Sep 30 15:21:37 2009 +0200

s3-registry: add regval_ctr_addvalue_multi_sz.

Guenther
(cherry picked from commit 05e8e90976e86689425ccafc9ecfc1d99c53a3db)

commit 4567a2ef52b0d04748337dc76315be277e72899a
Author: Günther Deschner g...@samba.org
Date:   Wed Sep 30 01:23:13 2009 +0200

s3-rpc_parse: remove unused prs_string.

Guenther
(cherry picked from commit afdea18fcf66ab9a03b542ea7f3d23d01a0a1931)

---

Summary of changes:
 source3/include/proto.h|2 +-
 source3/printing/nt_printing.c |   21 +++---
 source3/registry/reg_objects.c |   17 +++
 source3/rpc_parse/parse_prs.c  |   44 
 4 files changed, 22 insertions(+), 62 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index e7ad877..c9f57b4 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5114,6 +5114,7 @@ struct regval_blob *regval_compose(TALLOC_CTX *ctx, const 
char *name,
 int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint16 type,
const char *data_p, size_t size);
 int regval_ctr_addvalue_sz(struct regval_ctr *ctr, const char *name, const 
char *data);
+int regval_ctr_addvalue_multi_sz(struct regval_ctr *ctr, const char *name, 
const char **data);
 int regval_ctr_copyvalue(struct regval_ctr *ctr, struct regval_blob *val);
 int regval_ctr_delvalue(struct regval_ctr *ctr, const char *name);
 struct regval_blob* regval_ctr_getvalue(struct regval_ctr *ctr,
@@ -5673,7 +5674,6 @@ bool prs_uint8s(bool charmode, const char *name, 
prs_struct *ps, int depth, uint
 bool prs_uint16s(bool charmode, const char *name, prs_struct *ps, int depth, 
uint16 *data16s, int len);
 bool prs_uint32s(bool charmode, const char *name, prs_struct *ps, int depth, 
uint32 *data32s, int len);
 bool prs_unistr(const char *name, prs_struct *ps, int depth, UNISTR *str);
-bool prs_string(const char *name, prs_struct *ps, int depth, char *str, int 
max_buf_size);
 bool prs_init_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
 bool prs_data_blob(prs_struct *prs, DATA_BLOB *blob, TALLOC_CTX *mem_ctx);
 
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index f033d8d..9995dfe 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -3057,26 +3057,13 @@ static void map_bool_into_ctr(struct regval_ctr *ctr, 
const char *val_name,
 static void map_single_multi_sz_into_ctr(struct regval_ctr *ctr, const char 
*val_name,
 const char *multi_sz)
 {
-   smb_ucs2_t *conv_strs = NULL;
-   size_t str_size;
-
-   /* a multi-sz has to have a null string terminator, i.e., the last
-  string must be followed by two nulls */
-   str_size = strlen(multi_sz) + 2;
-   conv_strs = SMB_CALLOC_ARRAY(smb_ucs2_t, str_size);
-   if (!conv_strs) {
-   return;
-   }
+   const char *a[2];
 
-   /* Change to byte units. */
-   str_size *= sizeof(smb_ucs2_t);
-   push_ucs2(NULL, conv_strs, multi_sz, str_size,
- STR_TERMINATE | STR_NOALIGN);
+   a[0] = multi_sz;
+   a[1] = NULL;
 
regval_ctr_delvalue(ctr, val_name);
-   regval_ctr_addvalue(ctr, val_name, REG_MULTI_SZ,
-   (char *) conv_strs, str_size);
-   SAFE_FREE(conv_strs);
+   regval_ctr_addvalue_multi_sz(ctr, val_name, a);
 }
 
 /
diff --git a/source3/registry/reg_objects.c b/source3/registry/reg_objects.c
index 82086ca..b4b8ff2 100644
--- a/source3/registry/reg_objects.c
+++ b/source3/registry/reg_objects.c
@@ -507,6 +507,23 @@ int regval_ctr_addvalue_sz(struct regval_ctr *ctr, const 
char *name, const char
 }
 
 /***
+ Add a new registry MULTI_SZ value to the array
+ **/
+
+int regval_ctr_addvalue_multi_sz(struct regval_ctr *ctr, const 

[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-925-ge9cb129

2009-10-01 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  e9cb12953f191489b34e84547fc84841ff29515a (commit)
   via  f5586f6f14e40579b6c8f3da0daa5a8dd78aa956 (commit)
   via  6064f524738309b1062da4e8605145f920b7c856 (commit)
   via  248b7b5f74d8615c8b582df1f72fc71320bffb44 (commit)
  from  3d98546ebf8c582cdd675e7e93693f54968fbc58 (commit)

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


- Log -
commit e9cb12953f191489b34e84547fc84841ff29515a
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Fri Sep 18 00:46:52 2009 +0300

w32err: WERR_DC_NOT_FOUND replaced with WERR_DCNOTFOUND

It turns out in win32 ERROR_DC_NOT_FOUND exists and it is
an error for Device Context (DC), not Domain Controller

Signed-off-by: Anatoliy Atanasov anatoliy.atana...@postpath.com
(cherry picked from commit d9994a604bd51949a9869927bdc2cb512fba9171)

commit f5586f6f14e40579b6c8f3da0daa5a8dd78aa956
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Fri Sep 18 00:00:21 2009 +0300

w32err: WERR_USER_EXISTS replace with WERR_USEREXISTS name

In Win32 we have
NERR_UserExists which maps to WERR_USER_EXISTS currently
and there is
ERROR_USER_EXISTS which maps to WERR_USER_ALREADY_EXISTS

Signed-off-by: Anatoliy Atanasov anatoliy.atana...@postpath.com
(cherry picked from commit 948cd70bad6600a4e4e1493469efc0ccd9399c18)

commit 6064f524738309b1062da4e8605145f920b7c856
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Fri Sep 18 00:20:23 2009 +0300

w32err: WERR_GROUP_NOT_FOUND renamed to WERR_GROUPNOTFOUND

In Win 32 we have
NERR_GroupNotFound which maps to WERR_GROUP_NOT_FOUND currently
and we have
ERROR_GROUP_NOT_FOUND which maps to nothing, so it is to be added

Signed-off-by: Anatoliy Atanasov anatoliy.atana...@postpath.com
(cherry picked from commit 0e1840b84a892d31cbc45191b2965db5c931670b)

commit 248b7b5f74d8615c8b582df1f72fc71320bffb44
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Fri Sep 18 16:30:09 2009 +0300

w32err: Importing auto-generated Win32 errors and descriptions

Error codes and their descriptions are generated
using w32err_code.py script.
Error are downloaded from MS site:
http://msdn.microsoft.com/en-us/library/cc231199%28PROT.10%29.aspx

Signed-off-by: Anatoliy Atanasov anatoliy.atana...@postpath.com
(cherry picked from commit 1f2490e7d8b5a64caf75143041ce07bd2968839e)

---

Summary of changes:
 libcli/util/doserr.c | 4872 +-
 libcli/util/werror.h | 2367 -
 source3/lib/netapi/group.c   |8 +-
 source3/libnet/libnet_join.c |4 +-
 4 files changed, 7236 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/util/doserr.c b/libcli/util/doserr.c
index 5e74138..958c617 100644
--- a/libcli/util/doserr.c
+++ b/libcli/util/doserr.c
@@ -66,7 +66,7 @@ static const struct werror_code_struct dos_errs[] =
{ WERR_BUF_TOO_SMALL, WERR_BUF_TOO_SMALL },
{ WERR_JOB_NOT_FOUND, WERR_JOB_NOT_FOUND },
{ WERR_DEST_NOT_FOUND, WERR_DEST_NOT_FOUND },
-   { WERR_GROUP_NOT_FOUND, WERR_GROUP_NOT_FOUND },
+   { WERR_GROUPNOTFOUND, WERR_GROUPNOTFOUND },
{ WERR_USER_NOT_FOUND, WERR_USER_NOT_FOUND },
{ WERR_NOT_LOCAL_DOMAIN, WERR_NOT_LOCAL_DOMAIN },
{ WERR_DOMAIN_CONTROLLER_NOT_FOUND, WERR_DOMAIN_CONTROLLER_NOT_FOUND 
},
@@ -76,7 +76,7 @@ static const struct werror_code_struct dos_errs[] =
{ WERR_SETUP_DOMAIN_CONTROLLER, WERR_SETUP_DOMAIN_CONTROLLER },
{ WERR_DEVICE_NOT_AVAILABLE, WERR_DEVICE_NOT_AVAILABLE },
{ WERR_DEFAULT_JOIN_REQUIRED, WERR_DEFAULT_JOIN_REQUIRED },
-   { WERR_USER_EXISTS, WERR_USER_EXISTS },
+   { WERR_USEREXISTS, WERR_USEREXISTS },
{ WERR_REVISION_MISMATCH, WERR_REVISION_MISMATCH },
{ WERR_NO_LOGON_SERVERS, WERR_NO_LOGON_SERVERS },
{ WERR_NO_SUCH_LOGON_SESSION, WERR_NO_SUCH_LOGON_SESSION },
@@ -105,7 +105,7 @@ static const struct werror_code_struct dos_errs[] =
{ WERR_INVALID_COMPUTERNAME, WERR_INVALID_COMPUTERNAME },
{ WERR_INVALID_DOMAINNAME, WERR_INVALID_DOMAINNAME },
{ WERR_MACHINE_LOCKED, WERR_MACHINE_LOCKED },
-   { WERR_DC_NOT_FOUND, WERR_DC_NOT_FOUND },
+   { WERR_DCNOTFOUND, WERR_DCNOTFOUND },
{ WERR_NO_LOGON_SERVERS, WERR_NO_LOGON_SERVERS },
{ WERR_NO_SUCH_LOGON_SESSION, WERR_NO_SUCH_LOGON_SESSION },
{ WERR_NO_SUCH_PRIVILEGE, WERR_NO_SUCH_PRIVILEGE },
@@ -217,6 +217,2366 @@ static const struct werror_code_struct dos_errs[] =
{ WERR_PASSWORD_RESTRICTION, WERR_PASSWORD_RESTRICTION },
{ WERR_WRONG_PASSWORD, WERR_WRONG_PASSWORD },
{ WERR_CLASS_NOT_REGISTERED, WERR_CLASS_NOT_REGISTERED },
+ 

[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-928-gf1470f7

2009-10-01 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  f1470f7e46e2a33b40b9660f2c46996174d8c849 (commit)
   via  577504dd70cc76151dc4c4259a88229e5999b6e3 (commit)
   via  11c2052c6f1c452ce51f1859e3bbd9690bfcb36f (commit)
  from  e9cb12953f191489b34e84547fc84841ff29515a (commit)

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


- Log -
commit f1470f7e46e2a33b40b9660f2c46996174d8c849
Author: Günther Deschner g...@samba.org
Date:   Wed Sep 30 16:18:29 2009 +0200

s3: re-run make idl. janitor for tridge.

Guenther
(cherry picked from commit a6567cf198f9d1c9df0f34c463cec3b9f0aa2e54)

commit 577504dd70cc76151dc4c4259a88229e5999b6e3
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Thu Sep 17 13:52:28 2009 +0300

w32err: WERR_DOMAIN_CONTROLLER_NOT_FOUND error value fixed

Signed-off-by: Anatoliy Atanasov anatoliy.atana...@postpath.com
(cherry picked from commit e66911390005f377196d49dffb06cd4ae25ddc5f)

commit 11c2052c6f1c452ce51f1859e3bbd9690bfcb36f
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Thu Sep 17 23:18:40 2009 +0300

w32err: FRS_ group of errors replaced with numeric values

Signed-off-by: Anatoliy Atanasov anatoliy.atana...@postpath.com
(cherry picked from commit 0e64fcb18f22f31b9004e43f701ea109cef6075d)

---

Summary of changes:
 libcli/util/werror.h|8 
 librpc/gen_ndr/ndr_ntsvcs.c |2 +-
 librpc/gen_ndr/ntsvcs.h |2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/util/werror.h b/libcli/util/werror.h
index 5ae5417..ac4fb37 100644
--- a/libcli/util/werror.h
+++ b/libcli/util/werror.h
@@ -159,9 +159,9 @@ typedef uint32_t WERROR;
 #define WERR_INVALID_FORM_NAME W_ERROR(0x076E)
 #define WERR_INVALID_FORM_SIZE W_ERROR(0x076F)
 #define WERR_PASSWORD_MUST_CHANGE W_ERROR(0x0773)
+#define WERR_DOMAIN_CONTROLLER_NOT_FOUND W_ERROR(0x0774)
 #define WERR_ACCOUNT_LOCKED_OUT W_ERROR(0x0775)
 
-#define WERR_DOMAIN_CONTROLLER_NOT_FOUND W_ERROR(0x0995) /* Error code is 
wrong, should be  0x0774 (1908)*/
 
 #define WERR_DEVICE_NOT_AVAILABLE W_ERROR(0x10DF)
 
@@ -292,9 +292,9 @@ typedef uint32_t WERROR;
 #define WERR_DS_DUP_MSDS_INTID W_ERROR(0x2195)
 
 /* FRS errors */
-#define WERR_FRS_INSUFFICIENT_PRIV W_ERROR(FRS_ERR_BASE+7)
-#define WERR_FRS_SYSVOL_IS_BUSY W_ERROR(FRS_ERR_BASE+15)
-#define WERR_FRS_INVALID_SERVICE_PARAMETER W_ERROR(FRS_ERR_BASE+17)
+#define WERR_FRS_INSUFFICIENT_PRIV W_ERROR(0x1F47)
+#define WERR_FRS_SYSVOL_IS_BUSY W_ERROR(0x1F4F)
+#define WERR_FRS_INVALID_SERVICE_PARAMETER W_ERROR(0x1F51)
 
 /* RPC/COM/OLE HRESULT error codes */
 /* RPC errors */
diff --git a/librpc/gen_ndr/ndr_ntsvcs.c b/librpc/gen_ndr/ndr_ntsvcs.c
index 64917b4..f17033f 100644
--- a/librpc/gen_ndr/ndr_ntsvcs.c
+++ b/librpc/gen_ndr/ndr_ntsvcs.c
@@ -3,7 +3,7 @@
 #include includes.h
 #include ../librpc/gen_ndr/ndr_ntsvcs.h
 
-#include librpc/gen_ndr/ndr_winreg.h
+#include librpc/gen_ndr/ndr_misc.h
 static enum ndr_err_code ndr_push_PNP_GetIdListFlags(struct ndr_push *ndr, int 
ndr_flags, uint32_t r)
 {
NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
diff --git a/librpc/gen_ndr/ntsvcs.h b/librpc/gen_ndr/ntsvcs.h
index f59fcae..76b2628 100644
--- a/librpc/gen_ndr/ntsvcs.h
+++ b/librpc/gen_ndr/ntsvcs.h
@@ -4,7 +4,7 @@
 
 #include libcli/util/ntstatus.h
 
-#include librpc/gen_ndr/winreg.h
+#include librpc/gen_ndr/misc.h
 #ifndef _HEADER_ntsvcs
 #define _HEADER_ntsvcs
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - tevent-0-9-8-901-g5b0b939

2009-09-30 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  5b0b93991f256d1cd5c681c60075c4b17a0bc3c9 (commit)
  from  69d345ca71d127467fda768dc364a85333811397 (commit)

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


- Log -
commit 5b0b93991f256d1cd5c681c60075c4b17a0bc3c9
Author: Olaf Flebbe o.fle...@science-computing.de
Date:   Wed Sep 30 15:20:09 2009 -0700

allow for outstanding_aio_calls to be decremented

---

Summary of changes:
 source3/smbd/aio.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index c0367a5..491dd79 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -184,6 +184,7 @@ bool schedule_aio_read_and_X(connection_struct *conn,
return False;
}
 
+   outstanding_aio_calls++;
aio_ex-req = talloc_move(aio_ex, req);
 
DEBUG(10,(schedule_aio_read_and_X: scheduled aio_read for file %s, 
@@ -191,7 +192,6 @@ bool schedule_aio_read_and_X(connection_struct *conn,
  fsp_str_dbg(fsp), (double)startpos, (unsigned int)smb_maxcnt,
  (unsigned int)aio_ex-req-mid ));
 
-   outstanding_aio_calls++;
return True;
 }
 
@@ -279,6 +279,7 @@ bool schedule_aio_write_and_X(connection_struct *conn,
return False;
}
 
+   outstanding_aio_calls++;
aio_ex-req = talloc_move(aio_ex, req);
 
/* This should actually be improved to span the write. */
@@ -302,7 +303,6 @@ bool schedule_aio_write_and_X(connection_struct *conn,
DEBUG(10,(schedule_aio_write_and_X: scheduled aio_write 
  behind for file %s\n, fsp_str_dbg(fsp)));
}
-   outstanding_aio_calls++;
 
DEBUG(10,(schedule_aio_write_and_X: scheduled aio_write for file 
  %s, offset %.0f, len = %u (mid = %u) 
@@ -519,6 +519,8 @@ void smbd_aio_complete_mid(unsigned int mid)
struct aio_extra *aio_ex = find_aio_ex(mid);
int ret = 0;
 
+   outstanding_aio_calls--;
+
DEBUG(10,(smbd_aio_complete_mid: mid[%u]\n, mid));
 
if (!aio_ex) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1464-g56f5886

2009-09-25 Thread Jeff Layton
The branch, v3-5-test has been updated
   via  56f58860020151cdb720b865b9338d86320f73a6 (commit)
  from  50268ab18489b3508cf2ef35069dc0bcb585fbd9 (commit)

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


- Log -
commit 56f58860020151cdb720b865b9338d86320f73a6
Author: Jeff Layton jlay...@redhat.com
Date:   Fri Sep 25 06:47:39 2009 -0400

mount.cifs: print output to stderr

When a mount fails, mount.cifs often prints an error message. In most
cases, this error goes to stdout instead of stderr like it should. Fix
it to print errors to stderr instead.

Reported-by: Jan Engelhardt jeng...@gmx.de
Signed-off-by: Jeff Layton jlay...@redhat.com

---

Summary of changes:
 client/mount.cifs.c |  209 +--
 1 files changed, 101 insertions(+), 108 deletions(-)


Changeset truncated at 500 lines:

diff --git a/client/mount.cifs.c b/client/mount.cifs.c
index 4387f59..1c04e13 100644
--- a/client/mount.cifs.c
+++ b/client/mount.cifs.c
@@ -273,31 +273,34 @@ BB end finish BB */
 static char * check_for_domain(char **);
 
 
-static void mount_cifs_usage(void)
+static void mount_cifs_usage(FILE *stream)
 {
-   printf(\nUsage:  %s remotetarget dir -o options\n, thisprogram);
-   printf(\nMount the remote target, specified as a UNC name,);
-   printf( to a local directory.\n\nOptions:\n);
-   printf(\tuser=arg\n\tpass=arg\n\tdom=arg\n);
-   printf(\nLess commonly used options:);
-   
printf(\n\tcredentials=filename,guest,perm,noperm,setuids,nosetuids,rw,ro,);
-   
printf(\n\tsep=char,iocharset=codepage,suid,nosuid,exec,noexec,serverino,);
-   
printf(\n\tmapchars,nomapchars,nolock,servernetbiosname=SRV_RFC1001NAME);
-   printf(\n\tdirectio,nounix,cifsacl,sec=authentication 
mechanism,sign);
-   printf(\n\nOptions not needed for servers supporting CIFS Unix 
extensions);
-   printf(\n\t(e.g. unneeded for mounts to most Samba versions):);
-   printf(\n\tuid=uid,gid=gid,dir_mode=mode,file_mode=mode,sfu);
-   printf(\n\nRarely used options:);
-   
printf(\n\tport=tcpport,rsize=size,wsize=size,unc=unc_name,ip=ip_address,);
-   
printf(\n\tdev,nodev,nouser_xattr,netbiosname=OUR_RFC1001NAME,hard,soft,intr,);
-   
printf(\n\tnointr,ignorecase,noposixpaths,noacl,prefixpath=path,nobrl);
-   printf(\n\tin6_addr);
-   printf(\n\nOptions are described in more detail in the manual page);
-   printf(\n\tman 8 mount.cifs\n);
-   printf(\nTo display the version number of the mount helper:);
-   printf(\n\t%s -V\n,thisprogram);
+   fprintf(stream, \nUsage:  %s remotetarget dir -o options\n, 
thisprogram);
+   fprintf(stream, \nMount the remote target, specified as a UNC name,);
+   fprintf(stream,  to a local directory.\n\nOptions:\n);
+   fprintf(stream, \tuser=arg\n\tpass=arg\n\tdom=arg\n);
+   fprintf(stream, \nLess commonly used options:);
+   fprintf(stream, 
\n\tcredentials=filename,guest,perm,noperm,setuids,nosetuids,rw,ro,);
+   fprintf(stream, 
\n\tsep=char,iocharset=codepage,suid,nosuid,exec,noexec,serverino,);
+   fprintf(stream, 
\n\tmapchars,nomapchars,nolock,servernetbiosname=SRV_RFC1001NAME);
+   fprintf(stream, \n\tdirectio,nounix,cifsacl,sec=authentication 
mechanism,sign);
+   fprintf(stream, \n\nOptions not needed for servers supporting CIFS 
Unix extensions);
+   fprintf(stream, \n\t(e.g. unneeded for mounts to most Samba 
versions):);
+   fprintf(stream, 
\n\tuid=uid,gid=gid,dir_mode=mode,file_mode=mode,sfu);
+   fprintf(stream, \n\nRarely used options:);
+   fprintf(stream, 
\n\tport=tcpport,rsize=size,wsize=size,unc=unc_name,ip=ip_address,);
+   fprintf(stream, 
\n\tdev,nodev,nouser_xattr,netbiosname=OUR_RFC1001NAME,hard,soft,intr,);
+   fprintf(stream, 
\n\tnointr,ignorecase,noposixpaths,noacl,prefixpath=path,nobrl);
+   fprintf(stream, \n\nOptions are described in more detail in the manual 
page);
+   fprintf(stream, \n\tman 8 mount.cifs\n);
+   fprintf(stream, \nTo display the version number of the mount helper:);
+   fprintf(stream, \n\t%s -V\n,thisprogram);
 
SAFE_FREE(mountpassword);
+
+   if (stream == stderr)
+   exit(EX_USAGE);
+   exit(0);
 }
 
 /* caller frees username if necessary */
@@ -348,7 +351,7 @@ static int open_cred_file(char * file_name)
}
}
if(length  4086) {
-   printf(mount.cifs failed due to 
malformed username in credentials file);
+   fprintf(stderr, mount.cifs failed due 
to malformed username in credentials file\n);
memset(line_buf,0,4096);
   

[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1463-g50268ab

2009-09-17 Thread Bo Yang
The branch, v3-5-test has been updated
   via  50268ab18489b3508cf2ef35069dc0bcb585fbd9 (commit)
  from  dbebf4d848e72fe1b9bf117e05240b95d89fc93b (commit)

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


- Log -
commit 50268ab18489b3508cf2ef35069dc0bcb585fbd9
Author: Bo Yang boy...@samba.org
Date:   Wed Sep 16 23:54:46 2009 +0800

s3: Don't overwrite password in pam_winbind, subsequent pam modules might 
use the old password and new password.

Signed-off-by: Bo Yang boy...@samba.org

---

Summary of changes:
 nsswitch/pam_winbind.c |4 
 1 files changed, 0 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c
index 4e84574..324bede 100644
--- a/nsswitch/pam_winbind.c
+++ b/nsswitch/pam_winbind.c
@@ -3059,8 +3059,6 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
ret = winbind_chauthtok_request(ctx, user, pass_old,
pass_new, pwdlastset_update);
if (ret) {
-   _pam_overwrite(pass_new);
-   _pam_overwrite(pass_old);
pass_old = pass_new = NULL;
goto out;
}
@@ -3089,8 +3087,6 @@ int pam_sm_chauthtok(pam_handle_t * pamh, int flags,
   member, cctype, 0,
   error, info, policy,
   NULL, username_ret);
-   _pam_overwrite(pass_new);
-   _pam_overwrite(pass_old);
pass_old = pass_new = NULL;
 
if (ret == PAM_SUCCESS) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1462-gdbebf4d

2009-09-16 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  dbebf4d848e72fe1b9bf117e05240b95d89fc93b (commit)
   via  1a14264a24dbbcd8ba875ad6b27e1ae6f52215fe (commit)
   via  ed246aa063f73c3b004b091222b96cc7b2c28d2b (commit)
   via  3e7ee606d775d5030345d7a92212e1aef1db7a6c (commit)
   via  26e355e2fd8e80670feaa39c008ac0daeb5c0769 (commit)
   via  393596d517e063e2489fa6eaf5282db5a5dbe7fb (commit)
   via  9dae7253753061b7d93bc1b4ab93bae1217d6f47 (commit)
   via  1a314a9f23b0acbd81254f387efb3f3ebc0c4e1b (commit)
   via  0740cbe875dab141b20a8a78d2d96a63d0dc5dcd (commit)
   via  27907616abbc5ac21daacc3d2bc42daeb0723cab (commit)
   via  ffbcac88d059ac3940e9c13f4d01cc814c6d7494 (commit)
   via  56be28948e57a1daa4f05e8180872c99c4d59360 (commit)
   via  fd35570a98197efd0170af55cc6e17694b1383ff (commit)
   via  8fe5c56595e4518a26599bcfa7822e1409bc1473 (commit)
   via  0c28f9975955fe09d0231a516d1dddffac034587 (commit)
   via  cbf8282d8fd4d47d177987336a9e1b4d7956a05b (commit)
   via  0d47fb80a6b7d581f4aba4383ff4a45c637f9076 (commit)
   via  37646f55acea675a5884dc5a0a900a64d6391185 (commit)
   via  22eed3a782ff9cf9f6264e9102d8f2e9caf53bdb (commit)
   via  c1124544392f49c447db52d2c78c0d44fb3a34d4 (commit)
   via  6663117d0af9e5ec9a3274ebd82735ce3cc80a78 (commit)
   via  24bcd5f04a2403786a025fba29950205aa28948d (commit)
   via  940e8235d7309105a989ce40fb3a6e8b62602d1e (commit)
   via  3955823823f6842943bfbdea38005adccc64cd88 (commit)
   via  26d712a9ac51d51ab9f04a7ba79995cf280930d3 (commit)
   via  7abb68ce1ea7cb1eae9dfc471191b58d4fafb825 (commit)
   via  10b90a19be6608c30226a26dc00bfffd632e8f94 (commit)
   via  a0a9d7f1adfde440c596fc2929d66695df54adb4 (commit)
   via  5f121efcb1d777a41bad2c614919f9002c1cc296 (commit)
   via  3228f9c08ba8d1ef68f92e3bd2bebb95412875d9 (commit)
   via  a5d9696c443310b81f8159346ef1a49569efbbcb (commit)
   via  06b5f6c62506351eaed64c6a7b2a297f2785f65f (commit)
   via  a1be2f88c9936abcb3964042cd0cbb343dc6246b (commit)
   via  82b095cb0497d77abf3d620dcfb2713e7d7579fe (commit)
   via  fc1ffc3e9988374676f073c6f7bed2aa5688929e (commit)
   via  3ac6a68c7161945b7b8f4a9f88c354b9684f52e4 (commit)
   via  46b364061aa0d93d4664f6da1897b7cd3018c745 (commit)
   via  7afd6b668b7fd784d9443969c52f7657f1e4b329 (commit)
   via  967ada8cfdccf54be10c98d1e7ab7beb2ea4a037 (commit)
   via  bf4d572118bd7b0607243b8f3133a82bb2a9aa36 (commit)
   via  f850bf6a91a061d432f87f7e5ca7bdb02f445129 (commit)
   via  1589de06498e122247003533bf0bffdc863154ef (commit)
   via  a064a172454c8a7106dc14a9335e4016635c7359 (commit)
   via  526d1815a99867f1470a3f6404a5aaf93066b640 (commit)
   via  de9679c73329cbfa070c18f970ae50d47789fab3 (commit)
   via  0c5598f9116caad2417986231ed4f4ec5a5afa48 (commit)
   via  7392444f3d4a4e75ac4a2bd0c187a9ae5c2b0f56 (commit)
   via  2a8286649912b7dac1545d7e12f3b1c9648d83f4 (commit)
   via  5ef46825593076f8025a921da79ce61aa4ec6a81 (commit)
   via  35e8f5801b7498078b9bfd8b2d65017dcb2bf465 (commit)
   via  f7ef03aa089a161b62f31db474c87c7a7e772972 (commit)
   via  fc525b0d3c3245454d6ecf5974eee57f31a717cd (commit)
   via  27c569b5476eb2f4f19d1801ac4be8c93ad1d898 (commit)
   via  de96496b5a1c0cd57180e2579cc77fc70f3ec3e5 (commit)
  from  3f8202cd9e8cefb0cfea7a2245e941b0cf905d56 (commit)

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


- Log -
commit dbebf4d848e72fe1b9bf117e05240b95d89fc93b
Author: Günther Deschner g...@samba.org
Date:   Wed Sep 16 07:53:26 2009 +0200

s3-schannel: add dump_NL_AUTH_SIGNATURE.

Guenther
(cherry picked from commit c5c04fcf90849d31ff4d0343dedec2c097823a7e)

commit 1a14264a24dbbcd8ba875ad6b27e1ae6f52215fe
Author: Günther Deschner g...@samba.org
Date:   Wed Sep 16 03:23:05 2009 +0200

schannel: remove last traces of gensec.

Guenther
(cherry picked from commit 5b86a0ac013173e9d00f2f1476fb3ee54463e930)

commit ed246aa063f73c3b004b091222b96cc7b2c28d2b
Author: Günther Deschner g...@samba.org
Date:   Wed Sep 16 02:09:06 2009 +0200

lib/crypto: link in AES crypto for s4 as well.

Guenther
(cherry picked from commit 310051c79de5c649847972cdc1ae565d81841ec5)

commit 3e7ee606d775d5030345d7a92212e1aef1db7a6c
Author: Günther Deschner g...@samba.org
Date:   Wed Sep 16 00:52:33 2009 +0200

s3-schannel: remove unused schannel_decode/schannel_encode.

Guenther
(cherry picked from commit 97d7a524abc4993f231357ef22c637994d2cdcb9)

commit 26e355e2fd8e80670feaa39c008ac0daeb5c0769
Author: Günther Deschner g...@samba.org
Date:   Wed Sep 16 00:26:17 2009 +0200

schannel: fully share schannel sign/seal between s3 and 4.

Guenther
(cherry picked from commit 799f8d7e13cc712f32cdd779770e4868ad17486b)

commit 

[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1408-g3f8202c

2009-09-15 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  3f8202cd9e8cefb0cfea7a2245e941b0cf905d56 (commit)
   via  d988afc43acb7c1e2a0b4d1f1b6357230d483072 (commit)
   via  129ef463f9f7d58d3db3da0354b1af6337229131 (commit)
   via  da19f25bd59dc6c8111af147afc4431efd798634 (commit)
   via  13b125d3251dfeb28aa9834496c4bf71b3ba3974 (commit)
  from  5148eefe1ea6e215dcbf4ffaa642860bd8dab45f (commit)

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


- Log -
commit 3f8202cd9e8cefb0cfea7a2245e941b0cf905d56
Author: Björn Jacke b...@sernet.de
Date:   Tue Sep 15 06:48:49 2009 +0200

s3: BSD needs sys/sysctl.h included to build properly

FreeBSD (and other BSDs, too) need sys/sysctl.h inclueded to use 
sysctlbyname().

Thanks to Timur Bakeyev for that.

commit d988afc43acb7c1e2a0b4d1f1b6357230d483072
Author: Björn Jacke b...@sernet.de
Date:   Tue Sep 15 03:41:06 2009 +0200

nss_winbind: remove unused variable

commit 129ef463f9f7d58d3db3da0354b1af6337229131
Author: Björn Jacke b...@sernet.de
Date:   Wed Sep 9 20:07:19 2009 +0200

s3:examples:ldap: allow substing search on more attributes in nds schema 
file

commit da19f25bd59dc6c8111af147afc4431efd798634
Author: Björn Jacke b...@sernet.de
Date:   Wed Sep 9 19:13:32 2009 +0200

s3:examples:ldap: fix some OIDs in various schema files

commit 13b125d3251dfeb28aa9834496c4bf71b3ba3974
Author: Björn Jacke b...@sernet.de
Date:   Tue Sep 15 19:41:58 2009 +0200

s3: ignore cups-config to tidy up library dependencies

contrary to krb5-config for example, which outputs useful things, 
cups-config
--libs does not output libs we have to link against. It outputs libs that 
cups
linked against. We just have to link against cups.

---

Summary of changes:
 examples/LDAP/samba-nds.schema   |   12 ++--
 examples/LDAP/samba-schema-netscapeds4.x |6 +++---
 examples/LDAP/samba-schema-netscapeds5.x |6 +++---
 examples/LDAP/samba.schema.oc.IBM-DS |6 +++---
 nsswitch/winbind_nss_netbsd.c|1 -
 source3/configure.in |4 ++--
 source3/lib/fault.c  |5 +
 source3/param/loadparm.c |4 
 8 files changed, 26 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/LDAP/samba-nds.schema b/examples/LDAP/samba-nds.schema
index 8e8c5bc..2fc220f 100644
--- a/examples/LDAP/samba-nds.schema
+++ b/examples/LDAP/samba-nds.schema
@@ -35,7 +35,7 @@ attributeTypes: ( 1.3.6.1.4.1.7165.2.1.25 NAME 
'sambaNTPassword' DESC 'MD4 hash
 dn: cn=schema
 changetype: modify
 add: attributetypes
-attributeTypes: ( 1.3.6.1.4.1.7165.2.1.26 NAME 'sambaAcctFlags' DESC 'Account 
Flags' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{16} 
SINGLE-VALUE )
+attributeTypes: ( 1.3.6.1.4.1.7165.2.1.26 NAME 'sambaAcctFlags' DESC 'Account 
Flags' EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreSubstringsMatch SYNTAX 
1.3.6.1.4.1.1466.115.121.1.26{16} SINGLE-VALUE )
 
 ##
 ## Password timestamps  policies
@@ -137,7 +137,7 @@ attributeTypes: ( 1.3.6.1.4.1.7165.2.1.54 NAME 
'sambaPasswordHistory' DESC 'Conc
 dn: cn=schema
 changetype: modify
 add: attributetypes
-attributeTypes: ( 1.3.6.1.4.1.7165.2.1.20 NAME 'sambaSID' DESC 'Security ID' 
EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{64} 
SINGLE-VALUE )
+attributeTypes: ( 1.3.6.1.4.1.7165.2.1.20 NAME 'sambaSID' DESC 'Security ID' 
EQUALITY caseIgnoreIA5Match SUBSTR caseIgnoreSubstringsMatch SYNTAX 
1.3.6.1.4.1.1466.115.121.1.26{64} SINGLE-VALUE )
 
 ##
 ## Primary group SID, compatible with ntSid
@@ -328,22 +328,22 @@ objectClasses: ( 1.3.6.1.4.1.7165.2.2.5 NAME 
'sambaDomain' DESC 'Samba Domain In
 dn: cn=schema
 changetype: modify
 add: objectClasses
-objectClasses: ( 1.3.6.1.4.1.7165.1.2.2.7 NAME 'sambaUnixIdPool' DESC 'Pool 
for allocating UNIX uids/gids' SUP top AUXILIARY MUST ( uidNumber $ gidNumber ))
+objectClasses: ( 1.3.6.1.4.1.7165.2.2.7 NAME 'sambaUnixIdPool' DESC 'Pool for 
allocating UNIX uids/gids' SUP top AUXILIARY MUST ( uidNumber $ gidNumber ))
 
 dn: cn=schema
 changetype: modify
 add: objectClasses
-objectClasses: ( 1.3.6.1.4.1.7165.1.2.2.8 NAME 'sambaIdmapEntry' DESC 'Mapping 
from a SID to an ID' SUP top AUXILIARY MUST ( sambaSID ) MAY ( uidNumber $ 
gidNumber ))
+objectClasses: ( 1.3.6.1.4.1.7165.2.2.8 NAME 'sambaIdmapEntry' DESC 'Mapping 
from a SID to an ID' SUP top AUXILIARY MUST ( sambaSID ) MAY ( uidNumber $ 
gidNumber ))
 
 dn: cn=schema
 changetype: modify
 add: objectClasses
-objectClasses: ( 1.3.6.1.4.1.7165.1.2.2.9 NAME 'sambaSidEntry' DESC 
'Structural Class for a SID' SUP top STRUCTURAL MUST ( sambaSID ))
+objectClasses: ( 1.3.6.1.4.1.7165.2.2.9 NAME 'sambaSidEntry' DESC 'Structural 
Class for a SID' SUP top STRUCTURAL MUST ( sambaSID ))
 
 dn: cn=schema
 

[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1403-g5148eef

2009-09-10 Thread Lars Müller
The branch, v3-5-test has been updated
   via  5148eefe1ea6e215dcbf4ffaa642860bd8dab45f (commit)
   via  789963de23d46eba41cdd29c7b50100ec47e4361 (commit)
  from  b20f27ff40985a1fea2973e5a3532d58e65ca65b (commit)

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


- Log -
commit 5148eefe1ea6e215dcbf4ffaa642860bd8dab45f
Author: Lars Müller l...@samba.org
Date:   Mon Feb 2 21:38:38 2009 +0100

Adjust regex to match variable names including underscores

This is required to get the CIFSUPCALL_PROGS setting extracted from
config.log.

commit 789963de23d46eba41cdd29c7b50100ec47e4361
Author: Lars Müller l...@samba.org
Date:   Mon Feb 2 21:12:52 2009 +0100

Conditional install of the cifs.upcall man page

Only install the cifs.upcall man page if CIFSUPCALL_PROGS was set while
configure.

---

Summary of changes:
 source3/script/installman.sh |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/installman.sh b/source3/script/installman.sh
index ab9bfe5..085e862 100755
--- a/source3/script/installman.sh
+++ b/source3/script/installman.sh
@@ -20,7 +20,7 @@ fi
 
 # Get the configured feature set
 test -f ${SRCDIR}/config.log  \
-   eval `grep ^[[:alnum:]]*=.* ${SRCDIR}/config.log`
+   eval `grep ^[[:alnum:]_]*=.* ${SRCDIR}/config.log`
 
 for lang in $langs; do
 if [ X$lang = XC ]; then
@@ -48,6 +48,7 @@ for lang in $langs; do
 
# Check if this man page if required by the configured feature set
case ${MP_BASENAME} in
+   cifs.upcall.8) test -z ${CIFSUPCALL_PROGS}  continue ;;
smbsh.1) test -z ${SMBWRAPPER}  continue ;;
*) ;;
esac


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1400-g40e76eb

2009-09-09 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  40e76ebad2611516071f97a1c9f8e5bb2acf685f (commit)
   via  c8b6d81aa82d4bd4a23332d9796617e78c20ec7f (commit)
  from  8d999676f7f5adf4e8a0b3ae1c2f52a68aa1a65c (commit)

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


- Log -
commit 40e76ebad2611516071f97a1c9f8e5bb2acf685f
Author: Volker Lendecke v...@samba.org
Date:   Wed Sep 9 21:58:47 2009 +0200

s3:smbd: Add a hidden parameter share:fake_fscaps

This is needed to support some special app I've just come across where I 
had to
set the SPARSE_FILES bit (0x40) to make it work against Samba at all. There
might be others to fake. This is definitely a Don't touch if you don't know
what you're doing thing, so I decided to make this an undocumented 
parametric
parameter.

I know this sucks, so feel free to beat me up on this. But I don't think it
will hurt.

commit c8b6d81aa82d4bd4a23332d9796617e78c20ec7f
Author: Jeremy Allison j...@samba.org
Date:   Wed Sep 9 13:54:47 2009 -0700

Fix compile in a usually non-selected define.
Jeremy.

---

Summary of changes:
 source3/modules/vfs_default.c |2 +-
 source3/smbd/trans2.c |3 +++
 2 files changed, 4 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index e78ddf2..408721a 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -139,7 +139,7 @@ static uint32_t vfswrap_fs_capabilities(struct 
vfs_handle_struct *handle,
*p_ts_res = TIMESTAMP_SET_MSEC;
 #elif defined(HAVE_UTIME)
/* utime only allows sec timestamps to be set. */
-   *p_ts_res = TIMESTAMP_SET_SEC;
+   *p_ts_res = TIMESTAMP_SET_SECONDS;
 #endif
 
/* TODO. Add a configure test for the Linux
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index da23697..73873e0 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -2982,6 +2982,9 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n, 
(unsigned int)st.st_ex_dev, (u
 
/* Capabilities are filled in at connection time 
through STATVFS call */
additional_flags |= conn-fs_capabilities;
+   additional_flags |= lp_parm_int(conn-params-service,
+   share, fake_fscaps,
+   0);
 

SIVAL(pdata,0,FILE_CASE_PRESERVED_NAMES|FILE_CASE_SENSITIVE_SEARCH|
FILE_SUPPORTS_OBJECT_IDS|FILE_UNICODE_ON_DISK|


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1401-gb20f27f

2009-09-09 Thread Volker Lendecke
The branch, v3-5-test has been updated
   via  b20f27ff40985a1fea2973e5a3532d58e65ca65b (commit)
  from  40e76ebad2611516071f97a1c9f8e5bb2acf685f (commit)

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


- Log -
commit b20f27ff40985a1fea2973e5a3532d58e65ca65b
Author: Volker Lendecke v...@samba.org
Date:   Wed Sep 9 23:08:28 2009 +0200

s3:docs: Add info about how to obtain cifs module in cifs mount helper 
manpage

---

Summary of changes:
 docs-xml/manpages-3/mount.cifs.8.xml |8 
 1 files changed, 8 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/mount.cifs.8.xml 
b/docs-xml/manpages-3/mount.cifs.8.xml
index 9383f3f..4f775e8 100644
--- a/docs-xml/manpages-3/mount.cifs.8.xml
+++ b/docs-xml/manpages-3/mount.cifs.8.xml
@@ -62,6 +62,14 @@ kernel log.
the mounted resource is unmounted (usually via the umount 
utility).
/para
 
+   para
+   emphasismount.cifs -V/emphasis command displays the version 
of cifs mount helper.
+   /para
+   para
+
+   emphasismodinfo cifs/emphasis command displays the version 
of cifs module.
+   /para
+
 /refsect1
 
 refsect1


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1398-g8d99967

2009-09-08 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  8d999676f7f5adf4e8a0b3ae1c2f52a68aa1a65c (commit)
  from  237007230013219f7281241af4a21a911f27f2a4 (commit)

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


- Log -
commit 8d999676f7f5adf4e8a0b3ae1c2f52a68aa1a65c
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Sep 8 22:07:30 2009 +0200

socket_wrapper: swrap_read() should use SWRAP_RECV* for swrap_dump_packet()

This is the same as swrap_recv().

metze

---

Summary of changes:
 lib/socket_wrapper/socket_wrapper.c |8 +++-
 1 files changed, 3 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/socket_wrapper/socket_wrapper.c 
b/lib/socket_wrapper/socket_wrapper.c
index eb53c9c..a188cc6 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -671,8 +671,6 @@ enum swrap_packet_type {
SWRAP_CLOSE_SEND,
SWRAP_CLOSE_RECV,
SWRAP_CLOSE_ACK,
-   SWRAP_READ,
-   SWRAP_READ_RST
 };
 
 struct swrap_file_hdr {
@@ -2060,11 +2058,11 @@ _PUBLIC_ ssize_t swrap_read(int s, void *buf, size_t 
len)
 
ret = real_read(s, buf, len);
if (ret == -1  errno != EAGAIN  errno != ENOBUFS) {
-   swrap_dump_packet(si, NULL, SWRAP_READ_RST, NULL, 0);
+   swrap_dump_packet(si, NULL, SWRAP_RECV_RST, NULL, 0);
} else if (ret == 0) { /* END OF FILE */
-   swrap_dump_packet(si, NULL, SWRAP_READ_RST, NULL, 0);
+   swrap_dump_packet(si, NULL, SWRAP_RECV_RST, NULL, 0);
} else if (ret  0) {
-   swrap_dump_packet(si, NULL, SWRAP_READ, buf, ret);
+   swrap_dump_packet(si, NULL, SWRAP_RECV, buf, ret);
}
 
return ret;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1397-g2370072

2009-09-08 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  237007230013219f7281241af4a21a911f27f2a4 (commit)
   via  e9a092179833d2e4f63734c72970b4c98a4d2e52 (commit)
   via  3b4833b8efbc8463a2e68e0923b7b49a5b0ad4b8 (commit)
   via  3b75f61c6487f5076ae85b8fa66b4bb4b39ec4ab (commit)
   via  1ae8a900ca38fa494bcdfbe0c33c0fda527820eb (commit)
   via  227b5a2d4b0fea7b8300120fd44359a30b06e52c (commit)
   via  9c8f8b651d5504d183fb6100ff2efbfe29270888 (commit)
  from  cfd4297745a5271d4290d118bf40e20c4f963d1c (commit)

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


- Log -
commit 237007230013219f7281241af4a21a911f27f2a4
Author: Günther Deschner g...@samba.org
Date:   Tue Sep 8 17:02:54 2009 +0200

schannel: add missing prototype for ndr_print_nbt_string() in schannel 
helper.

Hopefully fixes samba4 build.

Guenther
(cherry picked from commit 4323c1321a1f498541b36169b1a34ea42824c397)

commit e9a092179833d2e4f63734c72970b4c98a4d2e52
Author: Günther Deschner g...@samba.org
Date:   Tue Sep 8 15:32:24 2009 +0200

s3: remove unused RPC_AUTH_SCHANNEL_NEG struct and parsing functions.

Guenther
(cherry picked from commit a48f884f705de2d08250e00400ae20cd8c677033)

commit 3b4833b8efbc8463a2e68e0923b7b49a5b0ad4b8
Author: Günther Deschner g...@samba.org
Date:   Tue Sep 8 15:31:01 2009 +0200

s3-rpc_server: use NL_AUTH_MESSAGE in pipe_schannel_auth_bind().

Guenther
(cherry picked from commit 3984738646eaa91c9d03b28f8a535d6eed79c0be)

commit 3b75f61c6487f5076ae85b8fa66b4bb4b39ec4ab
Author: Günther Deschner g...@samba.org
Date:   Tue Sep 8 15:30:22 2009 +0200

s3-rpc_client: use NL_AUTH_MESSAGE in create_schannel_auth_rpc_bind_req().

Guenther
(cherry picked from commit de0bf36493ada3d815d4ee03ddb90e9949d4316b)

commit 1ae8a900ca38fa494bcdfbe0c33c0fda527820eb
Author: Günther Deschner g...@samba.org
Date:   Tue Sep 8 14:51:42 2009 +0200

schannel: add NL_AUTH_MESSAGE and both NL_AUTH_SIGNATURE structs.

These actually belong netlogon but we for now want to keep netlogon as a 
security
providor separate.

Guenther
(cherry picked from commit 4fd9a9d6de6c37d368010f1485adf87a8f1523ca)

commit 227b5a2d4b0fea7b8300120fd44359a30b06e52c
Author: Günther Deschner g...@samba.org
Date:   Tue Sep 8 11:57:52 2009 +0200

s3-schannel: Fix Bug #6697. Interdomain trusts with Windows 2008 R2 DCs.

The Schannel verifier (aka NL_AUTH_SIGNATURE) structure (32 byte) sent from 
a
W2k8r2 DC is passed in a buffer with the size of a NL_AUTH_SHA2_SIGNATURE 
(56
byte). We should just ignore the remaining 12 zeroed bytes and proceed.

Guenther
(cherry picked from commit 5b2b5abf4f630c28dc5f018ecced3894ae66f491)

commit 9c8f8b651d5504d183fb6100ff2efbfe29270888
Author: Günther Deschner g...@samba.org
Date:   Mon Sep 7 11:56:10 2009 +0200

tdb: fix c++ build warning.

Guenther
(cherry picked from commit 1c2f4919abe99d07540b7380ad16d475d62aa50b)

---

Summary of changes:
 lib/tdb/common/tdb.c  |4 +-
 librpc/gen_ndr/ndr_schannel.c |  448 +
 librpc/gen_ndr/ndr_schannel.h |   17 ++
 librpc/gen_ndr/schannel.h |   83 
 librpc/idl/schannel.idl   |   73 +++
 librpc/ndr/ndr_schannel.c |   56 +
 librpc/ndr/ndr_schannel.h |   22 ++
 source3/Makefile.in   |1 +
 source3/include/proto.h   |4 -
 source3/include/rpc_dce.h |   12 +-
 source3/rpc_client/cli_pipe.c |   33 +++-
 source3/rpc_parse/parse_rpc.c |   41 
 source3/rpc_server/srv_pipe.c |   29 ++-
 source4/librpc/config.mk  |2 +-
 14 files changed, 752 insertions(+), 73 deletions(-)
 create mode 100644 librpc/ndr/ndr_schannel.c
 create mode 100644 librpc/ndr/ndr_schannel.h


Changeset truncated at 500 lines:

diff --git a/lib/tdb/common/tdb.c b/lib/tdb/common/tdb.c
index b78f74c..9b4b9c4 100644
--- a/lib/tdb/common/tdb.c
+++ b/lib/tdb/common/tdb.c
@@ -819,9 +819,9 @@ struct traverse_state {
 /*
   traverse function for repacking
  */
-static int repack_traverse(struct tdb_context *tdb, TDB_DATA key, TDB_DATA 
data, void *private)
+static int repack_traverse(struct tdb_context *tdb, TDB_DATA key, TDB_DATA 
data, void *private_data)
 {
-   struct traverse_state *state = (struct traverse_state *)private;
+   struct traverse_state *state = (struct traverse_state *)private_data;
if (tdb_store(state-dest_db, key, data, TDB_INSERT) != 0) {
state-error = true;
return -1;
diff --git a/librpc/gen_ndr/ndr_schannel.c b/librpc/gen_ndr/ndr_schannel.c
index d83d04b..98021e5 100644
--- a/librpc/gen_ndr/ndr_schannel.c
+++ b/librpc/gen_ndr/ndr_schannel.c
@@ -388,3 +388,451 @@ _PUBLIC_ void 
ndr_print_netlogon_creds_CredentialState(struct ndr_print *ndr, co
 

[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1380-gb01a7fc

2009-09-07 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  b01a7fce838329fa751dda34eaa5c49b2985f065 (commit)
   via  b76a027d4ff46383a31c5ba26f5a27cf10ed2517 (commit)
   via  cfeb524646309ff10fddf4777ec6d16bd74deaf1 (commit)
   via  4f96f49d4eb537c199118ab41f477c31d12b8fc2 (commit)
   via  9f04bdf2b0d4b29228922ec74263b5c3c0e44f1a (commit)
   via  ea80a6cb1f681d2c1ac2646d67127daf11fa350f (commit)
   via  e0c029aaf60ce1283e51997e91e12264a83aadfc (commit)
   via  5981c9efcc6c4cf7851767101a703555f5492340 (commit)
  from  87822aa751846365040cf9c19f6bed3515c27393 (commit)

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


- Log -
commit b01a7fce838329fa751dda34eaa5c49b2985f065
Author: Jeremy Allison j...@samba.org
Date:   Sun Sep 6 21:38:50 2009 -0700

Fix bug 6673 - smbpasswd does not work with unix password sync = yes.
Revert change from 3.3 - 3.4 with read_socket_with_timeout changed
from sys_read() to sys_recv(). read_socket_with_timeout() is called
with non-fd's (with a pty in chgpasswd.c and with a disk file in
lib/dbwrap_file.c via read_data()). recv works for the disk file,
but not the pty. Change the name of read_socket_with_timeout() to
read_fd_with_timeout() to make this clear (and add comments).
Jeremy.

commit b76a027d4ff46383a31c5ba26f5a27cf10ed2517
Author: Volker Lendecke v...@samba.org
Date:   Sun Sep 6 15:18:58 2009 +0200

s3:winbind: Convert WINBINDD_SET_HWM to the new API

commit cfeb524646309ff10fddf4777ec6d16bd74deaf1
Author: Volker Lendecke v...@samba.org
Date:   Sun Sep 6 14:59:41 2009 +0200

s3:winbind: Convert WINBINDD_REMOVE_MAPPING to the new API

commit 4f96f49d4eb537c199118ab41f477c31d12b8fc2
Author: Volker Lendecke v...@samba.org
Date:   Sun Sep 6 14:47:06 2009 +0200

s3:winbind: Convert WINBINDD_SET_MAPPING to the new API

commit 9f04bdf2b0d4b29228922ec74263b5c3c0e44f1a
Author: Volker Lendecke v...@samba.org
Date:   Sun Sep 6 09:32:34 2009 +0200

s3:winbind: Convert WINBINDD_CHECK_MACHACC to the new API

commit ea80a6cb1f681d2c1ac2646d67127daf11fa350f
Author: Volker Lendecke v...@samba.org
Date:   Sat Sep 5 19:20:16 2009 +0200

s3:smbd: Add the ntstatus to the smb_panic in share_mode_lock_destructor

This might help finding why bug 6518 happens

commit e0c029aaf60ce1283e51997e91e12264a83aadfc
Author: Simo Sorce i...@samba.org
Date:   Sat Sep 5 10:18:12 2009 -0400

Check we read off the compelte event from inotify

The kernel may return a short read, so we must use read_data() to make sure 
we
read off the full buffer. If somethign bad happens we also need to kill the
inotify watch because the filedescriptor will return out of sync structures 
if
we read only part of the data.

commit 5981c9efcc6c4cf7851767101a703555f5492340
Author: Simo Sorce i...@samba.org
Date:   Sat Sep 5 10:17:48 2009 -0400

Save and report the correct errno value.

---

Summary of changes:
 source3/Makefile.in|5 +-
 source3/include/proto.h|2 +-
 source3/lib/util_sock.c|   62 ++-
 source3/librpc/gen_ndr/cli_wbint.c |  616 
 source3/librpc/gen_ndr/cli_wbint.h |   48 ++
 source3/librpc/gen_ndr/ndr_wbint.c |  274 +++-
 source3/librpc/gen_ndr/ndr_wbint.h |   17 +-
 source3/librpc/gen_ndr/srv_wbint.c |  322 -
 source3/librpc/gen_ndr/srv_wbint.h |8 +
 source3/librpc/gen_ndr/wbint.h |   64 +++
 source3/librpc/idl/wbint.idl   |   26 +
 source3/libsmb/clientgen.c |2 +-
 source3/locking/locking.c  |   20 +-
 source3/smbd/chgpasswd.c   |2 +-
 source3/smbd/notify_inotify.c  |   10 +-
 source3/smbd/process.c |4 +-
 source3/winbindd/winbindd.c|   15 +-
 source3/winbindd/winbindd_check_machine_acct.c |   88 
 source3/winbindd/winbindd_domain.c |4 -
 source3/winbindd/winbindd_dual_srv.c   |  119 +
 source3/winbindd/winbindd_idmap.c  |  187 ---
 source3/winbindd/winbindd_misc.c   |   68 ---
 source3/winbindd/winbindd_proto.h  |   27 +
 source3/winbindd/winbindd_remove_mapping.c |  106 
 source3/winbindd/winbindd_set_hwm.c|   95 
 source3/winbindd/winbindd_set_mapping.c|  106 
 source3/winbindd/winbindd_sid.c|  142 --
 27 files changed, 1993 insertions(+), 446 deletions(-)
 create mode 100644 source3/winbindd/winbindd_check_machine_acct.c
 create mode 100644 source3/winbindd/winbindd_remove_mapping.c
 create mode 100644 source3/winbindd/winbindd_set_hwm.c
 create mode 100644 

[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1385-gfb6a4f4

2009-09-07 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  fb6a4f4eb16980aaf483207fd4f625f4d5116f86 (commit)
   via  6add49530e248c4396de159daf482ca6d13d0102 (commit)
   via  f8e300a458ac18c84013ebd067ee4663f4ce8b9c (commit)
   via  2a758612bd949ed5884e115e3d7446cf0a0a096f (commit)
   via  4d66ed585116556dc2eadc0b8340972124400e56 (commit)
  from  b01a7fce838329fa751dda34eaa5c49b2985f065 (commit)

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


- Log -
commit fb6a4f4eb16980aaf483207fd4f625f4d5116f86
Author: Jeff Layton jlay...@redhat.com
Date:   Fri Sep 4 06:29:44 2009 -0400

cifs.upcall: do a brute-force search for KRB5 credcache

A few weeks ago, I added some code to cifs.upcall to take the pid sent
by the kernel and use that to get the value of the $KRB5CCNAME
environment var for the process. That works fine on the initial mount,
but could be problematic on reconnect.

There's no guarantee on a reconnect that the process that initiates the
upcall will have $KRB5CCNAME pointed at the correct credcache. Because
of this, the current scheme isn't going to be reliable enough and we
need to use something different.

This patch replaces that scheme with one very similar to the one used by
rpc.gssd in nfs-utils. It searches the credcache dir (currently
hardcoded to /tmp) for a valid credcache for the given uid. If it finds
one then it uses that as the credentials cache. If it finds more than
one, it uses the one with the latest TGT expiration.

Signed-off-by: Jeff Layton jlay...@redhat.com

commit 6add49530e248c4396de159daf482ca6d13d0102
Author: Volker Lendecke v...@samba.org
Date:   Sat Sep 5 17:14:45 2009 +0200

s3:winbind: Use fstr_sprintf, it is simpler than talloc_asprintf-fstrcpy

commit f8e300a458ac18c84013ebd067ee4663f4ce8b9c
Author: Volker Lendecke v...@samba.org
Date:   Sat Sep 5 17:05:30 2009 +0200

s3:winbind: Remove pointless cond ? true : false;

commit 2a758612bd949ed5884e115e3d7446cf0a0a096f
Author: Volker Lendecke v...@samba.org
Date:   Sat Sep 5 17:00:21 2009 +0200

s3:winbind: Make the pam_auth subfunctions static

commit 4d66ed585116556dc2eadc0b8340972124400e56
Author: Volker Lendecke v...@samba.org
Date:   Thu Sep 3 08:02:21 2009 +0200

s3:libsmb: Convert (state-received) to (state-received != 0)

This confused me for a second, this should not happen a second time :-)

---

Summary of changes:
 client/cifs.upcall.c  |  186 +++-
 source3/libsmb/clireadwrite.c |2 +-
 source3/winbindd/winbindd_pam.c   |   39 
 source3/winbindd/winbindd_proto.h |9 --
 4 files changed, 158 insertions(+), 78 deletions(-)


Changeset truncated at 500 lines:

diff --git a/client/cifs.upcall.c b/client/cifs.upcall.c
index 1645322..71e60c6 100644
--- a/client/cifs.upcall.c
+++ b/client/cifs.upcall.c
@@ -31,6 +31,11 @@ create dns_resolver * * /usr/local/sbin/cifs.upcall %k
 
 #include cifs_spnego.h
 
+#defineCIFS_DEFAULT_KRB5_DIR   /tmp
+#defineCIFS_DEFAULT_KRB5_PREFIXkrb5cc_
+
+#defineMAX_CCNAME_LEN  PATH_MAX + 5
+
 const char *CIFSSPNEGO_VERSION = 1.3;
 static const char *prog = cifs.upcall;
 typedef enum _sectype {
@@ -39,60 +44,148 @@ typedef enum _sectype {
MS_KRB5
 } sectype_t;
 
-/*
- * given a process ID, get the value of the KRB5CCNAME environment variable
- * in the context of that process. On error, just return NULL.
- */
-static char *
-get_krb5_ccname(pid_t pid)
+static inline int
+k5_data_equal(krb5_data d1, krb5_data d2, unsigned int length)
 {
-   int fd;
-   ssize_t len, left;
+   if (!length)
+   length = d1.length;
 
-   /*
-* FIXME: sysconf for ARG_MAX instead? Kernel seems to be limited to a
-* page however, so it may not matter.
-*/
-   char buf[4096];
-   char *p, *value = NULL;
-   
-   buf[4095] = '\0';
-   snprintf(buf, 4095, /proc/%d/environ, pid);
-   fd = open(buf, O_RDONLY);
-   if (fd  0) {
-   syslog(LOG_DEBUG, %s: unable to open %s: %d, __func__, buf,
-   errno);
-   return NULL;
+   return (d1.length == length 
+   d1.length == d2.length 
+   memcmp(d1.data, d2.data, length) == 0);
+
+}
+
+/* does the ccache have a valid TGT? */
+static time_t
+get_tgt_time(const char *ccname) {
+   krb5_context context;
+   krb5_ccache ccache;
+   krb5_cc_cursor cur;
+   krb5_creds creds;
+   krb5_principal principal;
+   krb5_data tgt = { .data =   krbtgt,
+ .length = 6 };
+   time_t credtime = 0;
+
+   if (krb5_init_context(context)) {
+   syslog(LOG_DEBUG, %s: unable to init krb5 context, 

[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1388-g2520beb

2009-09-07 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  2520bebfc1163a9be5a0258cf9eeda3fe409558b (commit)
   via  cfd50746ee5e44d29f93423345bbe9961c792e4d (commit)
   via  ea2bcee0b19bbc7e6c79b5de8ba7b76528ada90f (commit)
  from  fb6a4f4eb16980aaf483207fd4f625f4d5116f86 (commit)

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


- Log -
commit 2520bebfc1163a9be5a0258cf9eeda3fe409558b
Author: Volker Lendecke v...@samba.org
Date:   Fri Sep 4 07:59:51 2009 +0200

s3:winbind: Fix Coverity ID 933: FORWARD_NULL

commit cfd50746ee5e44d29f93423345bbe9961c792e4d
Author: Volker Lendecke v...@samba.org
Date:   Fri Sep 4 07:57:19 2009 +0200

s3:smbd: Fix Coverity ID 937, REVERSE_INULL

commit ea2bcee0b19bbc7e6c79b5de8ba7b76528ada90f
Author: Volker Lendecke v...@samba.org
Date:   Fri Sep 4 07:52:28 2009 +0200

s3:winbind: Fix Coverity ID 940: Resource Leak

---

Summary of changes:
 source3/smbd/open.c   |4 ++--
 source3/winbindd/winbindd_cache.c |1 +
 source3/winbindd/winbindd_misc.c  |1 +
 3 files changed, 4 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 0456355..492164c 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -3332,12 +3332,12 @@ NTSTATUS get_relative_fid_filename(connection_struct 
*conn,
 
dir_fsp = file_fsp(req, root_dir_fid);
 
-   if (is_ntfs_stream_smb_fname(dir_fsp-fsp_name)) {
+   if (dir_fsp == NULL) {
status = NT_STATUS_INVALID_HANDLE;
goto out;
}
 
-   if (dir_fsp == NULL) {
+   if (is_ntfs_stream_smb_fname(dir_fsp-fsp_name)) {
status = NT_STATUS_INVALID_HANDLE;
goto out;
}
diff --git a/source3/winbindd/winbindd_cache.c 
b/source3/winbindd/winbindd_cache.c
index 8d44d27..6d48fe5 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -2110,6 +2110,7 @@ NTSTATUS wcache_lookup_usergroups(struct winbindd_domain 
*domain,
num_sids = centry_uint32(centry);
sids = talloc_array(mem_ctx, struct dom_sid, num_sids);
if (sids == NULL) {
+   centry_free(centry);
return NT_STATUS_NO_MEMORY;
}
 
diff --git a/source3/winbindd/winbindd_misc.c b/source3/winbindd/winbindd_misc.c
index dd5f132..9e62a1b 100644
--- a/source3/winbindd/winbindd_misc.c
+++ b/source3/winbindd/winbindd_misc.c
@@ -378,6 +378,7 @@ void winbindd_domain_info(struct winbindd_cli_state *cli)
if (req == NULL) {
DEBUG(3, (wb_domain_request_send failed\n));
request_error(cli);
+   return;
}
tevent_req_set_callback(req, domain_info_done, state);
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1389-g41924a6

2009-09-07 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  41924a6feb47a5853c0b024a6da3716fd14db9d8 (commit)
  from  2520bebfc1163a9be5a0258cf9eeda3fe409558b (commit)

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


- Log -
commit 41924a6feb47a5853c0b024a6da3716fd14db9d8
Author: Simo Sorce i...@samba.org
Date:   Fri Sep 4 18:20:29 2009 -0400

Add release script for tevent

---

Summary of changes:
 lib/{talloc = tevent}/release-script.sh |   24 
 1 files changed, 12 insertions(+), 12 deletions(-)
 copy lib/{talloc = tevent}/release-script.sh (53%)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/release-script.sh b/lib/tevent/release-script.sh
similarity index 53%
copy from lib/talloc/release-script.sh
copy to lib/tevent/release-script.sh
index 6b6c0e7..077f562 100755
--- a/lib/talloc/release-script.sh
+++ b/lib/tevent/release-script.sh
@@ -5,12 +5,12 @@ if [ $1 =  ]; then
 exit 1
 fi
 
-if [ ! -d lib/talloc ]; then
+if [ ! -d lib/tevent ]; then
 echo Run this script from the samba base directory.
 exit 1
 fi
 
-git clean -f -x -d lib/talloc
+git clean -f -x -d lib/tevent
 git clean -f -x -d lib/replace
 
 curbranch=`git-branch |grep ^* | tr -d * `
@@ -19,30 +19,30 @@ version=$1
 strver=`echo ${version} | tr . -`
 
 # Checkout the release tag
-git branch -f talloc-release-script-${strver} talloc-${strver}
+git branch -f tevent-release-script-${strver} tevent-${strver}
 if [ ! $? = 0 ];  then
-echo Unable to checkout talloc-${strver} release
+echo Unable to checkout tevent-${strver} release
 exit 1
 fi
 
-git checkout talloc-release-script-${strver}
+git checkout tevent-release-script-${strver}
 
 # Test configure agrees with us
-confver=`grep ^AC_INIT lib/talloc/configure.ac | tr -d AC_INIT(talloc,  | 
tr -d )`
+confver=`grep ^AC_INIT lib/tevent/configure.ac | tr -d AC_INIT(tevent,  | 
tr -d )`
 if [ ! $confver = $version ]; then
 echo Wrong version, requested release for ${version}, found ${confver}
 exit 1
 fi
 
 # Now build tarball
-cp -a lib/talloc talloc-${version}
-cp -a lib/replace talloc-${version}/libreplace
-pushd talloc-${version}
+cp -a lib/tevent tevent-${version}
+cp -a lib/replace tevent-${version}/libreplace
+pushd tevent-${version}
 ./autogen.sh
 popd
-tar cvzf talloc-${version}.tar.gz talloc-${version}
-rm -fr talloc-${version}
+tar cvzf tevent-${version}.tar.gz tevent-${version}
+rm -fr tevent-${version}
 
 #Clean up
 git checkout $curbranch
-git branch -d talloc-release-script-${strver}
+git branch -d tevent-release-script-${strver}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1390-gcfd4297

2009-09-07 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  cfd4297745a5271d4290d118bf40e20c4f963d1c (commit)
  from  41924a6feb47a5853c0b024a6da3716fd14db9d8 (commit)

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


- Log -
commit cfd4297745a5271d4290d118bf40e20c4f963d1c
Author: Jeremy Allison j...@samba.org
Date:   Mon Sep 7 20:31:01 2009 -0700

Add read() to socketwrapper. Metze please check.
Jeremy.

---

Summary of changes:
 lib/socket_wrapper/socket_wrapper.c |   33 -
 lib/socket_wrapper/socket_wrapper.h |6 ++
 source3/Makefile.in |2 +-
 3 files changed, 39 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/socket_wrapper/socket_wrapper.c 
b/lib/socket_wrapper/socket_wrapper.c
index 933b126..eb53c9c 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -121,6 +121,7 @@
 #define real_sendmsg sendmsg
 #define real_ioctl ioctl
 #define real_recv recv
+#define real_read read
 #define real_send send
 #define real_readv readv
 #define real_writev writev
@@ -669,7 +670,9 @@ enum swrap_packet_type {
SWRAP_SEND_RST,
SWRAP_CLOSE_SEND,
SWRAP_CLOSE_RECV,
-   SWRAP_CLOSE_ACK
+   SWRAP_CLOSE_ACK,
+   SWRAP_READ,
+   SWRAP_READ_RST
 };
 
 struct swrap_file_hdr {
@@ -2039,6 +2042,34 @@ _PUBLIC_ ssize_t swrap_recv(int s, void *buf, size_t 
len, int flags)
return ret;
 }
 
+_PUBLIC_ ssize_t swrap_read(int s, void *buf, size_t len)
+{
+   int ret;
+   struct socket_info *si = find_socket_info(s);
+
+   if (!si) {
+   return real_read(s, buf, len);
+   }
+
+   if (si-type == SOCK_STREAM) {
+   /* cut down to 1500 byte packets for stream sockets,
+* which makes it easier to format PCAP capture files
+* (as the caller will simply continue from here) */
+   len = MIN(len, 1500);
+   }
+
+   ret = real_read(s, buf, len);
+   if (ret == -1  errno != EAGAIN  errno != ENOBUFS) {
+   swrap_dump_packet(si, NULL, SWRAP_READ_RST, NULL, 0);
+   } else if (ret == 0) { /* END OF FILE */
+   swrap_dump_packet(si, NULL, SWRAP_READ_RST, NULL, 0);
+   } else if (ret  0) {
+   swrap_dump_packet(si, NULL, SWRAP_READ, buf, ret);
+   }
+
+   return ret;
+}
+
 
 _PUBLIC_ ssize_t swrap_send(int s, const void *buf, size_t len, int flags)
 {
diff --git a/lib/socket_wrapper/socket_wrapper.h 
b/lib/socket_wrapper/socket_wrapper.h
index 56282e2..472aa19 100644
--- a/lib/socket_wrapper/socket_wrapper.h
+++ b/lib/socket_wrapper/socket_wrapper.h
@@ -52,6 +52,7 @@ ssize_t swrap_sendto(int s, const void *buf, size_t len, int 
flags, const struct
 ssize_t swrap_sendmsg(int s, const struct msghdr *msg, int flags);
 int swrap_ioctl(int s, int req, void *ptr);
 ssize_t swrap_recv(int s, void *buf, size_t len, int flags);
+ssize_t swrap_read(int s, void *buf, size_t len);
 ssize_t swrap_send(int s, const void *buf, size_t len, int flags);
 int swrap_readv(int s, const struct iovec *vector, size_t count);
 int swrap_writev(int s, const struct iovec *vector, size_t count);
@@ -124,6 +125,11 @@ int swrap_close(int);
 #endif
 #define recv(s,buf,len,flags)  swrap_recv(s,buf,len,flags)
 
+#ifdef read
+#undef read
+#endif
+#define read(s,buf,len)swrap_read(s,buf,len)
+
 #ifdef send
 #undef send
 #endif
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 3528d6c..76ab280 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1100,7 +1100,7 @@ REPLACETORT_OBJ = @libreplacedir@/test/testsuite.o \
@libreplacedir@/test/os2_delete.o \
@libreplacedir@/test/strptime.o \
@libreplacedir@/test/main.o \
-   $(LIBREPLACE_OBJ)
+   $(LIBREPLACE_OBJ) $(SOCKET_WRAPPER_OBJ)
 
 DEBUG2HTML_OBJ = utils/debug2html.o utils/debugparse.o
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1370-gf267d11

2009-09-04 Thread Stefan Metzmacher
The branch, v3-5-test has been updated
   via  f267d1151cafe64fe7129e2a6a635d476b6481cc (commit)
   via  25eb0060d60a46a6122475b32de71ae8511a75c5 (commit)
  from  8df4d1015106dd706b05dbf68f01ea9266af1653 (commit)

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


- Log -
commit f267d1151cafe64fe7129e2a6a635d476b6481cc
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Sep 4 08:52:45 2009 +0200

s3:configure: turn off the merged build by default for the 3.5.x releases

metze

commit 25eb0060d60a46a6122475b32de71ae8511a75c5
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Sep 4 08:47:56 2009 +0200

s4: disable source4 directory for the 3.5.x releases

metze
(cherry picked from commit 6ced4bcadf05578bba83cb061310ad4dcf1e9c94)
(cherry picked from commit f97a1a0d3b708872534c85dbc5ae53215577057c)

---

Summary of changes:
 source3/configure.in |7 +-
 source4/autogen.sh   |   91 +++---
 source4/configure.ac |  216 --
 3 files changed, 14 insertions(+), 300 deletions(-)
 delete mode 100644 source4/configure.ac


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 3255751..cf65726 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6530,9 +6530,10 @@ if test x$enable_merged_build = xauto; then
AC_MSG_RESULT([$merged_build_possible])
 
# Enable merged build automatically if possible, when in developer mode
-   if test x$developer = xyes; then
-   enable_merged_build=$merged_build_possible
-   fi
+   # Don't enable  merged build automatically in 3.5.0.
+   #if test x$developer = xyes; then
+   #   enable_merged_build=$merged_build_possible
+   #fi
 fi
 
 if test x$enable_merged_build = xyes; then
diff --git a/source4/autogen.sh b/source4/autogen.sh
index 2d995ca..f30d42f 100755
--- a/source4/autogen.sh
+++ b/source4/autogen.sh
@@ -1,84 +1,13 @@
 #!/bin/sh
 
-# Run this script to build samba from git.
+echo 
+echo 
+echo 
+echo The build in source4 is not supported in the 3.5.x releases!
+echo Please use the source4 of the master branch
+echo or the latest samba4 alpha release
+echo 
+echo 
+echo 
+exit 1
 
-while true; do
-case $1 in
-   --version-file)
-   VERSION_FILE=$2
-   shift 2
-   ;;
-   *)
-   break
-   ;;
-esac
-done
-
-## insert all possible names (only works with
-## autoconf 2.x)
-TESTAUTOHEADER=autoheader autoheader-2.53 autoheader2.50 autoheader259 
autoheader253
-TESTAUTOCONF=autoconf autoconf-2.53 autoconf2.50 autoconf259 autoconf253
-
-AUTOHEADERFOUND=0
-AUTOCONFFOUND=0
-
-if which which  /dev/null 21; then
-echo -n
-else
-   echo $0: need 'which' to figure out if we have the right autoconf to 
build samba from git 2
-   exit 1
-fi
-##
-## Look for autoheader
-##
-for i in $TESTAUTOHEADER; do
-   if which $i  /dev/null 21; then
-   if test `$i --version | head -n 1 | cut -d.  -f 2 | sed 
s/[^0-9]//g` -ge 53; then
-   AUTOHEADER=$i
-   AUTOHEADERFOUND=1
-   break
-   fi
-   fi
-done
-
-##
-## Look for autoconf
-##
-
-for i in $TESTAUTOCONF; do
-   if which $i  /dev/null 21; then
-   if test `$i --version | head -n 1 | cut -d.  -f 2 | sed 
s/[^0-9]//g` -ge 53; then
-   AUTOCONF=$i
-   AUTOCONFFOUND=1
-   break
-   fi
-   fi
-done
-
-
-##
-## do we have it?
-##
-if test $AUTOCONFFOUND = 0 -o $AUTOHEADERFOUND = 0; then
-   echo $0: need autoconf 2.53 or later to build samba from git 2
-   exit 1
-fi
-
-echo $0: running script/mkversion.sh
-./script/mkversion.sh $VERSION_FILE || exit 1
-
-rm -rf autom4te*.cache
-rm -f configure include/config_tmp.h*
-
-IPATHS=-I. -I../lib/replace
-
-echo $0: running $AUTOHEADER $IPATHS
-$AUTOHEADER $IPATHS || exit 1
-
-echo $0: running $AUTOCONF $IPATHS
-$AUTOCONF $IPATHS || exit 1
-
-rm -rf autom4te*.cache
-
-echo Now run ./configure and then make.
-exit 0
diff --git a/source4/configure.ac b/source4/configure.ac
deleted file mode 100644
index 3f10419..000
--- a/source4/configure.ac
+++ /dev/null
@@ -1,216 +0,0 @@
-dnl -*- mode: m4-mode -*-
-dnl Process this file with autoconf to produce a configure script.
-
-AC_PREREQ(2.54)
-
-AC_INIT([samba],[4],[samba-techni...@samba.org])
-
-AC_CONFIG_SRCDIR([include/includes.h])
-AC_CONFIG_HEADER(include/config_tmp.h)
-AC_DEFINE(CONFIG_H_IS_FROM_SAMBA,1,[Marker for samba's config.h.])
-
-# Configuration rules.
-m4_include(build/m4/env.m4)
-m4_include(../lib/replace/samba.m4)

[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1372-g87822aa

2009-09-04 Thread Stefan Metzmacher
The branch, v3-5-test has been updated
   via  87822aa751846365040cf9c19f6bed3515c27393 (commit)
   via  11e756d695c236b31c3d1a5f9bd34de9b8ec0d48 (commit)
  from  f267d1151cafe64fe7129e2a6a635d476b6481cc (commit)

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


- Log -
commit 87822aa751846365040cf9c19f6bed3515c27393
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Sep 4 12:57:13 2009 +0200

s4:configure: require tevent = 0.9.8

metze
(cherry picked from commit 5e59c17e5c547b7a2cea8c40738bd7a3ca94dfad)

commit 11e756d695c236b31c3d1a5f9bd34de9b8ec0d48
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Sep 4 12:56:39 2009 +0200

tevent: change version to 0.9.8 after some critical bugs have been fixed

metze
(cherry picked from commit 1bb68402a2e37f39118e039ac69e03ba66f2)

---

Summary of changes:
 lib/tevent/configure.ac |2 +-
 source4/min_versions.m4 |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/configure.ac b/lib/tevent/configure.ac
index 89190af..c759b83 100644
--- a/lib/tevent/configure.ac
+++ b/lib/tevent/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.50)
-AC_INIT(tevent, 0.9.7)
+AC_INIT(tevent, 0.9.8)
 AC_CONFIG_SRCDIR([tevent.c])
 AC_CONFIG_HEADER(config.h)
 
diff --git a/source4/min_versions.m4 b/source4/min_versions.m4
index 329ecea..0ca6046 100644
--- a/source4/min_versions.m4
+++ b/source4/min_versions.m4
@@ -3,4 +3,4 @@
 define(TDB_MIN_VERSION,1.1.5)
 define(TALLOC_MIN_VERSION,2.0.0)
 define(LDB_REQUIRED_VERSION,0.9.6)
-define(TEVENT_REQUIRED_VERSION,0.9.7)
+define(TEVENT_REQUIRED_VERSION,0.9.8)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1366-g55288bb

2009-09-03 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  55288bb0b4468b66ecd07e5bd2440d37be7b3c59 (commit)
   via  5dd5c5854a8081b9266ede8c29966151885d9d1e (commit)
  from  38995d7cbb0c3143eb1fea0215863321349c7bbe (commit)

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


- Log -
commit 55288bb0b4468b66ecd07e5bd2440d37be7b3c59
Author: Jeremy Allison j...@samba.org
Date:   Thu Sep 3 07:40:48 2009 -0700

Hopefully last part of the fix for bug 6651 - smbd SIGSEGV when breaking 
oplocks.
This one is subtle. There is a race condition where a signal can be
queued for oplock break, and then the file can be closed by the client
before the signal can be processed. Currently if this occurs we panic
(we can't match an incoming signal fd with a fsp pointer). Simply log
the error (at debug level 10 right now, might be too much) and then
return without processing the break request. It looks like there is
another race condition with this fix, but here's why it won't happen.
If the signal was pending (caused by a kernel oplock break from a
local file open), and the client closed the file and then re-opened
another file which happened to use the same file descriptor as the
file just closed, then theoretically the oplock break requests could
be processed on the wrong fd. Here's why this should be very rare..
Processing a pending signal always take precedence over an incoming
network request, so as long as the client close request is non-chained
then the break signal should always be harmlessly processed *before*
the open can be called. If the open is chained onto the close, and
the fd on the new open is the same as the old closed fd, then it's
possible this race will occur. However, all that will happen is that
we'll lose the oplock on this file. A shame, but not a fatal event.
Jeremy.

commit 5dd5c5854a8081b9266ede8c29966151885d9d1e
Author: Jeremy Allison j...@samba.org
Date:   Thu Sep 3 07:38:21 2009 -0700

Another part of the fix for bug 6651 - smbd SIGSEGV when breaking oplocks.
SA_INFO_QUEUE_COUNT *MUST* be a power of 2, in order for the ring buffer
wrap to work correctly at the 32 bit boundary. Thanks to Petr
Vandrovec p...@vandrovec.name for this.

---

Summary of changes:
 lib/tevent/tevent_signal.c  |8 ++--
 source3/smbd/oplock_linux.c |4 ++--
 2 files changed, 8 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent_signal.c b/lib/tevent/tevent_signal.c
index b329f8c..ef9c0cf 100644
--- a/lib/tevent/tevent_signal.c
+++ b/lib/tevent/tevent_signal.c
@@ -32,8 +32,12 @@
 
 #define NUM_SIGNALS 64
 
-/* maximum number of SA_SIGINFO signals to hold in the queue */
-#define SA_INFO_QUEUE_COUNT 100
+/* maximum number of SA_SIGINFO signals to hold in the queue.
+  NB. This *MUST* be a power of 2, in order for the ring buffer
+  wrap to work correctly. Thanks to Petr Vandrovec p...@vandrovec.name
+  for this. */
+
+#define SA_INFO_QUEUE_COUNT 64
 
 struct sigcounter {
uint32_t count;
diff --git a/source3/smbd/oplock_linux.c b/source3/smbd/oplock_linux.c
index 535e809..c60c745 100644
--- a/source3/smbd/oplock_linux.c
+++ b/source3/smbd/oplock_linux.c
@@ -99,8 +99,8 @@ static void linux_oplock_signal_handler(struct tevent_context 
*ev_ctx,
 
fsp = file_find_fd(fd);
if (fsp == NULL) {
-   DEBUG(0,(linux_oplock_signal_handler: failed to find fsp for 
file fd=%d\n, fd ));
-   smb_panic(linux_oplock_signal_handler\n);
+   DEBUG(0,(linux_oplock_signal_handler: failed to find fsp for 
file fd=%d (file was closed ?)\n, fd ));
+   return;
}
break_kernel_oplock(smbd_messaging_context(), fsp);
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-5-test updated - release-4-0-0alpha8-1368-g8df4d10

2009-09-03 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  8df4d1015106dd706b05dbf68f01ea9266af1653 (commit)
   via  ef28e79dc5b1442c0fd66de1dbe7eae6aab5bdf6 (commit)
  from  55288bb0b4468b66ecd07e5bd2440d37be7b3c59 (commit)

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


- Log -
commit 8df4d1015106dd706b05dbf68f01ea9266af1653
Author: Günther Deschner g...@samba.org
Date:   Fri Sep 4 00:02:13 2009 +0200

wbinfo: fix various valgrind warnings and an invalid free.

Kai, please check.

Guenther
(cherry picked from commit b35c627b92c0585f4fa3a1d92385a908f0e0cd5b)

commit ef28e79dc5b1442c0fd66de1dbe7eae6aab5bdf6
Author: Günther Deschner g...@samba.org
Date:   Thu Sep 3 23:49:50 2009 +0200

s3-ntlm_auth: fix two segfaults in diagnostics mode.

Guenther
(cherry picked from commit d9bdf2a02f2966720a573cfa933edb112bf6fe64)

---

Summary of changes:
 nsswitch/wbinfo.c |8 +---
 source3/utils/ntlm_auth_diagnostics.c |4 ++--
 2 files changed, 3 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index 813846f..a80b69f 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -1318,7 +1318,6 @@ static bool wbinfo_auth_krb5(char *username, const char 
*cctype, uint32_t flags)
}
  done:
 
-   TALLOC_FREE(frame);
wbcFreeMemory(params.blobs);
 
return WBC_ERROR_IS_OK(wbc_status);
@@ -1363,8 +1362,6 @@ static bool wbinfo_auth(char *username)
 response.data.auth.error_string);
 #endif
 
-   TALLOC_FREE(frame);
-
return WBC_ERROR_IS_OK(wbc_status);
 }
 
@@ -1424,7 +1421,7 @@ static bool wbinfo_auth_crap(char *username, bool 
use_ntlmv2, bool use_lanman)
  lm, nt, NULL, NULL)) {
data_blob_free(names_blob);
data_blob_free(server_chal);
-   SAFE_FREE(pass);
+   TALLOC_FREE(pass);
return false;
}
data_blob_free(names_blob);
@@ -1471,7 +1468,6 @@ static bool wbinfo_auth_crap(char *username, bool 
use_ntlmv2, bool use_lanman)
 
data_blob_free(nt);
data_blob_free(lm);
-   TALLOC_FREE(frame);
 
return WBC_ERROR_IS_OK(wbc_status);
 }
@@ -1650,8 +1646,6 @@ static bool wbinfo_change_user_password(const char 
*username)
d_printf(Password change for user %s %s\n, username,
WBC_ERROR_IS_OK(wbc_status) ? succeeded : failed);
 
-   TALLOC_FREE(frame);
-
return WBC_ERROR_IS_OK(wbc_status);
 }
 
diff --git a/source3/utils/ntlm_auth_diagnostics.c 
b/source3/utils/ntlm_auth_diagnostics.c
index 0178823..3ee4acd 100644
--- a/source3/utils/ntlm_auth_diagnostics.c
+++ b/source3/utils/ntlm_auth_diagnostics.c
@@ -495,11 +495,11 @@ static bool test_plaintext(enum ntlm_break break_which)
nt_response.data[0]++;
break;
case NO_LM:
-   SAFE_FREE(lm_response.data);
+   TALLOC_FREE(lm_response.data);
lm_response.length = 0;
break;
case NO_NT:
-   SAFE_FREE(nt_response.data);
+   TALLOC_FREE(nt_response.data);
nt_response.length = 0;
break;
}


-- 
Samba Shared Repository


<    4   5   6   7   8   9