autobuild: intermittent test failure detected

2012-02-22 Thread autobuild
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2012-02-22-1258/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-02-22-1258/samba3.stderr
   http://git.samba.org/autobuild.flakey/2012-02-22-1258/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-02-22-1258/samba4.stderr
   http://git.samba.org/autobuild.flakey/2012-02-22-1258/samba4.stdout
  
The top commit at the time of the failure was:

commit 77889f63e6cf66553e615dbe9a4eba09ad046553
Author: Michael Adam ob...@samba.org
Date:   Tue Feb 21 18:09:14 2012 +0100

s4:torture:smb2: add a durable-open.open-oplock test

this is a variant of the open-lease test that does the initial
durable open with a batch oplock instead of a RH lease.

This is e.g. useful do analyse a (mis?) behaviour with current
windows 8 preview versions, compared to w2k8r2

Autobuild-User: Michael Adam ob...@samba.org
Autobuild-Date: Tue Feb 21 19:51:21 CET 2012 on sn-devel-104


[SCM] Samba Shared Repository - branch master updated

2012-02-22 Thread Volker Lendecke
The branch, master has been updated
   via  ee2e3d5 s3-vfstest: Fake smb_requests
   via  b0c21af s3-vfstest: Initialize some more
   via  db17767 s3: Add an error msg when a share mode entry is discarded
  from  77889f6 s4:torture:smb2: add a durable-open.open-oplock test

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


- Log -
commit ee2e3d56a2a633cecf4d1b06badc6fb8fd12580e
Author: Volker Lendecke v...@samba.org
Date:   Mon Feb 20 16:28:14 2012 +0100

s3-vfstest: Fake smb_requests

Autobuild-User: Volker Lendecke v...@samba.org
Autobuild-Date: Wed Feb 22 17:32:28 CET 2012 on sn-devel-104

commit b0c21afffe36b2239f9e688678b28cb58834fb6e
Author: Volker Lendecke v...@samba.org
Date:   Mon Feb 20 16:27:07 2012 +0100

s3-vfstest: Initialize some more

commit db17767d4d1e7ddccab899346d0374095389e370
Author: Volker Lendecke v...@samba.org
Date:   Mon Feb 20 16:00:50 2012 +0100

s3: Add an error msg when a share mode entry is discarded

---

Summary of changes:
 source3/locking/share_mode_lock.c |2 ++
 source3/torture/vfstest.c |   28 
 source3/torture/vfstest.h |4 
 3 files changed, 34 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/locking/share_mode_lock.c 
