[SCM] Samba Shared Repository - branch master updated

2011-05-28 Thread Volker Lendecke
The branch, master has been updated
   via  9e05d34 s3: Fix a tiny memleak in copy_unix_token
   via  77ce431 s3: Use talloc_memdup in copy_unix_token
   via  4586f51 s3: Fix some nonempty blank lines
   via  1c11186 s3: Use cli_connect_nb in cli_start_connection
   via  defcd40 s3: Add cli_connect_nb
  from  51b43a4 packaging(RHEL-CTDB): align configure.rpm to the spec file

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


- Log -
commit 9e05d3430fedde70fcb1f6a1121c2cb67e4ce0f0
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 10:39:25 2011 +0200

s3: Fix a tiny memleak in copy_unix_token

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Sat May 28 11:47:11 CEST 2011 on sn-devel-104

commit 77ce431fdbd9f85f44c9bd8812e275a0b0e73f5d
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 10:38:52 2011 +0200

s3: Use talloc_memdup in copy_unix_token

commit 4586f5176bab04f7e003a3e93e4d62a512e8c047
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 10:24:20 2011 +0200

s3: Fix some nonempty blank lines

commit 1c11186837e33a1b57ea3346d4034a180cc654cb
Author: Volker Lendecke v...@samba.org
Date:   Thu May 26 22:02:28 2011 +0200

s3: Use cli_connect_nb in cli_start_connection

commit defcd409a38e0c9c624424a47becb45cb792ce76
Author: Volker Lendecke v...@samba.org
Date:   Thu May 26 22:00:07 2011 +0200

s3: Add cli_connect_nb

This builds up a cli_state until after the netbios session setup. It makes 
use
of smbsock_connect, so it connects to 139 and 445 simultaneously. This 
improves
the connection to Windows 2008 which does not listen on *SMBSERVER anymore.

---

Summary of changes:
 source3/libsmb/cliconnect.c |  184 ---
 source3/libsmb/proto.h  |3 +
 source3/locking/brlock.c|   12 ++--
 source3/locking/locking.c   |   27 +++---
 4 files changed, 160 insertions(+), 66 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index a4a3c11..9ee3b79 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -3079,6 +3079,139 @@ NTSTATUS cli_connect(struct cli_state *cli,
return NT_STATUS_OK;
 }
 
+static NTSTATUS cli_connect_sock(const char *host, int name_type,
+const struct sockaddr_storage *pss,
+const char *myname, uint16_t port,
+int sec_timeout, int *pfd, uint16_t *pport)
+{
+   TALLOC_CTX *frame = talloc_stackframe();
+   const char *prog;
+   unsigned int i, num_addrs;
+   const char **called_names;
+   const char **calling_names;
+   int *called_types;
+   NTSTATUS status;
+   int fd;
+
+   prog = getenv(LIBSMB_PROG);
+   if (prog != NULL) {
+   fd = sock_exec(prog);
+   if (fd == -1) {
+   return map_nt_error_from_unix(errno);
+   }
+   port = 0;
+   goto done;
+   }
+
+   if ((pss == NULL) || is_zero_addr(pss)) {
+   struct sockaddr_storage *addrs;
+   status = resolve_name_list(talloc_tos(), host, name_type,
+  addrs, num_addrs);
+   if (!NT_STATUS_IS_OK(status)) {
+   goto fail;
+   }
+   pss = addrs;
+   } else {
+   num_addrs = 1;
+   }
+
+   called_names = talloc_array(talloc_tos(), const char *, num_addrs);
+   if (called_names == NULL) {
+   status = NT_STATUS_NO_MEMORY;
+   goto fail;
+   }
+   called_types = talloc_array(talloc_tos(), int, num_addrs);
+   if (called_types == NULL) {
+   status = NT_STATUS_NO_MEMORY;
+   goto fail;
+   }
+   calling_names = talloc_array(talloc_tos(), const char *, num_addrs);
+   if (calling_names == NULL) {
+   status = NT_STATUS_NO_MEMORY;
+   goto fail;
+   }
+   for (i=0; inum_addrs; i++) {
+   called_names[i] = host;
+   called_types[i] = name_type;
+   calling_names[i] = myname;
+   }
+   status = smbsock_any_connect(pss, called_names, called_types,
+calling_names, NULL, num_addrs, port,
+sec_timeout, fd, NULL, port);
+   if (!NT_STATUS_IS_OK(status)) {
+   goto fail;
+   }
+done:
+   *pfd = fd;
+   *pport = port;
+   status = NT_STATUS_OK;
+fail:
+   TALLOC_FREE(frame);
+   return status;
+}
+
+NTSTATUS cli_connect_nb(const char *host, struct sockaddr_storage *pss,
+   uint16_t port, const char *myname,
+   int 

[SCM] Samba Shared Repository - branch master updated

2011-05-28 Thread Volker Lendecke
The branch, master has been updated
   via  5df8791 s3: Use cli_connect_nb in locktest
   via  6bf5d9a s3: Fix smbsock_connect
  from  9e05d34 s3: Fix a tiny memleak in copy_unix_token

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


- Log -
commit 5df87913d73ac3c3b6d1893f20038b24db31bd4f
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 18:57:03 2011 +0200

s3: Use cli_connect_nb in locktest

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Sat May 28 18:06:49 CEST 2011 on sn-devel-104

commit 6bf5d9a61f241d21cf5980f3617c7e27469c4681
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 18:55:47 2011 +0200

s3: Fix smbsock_connect

If all connection attempts fail, return immediately. Plain bug.

---

Summary of changes:
 source3/libsmb/smbsock_connect.c |2 +-
 source3/torture/locktest.c   |   31 +++
 2 files changed, 4 insertions(+), 29 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/smbsock_connect.c b/source3/libsmb/smbsock_connect.c
index 88b4533..8cf403c 100644
--- a/source3/libsmb/smbsock_connect.c
+++ b/source3/libsmb/smbsock_connect.c
@@ -575,7 +575,7 @@ static void smbsock_any_connect_connected(struct tevent_req 
*subreq)
}
 
