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

2013-02-27 Thread Karolin Seeger
The branch, v3-6-test has been updated
   via  b174e1b pdb: Fix array overrun by one. Reviewed-by: Alexander 
Bokovoy 
  from  b76501d build/autoconf: put ld check variable in quotes

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


- Log -
commit b174e1b496659c9e7a0fc70ad49ed0fc5906d252
Author: Andreas Schneider 
Date:   Tue Feb 19 09:23:53 2013 +0100

pdb: Fix array overrun by one. Reviewed-by: Alexander Bokovoy 


Signed-off-by: Andreas Schneider 

Fix bug #9686 - Fix a possible buffer overrun in pdb_smbpasswd.

---

Summary of changes:
 source3/passdb/pdb_smbpasswd.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index 43d6eaf..3d1c28c 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -736,7 +736,8 @@ static bool mod_smbfilepwd_entry(struct smbpasswd_privates 
*smbpasswd_state, con
fstring user_name;
 
char *status;
-   char linebuf[256];
+#define LINEBUF_SIZE 255
+   char linebuf[LINEBUF_SIZE + 1];
char readbuf[1024];
int c;
fstring ascii_p16;
@@ -791,7 +792,7 @@ static bool mod_smbfilepwd_entry(struct smbpasswd_privates 
*smbpasswd_state, con
 
linebuf[0] = '\0';
 
-   status = fgets(linebuf, sizeof(linebuf), fp);
+   status = fgets(linebuf, LINEBUF_SIZE, fp);
if (status == NULL && ferror(fp)) {
pw_file_unlock(lockfd, 
&smbpasswd_state->pw_file_lock_depth);
fclose(fp);
@@ -1020,7 +1021,7 @@ This is no longer supported.!\n", pwd->smb_name));
dump_data(100, (uint8 *)ascii_p16, wr_len);
 #endif
 
-   if(wr_len > sizeof(linebuf)) {
+   if(wr_len > LINEBUF_SIZE) {
DEBUG(0, ("mod_smbfilepwd_entry: line to write (%d) is too 
long.\n", wr_len+1));
pw_file_unlock(lockfd,&smbpasswd_state->pw_file_lock_depth);
fclose(fp);


-- 
Samba Shared Repository


autobuild: intermittent test failure detected

2013-02-27 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/2013-02-27-1011/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2013-02-27-1011/samba3.stderr
   http://git.samba.org/autobuild.flakey/2013-02-27-1011/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2013-02-27-1011/samba.stderr
   http://git.samba.org/autobuild.flakey/2013-02-27-1011/samba.stdout
  
The top commit at the time of the failure was:

commit bb0e4cbc3c30137245ca6b6cf9d74812ad17cee1
Author: Michael Adam 
Date:   Wed Feb 27 01:04:46 2013 +0100

s4:winbindd: do not drop the workgroup name in the getgrgid call

Signed-off-by: Michael Adam 

Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Andrew Bartlett 
Autobuild-Date(master): Wed Feb 27 05:44:39 CET 2013 on sn-devel-104


[SCM] Samba Shared Repository - branch v4-0-test updated

2013-02-27 Thread Karolin Seeger
The branch, v4-0-test has been updated
   via  51e2615 s4-libcli: Check return value of smbcli_request_setup(). 
Reviewed-by: Alexander Bokovoy 
   via  f589262 pyauth: Check return value of lpcfg_from_py_object(). 
Reviewed-by: Alexander Bokovoy 
   via  56af551 s4-libcli: Check return code of smbcli_request_setup(). 
Reviewed-by: Alexander Bokovoy 
   via  dc04531 librpc: Add NULL check for ndr functions for epm bindings.
   via  a925c14 s3-tldap: Make sure we don't deref a null pointer. 
Reviewed-by: Alexander Bokovoy 
   via  5114983 nmbd: Fix request data data processing.
   via  5d401e5 libsmb: Fix possible null pointer dereference. Reviewed-by: 
Alexander Bokovoy 
   via  72e902a pdb: Fix array overrun by one. Reviewed-by: Alexander 
Bokovoy 
   via  55fdc89 s3-spoolss: Don't leak memory. Reviewed-by: Alexander 
Bokovoy 
   via  5eaca8f s3-rpc_server: Make sure that fd is really closed on error. 
Reviewed-by: Alexander Bokovoy 
   via  bd76950 lib-util: Don't leak file descriptor on error. Reviewed-by: 
Alexander Bokovoy 
   via  22928b0 s3-vfs: Don't leak file descriptor on error. Reviewed-by: 
Alexander Bokovoy 
   via  7e9cfa8 s3-libsmb: Don't leak memory on error. Reviewed-by: 
Alexander Bokovoy 
   via  53538f6 winbind: Don't leak centry memory. Reviewed-by: Alexander 
Bokovoy 
   via  7d2d82a winbind: Don't leak memory on return. Reviewed-by: 
Alexander Bokovoy 
   via  2805032 s3-smbd: Don't leak subcntarr array. Reviewed-by: Alexander 
Bokovoy 
   via  6b9a239 s3-vfs: Don't leak file descriptor. Reviewed-by: Alexander 
Bokovoy 
   via  3461b09 s3-param: Don't leak file descriptor. Reviewed-by: 
Alexander Bokovoy 
   via  2b19732 s3-lsasd: Don't leak file descriptors. Reviewed-by: 
Alexander Bokovoy 
  from  20cb7de Fix bug #9674 - Samba denies owner Read Control when there 
is a DENY entry while W2K08 does not.

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


- Log -
commit 51e2615473110637f574f11f96c6ce2483eaf021
Author: Andreas Schneider 
Date:   Tue Feb 19 09:00:51 2013 +0100

s4-libcli: Check return value of smbcli_request_setup(). Reviewed-by: 
Alexander Bokovoy 

The last 7 patches address bug #9687 - Fix several possible null pointer
dereferences.

Autobuild-User(v4-0-test): Karolin Seeger 
Autobuild-Date(v4-0-test): Wed Feb 27 13:21:07 CET 2013 on sn-devel-104

commit f58926214da4e974d27b7a478e077848bce7982a
Author: Andreas Schneider 
Date:   Tue Feb 19 08:58:00 2013 +0100

pyauth: Check return value of lpcfg_from_py_object(). Reviewed-by: 
Alexander Bokovoy 

commit 56af551da8066c5b21a0c3fba705543f76900355
Author: Andreas Schneider 
Date:   Mon Feb 18 18:00:38 2013 +0100

s4-libcli: Check return code of smbcli_request_setup(). Reviewed-by: 
Alexander Bokovoy 

commit dc04531aabbd4e965e156e3650860efe6a1ebb34
Author: Andreas Schneider 
Date:   Mon Feb 18 17:32:28 2013 +0100

librpc: Add NULL check for ndr functions for epm bindings.

Reviewed-by: Alexander Bokovoy 

commit a925c141ca753a67b480618f1ab8481de9f6d68a
Author: Andreas Schneider 
Date:   Mon Feb 18 17:30:19 2013 +0100

s3-tldap: Make sure we don't deref a null pointer. Reviewed-by: Alexander 
Bokovoy 

commit 511498348417ed5957c7d11463721f6cfc4f7b4b
Author: Andreas Schneider 
Date:   Mon Feb 18 17:21:31 2013 +0100

nmbd: Fix request data data processing.

answers->rdata is an array and will never be NULL.
Reviewed-by: Alexander Bokovoy 

commit 5d401e55b772648cce0e96d8e6a2c8e6ebbd7875
Author: Andreas Schneider 
Date:   Mon Feb 18 17:11:15 2013 +0100

libsmb: Fix possible null pointer dereference. Reviewed-by: Alexander 
Bokovoy 

commit 72e902a8c70955709c91af51083471cae76b3672
Author: Andreas Schneider 
Date:   Tue Feb 19 09:23:53 2013 +0100

pdb: Fix array overrun by one. Reviewed-by: Alexander Bokovoy 


Signed-off-by: Andreas Schneider 

Fix bug #9686 - Fix a possible buffer overrun in pdb_smbpasswd.

commit 55fdc89aac7a5344e77759821579d40cc67aa67b
Author: Andreas Schneider 
Date:   Wed Feb 20 09:06:51 2013 +0100

s3-spoolss: Don't leak memory. Reviewed-by: Alexander Bokovoy 


Fix bug #9685 - Fix a memory leak in spoolss rpc server.

commit 5eaca8f645398877a96aaff98783bf618e6e8bc6
Author: Andreas Schneider 
Date:   Wed Feb 20 10:52:37 2013 +0100

s3-rpc_server: Make sure that fd is really closed on error. Reviewed-by: 
Alexander Bokovoy 

The last 10 patches address bug #bug 9683 - Fix several resource (fd) leaks.

commit bd769506ab2caf2ad0740f2d59a15fce881b4c77
Author: Andreas Schneider 
Date:   Wed Feb 20 10:48:05 2013 +0100

lib-util: Don't leak file descriptor on error. Reviewed-by: Alexander 
Bokovoy 

commit 22928b0cea0fce41efd211d28a14cbdbdb0c0d06
Author: Andreas Schneider 
Date:   Wed Feb 20 10:45:06 2013 +0100

s3-vfs: Don't leak file 

[SCM] Samba Shared Repository - branch master updated

2013-02-27 Thread Jeremy Allison
The branch, master has been updated
   via  a125ebe Make sure that domain joins work correctly when the DC 
disallows NTLM auth.
  from  bb0e4cb s4:winbindd: do not drop the workgroup name in the getgrgid 
call

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


- Log -
commit a125ebe9a5f3b9801b99bdffd12d565fc6fdcf07
Author: Richard Sharpe 
Date:   Tue Feb 26 20:22:05 2013 -0800

Make sure that domain joins work correctly when the DC disallows NTLM auth.

Signed-Off-By: Richard Sharpe 
Reviewed-By: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Wed Feb 27 21:49:25 CET 2013 on sn-devel-104

---

Summary of changes:
 source3/libnet/libnet_join.c |   14 +++---
 source3/libnet/libnet_join.h |3 ++-
 2 files changed, 13 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c
index 3d0a6d3..2b4ab0b 100644
--- a/source3/libnet/libnet_join.c
+++ b/source3/libnet/libnet_join.c
@@ -1170,7 +1170,8 @@ static NTSTATUS libnet_join_joindomain_rpc(TALLOC_CTX 
*mem_ctx,
 
 NTSTATUS libnet_join_ok(const char *netbios_domain_name,
const char *machine_name,
-   const char *dc_name)
+   const char *dc_name,
+   const bool use_kerberos)
 {
uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS;
struct cli_state *cli = NULL;
@@ -1179,6 +1180,7 @@ NTSTATUS libnet_join_ok(const char *netbios_domain_name,
NTSTATUS status;
char *machine_password = NULL;
char *machine_account = NULL;
+   int flags = 0;
 
if (!dc_name) {
return NT_STATUS_INVALID_PARAMETER;
@@ -1199,6 +1201,10 @@ NTSTATUS libnet_join_ok(const char *netbios_domain_name,
return NT_STATUS_NO_MEMORY;
}
 
+   if (use_kerberos) {
+   flags |= CLI_FULL_CONNECTION_USE_KERBEROS;
+   }
+
status = cli_full_connection(&cli, NULL,
 dc_name,
 NULL, 0,
@@ -1206,7 +1212,7 @@ NTSTATUS libnet_join_ok(const char *netbios_domain_name,
 machine_account,
 NULL,
 machine_password,
-0,
+flags,
 SMB_SIGNING_DEFAULT);
free(machine_account);
free(machine_password);
@@ -1277,7 +1283,8 @@ static WERROR libnet_join_post_verify(TALLOC_CTX *mem_ctx,
 
status = libnet_join_ok(r->out.netbios_domain_name,
r->in.machine_name,
-   r->in.dc_name);
+   r->in.dc_name,
+   r->in.use_kerberos);
if (!NT_STATUS_IS_OK(status)) {
libnet_join_set_error_string(mem_ctx, r,
"failed to verify domain membership after joining: %s",
@@ -2084,6 +2091,7 @@ static WERROR libnet_join_rollback(TALLOC_CTX *mem_ctx,
u->in.admin_account = r->in.admin_account;
u->in.admin_password= r->in.admin_password;
u->in.modify_config = r->in.modify_config;
+   u->in.use_kerberos  = r->in.use_kerberos;
u->in.unjoin_flags  = WKSSVC_JOIN_FLAGS_JOIN_TYPE |
  WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE;
 
diff --git a/source3/libnet/libnet_join.h b/source3/libnet/libnet_join.h
index dccf03b..58c33b2 100644
--- a/source3/libnet/libnet_join.h
+++ b/source3/libnet/libnet_join.h
@@ -25,7 +25,8 @@
 
 NTSTATUS libnet_join_ok(const char *netbios_domain_name,
const char *machine_name,
-   const char *dc_name);
+   const char *dc_name,
+   const bool use_kerberos);
 WERROR libnet_init_JoinCtx(TALLOC_CTX *mem_ctx,
   struct libnet_JoinCtx **r);
 WERROR libnet_init_UnjoinCtx(TALLOC_CTX *mem_ctx,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2013-02-27 Thread Michael Adam
The branch, master has been updated
   via  1da22ab build: Do not force a specific perl from ${PERL} when 
running pod2man
   via  3630ea1 Fix bug #9039 'map untrusted to domain' treats WORKSTATION 
as bogus domain.
  from  a125ebe Make sure that domain joins work correctly when the DC 
disallows NTLM auth.

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


- Log -
commit 1da22ab994822acacf9a0378c68b15cd32535390
Author: Andrew Bartlett 
Date:   Fri Feb 8 09:12:20 2013 +1100

build: Do not force a specific perl from ${PERL} when running pod2man

pod2man should have the right #!/usr/bin/perl line already, and forcing it 
may
cause us to use the wrong perl.

Essentially treat this like any other system binary, rather than forcing
it to use the first perl we found.

This essentially reverts e80f576db66ad04592ac436ed74ceb9b96452060.
Current SLES11 does not seem to have the issue this was added to
address.

Andrew Bartlett

Reviewed-by: Michael Adam 

Autobuild-User(master): Michael Adam 
Autobuild-Date(master): Thu Feb 28 02:14:25 CET 2013 on sn-devel-104

commit 3630ea12034ac17c1498ee2f81eb4788c0305782
Author: Daniel Kobras 
Date:   Fri Feb 22 16:24:26 2013 -0800

Fix bug #9039 'map untrusted to domain' treats WORKSTATION as bogus domain.

s3: never try to map global SAM name

Do not treat the global SAM name as a BOGUS domain, and exempt
local users from mapping, instead. This change reinstates the
exact mapping behaviour of Samba 3.2 if parameter 'map untrusted
to domain' is set.

Reviewed-by: Jeremy Allison 
Reviewed-by: Michael Adam 

---

Summary of changes:
 pidl/wscript |2 +-
 source3/auth/auth_util.c |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/pidl/wscript b/pidl/wscript
index e60ca20..7a25734 100644
--- a/pidl/wscript
+++ b/pidl/wscript
@@ -49,7 +49,7 @@ def build(bld):
 bld.SET_BUILD_GROUP('final')
 if 'POD2MAN' in bld.env and bld.env['POD2MAN'] != '':
 for src, manpage in pidl_manpages.iteritems():
-bld(rule='${PERL} ${POD2MAN} -c "Samba Documentation" ${SRC} 
${TGT}',
+bld(rule='${POD2MAN} -c "Samba Documentation" ${SRC} ${TGT}',
 shell=True,
 source=src,
 
install_path=os.path.dirname(bld.EXPAND_VARIABLES('${MANDIR}/'+manpage)),
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 1367186..ceaa706 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -125,7 +125,8 @@ NTSTATUS make_user_info_map(struct auth_usersupplied_info 
**user_info,
 * This also deals with the client passing in a "" domain */
 
if (!is_trusted_domain(domain) &&
-   !strequal(domain, my_sam_name()))
+   !strequal(domain, my_sam_name()) &&
+   !strequal(domain, get_global_sam_name()))
{
if (lp_map_untrusted_to_domain())
domain = my_sam_name();


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2013-02-27 Thread Jeremy Allison
The branch, master has been updated
   via  f14ba64 s4:winbindd: fix spacing and line length in 
cmd_getpwnam_recv_domain()
   via  7d01f10 s3:smbd: fix missing space in debug message in 
initial_break_processing()
  from  1da22ab build: Do not force a specific perl from ${PERL} when 
running pod2man

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


- Log -
commit f14ba6460a08794074bf1395a6d3886aee2fcb57
Author: Michael Adam 
Date:   Wed Feb 27 01:28:51 2013 +0100

s4:winbindd: fix spacing and line length in cmd_getpwnam_recv_domain()

Signed-off-by: Michael Adam 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Feb 28 03:54:41 CET 2013 on sn-devel-104

commit 7d01f1036971ecb4151871be30f7b6f39316adf6
Author: Michael Adam 
Date:   Tue Feb 26 09:39:17 2013 +0100

s3:smbd: fix missing space in debug message in initial_break_processing()

Signed-off-by: Michael Adam 
Reviewed-by: Jeremy Allison 

---

Summary of changes:
 source3/smbd/oplock.c |2 +-
 source4/winbind/wb_cmd_getpwnam.c |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index f447113..1fc7c83 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -290,7 +290,7 @@ static files_struct *initial_break_processing(
/* The file could have been closed in the meantime - return 
success. */
if( DEBUGLVL( 3 ) ) {
dbgtext( "initial_break_processing: cannot find open 
file with " );
-   dbgtext( "file_id %s gen_id = %lu", 
file_id_string_tos(&id), file_id);
+   dbgtext( "file_id %s gen_id = %lu, ", 
file_id_string_tos(&id), file_id);
dbgtext( "allowing break to succeed.\n" );
}
return NULL;
diff --git a/source4/winbind/wb_cmd_getpwnam.c 
b/source4/winbind/wb_cmd_getpwnam.c
index 0ba4cb6..0101d8c 100644
--- a/source4/winbind/wb_cmd_getpwnam.c
+++ b/source4/winbind/wb_cmd_getpwnam.c
@@ -84,7 +84,8 @@ static void cmd_getpwnam_recv_domain(struct composite_context 
*ctx)
user_info = talloc(state, struct libnet_UserInfo);
if (composite_nomem(user_info, state->ctx)) return;
 
-   ok= wb_samba3_split_username(state, state->service->task->lp_ctx, 
state->name, &user_dom, &user_name);
+   ok = wb_samba3_split_username(state, state->service->task->lp_ctx,
+ state->name, &user_dom, &user_name);
if(!ok){
composite_error(state->ctx, NT_STATUS_OBJECT_NAME_INVALID);
return;


-- 
Samba Shared Repository


[SCM] CTDB repository - branch 1.2.40 updated - ctdb-1.2.58-5-g49bab58

2013-02-27 Thread Amitay Isaacs
The branch, 1.2.40 has been updated
   via  49bab583f430b5c06178c2cd114d2362cf1d606c (commit)
   via  b129e5223eb77a08b8ee3d36aa59d36957699971 (commit)
  from  158a1e8d045c4b65dd3f52eb70535e446ec4fb48 (commit)

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


- Log -
commit 49bab583f430b5c06178c2cd114d2362cf1d606c
Author: Martin Schwenke 
Date:   Mon Feb 18 16:32:14 2013 +1100

recoverd: Do not send "ipreallocated" event to stopped nodes

Stopped nodes will reject "ipreallocated" because they are in
recovery, so they will eventually be banned.

Signed-off-by: Martin Schwenke 
Pair-programmed-with: Amitay Isaacs 
Cherry-pick-from: c270381ee81903ff459a8b23fd57c997d038cf14

commit b129e5223eb77a08b8ee3d36aa59d36957699971
Author: Martin Schwenke 
Date:   Tue Feb 19 14:29:06 2013 +1100

client: New generic node listing function list_of_nodes()

Signed-off-by: Martin Schwenke 
Pair-programmed-with: Amitay Isaacs 
Cherry-pick-from: a73bb56991b8c07ed0e9517ffcf0dc264be30487

---

Summary of changes:
 client/ctdb_client.c   |   38 ++
 include/ctdb_client.h  |5 +
 server/ctdb_takeover.c |   13 ++---
 3 files changed, 53 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/client/ctdb_client.c b/client/ctdb_client.c
index 739c21b..4a02ae5 100644
--- a/client/ctdb_client.c
+++ b/client/ctdb_client.c
@@ -3408,6 +3408,44 @@ uint32_t *list_of_vnnmap_nodes(struct ctdb_context *ctdb,
return nodes;
 }
 
+/* Get list of nodes not including those with flags specified by mask.
+ * If exclude_pnn is not -1 then exclude that pnn from the list.
+ */
+uint32_t *list_of_nodes(struct ctdb_context *ctdb,
+   struct ctdb_node_map *node_map,
+   TALLOC_CTX *mem_ctx,
+   uint32_t mask,
+   int exclude_pnn)
+{
+   int i, j, num_nodes;
+   uint32_t *nodes;
+
+   for (i=num_nodes=0;inum;i++) {
+   if (node_map->nodes[i].flags & mask) {
+   continue;
+   }
+   if (node_map->nodes[i].pnn == exclude_pnn) {
+   continue;
+   }
+   num_nodes++;
+   } 
+
+   nodes = talloc_array(mem_ctx, uint32_t, num_nodes);
+   CTDB_NO_MEMORY_FATAL(ctdb, nodes);
+
+   for (i=j=0;inum;i++) {
+   if (node_map->nodes[i].flags & mask) {
+   continue;
+   }
+   if (node_map->nodes[i].pnn == exclude_pnn) {
+   continue;
+   }
+   nodes[j++] = node_map->nodes[i].pnn;
+   } 
+
+   return nodes;
+}
+
 uint32_t *list_of_active_nodes(struct ctdb_context *ctdb,
struct ctdb_node_map *node_map,
TALLOC_CTX *mem_ctx,
diff --git a/include/ctdb_client.h b/include/ctdb_client.h
index ad31d24..69467c5 100644
--- a/include/ctdb_client.h
+++ b/include/ctdb_client.h
@@ -490,6 +490,11 @@ int ctdb_ctrl_setreclock(struct ctdb_context *ctdb,
const char *reclock);
 
 
+uint32_t *list_of_nodes(struct ctdb_context *ctdb,
+   struct ctdb_node_map *node_map,
+   TALLOC_CTX *mem_ctx,
+   uint32_t mask,
+   int exclude_pnn);
 uint32_t *list_of_connected_nodes(struct ctdb_context *ctdb,
struct ctdb_node_map *node_map,
TALLOC_CTX *mem_ctx,
diff --git a/server/ctdb_takeover.c b/server/ctdb_takeover.c
index 83b9347..5704b09 100644
--- a/server/ctdb_takeover.c
+++ b/server/ctdb_takeover.c
@@ -2125,11 +2125,18 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct 
ctdb_node_map *nodemap,
}
 
 ipreallocated:
-   /* tell all nodes to update natwg */
-   /* send the flags update natgw on all connected nodes */
+   /*
+* Tell all connected, but not stopped (since they are in
+* recovery and will reject the event), nodes to run
+* eventscripts to process the "ipreallocated" event.  This
+* can do a lot of things, including restarting services to
+* reconfigure them if public IPs have moved.  Once upon a
+* time this event only used to update natwg.
+*/
data.dptr  = discard_const("ipreallocated");
data.dsize = strlen((char *)data.dptr) + 1; 
-   nodes = list_of_connected_nodes(ctdb, nodemap, tmp_ctx, true);
+   nodes = list_of_nodes(ctdb, nodemap, tmp_ctx,
+ NODE_FLAGS_DISCONNECTED|NODE_FLAGS_STOPPED, -1);
if (ctdb_client_async_control(ctdb, CTDB_CONTROL_RUN_EVENTSCRIPTS,
  nodes, 0, TAKEOVER_TIMEOUT(),