[SCM] Samba Shared Repository - branch master updated

2011-07-22 Thread Andrew Tridgell
The branch, master has been updated
   via  2d21fe0 s4-messaging: fixed the removal of messaging sockets in 
child tasks
  from  fafd386 Fix const warning.

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


- Log -
commit 2d21fe079fb57e55d9bac0c69d8527013bf4fbc7
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jul 22 14:55:32 2011 +1000

s4-messaging: fixed the removal of messaging sockets in child tasks

when a child task exits we were firing a destructor on any inherited
messaging contexts, which could trigger a removal of the parents
message socket and messaging database entry.

This adds a new auto_remove flag to imessaging_init(), and exposes the
cleanup code for use by the stream service.

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Fri Jul 22 08:09:06 CEST 2011 on sn-devel-104

---

Summary of changes:
 source4/lib/messaging/messaging.c   |   23 ---
 source4/lib/messaging/messaging.h   |8 +---
 source4/lib/messaging/pymessaging.c |   10 +-
 source4/lib/messaging/tests/irpc.c  |4 ++--
 source4/lib/messaging/tests/messaging.c |   10 +-
 source4/smbd/server.c   |4 ++--
 source4/smbd/service_stream.c   |5 +++--
 source4/smbd/service_task.c |6 +++---
 8 files changed, 41 insertions(+), 29 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/messaging/messaging.c 