b/source3/locking/share_mode_lock.c
index 2152591..de8cc3c 100644
--- a/source3/locking/share_mode_lock.c
+++ b/source3/locking/share_mode_lock.c
@@ -176,6 +176,8 @@ static struct share_mode_data *parse_share_modes(TALLOC_CTX 
*mem_ctx,
while (i  d-num_share_modes) {
struct share_mode_entry *e = d-share_modes[i];
if (!pid_exists[i]) {
+   DEBUG(10, (wipe non-existent pid %s\n,
+  procid_str_static(e-pid)));
*e = d-share_modes[d-num_share_modes-1];
d-num_share_modes -= 1;
d-modified = True;
diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c
index 55321dd..53b5ee9 100644
--- a/source3/torture/vfstest.c
+++ b/source3/torture/vfstest.c
@@ -32,6 +32,7 @@
 #include auth.h
 #include serverid.h
 #include messages.h
+#include libcli/security/security.h
 
 /* List to hold groups of commands */
 static struct cmd_list {
@@ -415,6 +416,30 @@ void exit_server_cleanly(const char *const reason)
exit_server(normal exit);
 }
 
+struct smb_request *vfstest_get_smbreq(TALLOC_CTX *mem_ctx,
+  struct vfs_state *vfs)
+{
+   struct smb_request *result;
+
+   result = talloc_zero(mem_ctx, struct smb_request);
+   if (result == NULL) {
+   return NULL;
+   }
+   result-sconn = vfs-conn-sconn;
+   result-mid = ++vfs-mid;
+
+   result-inbuf = talloc_array(result, uint8_t, smb_size);
+   if (result-inbuf == NULL) {
+   goto fail;
+   }
+   SSVAL(result-inbuf, smb_mid, result-mid);
+   smb_setlen(result-inbuf, smb_size-4);
+   return result;
+fail:
+   TALLOC_FREE(result);
+   return NULL;
+}
+
 /* Main function */
 
 int main(int argc, char *argv[])
@@ -476,9 +501,12 @@ int main(int argc, char *argv[])
locking_init();
serverid_parent_init(NULL);
vfs.conn = talloc_zero(NULL, connection_struct);
+   vfs.conn-share_access = FILE_GENERIC_ALL;
vfs.conn-params = talloc_zero(vfs.conn, struct share_params);
vfs.conn-sconn = talloc_zero(NULL, struct smbd_server_connection);
vfs.conn-sconn-msg_ctx = messaging_init(vfs.conn-sconn, ev);
+   vfs.conn-sconn-ev_ctx = ev;
+   serverid_register(messaging_server_id(vfs.conn-sconn-msg_ctx), 0);
make_session_info_guest(NULL, vfs.conn-session_info);
file_init(vfs.conn-sconn);
set_conn_connectpath(vfs.conn, getcwd(cwd, sizeof(cwd)));
diff --git a/source3/torture/vfstest.h b/source3/torture/vfstest.h
index 0d71fac..0c57d56 100644
--- a/source3/torture/vfstest.h
+++ b/source3/torture/vfstest.h
@@ -29,12 +29,16 @@ struct func_entry {
 
 struct vfs_state {
struct connection_struct *conn;
+   uint64_t mid;
struct files_struct *files[1024];
DIR *currentdir;
void *data;
size_t data_size;
 };
 
+struct smb_request *vfstest_get_smbreq(TALLOC_CTX *mem_ctx,
+  struct vfs_state *vfs);
+
 struct cmd_set {
const char *name;
NTSTATUS (*fn)(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-02-22 Thread Richard Sharpe
The branch, master has been updated
   via  1082532 Honor SeTakeOwnershiPrivilege when client asks for 
SEC_STD_WRITE_OWNER but has no permission for that, but token has 
SeTakeOwnershipPrivilege
  from  ee2e3d5 s3-vfstest: Fake smb_requests

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


- Log -
commit 108253250048673493a636fd9fb2bf99b64ccf3c
Author: Richard Sharpe realrichardsha...@gmail.com
Date:   Wed Feb 22 06:25:54 2012 -0800

Honor SeTakeOwnershiPrivilege when client asks for SEC_STD_WRITE_OWNER but 
has no permission for that, but token has SeTakeOwnershipPrivilege

Autobuild-User: Richard Sharpe sha...@samba.org
Autobuild-Date: Wed Feb 22 19:19:32 CET 2012 on sn-devel-104

---

Summary of changes:
 libcli/security/access_check.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/security/access_check.c b/libcli/security/access_check.c
index 1b02a86..a9b618f 100644
--- a/libcli/security/access_check.c
+++ b/libcli/security/access_check.c
@@ -205,6 +205,11 @@ NTSTATUS se_access_check(const struct security_descriptor 
*sd,
bits_remaining = ~(SEC_RIGHTS_PRIV_BACKUP);
}
 
+   if ((bits_remaining  SEC_STD_WRITE_OWNER) 
+security_token_has_privilege(token, SEC_PRIV_TAKE_OWNERSHIP)) {
+   bits_remaining = ~(SEC_STD_WRITE_OWNER);
+   }
+
/* a NULL dacl allows access */
if ((sd-type  SEC_DESC_DACL_PRESENT)  sd-dacl == NULL) {
*access_granted = access_desired;


-- 
Samba Shared Repository


autobuild: intermittent test failure detected

2012-02-22 Thread autobuild
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2012-02-22-2052/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-02-22-2052/samba3.stderr
   http://git.samba.org/autobuild.flakey/2012-02-22-2052/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-02-22-2052/samba4.stderr
   http://git.samba.org/autobuild.flakey/2012-02-22-2052/samba4.stdout
  
The top commit at the time of the failure was:

commit 108253250048673493a636fd9fb2bf99b64ccf3c
Author: Richard Sharpe realrichardsha...@gmail.com
Date:   Wed Feb 22 06:25:54 2012 -0800

Honor SeTakeOwnershiPrivilege when client asks for SEC_STD_WRITE_OWNER but 
has no permission for that, but token has SeTakeOwnershipPrivilege

Autobuild-User: Richard Sharpe sha...@samba.org
Autobuild-Date: Wed Feb 22 19:19:32 CET 2012 on sn-devel-104


[SCM] Samba Shared Repository - branch master updated

2012-02-22 Thread Volker Lendecke
The branch, master has been updated
   via  e673afa s3-vfstest: Return an error code if cmd failed
  from  1082532 Honor SeTakeOwnershiPrivilege when client asks for 
SEC_STD_WRITE_OWNER but has no permission for that, but token has 
SeTakeOwnershipPrivilege

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


- Log -
commit e673afada1248535b992ceb28b8fcef106a85e05
Author: Volker Lendecke v...@samba.org
Date:   Wed Feb 22 17:57:08 2012 +0100

s3-vfstest: Return an error code if cmd failed

Autobuild-User: Volker Lendecke v...@samba.org
Autobuild-Date: Wed Feb 22 23:56:18 CET 2012 on sn-devel-104

---

Summary of changes:
 source3/torture/vfstest.c |9 +
 1 files changed, 5 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/torture/vfstest.c b/source3/torture/vfstest.c
index 53b5ee9..40e78e8 100644
--- a/source3/torture/vfstest.c
+++ b/source3/torture/vfstest.c
@@ -452,6 +452,7 @@ int main(int argc, char *argv[])
char cwd[MAXPATHLEN];
TALLOC_CTX *frame = talloc_stackframe();
struct tevent_context *ev = tevent_context_init(NULL);
+   NTSTATUS status = NT_STATUS_OK;
 
/* make sure the vars that get altered (4th field) are in
   a fixed location or certain compilers complain */
@@ -532,11 +533,11 @@ int main(int argc, char *argv[])
char*p = cmdstr;
 
while((cmd=next_command(frame, p)) != NULL) {
-   process_cmd(vfs, cmd);
+   status = process_cmd(vfs, cmd);
}
 
TALLOC_FREE(cmd);
-   return 0;
+   return NT_STATUS_IS_OK(status) ? 0 : 1;
}
 
/* Loop around accepting commands */
@@ -551,12 +552,12 @@ int main(int argc, char *argv[])
}
 
if (line[0] != '\n') {
-   process_cmd(vfs, line);
+   status = process_cmd(vfs, line);
}
SAFE_FREE(line);
}
 
TALLOC_FREE(vfs.conn);
TALLOC_FREE(frame);
-   return 0;
+   return NT_STATUS_IS_OK(status) ? 0 : 1;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-02-22 Thread Andrew Tridgell
The branch, master has been updated
   via  0c73322 s3:wscript_build - fix TDB dependency for source3/lib/util.c
   via  ed405df examples/testsmbc.c - substitute deprecated function 
bzero with memset
   via  b2ff4b0 examples/testsmbc.c - quiet implicit cast warnings on 
OpenSolaris
   via  a191852 examples/testsmbc.c - remove unused function print_list_fn
   via  2522712 examples/testsmbc.c - remove unused variables
  from  e673afa s3-vfstest: Return an error code if cmd failed

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


- Log -
commit 0c733221cf122d1bf304d74904b1329b2a6b7fb5
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Feb 20 10:27:45 2012 +0100

s3:wscript_build - fix TDB dependency for source3/lib/util.c

https://bugzilla.samba.org/show_bug.cgi?id=8708

Signed-off-by: Andrew Tridgell tri...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Feb 23 01:43:04 CET 2012 on sn-devel-104

commit ed405df823b9238baf49e3f9b84146eef6ce64ec
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Feb 20 09:27:13 2012 +0100

examples/testsmbc.c - substitute deprecated function bzero with memset

Here we do not make any use of libreplace and hence it would be overkill
to include the right headers for Solaris.

This fixes bug: https://bugzilla.samba.org/show_bug.cgi?id=8767

Signed-off-by: Andrew Tridgell tri...@samba.org

commit b2ff4b06d65f26eed913eb472a6660e7e26f8389
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Feb 20 09:23:30 2012 +0100

examples/testsmbc.c - quiet implicit cast warnings on OpenSolaris

https://bugzilla.samba.org/show_bug.cgi?id=8767

Signed-off-by: Andrew Tridgell tri...@samba.org

commit a19185249a69597c870cd1e366128400c5ebeeb9
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Feb 20 09:18:42 2012 +0100

examples/testsmbc.c - remove unused function print_list_fn

It does not get referenced from anywhere.

Signed-off-by: Andrew Tridgell tri...@samba.org

commit 25227129943420558476799a71a0e27647cf8d86
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Feb 20 09:37:39 2012 +0100

examples/testsmbc.c - remove unused variables

Signed-off-by: Andrew Tridgell tri...@samba.org

---

Summary of changes:
 examples/libsmbclient/testsmbc.c |   26 +-
 source3/wscript_build|4 +---
 2 files changed, 6 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/libsmbclient/testsmbc.c b/examples/libsmbclient/testsmbc.c
index de42428..1f98c3a 100644
--- a/examples/libsmbclient/testsmbc.c
+++ b/examples/libsmbclient/testsmbc.c
@@ -29,25 +29,9 @@
 #include libsmbclient.h
 #include get_auth_data_fn.h
 
-int global_id = 0;
-
-void print_list_fn(struct print_job_info *pji)
-{
-
-  fprintf(stdout, Print job: ID: %u, Prio: %u, Size: %lu, User: %s, Name: 
%s\n,
- pji-id,
-  pji-priority,
-  (unsigned long) pji-size,
-  pji-user,
-  pji-name);
-
-  global_id = pji-id;
-
-}
-
 int main(int argc, char *argv[])
 {
-  int err, fd, dh1, dh2, dh3, dsize, dirc;
+  int err, fd, dh1, dsize, dirc;
   const char *file = smb://samba/public/testfile.txt;
   const char *file2 = smb://samba/public/testfile2.txt;
   char buff[256];
@@ -74,7 +58,7 @@ int main(int argc, char *argv[])
 
 }
 
-fprintf(stdout, Directory handles: %u, %u, %u\n, dh1, dh2, dh3);
+fprintf(stdout, Directory handle: %u\n, dh1);
 
 /* Now, list those directories, but in funny ways ... */
 
@@ -130,7 +114,7 @@ int main(int argc, char *argv[])
 
   /* Now, write some date to the file ... */
 
-  bzero(buff, sizeof(buff));
+  memset(buff, '\0', sizeof(buff));
   strcpy(buff, Some test data for the moment ...);
 
   err = smbc_write(fd, buff, sizeof(buff));
@@ -256,10 +240,10 @@ int main(int argc, char *argv[])
   }
 
   fprintf(stdout, Stat'ed file:   %s. Size = %d, mode = %04X\n, file2, 
- (int)st2.st_size, st2.st_mode);
+ (int)st2.st_size, (unsigned int)st2.st_mode);
   fprintf(stdout, time: %s\n, ctime(st2.st_atime));
   fprintf(stdout, Earlier stat:   %s, Size = %d, mode = %04X\n, file, 
- (int)st1.st_size, st1.st_mode);
+ (int)st1.st_size, (unsigned int)st1.st_mode);
   fprintf(stdout, time: %s\n, ctime(st1.st_atime));
 
   /* Now, make a directory ... */
diff --git a/source3/wscript_build b/source3/wscript_build
index 67b686b..b24090e 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -811,7 +811,7 @@ bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
 
 bld.SAMBA3_SUBSYSTEM('samba3util',
source=LIB_UTIL_SRC,
-   deps='ndr security NDR_SECURITY samba-util',
+   deps='ndr security 

[SCM] Samba Shared Repository - branch master updated

2012-02-22 Thread Michael Adam
The branch, master has been updated
   via  fe24ab4 s4:smbcli:smb2: add a random GUID to the transport 
connection in smb2_transport_init()
  from  0c73322 s3:wscript_build - fix TDB dependency for source3/lib/util.c

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


- Log -
commit fe24ab4e53cde22e6b72d6073592cd3e31dc97f0
Author: Michael Adam ob...@samba.org
Date:   Wed Feb 22 15:29:26 2012 +0100

s4:smbcli:smb2: add a random GUID to the transport connection in 
smb2_transport_init()

This GUID is used in the smb2 negprot when max protocol is bigger than 
0x0202.
According to section 2.2.3 of the MS-SMB2 document, the Client GUID filed 
in the
SMB2 negotiate request must be filled with a (non-zero) GUID if there are 
other
dialects than 0x0202 in the dialects field.

http://msdn.microsoft.com/en-us/library/cc246543%28v=prot.13%29.aspx

Apart from corresponding to the docs, this change makes some of our 
durable-open
tests (e.g reopen2 and open-oplock) _not_ hang when running against windows 
8
preview (which might be still buggy).

Pair-Programmed-With: Gregor Beck gb...@sernet.de

Autobuild-User: Michael Adam ob...@samba.org
Autobuild-Date: Thu Feb 23 03:23:57 CET 2012 on sn-devel-104

---

Summary of changes:
 source4/libcli/smb2/transport.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/libcli/smb2/transport.c b/source4/libcli/smb2/transport.c
index 59d49f7..14d1fc5 100644
--- a/source4/libcli/smb2/transport.c
+++ b/source4/libcli/smb2/transport.c
@@ -30,6 +30,7 @@
 #include lib/stream/packet.h
 #include ../lib/util/dlinklist.h
 #include ../libcli/smb/smbXcli_base.h
+#include librpc/ndr/libndr.h
 
 /*
   destroy a transport
@@ -48,6 +49,7 @@ struct smb2_transport *smb2_transport_init(struct 
smbcli_socket *sock,
   struct smbcli_options *options)
 {
struct smb2_transport *transport;
+   struct GUID client_guid;
 
transport = talloc_zero(parent_ctx, struct smb2_transport);
if (!transport) return NULL;
@@ -58,12 +60,14 @@ struct smb2_transport *smb2_transport_init(struct 
smbcli_socket *sock,
TALLOC_FREE(sock-event.fde);
TALLOC_FREE(sock-event.te);
 
+   client_guid = GUID_random();
+
transport-conn = smbXcli_conn_create(transport,
  sock-sock-fd,
  sock-hostname,
  options-signing,
  0, /* smb1_capabilities */
- NULL); /* client_guid */
+ client_guid);
if (transport-conn == NULL) {
talloc_free(transport);
return NULL;


-- 
Samba Shared Repository