state-num_received += 1;
-   if (state-num_received = state-num_addrs) {
+   if (state-num_received  state-num_addrs) {
/*
 * More addrs pending, wait for the others
 */
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c
index 95e4975..38f05f1 100644
--- a/source3/torture/locktest.c
+++ b/source3/torture/locktest.c
@@ -164,10 +164,8 @@ return a connection to a server
 static struct cli_state *connect_one(char *share, int snum)
 {
struct cli_state *c;
-   struct nmb_name called, calling;
char *server_n;
fstring server;
-   struct sockaddr_storage ss;
fstring myname;
static int count;
NTSTATUS status;
@@ -180,42 +178,19 @@ static struct cli_state *connect_one(char *share, int 
snum)
 
server_n = server;
 
-   zero_sockaddr(ss);
-
slprintf(myname,sizeof(myname), lock-%lu-%u, (unsigned long)getpid(), 
count++);
 
-   make_nmb_name(calling, myname, 0x0);
-   make_nmb_name(called , server, 0x20);
-
- again:
-zero_sockaddr(ss);
-
/* have to open a new connection */
-   if (!(c=cli_initialise())) {
-   DEBUG(0,(Connection to %s failed\n, server_n));
-   return NULL;
-   }
 
-   status = cli_connect(c, server_n, ss);
+   status = cli_connect_nb(server_n, NULL, 0, myname, Undefined, c);
if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(0,(Connection to %s failed. Error %s\n, server_n, 
nt_errstr(status) ));
+   DEBUG(0, (Connection to %s failed. Error %s\n, server_n,
+ nt_errstr(status)));
return NULL;
}
 
c-use_kerberos = use_kerberos;
 
-   if (!cli_session_request(c, calling, called)) {
-   DEBUG(0,(session request to %s failed\n, called.name));
-   cli_shutdown(c);
-   if (strcmp(called.name, *SMBSERVER)) {
-   make_nmb_name(called , *SMBSERVER, 0x20);
-   goto again;
-   }
-   return NULL;
-   }
-
-   DEBUG(4,( session request ok\n));
-
status = cli_negprot(c);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0, (protocol negotiation failed: %s\n,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-05-28 Thread Volker Lendecke
The branch, master has been updated
   via  797316a s3: Use cli_connect_nb in net_rpc_check
   via  230cb3b s3: Use cli_connect_nb in smbd_running()
   via  54970f9 s3: Use cli_connect_nb in cli_servertime
   via  06eec02 s3: Use cli_connect_nb in remote_password_change
   via  57ae327 s3: Add called name_type param to cli_connect_nb
   via  c430b57 s3: Fix a type-punned warning
   via  649873b s3: Use cli_connect_nb in masktest
   via  1173a4f s3: Fix some nonemtpy blank lines
  from  5df8791 s3: Use cli_connect_nb in locktest

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


- Log -
commit 797316ae9797f7567e01f853effbd87d98b2abbb
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 21:01:59 2011 +0200

s3: Use cli_connect_nb in net_rpc_check

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Sat May 28 21:57:04 CEST 2011 on sn-devel-104

commit 230cb3b90435d951beb62d8dd5230f74e178f921
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 20:54:33 2011 +0200

s3: Use cli_connect_nb in smbd_running()

commit 54970f90f6966f8b0c17a7c2badda619c2ebc13a
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 20:52:06 2011 +0200

s3: Use cli_connect_nb in cli_servertime

commit 06eec02e746860fb55901b65da44f50c35b48568
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 20:45:11 2011 +0200

s3: Use cli_connect_nb in remote_password_change

commit 57ae32794f841365a73f22df3b872eb001c21abc
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 20:39:54 2011 +0200

s3: Add called name_type param to cli_connect_nb

commit c430b57ce44e67d3eddc0d2fffaa78b9b0f36af5
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 20:38:13 2011 +0200

s3: Fix a type-punned warning

commit 649873bcf374997088da73f85424cbb641e56735
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 20:26:49 2011 +0200

s3: Use cli_connect_nb in masktest

commit 1173a4f83d8001d6a00b389133de64f09d1d77a2
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 20:24:01 2011 +0200

s3: Fix some nonemtpy blank lines

---

Summary of changes:
 source3/libsmb/cliconnect.c   |8 
 source3/libsmb/passchange.c   |   39 +--
 source3/libsmb/proto.h|2 +-
 source3/nmbd/nmbd_synclists.c |   11 +--
 source3/torture/locktest.c|3 ++-
 source3/torture/masktest.c|   40 +++-
 source3/utils/net_rpc.c   |   11 +++
 source3/utils/net_time.c  |   20 ++--
 source3/web/diagnose.c|   10 +++---
 9 files changed, 32 insertions(+), 112 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 9ee3b79..3921fbc 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -3151,13 +3151,12 @@ fail:
 }
 
 NTSTATUS cli_connect_nb(const char *host, struct sockaddr_storage *pss,
-   uint16_t port, const char *myname,
+   uint16_t port, int name_type, const char *myname,
int signing_state, struct cli_state **pcli)
 {
TALLOC_CTX *frame = talloc_stackframe();
struct cli_state *cli;
NTSTATUS status = NT_STATUS_NO_MEMORY;
-   int name_type = 0x20;
int fd = -1;
char *desthost;
char *p;
@@ -3194,7 +3193,8 @@ NTSTATUS cli_connect_nb(const char *host, struct 
sockaddr_storage *pss,
cli-port = port;
 
length = sizeof(cli-dest_ss);
-   ret = getpeername(fd, (struct sockaddr *)cli-dest_ss, length);
+   ret = getpeername(fd, (struct sockaddr *)(void *)cli-dest_ss,
+ length);
if (ret == -1) {
status = map_nt_error_from_unix(errno);
cli_shutdown(cli);
@@ -3228,7 +3228,7 @@ NTSTATUS cli_start_connection(struct cli_state 
**output_cli,
NTSTATUS nt_status;
struct cli_state *cli;
 
-   nt_status = cli_connect_nb(dest_host, dest_ss, port, my_name,
+   nt_status = cli_connect_nb(dest_host, dest_ss, port, 0x20, my_name,
   signing_state, cli);
if (!NT_STATUS_IS_OK(nt_status)) {
DEBUG(10, (cli_connect_nb failed: %s\n,
diff --git a/source3/libsmb/passchange.c b/source3/libsmb/passchange.c
index 37496bd..bf2103d 100644
--- a/source3/libsmb/passchange.c
+++ b/source3/libsmb/passchange.c
@@ -2,17 +2,17 @@
Unix SMB/CIFS implementation.
SMB client password change routine
Copyright (C) Andrew Tridgell 1994-1998
-   
+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the 

autobuild: intermittent test failure detected

2011-05-28 Thread Andrew Tridgell
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/2011-05-28-2306/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-28-2306/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-28-2306/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-28-2306/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-28-2306/samba4.stdout
  
The top commit at the time of the failure was:

commit 797316ae9797f7567e01f853effbd87d98b2abbb
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 21:01:59 2011 +0200

s3: Use cli_connect_nb in net_rpc_check

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Sat May 28 21:57:04 CEST 2011 on sn-devel-104