b/source4/lib/messaging/messaging.c
index 484f22b..ccc6003 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -541,10 +541,11 @@ NTSTATUS imessaging_send_ptr(struct imessaging_context 
*msg, struct server_id se
 
 
 /*
-  destroy the messaging context
+  remove our messaging socket and database entry
 */
-static int imessaging_destructor(struct imessaging_context *msg)
+int imessaging_cleanup(struct imessaging_context *msg)
 {
+   DEBUG(5,(imessaging: cleaning up %s\n, msg-path));
unlink(msg-path);
while (msg-names  msg-names[0]) {
irpc_remove_name(msg, msg-names[0]);
@@ -554,11 +555,17 @@ static int imessaging_destructor(struct 
imessaging_context *msg)
 
 /*
   create the listening socket and setup the dispatcher
+
+  use temporary=true when you want a destructor to remove the
+  associated messaging socket and database entry on talloc free. Don't
+  use this in processes that may fork and a child may talloc free this
+  memory
 */
 struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx,
-const char *dir,
-struct server_id server_id, 
-struct tevent_context *ev)
+  const char *dir,
+  struct server_id server_id,
+  struct tevent_context *ev,
+  bool auto_remove)
 {
struct imessaging_context *msg;
NTSTATUS status;
@@ -622,7 +629,9 @@ struct imessaging_context *imessaging_init(TALLOC_CTX 
*mem_ctx,
   EVENT_FD_READ, imessaging_handler, msg);
tevent_fd_set_auto_close(msg-event.fde);
 
-   talloc_set_destructor(msg, imessaging_destructor);
+   if (auto_remove) {
+   talloc_set_destructor(msg, imessaging_cleanup);
+   }

imessaging_register(msg, NULL, MSG_PING, ping_message);
imessaging_register(msg, NULL, MSG_IRPC, irpc_handler);
@@ -641,7 +650,7 @@ struct imessaging_context 
*imessaging_client_init(TALLOC_CTX *mem_ctx,
struct server_id id;
ZERO_STRUCT(id);
id.pid = random() % 0x1000;
-   return imessaging_init(mem_ctx, dir, id, ev);
+   return imessaging_init(mem_ctx, dir, id, ev, true);
 }
 /*
   a list of registered irpc server functions
diff --git a/source4/lib/messaging/messaging.h 
b/source4/lib/messaging/messaging.h
index eb8a8ab..e51590f 100644
--- a/source4/lib/messaging/messaging.h
+++ b/source4/lib/messaging/messaging.h
@@ -54,9 +54,11 @@ NTSTATUS imessaging_register(struct imessaging_context *msg, 
void *private_data,
 NTSTATUS imessaging_register_tmp(struct imessaging_context *msg, void 
*private_data,
msg_callback_t fn, uint32_t *msg_type);
 struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx,
-const char *dir,
-struct server_id server_id,
-struct tevent_context *ev);
+  const char *dir,
+   

[SCM] Samba Shared Repository - branch master updated

2011-07-22 Thread Stefan Metzmacher
The branch, master has been updated
   via  a11cc88 s3:libsmb: move cli_state-outgoing to 
cli_state-conn.outgoing
   via  9f2b3b0 s3:libsmb: move cli_state-pending to 
cli_state-conn.pending
   via  b94a7ca s3:libsmb: fix compiler warnings in cli_state_create()
  from  2d21fe0 s4-messaging: fixed the removal of messaging sockets in 
child tasks

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


- Log -
commit a11cc880ef0a7e105c46b835fb3c793da7cabb53
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jul 22 08:41:20 2011 +0200

s3:libsmb: move cli_state-outgoing to cli_state-conn.outgoing

metze

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Fri Jul 22 09:53:59 CEST 2011 on sn-devel-104

commit 9f2b3b0be6837c280a033b2fddf8fd433421d206
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jul 22 08:38:59 2011 +0200

s3:libsmb: move cli_state-pending to cli_state-conn.pending

metze

commit b94a7caa3ada6764c29ab75bf72fbb153c650bc0
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jul 22 08:38:02 2011 +0200

s3:libsmb: fix compiler warnings in cli_state_create()

metze

---

Summary of changes:
 source3/include/client.h  |6 +++-
 source3/libsmb/async_smb.c|   54 +---
 source3/libsmb/clientgen.c|   20 +++---
 source3/libsmb/smb2cli_base.c |   45 +
 4 files changed, 65 insertions(+), 60 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/client.h b/source3/include/client.h
index cfc0b41..26b8fcb 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -124,8 +124,10 @@ struct cli_state {
/* Where (if anywhere) this is mounted under DFS. */
char *dfs_mountpoint;
 
-   struct tevent_queue *outgoing;
-   struct tevent_req **pending;
+   struct {
+   struct tevent_queue *outgoing;
+   struct tevent_req **pending;
+   } conn;
 
struct {
uint16_t mid;
diff --git a/source3/libsmb/async_smb.c b/source3/libsmb/async_smb.c
index b621919..462a6dc 100644
--- a/source3/libsmb/async_smb.c
+++ b/source3/libsmb/async_smb.c
@@ -93,7 +93,7 @@ struct cli_smb_state {
 
 static uint16_t cli_alloc_mid(struct cli_state *cli)
 {
-   int num_pending = talloc_array_length(cli-pending);
+   int num_pending = talloc_array_length(cli-conn.pending);
uint16_t result;
 
while (true) {
@@ -105,7 +105,7 @@ static uint16_t cli_alloc_mid(struct cli_state *cli)
}
 
for (i=0; inum_pending; i++) {
-   if (result == cli_smb_req_mid(cli-pending[i])) {
+   if (result == cli_smb_req_mid(cli-conn.pending[i])) {
break;
}
}
@@ -121,7 +121,7 @@ void cli_smb_req_unset_pending(struct tevent_req *req)
struct cli_smb_state *state = tevent_req_data(
req, struct cli_smb_state);
struct cli_state *cli = state-cli;
-   int num_pending = talloc_array_length(cli-pending);
+   int num_pending = talloc_array_length(cli-conn.pending);
int i;
 
if (state-mid != 0) {
@@ -138,12 +138,12 @@ void cli_smb_req_unset_pending(struct tevent_req *req)
 * cli-pending. So if nothing is pending anymore, we need to
 * delete the socket read fde.
 */
-   TALLOC_FREE(cli-pending);
+   TALLOC_FREE(cli-conn.pending);
return;
}
 
for (i=0; inum_pending; i++) {
-   if (req == cli-pending[i]) {
+   if (req == cli-conn.pending[i]) {
break;
}
}
@@ -151,22 +151,23 @@ void cli_smb_req_unset_pending(struct tevent_req *req)
/*
 * Something's seriously broken. Just returning here is the
 * right thing nevertheless, the point of this routine is to
-* remove ourselves from cli-pending.
+* remove ourselves from cli-conn.pending.
 */
return;
}
 
/*
-* Remove ourselves from the cli-pending array
+* Remove ourselves from the cli-conn.pending array
 */
-   cli-pending[i] = cli-pending[num_pending-1];
+   cli-conn.pending[i] = cli-conn.pending[num_pending-1];
 
/*
 * No NULL check here, we're shrinking by sizeof(void *), and
 * talloc_realloc just adjusts the size for this.
 */
-   cli-pending = talloc_realloc(NULL, cli-pending, struct tevent_req *,
- num_pending - 1);
+   cli-conn.pending = talloc_realloc(NULL, cli-conn.pending,
+   

[SCM] CTDB repository - branch master updated - ctdb-1.10-224-gc6bfba2

2011-07-22 Thread Michael Adam
The branch, master has been updated
   via  c6bfba2bb66962b7b05d708f0747002700991472 (commit)
  from  a1b3661973489f0111e7975fec422fb99a25f0c8 (commit)

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


- Log -
commit c6bfba2bb66962b7b05d708f0747002700991472
Author: Michael Adam ob...@samba.org
Date:   Fri Jul 22 10:27:40 2011 +0200

packaging: honour rpm build target options handed in to makerpms.sh

This allows to call e.g. makerpms.sh -bs to build only the source RPM.

---

Summary of changes:
 packaging/RPM/makerpms.sh |   13 -
 1 files changed, 12 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RPM/makerpms.sh b/packaging/RPM/makerpms.sh
index 266fcfb..370e7c8 100755
--- a/packaging/RPM/makerpms.sh
+++ b/packaging/RPM/makerpms.sh
@@ -105,7 +105,18 @@ cp -p ${DIRNAME}/${SPECFILE} ${SPECDIR}
 ## Build
 ##
 echo $(basename $0): Getting Ready to build release package
-${RPMBUILD} -ba --clean --rmsource ${EXTRA_OPTIONS} ${SPECDIR}/${SPECFILE} || 
exit 1
+
+case ${EXTRA_OPTIONS} in
+   *-b*)
+   BUILD_TARGET=
+   ;;
+   *)
+   BUILD_TARGET=-ba
+   ;;
+esac
+
+
+${RPMBUILD} ${BUILD_TARGET} --clean --rmsource ${EXTRA_OPTIONS} 
${SPECDIR}/${SPECFILE} || exit 1
 
 echo $(basename $0): Done.
 


-- 
CTDB repository


[SCM] CTDB repository - branch 1.0.114 updated - ctdb-1.0.114.3-1-g0c3f11a

2011-07-22 Thread Michael Adam
The branch, 1.0.114 has been updated
   via  0c3f11a949f99d44dbe53831ccba8784b328d178 (commit)
  from  8ee1e84498fd91ffbd2f58edc5ac789df9679c80 (commit)

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


- Log -
commit 0c3f11a949f99d44dbe53831ccba8784b328d178
Author: Michael Adam ob...@samba.org
Date:   Fri Jul 22 10:27:40 2011 +0200

packaging: honour rpm build target options handed in to makerpms.sh

This allows to call e.g. makerpms.sh -bs to build only the source RPM.
(cherry picked from commit c6bfba2bb66962b7b05d708f0747002700991472)

---

Summary of changes:
 packaging/RPM/makerpms.sh |   13 -
 1 files changed, 12 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RPM/makerpms.sh b/packaging/RPM/makerpms.sh
index a51099c..50baa43 100755
--- a/packaging/RPM/makerpms.sh
+++ b/packaging/RPM/makerpms.sh
@@ -85,7 +85,18 @@ cp -p ${DIRNAME}/${SPECFILE} ${SPECDIR}
 ## Build
 ##
 echo $(basename $0): Getting Ready to build release package
-${RPMBUILD} -ba --clean --rmsource ${EXTRA_OPTIONS} ${SPECDIR}/${SPECFILE} || 
exit 1
+
+case ${EXTRA_OPTIONS} in
+   *-b*)
+   BUILD_TARGET=
+   ;;
+   *)
+   BUILD_TARGET=-ba
+   ;;
+esac
+
+
+${RPMBUILD} ${BUILD_TARGET} --clean --rmsource ${EXTRA_OPTIONS} 
${SPECDIR}/${SPECFILE} || exit 1
 
 echo $(basename $0): Done.
 


-- 
CTDB repository


[SCM] Samba Shared Repository - branch master updated

2011-07-22 Thread Michael Adam
The branch, master has been updated
   via  efbe160 s3:loadparm: fix the reload of the configuration: also 
reload activated registry shares
   via  ec113a5 s3:loadparm: add reload_registry_shares() - reload only 
those shares already loaded
   via  2b4bb9b s3:smbclient: print nt status code when smb echo fails
   via  d67a91b s3:smbclient: add a tdis command to view and change the 
tree id (tid).
   via  7327bde s3:smbclient: add a tdis command to do a tree disconnect 
(close a connection to a share)
   via  88d0e44 s3:smbclient: add a tcon command to do a tree connect 
(connect to a share)
   via  281c6d0 s3:smbclient: add logoff command to close the session
  from  a11cc88 s3:libsmb: move cli_state-outgoing to 
cli_state-conn.outgoing

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


- Log -
commit efbe1602bd014eada4811f336bdccbf4692d3807
Author: Michael Adam ob...@samba.org
Date:   Fri Jul 22 10:11:52 2011 +0200

s3:loadparm: fix the reload of the configuration: also reload activated 
registry shares

Autobuild-User: Michael Adam ob...@samba.org
Autobuild-Date: Fri Jul 22 16:53:49 CEST 2011 on sn-devel-104

commit ec113a58a4dc4e4f3ea03f7818eb312325f69482
Author: Michael Adam ob...@samba.org
Date:   Fri Jul 22 10:10:43 2011 +0200

s3:loadparm: add reload_registry_shares() - reload only those shares 
already loaded

commit 2b4bb9b7a127dbaae9af8b1d48e56986ef70b974
Author: Michael Adam ob...@samba.org
Date:   Fri Jul 22 15:38:38 2011 +0200

s3:smbclient: print nt status code when smb echo fails

commit d67a91b9556a81318fd36d7f17ce327e5f6d44e0
Author: Michael Adam ob...@samba.org
Date:   Fri Jul 22 14:12:13 2011 +0200

s3:smbclient: add a tdis command to view and change the tree id (tid).

This low level command can be used to switch between tree connects in one
session.

commit 7327bde81acecf4ae0c09f80cebe21a1312aeb3a
Author: Michael Adam ob...@samba.org
Date:   Fri Jul 22 14:11:34 2011 +0200

s3:smbclient: add a tdis command to do a tree disconnect (close a 
connection to a share)

commit 88d0e44df340e5954b2f57c779c2a49a5fac0b11
Author: Michael Adam ob...@samba.org
Date:   Fri Jul 22 14:10:38 2011 +0200

s3:smbclient: add a tcon command to do a tree connect (connect to a share)

commit 281c6d02bdcc9988c0f1660a3c77ba4b3db3dc6d
Author: Michael Adam ob...@samba.org
Date:   Fri Jul 22 14:08:03 2011 +0200

s3:smbclient: add logoff command to close the session

---

Summary of changes:
 source3/client/client.c  |  101 +-
 source3/param/loadparm.c |   37 -
 2 files changed, 134 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/client.c b/source3/client/client.c
index 1cf4410..8c797e5 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -4308,6 +4308,99 @@ static int cmd_logon(void)
return 0;
 }
 
+/**
+ * close the session
+ */
+
+static int cmd_logoff(void)
+{
+   NTSTATUS status;
+
+   status = cli_ulogoff(cli);
+   if (!NT_STATUS_IS_OK(status)) {
+   d_printf(logoff failed: %s\n, nt_errstr(status));
+   return -1;
+   }
+
+   d_printf(logoff successful\n);
+   return 0;
+}
+
+
+/**
+ * tree connect (connect to a share)
+ */
+
+static int cmd_tcon(void)
+{
+   TALLOC_CTX *ctx = talloc_tos();
+   char *sharename;
+   NTSTATUS status;
+
+   if (!next_token_talloc(ctx, cmd_ptr, sharename, NULL)) {
+   d_printf(tcon sharename\n);
+   return 0;
+   }
+
+   if (!sharename) {
+   return 1;
+   }
+
+   status = cli_tcon_andx(cli, sharename, ?, , 0);
+   if (!NT_STATUS_IS_OK(status)) {
+   d_printf(tcon failed: %s\n, nt_errstr(status));
+   return -1;
+   }
+
+   talloc_free(sharename);
+
+   d_printf(tcon to %s successful, tid: %u\n, sharename,
+cli_state_get_tid(cli));
+   return 0;
+}
+
+/**
+ * tree disconnect (disconnect from a share)
+ */
+
+static int cmd_tdis(void)
+{
+   NTSTATUS status;
+
+   status = cli_tdis(cli);
+   if (!NT_STATUS_IS_OK(status)) {
+   d_printf(tdis failed: %s\n, nt_errstr(status));
+   return -1;
+   }
+
+   d_printf(tdis successful\n);
+   return 0;
+}
+
+
+/**
+ * get or set tid
+ */
+
+static int cmd_tid(void)
+{
+   TALLOC_CTX *ctx = talloc_tos();
+   char *tid_str;
+
+   if (!next_token_talloc(ctx, cmd_ptr, tid_str, NULL)) {
+   if (cli_state_has_tcon(cli)) {
+   d_printf(current tid is %d\n, cli_state_get_tid(cli));
+   } else {
+   d_printf(no tcon currently\n);
+   }
+   } else {
+   uint16_t tid = 

[SCM] Samba Shared Repository - branch master updated

2011-07-22 Thread Stefan Metzmacher
The branch, master has been updated
   via  6d4f9fc s3:libsmb: move cli_state-desthost to 
cli_state-conn.remote_name
   via  477a8a7 s3:winbindd_cm: use controller instead of cli-desthost
   via  e0a38c3 s3:net_util: use server_name instead of cli-desthost
   via  4fb03b4 s3:net_rpc_registry: use pipe_hnd-desthost instead of 
cli-desthost
   via  1f1ca59 s3:net_rpc_printer: make use of cli_state_remote_name()
   via  419eb29 s3:net_rpc_join: make use of cli_state_remote_name()
   via  7ca20ea s3:net_rpc_join: use pipe_hnd-desthost instead of 
cli-desthost
   via  27c38df s3:net_rpc: make use of cli_state_remote_name()
   via  f88723a s3:net_rpc: use netr-desthost instead of cli-desthost
   via  3d675f1 s3:net_rap: make use of cli_state_remote_name()
   via  540cd1a s3:rpcclient: make use of cli_state_remote_name()
   via  9a638c4 s3:rpcclient: use rpc_pipe-desthost instead of 
cli-desthost
   via  49c8534 s3:cli_pipe_schannel: make use of cli_state_remote_name()
   via  efc2c31 s3:cli_pipe: make use of cli_state_remote_name()
   via  ef23fb3 s3:cli_pipe: use result-desthost instead of cli-desthost
   via  9fe30f3 s3:libsmb_server: make use of cli_state_remote_name()
   via  b5e9ada s3:libsmb/libsmb_dir: make use of cli_state_remote_name()
   via  8277260 s3:libsmb/clirap2: make use of cli_state_remote_name()
   via  390b545 s3:libsmb/clifsinfo: make use of cli_state_remote_name()
   via  ad40515 s3:libsmb/clidfs: make use of cli_state_remote_name()
   via  77fdebc s3:libsmb/cliconnect: make use of cli_state_remote_name()
   via  22cbb59 s3:libnet_join: make use of cli_state_remote_name()
   via  bb0d063 s3:lib/netapi: make use of cli_state_remote_name()
   via  9a3e15d s3:client: make use of cli_state_remote_name()
   via  ab9d99c s3:auth_server: make use of cli_state_remote_name()
   via  823ce6f s3:auth_domain: we already have the dc_name, it's the same 
as cli-desthost
   via  b87bd59 s3:libsmb: add cli_state_remote_name()
   via  b3e0b73 s3:libsmb: remove const from cli_cm_display()
   via  a560b79 s3-torture: run_locktest4(): replace cli_read_old() with 
cli_read()
   via  0986b0b s3-torture: introduce test_cli_read()
   via  48de329 s3:libsmb: move cli_state-{src_ss,dest_ss} to 
cli_state-conn.{local_ss,remote_ss}
   via  cc4b2a6 s3:net_rpc_printer: make use of cli_state_remote_sockaddr()
   via  9b40092 s3:net_rpc: make use of cli_state_remote_sockaddr()
   via  a46b265 s3:net_rpc_join: make use of cli_state_remote_sockaddr()
   via  f0c1b5d s3:net_rpc_join: pass const sockaddr_storage to 
net_rpc_join_ok()
   via  e917976 s3:net_util: pass const sockaddr_storage to 
net_make_ipc_connection_ex()
   via  f7cd20d s3:net_util: add some const to sockaddr_storage
   via  b76951b s3:auth_domain: add some const to sockaddr_storage
   via  5c7749a s3:libsmb: only pass const sockaddr_storage to 
cli_full_connection()
   via  552164c s3:smbcquotas: pass down NULL instead of a zero 
sockaddr_storage
   via  d60a1b4 s3:smbcacls: pass down NULL instead of a zero 
sockaddr_storage
   via  814449a s3:libsmb_server: pass NULL instead of a zero 
sockaddr_storage
   via  1eb8c2a s3:libsmb: only pass a const sockaddr_storage to 
cli_start_connection()
   via  6cc61d6 s3:net_time: expect const sockaddr_storage in 
cli_servertime()
   via  0cd70ec s3:libsmb: let cli_connect_nb() only expect a const 
sockaddr_storage *dest_ss
   via  7f0b4ee s3:libsmb: use cli_state_remote_sockaddr() in 
smb2cli_tcon_send()
   via  acf4b84 s3:libnet: use cli_state_remote_sockaddr() in 
libnet_DomainJoin()
   via  8bea5d6 s3:winbindd_cm: use cli_state_[local|remote]_sockaddr()
   via  fa42d2e s3:libsmb: add cli_state_[local|remote]_sockaddr()
   via  13dbd50 s3:libsmb: move cli_state-fd to cli_state-conn.fd
   via  6d1757f s3:libsmb: make use of cli_state_disconnect()
   via  103413d s3:libsmb: make use of cli_state_is_connected()
   via  cd71c57 s3:torture: use cli_state_disconnect() to close the socket 
on SIGALRM
   via  5bd80b2 s3:smbtree: try to fix completely broken logic in 
get_workgroups()
  from  efbe160 s3:loadparm: fix the reload of the configuration: also 
reload activated registry shares

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


- Log -
commit 6d4f9fc251fabc2951356db968e72b65ebf8c027
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jul 22 16:53:51 2011 +0200

s3:libsmb: move cli_state-desthost to cli_state-conn.remote_name

metze

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Fri Jul 22 18:17:41 CEST 2011 on sn-devel-104

commit 477a8a7e479952640703ca2f30dc6e184a57edb1
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jul 22 16:52:55 2011 +0200

s3:winbindd_cm: use 

[SCM] Samba Shared Repository - branch master updated

2011-07-22 Thread Jeremy Allison
The branch, master has been updated
   via  1832c95 Fix bug 8314] - smbd crash with unknown user.
  from  6d4f9fc s3:libsmb: move cli_state-desthost to 
cli_state-conn.remote_name

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


- Log -
commit 1832c9591099be941ef3afe7b0381c4af61f4728
Author: Jeremy Allison j...@samba.org
Date:   Fri Jul 22 16:40:54 2011 -0700

Fix bug 8314] - smbd crash with unknown user.

All other auth modules code with being called with
auth_method-private_data being NULL, make the auth_server
module cope with this too.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Sat Jul 23 02:55:01 CEST 2011 on sn-devel-104

---

Summary of changes:
 source3/auth/auth_server.c |   15 +++
 1 files changed, 11 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c
index 3d775c2..f298599 100644
--- a/source3/auth/auth_server.c
+++ b/source3/auth/auth_server.c
@@ -272,16 +272,23 @@ static NTSTATUS check_smbserver_security(const struct 
auth_context *auth_context
 const struct auth_usersupplied_info 
*user_info,
 struct auth_serversupplied_info 
**server_info)
 {
-   struct server_security_state *state = talloc_get_type_abort(
-   my_private_data, struct server_security_state);
-   struct cli_state *cli;
+   struct server_security_state *state = NULL;
+   struct cli_state *cli = NULL;
static bool tested_password_server = False;
static bool bad_password_server = False;
NTSTATUS nt_status = NT_STATUS_NOT_IMPLEMENTED;
bool locally_made_cli = False;
 
-   DEBUG(10, (Check auth for: [%s]\n, user_info-mapped.account_name));
+   DEBUG(10, (check_smbserver_security: Check auth for: [%s]\n,
+   user_info-mapped.account_name));
+
+   if (my_private_data == NULL) {
+   DEBUG(10,(check_smbserver_security: 
+   password server is not connected\n));
+   return NT_STATUS_LOGON_FAILURE;
+   }
 
+   state = talloc_get_type_abort(my_private_data, struct 
server_security_state);
cli = state-cli;
 
if (cli) {


-- 
Samba Shared Repository