[SCM] Samba Shared Repository - branch master updated

2010-12-09 Thread Andrew Bartlett
The branch, master has been updated
   via  e928032 wintest flush DNS on Windows clients to improve reliablity
   via  280caa6 s3-dns Don't use DELEG_FLAG in DNS update, Windows 2008R2 
does not like it
   via  0f1cc88 s3-dns Don't use SEQUENCE_FLAG in DNS update, Windows 
2008R2 does not like it
   via  89d4439 wintest More work to make test-s3.py work
   via  c2a1ad9 s3-net Allow 'net ads dns register' to take an optional 
hostname argument
   via  4408f8a wintest Share more of the S4 test code with the s3 test
   via  6195dfc s3-winbind Improve memory handling in NTLMv2-backend 
plaintext authentication
   via  5cfe949 s3-winbind Don't send the LM password to the server, ever
   via  f13404e s3-libsmb Don't ever ask for machine$ principals as a 
target.
   via  45d784e s3-docs Add docs for 'client use spnego principal' and 
'send spengo principal'
   via  d69b4f1 s3-docs Explain change to NTLMv2 by default in the client
   via  635fbf2 s3-client Use NTLMv2 by default in the Samba client
   via  b3c2df5 s3-smbd Don't send SPNEGO principal (rfc4178 hint) by 
default
   via  bb78062 s3-libads Default to NOT using the server-supplied 
principal from SPNEGO
  from  10441ed subunitrun: Use unittest.TestProgram if subunit.TestProgram 
is not available.

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


- Log -
commit e92803201ae442892bee220fbcd2a124a8ca854b
Author: Andrew Bartlett 
Date:   Fri Dec 10 16:56:57 2010 +1100

wintest flush DNS on Windows clients to improve reliablity

Autobuild-User: Andrew Bartlett 
Autobuild-Date: Fri Dec 10 08:45:28 CET 2010 on sn-devel-104

commit 280caa6b3bb1199939f9349ea5a436a491c81791
Author: Andrew Bartlett 
Date:   Fri Dec 10 15:32:08 2010 +1100

s3-dns Don't use DELEG_FLAG in DNS update, Windows 2008R2 does not like it

commit 0f1cc889a26477e9a98629f120fe5890b2e106fa
Author: Andrew Bartlett 
Date:   Fri Dec 10 15:30:22 2010 +1100

s3-dns Don't use SEQUENCE_FLAG in DNS update, Windows 2008R2 does not like 
it

Andrew Bartlett

commit 89d4439ff13825d2bd59ebf8a49960258f4feebd
Author: Andrew Bartlett 
Date:   Fri Dec 10 15:09:54 2010 +1100

wintest More work to make test-s3.py work

 - Set the password on the newly added 'root' user so we can connect with a 
user that exists in getpwnam() without further configuration
 - bind interfaces only so we don't conflict with other Samba instances
 - use the full DNS name for smbclient
 - don't connect to localhost (as we will be on ${INTERFACE_IP} only
 - Use the windows domain in the wbinfo command (winbindd won't take bare 
name here).
 - Register our IP address in DNS using 'net ads dns register'

Andrew Bartlett

commit c2a1ad9047508cf2745a9019e6783c8b8f7ef475
Author: Andrew Bartlett 
Date:   Fri Dec 10 15:08:53 2010 +1100

s3-net Allow 'net ads dns register' to take an optional hostname argument

This allows the administrator to more carefully chose what name to register.

Andrew Bartlett

commit 4408f8a0dec80c34dfe770cc2a81f2d4e074ba8a
Author: Andrew Bartlett 
Date:   Fri Dec 10 12:13:58 2010 +1100

wintest Share more of the S4 test code with the s3 test

This allows us to run a private BIND in the S3 test, and allows the S3
test to join a freshly provisioned AD instance if the VM isn't already
configured.

Andrew Bartlett

commit 6195dfc0eb310a2362cb949a000979514a52c648
Author: Andrew Bartlett 
Date:   Fri Dec 10 12:12:23 2010 +1100

s3-winbind Improve memory handling in NTLMv2-backend plaintext 
authentication

Andrew Bartlett

commit 5cfe949108f253a8e20c835cb53fe6f5eae7fbb5
Author: Andrew Bartlett 
Date:   Fri Dec 10 12:10:07 2010 +1100

s3-winbind Don't send the LM password to the server, ever

This is for the case where we have the plaintext password locally, and
can construct the challenge-response values here.

We should never ever use the LM password in domain authentication.
The last domain controller to only have LM passwords stored was NT
3.5.

Andrew Bartlett

commit f13404e27b00f826a11684e69cff82ae0023fc91
Author: Andrew Bartlett 
Date:   Fri Dec 10 07:57:59 2010 +1100

s3-libsmb Don't ever ask for machine$ principals as a target.

It is never correct to ask for a machine$ principal as the target of a
kerberos connection.  You should always connect via the
servicePrincipalName.

This current code appears to have built up from a series of minimal
changes, as the codebase adapted the to lack of a SPNEGO principal
from Windows 2008.

Andrew Bartlett

commit 45d784e929b37edddea4c472d288a46b37aa7415
Author: Andrew Bartlett 
Date:   Thu Dec 9 17:37:14 2010 +1100

s3-docs Add docs for 'client use spnego principal' and 'send spengo 
principal'

Andrew Bartlett

commit 

[SCM] CTDB repository - branch master updated - ctdb-1.10-46-gf44c02f

2010-12-09 Thread Ronnie Sahlberg
The branch, master has been updated
   via  f44c02f45dbc13e3cc2e89ee1c96bd0d57042fcc (commit)
  from  c111e98d3ad7bd3d09f4081e9bb1443d3722672f (commit)

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


- Log -
commit f44c02f45dbc13e3cc2e89ee1c96bd0d57042fcc
Author: Ronnie Sahlberg 
Date:   Fri Dec 10 14:18:28 2010 +1100

libctdb

fix a compile problem after renaming a structure field

---

Summary of changes:
 libctdb/messages.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libctdb/messages.c b/libctdb/messages.c
index f28ac4a..d61d29e 100644
--- a/libctdb/messages.c
+++ b/libctdb/messages.c
@@ -202,7 +202,7 @@ bool ctdb_send_message(struct ctdb_connection *ctdb,
return false;
}
 
-   io_elem_init_req_header(req->pdu,
+   io_elem_init_req_header(req->io,
CTDB_REQ_MESSAGE, pnn, new_reqid(ctdb));
 
pkt = req->hdr.message;


-- 
CTDB repository


[SCM] CTDB repository - branch 1.2 updated - ctdb-1.9.1-267-gae1aeac

2010-12-09 Thread Ronnie Sahlberg
The branch, 1.2 has been updated
   via  ae1aeacc05a39177d274ed8fb90e24163a59bae8 (commit)
  from  5a46d95b8d4dbc1e5aea3fb73912ac6ee49cd182 (commit)

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


- Log -
commit ae1aeacc05a39177d274ed8fb90e24163a59bae8
Author: Ronnie Sahlberg 
Date:   Fri Dec 10 14:18:28 2010 +1100

libctdb

fix a compile problem after renaming a structure field

---

Summary of changes:
 libctdb/messages.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libctdb/messages.c b/libctdb/messages.c
index f28ac4a..d61d29e 100644
--- a/libctdb/messages.c
+++ b/libctdb/messages.c
@@ -202,7 +202,7 @@ bool ctdb_send_message(struct ctdb_connection *ctdb,
return false;
}
 
-   io_elem_init_req_header(req->pdu,
+   io_elem_init_req_header(req->io,
CTDB_REQ_MESSAGE, pnn, new_reqid(ctdb));
 
pkt = req->hdr.message;


-- 
CTDB repository


[SCM] CTDB repository - branch 1.2-nodeflags updated - ctdb-1.9.1-253-g693e7f9

2010-12-09 Thread Ronnie Sahlberg
The branch, 1.2-nodeflags has been updated
   via  693e7f954f9fdae493fb43f41eafefaad3876196 (commit)
  from  78e5ae528f197aa75cc477ee3ff33c3a558c612a (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2-nodeflags


- Log -
commit 693e7f954f9fdae493fb43f41eafefaad3876196
Author: Ronnie Sahlberg 
Date:   Fri Dec 10 14:18:28 2010 +1100

libctdb

fix a compile problem after renaming a structure field

---

Summary of changes:
 libctdb/messages.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libctdb/messages.c b/libctdb/messages.c
index f28ac4a..d61d29e 100644
--- a/libctdb/messages.c
+++ b/libctdb/messages.c
@@ -202,7 +202,7 @@ bool ctdb_send_message(struct ctdb_connection *ctdb,
return false;
}
 
-   io_elem_init_req_header(req->pdu,
+   io_elem_init_req_header(req->io,
CTDB_REQ_MESSAGE, pnn, new_reqid(ctdb));
 
pkt = req->hdr.message;


-- 
CTDB repository


[SCM] Samba Shared Repository - branch master updated

2010-12-09 Thread Jelmer Vernooij
The branch, master has been updated
   via  10441ed subunitrun: Use unittest.TestProgram if subunit.TestProgram 
is not available.
   via  636d8cf s4-python: Add convenience function for forcibly importing 
bundled package.
   via  bdf5a49 subunitrun: Extend hack to cope with older system subunit 
run installs.
   via  b1daa50 subunitrun: Remove global subunit module when reimporting 
from a different location.
   via  8f4c064 s4-dist: Remove no longer existing files from blacklist 
(fixes 'make dist' inclusion of configure)
   via  408a99e s4-python: Fix use of bundled modules.
   via  4571b94 s4-python: Split up ensure_external_module.
   via  c565da0 selftest: Make sure system subunit.run has TestProgram.
   via  365cfb1 smbtorture: Rename --list to --list-suites, add stub --list.
   via  5f6dd9a selftest: Check exit code when listing tests.
   via  680a2fb s4-selftest: Add convenience function for running 
testsuites using subunitrun.
   via  028ea57 selftest: Allow discovering tests in pure python testsuites.
   via  069ff14 subunitrun: Support --list.
   via  a957d8c selftest: Rename $LIST to $LISTOPT for consistency with 
testrepository.
   via  75ef8f1 dnspython: Update to newer upstream snapshot.
   via  9143892 subunit: Update to newer upstream snapshot.
   via  2974340 testtools: Import new upstream snapshot.
   via  e6974b0 selftest: add --list option.
   via  34adc74 selftest: Document --testenv in --help output, remove 
documentation for now obsolete --analyse-cmd.
  from  21b0d5e pidl: use $CC -E if $CPP is not defined, if both undefined 
use cpp

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


- Log -
commit 10441ed83d701d6db64c3a933cf09957355e1db2
Author: Jelmer Vernooij 
Date:   Fri Dec 10 03:03:18 2010 +0100

subunitrun: Use unittest.TestProgram if subunit.TestProgram is not
available.

Autobuild-User: Jelmer Vernooij 
Autobuild-Date: Fri Dec 10 03:49:03 CET 2010 on sn-devel-104

commit 636d8cfb423bbdf271df25efbc13c91420ebefe8
Author: Jelmer Vernooij 
Date:   Fri Dec 10 00:47:33 2010 +0100

s4-python: Add convenience function for forcibly importing bundled
package.

commit bdf5a49cec064c965c1271d875fc9b474b77f634
Author: Jelmer Vernooij 
Date:   Thu Dec 9 23:28:25 2010 +0100

subunitrun: Extend hack to cope with older system subunit run installs.

commit b1daa502935026854758dc47868866b022c53128
Author: Jelmer Vernooij 
Date:   Thu Dec 9 22:48:16 2010 +0100

subunitrun: Remove global subunit module when reimporting from a
different location.

commit 8f4c064b49f01e7d53d5610da6b6574615d9f188
Author: Jelmer Vernooij 
Date:   Thu Dec 9 22:46:08 2010 +0100

s4-dist: Remove no longer existing files from blacklist (fixes 'make
dist' inclusion of configure)

commit 408a99e3bba2e08ad4caf2f8aae446865a3250db
Author: Jelmer Vernooij 
Date:   Thu Dec 9 21:38:48 2010 +0100

s4-python: Fix use of bundled modules.

commit 4571b94e7b04acaa7f462262dac509843287e4af
Author: Jelmer Vernooij 
Date:   Thu Dec 9 19:45:37 2010 +0100

s4-python: Split up ensure_external_module.

commit c565da0f7148fcfb560bea9abe4b9e2bb59a81e1
Author: Jelmer Vernooij 
Date:   Thu Dec 9 18:49:38 2010 +0100

selftest: Make sure system subunit.run has TestProgram.

commit 365cfb1c323cd3a24ff0caf1929674910095b4c6
Author: Jelmer Vernooij 
Date:   Thu Dec 9 16:57:45 2010 +0100

smbtorture: Rename --list to --list-suites, add stub --list.

commit 5f6dd9a608271948bb1d4a1fb975e889db70512c
Author: Jelmer Vernooij 
Date:   Thu Dec 9 16:48:24 2010 +0100

selftest: Check exit code when listing tests.

commit 680a2fb5173a74b65fa23ac0027f516ddd908e9b
Author: Jelmer Vernooij 
Date:   Thu Dec 9 16:28:31 2010 +0100

s4-selftest: Add convenience function for running testsuites using
subunitrun.

commit 028ea57e554e04dcc891786f32cf79c6587d1708
Author: Jelmer Vernooij 
Date:   Thu Dec 9 15:41:17 2010 +0100

selftest: Allow discovering tests in pure python testsuites.

commit 069ff146cb13b5bb6655b9d47540ab5ea9f6183e
Author: Jelmer Vernooij 
Date:   Thu Dec 9 15:35:51 2010 +0100

subunitrun: Support --list.

commit a957d8c80f532654f502fdd37aecd34b231a00e8
Author: Jelmer Vernooij 
Date:   Thu Dec 9 15:35:23 2010 +0100

selftest: Rename $LIST to $LISTOPT for consistency with testrepository.

commit 75ef8f1dd27f4985b3d705e7681a9218ad513c84
Author: Jelmer Vernooij 
Date:   Thu Dec 9 14:53:45 2010 +0100

dnspython: Update to newer upstream snapshot.

commit 91438920b465ec7455dd1cd700bbe8ec5050b3f9
Author: Jelmer Vernooij 
Date:   Thu Dec 9 14:51:51 2010 +0100

subunit: Update to newer upstream snapshot.

commit 297434055e2e2b28a2f9cacc09a30786edf8903a
Author: Jelmer Vernooij 
Date:   Thu Dec 9 14:51:17 2010 +0100

testtools: Import new upstream snapshot.

commit e6974b0ff0100bb292d57e58ae11bc2e6b0d4053
Author

[SCM] CTDB repository - branch master updated - ctdb-1.10-45-gc111e98

2010-12-09 Thread Ronnie Sahlberg
The branch, master has been updated
   via  c111e98d3ad7bd3d09f4081e9bb1443d3722672f (commit)
   via  fcb9e8d1e1c78439ea42adb8b05ad84fbca7f724 (commit)
  from  73764104356d3738d9d20a9d06ce51535f74f475 (commit)

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


- Log -
commit c111e98d3ad7bd3d09f4081e9bb1443d3722672f
Author: Ronnie Sahlberg 
Date:   Fri Dec 10 13:39:18 2010 +1100

LibCTDB

Add an input queue where we keep received pdus we have not yet processed
This allows us to perform SYNC calls from an ASYNC callback

commit fcb9e8d1e1c78439ea42adb8b05ad84fbca7f724
Author: Ronnie Sahlberg 
Date:   Wed Dec 8 11:08:19 2010 +1100

only run "serverid wipe" if we are actually running samba.
we dont need to run this on systems where we do run winbind but not samba

---

Summary of changes:
 config/events.d/50.samba  |4 ++--
 libctdb/ctdb.c|   26 --
 libctdb/io_elem.c |   16 
 libctdb/io_elem.h |6 ++
 libctdb/libctdb_private.h |4 
 libctdb/messages.c|2 +-
 6 files changed, 53 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/50.samba b/config/events.d/50.samba
index 6e84f5f..17d2336 100755
--- a/config/events.d/50.samba
+++ b/config/events.d/50.samba
@@ -63,8 +63,6 @@ start_samba() {
 
}
 
-   /usr/bin/net serverid wipe
-
# start the winbind service
[ "$CTDB_MANAGES_WINBIND" = "yes" ] && {
service "$CTDB_SERVICE_WINBIND" start
@@ -74,6 +72,8 @@ start_samba() {
# the number of smbd processes will mean that it leaves few cycles for
# anything else
[ "$CTDB_MANAGES_SAMBA" = "yes" ] && {
+   /usr/bin/net serverid wipe
+
nice_service "$CTDB_SERVICE_NMB" start
nice_service "$CTDB_SERVICE_SMB" start
}
diff --git a/libctdb/ctdb.c b/libctdb/ctdb.c
index 23acef4..2649524 100644
--- a/libctdb/ctdb.c
+++ b/libctdb/ctdb.c
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "libctdb_private.h"
 #include "io_elem.h"
 #include "local_tdb.h"
@@ -417,6 +418,19 @@ bool ctdb_service(struct ctdb_connection *ctdb, int 
revents)
 
while (revents & POLLIN) {
int ret;
+   int num_ready = 0;
+
+   if (ioctl(ctdb->fd, FIONREAD, &num_ready) != 0) {
+   DEBUG(ctdb, LOG_ERR,
+ "ctdb_service: ioctl(FIONREAD) %d", errno);
+   ctdb->broken = true;
+   return false;
+   }
+   if (num_ready == 0) {
+   /* the descriptor has been closed or we have all our 
data */
+   break;
+   }
+
 
if (!ctdb->in) {
ctdb->in = new_io_elem(sizeof(struct ctdb_req_header));
@@ -439,13 +453,21 @@ bool ctdb_service(struct ctdb_connection *ctdb, int 
revents)
return false;
} else if (ret < 0) {
/* No progress, stop loop. */
-   revents = 0;
+   break;
} else if (io_elem_finished(ctdb->in)) {
-   handle_incoming(ctdb, ctdb->in);
+   io_elem_queue(ctdb, ctdb->in);
ctdb->in = NULL;
}
}
 
+
+   while (ctdb->inqueue != NULL) {
+   struct io_elem *io = ctdb->inqueue;
+
+   io_elem_dequeue(ctdb, io);
+   handle_incoming(ctdb, io);
+   }
+
return true;
 }
 
diff --git a/libctdb/io_elem.c b/libctdb/io_elem.c
index bff21cb..81d44e4 100644
--- a/libctdb/io_elem.c
+++ b/libctdb/io_elem.c
@@ -23,12 +23,15 @@
 #include 
 #include 
 #include 
+#include "libctdb_private.h"
 #include "io_elem.h"
 #include 
 #include 
+#include 
 #include  // For CTDB_DS_ALIGNMENT and ctdb_req_header
 
 struct io_elem {
+   struct io_elem *next, *prev;
size_t len, off;
char *data;
 };
@@ -55,6 +58,8 @@ struct io_elem *new_io_elem(size_t len)
}
elem->len = len;
elem->off = 0;
+   elem->next = NULL;
+   elem->prev = NULL;
return elem;
 }
 
@@ -145,3 +150,14 @@ void io_elem_reset(struct io_elem *io)
 {
io->off = 0;
 }
+
+void io_elem_queue(struct ctdb_connection *ctdb, struct io_elem *io)
+{
+   DLIST_ADD_END(ctdb->inqueue, io, struct io_elem);
+}
+
+void io_elem_dequeue(struct ctdb_connection *ctdb, struct io_elem *io)
+{
+   DLIST_REMOVE(ctdb->inqueue, io);
+}
+
diff --git a/libctdb/io_elem.h b/libctdb/io_elem.h
index e774cdb..dd65fcd 100644
--- a/libctdb/io_elem.h
+++ b/libctdb/io_elem.h
@@ -32,4 +32,10 @@ int read_io_elem(int fd, struct io_elem *io);
 /* Returns 

[SCM] CTDB repository - branch 1.2-nodeflags updated - ctdb-1.9.1-252-g78e5ae5

2010-12-09 Thread Ronnie Sahlberg
The branch, 1.2-nodeflags has been updated
   via  78e5ae528f197aa75cc477ee3ff33c3a558c612a (commit)
   via  2783b8f8212adf05833b82b1c57a383e6f555672 (commit)
  from  9bf47667adbe4324b7587c61349b64affa5420c6 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2-nodeflags


- Log -
commit 78e5ae528f197aa75cc477ee3ff33c3a558c612a
Author: Ronnie Sahlberg 
Date:   Fri Dec 10 13:39:18 2010 +1100

LibCTDB

Add an input queue where we keep received pdus we have not yet processed
This allows us to perform SYNC calls from an ASYNC callback

commit 2783b8f8212adf05833b82b1c57a383e6f555672
Author: Ronnie Sahlberg 
Date:   Wed Dec 8 11:08:19 2010 +1100

only run "serverid wipe" if we are actually running samba.
we dont need to run this on systems where we do run winbind but not samba

---

Summary of changes:
 config/events.d/50.samba  |4 ++--
 libctdb/ctdb.c|   26 --
 libctdb/io_elem.c |   16 
 libctdb/io_elem.h |6 ++
 libctdb/libctdb_private.h |4 
 libctdb/messages.c|2 +-
 6 files changed, 53 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/50.samba b/config/events.d/50.samba
index 6e84f5f..17d2336 100755
--- a/config/events.d/50.samba
+++ b/config/events.d/50.samba
@@ -63,8 +63,6 @@ start_samba() {
 
}
 
-   /usr/bin/net serverid wipe
-
# start the winbind service
[ "$CTDB_MANAGES_WINBIND" = "yes" ] && {
service "$CTDB_SERVICE_WINBIND" start
@@ -74,6 +72,8 @@ start_samba() {
# the number of smbd processes will mean that it leaves few cycles for
# anything else
[ "$CTDB_MANAGES_SAMBA" = "yes" ] && {
+   /usr/bin/net serverid wipe
+
nice_service "$CTDB_SERVICE_NMB" start
nice_service "$CTDB_SERVICE_SMB" start
}
diff --git a/libctdb/ctdb.c b/libctdb/ctdb.c
index 23acef4..2649524 100644
--- a/libctdb/ctdb.c
+++ b/libctdb/ctdb.c
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "libctdb_private.h"
 #include "io_elem.h"
 #include "local_tdb.h"
@@ -417,6 +418,19 @@ bool ctdb_service(struct ctdb_connection *ctdb, int 
revents)
 
while (revents & POLLIN) {
int ret;
+   int num_ready = 0;
+
+   if (ioctl(ctdb->fd, FIONREAD, &num_ready) != 0) {
+   DEBUG(ctdb, LOG_ERR,
+ "ctdb_service: ioctl(FIONREAD) %d", errno);
+   ctdb->broken = true;
+   return false;
+   }
+   if (num_ready == 0) {
+   /* the descriptor has been closed or we have all our 
data */
+   break;
+   }
+
 
if (!ctdb->in) {
ctdb->in = new_io_elem(sizeof(struct ctdb_req_header));
@@ -439,13 +453,21 @@ bool ctdb_service(struct ctdb_connection *ctdb, int 
revents)
return false;
} else if (ret < 0) {
/* No progress, stop loop. */
-   revents = 0;
+   break;
} else if (io_elem_finished(ctdb->in)) {
-   handle_incoming(ctdb, ctdb->in);
+   io_elem_queue(ctdb, ctdb->in);
ctdb->in = NULL;
}
}
 
+
+   while (ctdb->inqueue != NULL) {
+   struct io_elem *io = ctdb->inqueue;
+
+   io_elem_dequeue(ctdb, io);
+   handle_incoming(ctdb, io);
+   }
+
return true;
 }
 
diff --git a/libctdb/io_elem.c b/libctdb/io_elem.c
index bff21cb..81d44e4 100644
--- a/libctdb/io_elem.c
+++ b/libctdb/io_elem.c
@@ -23,12 +23,15 @@
 #include 
 #include 
 #include 
+#include "libctdb_private.h"
 #include "io_elem.h"
 #include 
 #include 
+#include 
 #include  // For CTDB_DS_ALIGNMENT and ctdb_req_header
 
 struct io_elem {
+   struct io_elem *next, *prev;
size_t len, off;
char *data;
 };
@@ -55,6 +58,8 @@ struct io_elem *new_io_elem(size_t len)
}
elem->len = len;
elem->off = 0;
+   elem->next = NULL;
+   elem->prev = NULL;
return elem;
 }
 
@@ -145,3 +150,14 @@ void io_elem_reset(struct io_elem *io)
 {
io->off = 0;
 }
+
+void io_elem_queue(struct ctdb_connection *ctdb, struct io_elem *io)
+{
+   DLIST_ADD_END(ctdb->inqueue, io, struct io_elem);
+}
+
+void io_elem_dequeue(struct ctdb_connection *ctdb, struct io_elem *io)
+{
+   DLIST_REMOVE(ctdb->inqueue, io);
+}
+
diff --git a/libctdb/io_elem.h b/libctdb/io_elem.h
index e774cdb..dd65fcd 100644
--- a/libctdb/io_elem.h
+++ b/libctdb/io_elem.h
@@ -32,4 +32,10 @@ int read_io_elem(int fd, struct io_elem *io)

[SCM] CTDB repository - branch 1.2 updated - ctdb-1.9.1-266-g5a46d95

2010-12-09 Thread Ronnie Sahlberg
The branch, 1.2 has been updated
   via  5a46d95b8d4dbc1e5aea3fb73912ac6ee49cd182 (commit)
   via  5b59e39a2b98428de8ec75180dd0688b03175d05 (commit)
  from  6ef0c8bdae6cf4163b05e2488a582230c5e4 (commit)

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


- Log -
commit 5a46d95b8d4dbc1e5aea3fb73912ac6ee49cd182
Author: Ronnie Sahlberg 
Date:   Fri Dec 10 13:39:18 2010 +1100

LibCTDB

Add an input queue where we keep received pdus we have not yet processed
This allows us to perform SYNC calls from an ASYNC callback

commit 5b59e39a2b98428de8ec75180dd0688b03175d05
Author: Ronnie Sahlberg 
Date:   Wed Dec 8 11:08:19 2010 +1100

only run "serverid wipe" if we are actually running samba.
we dont need to run this on systems where we do run winbind but not samba

---

Summary of changes:
 config/events.d/50.samba  |4 ++--
 libctdb/ctdb.c|   26 --
 libctdb/io_elem.c |   16 
 libctdb/io_elem.h |6 ++
 libctdb/libctdb_private.h |4 
 libctdb/messages.c|2 +-
 6 files changed, 53 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/50.samba b/config/events.d/50.samba
index 6e84f5f..17d2336 100755
--- a/config/events.d/50.samba
+++ b/config/events.d/50.samba
@@ -63,8 +63,6 @@ start_samba() {
 
}
 
-   /usr/bin/net serverid wipe
-
# start the winbind service
[ "$CTDB_MANAGES_WINBIND" = "yes" ] && {
service "$CTDB_SERVICE_WINBIND" start
@@ -74,6 +72,8 @@ start_samba() {
# the number of smbd processes will mean that it leaves few cycles for
# anything else
[ "$CTDB_MANAGES_SAMBA" = "yes" ] && {
+   /usr/bin/net serverid wipe
+
nice_service "$CTDB_SERVICE_NMB" start
nice_service "$CTDB_SERVICE_SMB" start
}
diff --git a/libctdb/ctdb.c b/libctdb/ctdb.c
index 23acef4..2649524 100644
--- a/libctdb/ctdb.c
+++ b/libctdb/ctdb.c
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include "libctdb_private.h"
 #include "io_elem.h"
 #include "local_tdb.h"
@@ -417,6 +418,19 @@ bool ctdb_service(struct ctdb_connection *ctdb, int 
revents)
 
while (revents & POLLIN) {
int ret;
+   int num_ready = 0;
+
+   if (ioctl(ctdb->fd, FIONREAD, &num_ready) != 0) {
+   DEBUG(ctdb, LOG_ERR,
+ "ctdb_service: ioctl(FIONREAD) %d", errno);
+   ctdb->broken = true;
+   return false;
+   }
+   if (num_ready == 0) {
+   /* the descriptor has been closed or we have all our 
data */
+   break;
+   }
+
 
if (!ctdb->in) {
ctdb->in = new_io_elem(sizeof(struct ctdb_req_header));
@@ -439,13 +453,21 @@ bool ctdb_service(struct ctdb_connection *ctdb, int 
revents)
return false;
} else if (ret < 0) {
/* No progress, stop loop. */
-   revents = 0;
+   break;
} else if (io_elem_finished(ctdb->in)) {
-   handle_incoming(ctdb, ctdb->in);
+   io_elem_queue(ctdb, ctdb->in);
ctdb->in = NULL;
}
}
 
+
+   while (ctdb->inqueue != NULL) {
+   struct io_elem *io = ctdb->inqueue;
+
+   io_elem_dequeue(ctdb, io);
+   handle_incoming(ctdb, io);
+   }
+
return true;
 }
 
diff --git a/libctdb/io_elem.c b/libctdb/io_elem.c
index bff21cb..81d44e4 100644
--- a/libctdb/io_elem.c
+++ b/libctdb/io_elem.c
@@ -23,12 +23,15 @@
 #include 
 #include 
 #include 
+#include "libctdb_private.h"
 #include "io_elem.h"
 #include 
 #include 
+#include 
 #include  // For CTDB_DS_ALIGNMENT and ctdb_req_header
 
 struct io_elem {
+   struct io_elem *next, *prev;
size_t len, off;
char *data;
 };
@@ -55,6 +58,8 @@ struct io_elem *new_io_elem(size_t len)
}
elem->len = len;
elem->off = 0;
+   elem->next = NULL;
+   elem->prev = NULL;
return elem;
 }
 
@@ -145,3 +150,14 @@ void io_elem_reset(struct io_elem *io)
 {
io->off = 0;
 }
+
+void io_elem_queue(struct ctdb_connection *ctdb, struct io_elem *io)
+{
+   DLIST_ADD_END(ctdb->inqueue, io, struct io_elem);
+}
+
+void io_elem_dequeue(struct ctdb_connection *ctdb, struct io_elem *io)
+{
+   DLIST_REMOVE(ctdb->inqueue, io);
+}
+
diff --git a/libctdb/io_elem.h b/libctdb/io_elem.h
index e774cdb..dd65fcd 100644
--- a/libctdb/io_elem.h
+++ b/libctdb/io_elem.h
@@ -32,4 +32,10 @@ int read_io_elem(int fd, struct io_elem *io);
 /* Returns -1 if 

[SCM] Samba Shared Repository - branch master updated

2010-12-09 Thread Matthieu Patou
The branch, master has been updated
   via  21b0d5e pidl: use $CC -E if $CPP is not defined, if both undefined 
use cpp
   via  301d59c build: use CPP and CC values when calling pidl
   via  8733738 build: introduce SAMBA_CHECK_PYTHON_HEADERS
   via  672c48b build: finishing fixing broken libiconv on hpux
  from  1f2518d s4 libcli: Add libcli_echo lib and torture test

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


- Log -
commit 21b0d5e3b10711e6ce3bfad0c1ee2da09a60e232
Author: Matthieu Patou 
Date:   Fri Dec 10 02:03:40 2010 +0300

pidl: use $CC -E if $CPP is not defined, if both undefined use cpp

Autobuild-User: Matthieu Patou 
Autobuild-Date: Fri Dec 10 01:26:44 CET 2010 on sn-devel-104

commit 301d59caf2ee6f49e108b748b0e38221dec9bb96
Author: Matthieu Patou 
Date:   Fri Dec 10 02:36:24 2010 +0300

build: use CPP and CC values when calling pidl

commit 87337383572324e3d1d00ed710614ebe217aa2b2
Author: Matthieu Patou 
Date:   Fri Dec 10 01:42:32 2010 +0300

build: introduce SAMBA_CHECK_PYTHON_HEADERS

This function is a wrapper around waf's check_python_header.
It avoids searching more than once for the headers bringing a small
speed improvement and a better lisibility of the logs.

But it's mainly to avoid a nasty bug when python libraries are in path
pointed by python_LIBPL (ie. /usr/local/lib/python2.6/config/) instead
of python_LIBDIR (ie. /usr/local/lib).

On the first call waf will correctly find that in order to link with
python libs it needs to add -L$python_LIBPL.

But on the next calls of check_python_headers, waf will use both the
current library path value (ie. -L/usr/local/lib/python2.6/config) and
-L$python_LIBDIR (ie. /usr/local/lib/) which will make him beleive that
python libraries are in $python_LIBDIR which at the end will make the
final link test fails in check_python_headers as it will not use the
good directory.

So by avoiding calling check_python_headers more than once we avoid
making waf fooling itself.

commit 672c48b763ce3d53dc93cce1c73f3f1ced1147e8
Author: Matthieu Patou 
Date:   Thu Dec 9 23:31:16 2010 +0300

build: finishing fixing broken libiconv on hpux

---

Summary of changes:
 buildtools/wafsamba/samba_autoconf.py |9 +
 buildtools/wafsamba/samba_pidl.py |   11 ++-
 buildtools/wafsamba/samba_python.py   |9 +
 lib/talloc/wscript|2 +-
 lib/tdb/wscript   |2 +-
 lib/tevent/wscript|2 +-
 lib/util/charset/wscript_configure|2 ++
 pidl/lib/Parse/Pidl/IDL.pm|   10 --
 source4/wscript   |2 +-
 9 files changed, 42 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_autoconf.py 
b/buildtools/wafsamba/samba_autoconf.py
index b6d0b35..1babe7b 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -448,10 +448,19 @@ def CHECK_LDFLAGS(conf, ldflags):
 
 
 @conf
+def CONFIG_GET(conf, option):
+'''return True if a configuration option was found'''
+if (option in conf.env):
+return conf.env[option]
+else:
+return None
+
+...@conf
 def CONFIG_SET(conf, option):
 '''return True if a configuration option was found'''
 return (option in conf.env) and (conf.env[option] != ())
 Build.BuildContext.CONFIG_SET = CONFIG_SET
+Build.BuildContext.CONFIG_GET = CONFIG_GET
 
 
 def library_flags(conf, libs):
diff --git a/buildtools/wafsamba/samba_pidl.py 
b/buildtools/wafsamba/samba_pidl.py
index 902d4c6..6476211 100644
--- a/buildtools/wafsamba/samba_pidl.py
+++ b/buildtools/wafsamba/samba_pidl.py
@@ -58,7 +58,16 @@ def SAMBA_PIDL(bld, pname, source,
 pidl_src_nodes = bld.pidl_files_cache
 
 # the cd .. is needed because pidl currently is sensitive to the directory 
it is run in
-t = bld(rule='cd .. && ${PERL} "${PIDL}" --quiet ${OPTIONS} --outputdir 
${OUTPUTDIR} -- "${SRC[0].abspath(env)}"',
+cpp = ""
+cc = ""
+if bld.CONFIG_SET("CPP"):
+cpp = "CPP=%s" % bld.CONFIG_GET("CPP")
+if bld.CONFIG_SET("CC"):
+if isinstance(bld.CONFIG_GET("CC"), list):
+cc = "CC=%s" % bld.CONFIG_GET("CC")[0]
+else:
+cc = "CC=%s" % bld.CONFIG_GET("CC")
+t = bld(rule='cd .. && %s %s ${PERL} "${PIDL}" --quiet ${OPTIONS} 
--outputdir ${OUTPUTDIR} -- "${SRC[0].abspath(env)}"' % (cpp, cc),
 ext_out= '.c',
 before = 'cc',
 on_results = True,
diff --git a/buildtools/wafsamba/samba_python.py 
b/buildtools/wafsamba/samba_python.py
index ad09981..a663b19 100644
--- a/buildtools/wafsamba/samba_python.py
+++ b/buildtools/wafsamba/samba_python.py
@@ -4,6 +4,

[SCM] Samba Shared Repository - branch master updated

2010-12-09 Thread Kai Blin
The branch, master has been updated
   via  1f2518d s4 libcli: Add libcli_echo lib and torture test
   via  9df1b40 s4: Implement UDP echo server example
  from  5fcbb16 s4:pyrpc_util: s/typename/type_name to avoid c++ warnings

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


- Log -
commit 1f2518df5a4f21bb7a2bd2abc601517d7988c507
Author: Kai Blin 
Date:   Mon Nov 15 23:01:57 2010 +0100

s4 libcli: Add libcli_echo lib and torture test

Autobuild-User: Kai Blin 
Autobuild-Date: Thu Dec  9 23:57:03 CET 2010 on sn-devel-104

commit 9df1b408c1b2432728ecc3d114854535f168b47a
Author: Kai Blin 
Date:   Sun Nov 7 10:05:56 2010 +0100

s4: Implement UDP echo server example

This is a simple UDP-based echo server. It is mainly intended as an
example on how to do server service tasks in s4.

---

Summary of changes:
 libcli/echo/echo.c|  204 ++
 libcli/echo/libecho.h |   56 ++
 libcli/echo/tests/echo.c  |   93 ++
 libcli/echo/tests/wscript_build   |8 +
 libcli/echo/wscript_build |7 +
 selftest/target/Samba4.pm |1 +
 source4/echo_server/echo_server.c |  345 +
 source4/echo_server/echo_server.h |   33 
 source4/echo_server/wscript_build |9 +
 source4/selftest/tests.py |2 +
 source4/wscript_build |2 +
 11 files changed, 760 insertions(+), 0 deletions(-)
 create mode 100644 libcli/echo/echo.c
 create mode 100644 libcli/echo/libecho.h
 create mode 100644 libcli/echo/tests/echo.c
 create mode 100644 libcli/echo/tests/wscript_build
 create mode 100644 libcli/echo/wscript_build
 create mode 100644 source4/echo_server/echo_server.c
 create mode 100644 source4/echo_server/echo_server.h
 create mode 100644 source4/echo_server/wscript_build


Changeset truncated at 500 lines:

diff --git a/libcli/echo/echo.c b/libcli/echo/echo.c
new file mode 100644
index 000..46d1e28
--- /dev/null
+++ b/libcli/echo/echo.c
@@ -0,0 +1,204 @@
+/*
+   Unix SMB/CIFS implementation.
+
+   Echo example async client library
+
+   Copyright (C) 2010 Kai Blin  
+
+   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 License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see .
+*/
+
+#include "replace.h"
+#include "system/network.h"
+#include 
+#include "lib/tsocket/tsocket.h"
+#include "libcli/util/ntstatus.h"
+#include "libcli/echo/libecho.h"
+#include "lib/util/tevent_ntstatus.h"
+#include "libcli/util/error.h"
+
+/*
+ * Following the Samba convention for async functions, set up a state struct
+ * for this set of calls. The state is always called function_name_state for
+ * the set of async functions related to function_name_send().
+ */
+struct echo_request_state {
+   struct tevent_context *ev;
+   ssize_t orig_len;
+   struct tdgram_context *dgram;
+   char *message;
+};
+
+/* Declare callback functions used below. */
+static void echo_request_get_reply(struct tevent_req *subreq);
+static void echo_request_done(struct tevent_req *subreq);
+
+struct tevent_req *echo_request_send(TALLOC_CTX *mem_ctx,
+struct tevent_context *ev,
+const char *server_addr_string,
+const char *message)
+{
+   struct tevent_req *req, *subreq;
+   struct echo_request_state *state;
+   struct tsocket_address *local_addr, *server_addr;
+   struct tdgram_context *dgram;
+   int ret;
+
+   /*
+* Creating the initial tevent_req is the only place where returning
+* NULL is allowed. Everything after that should return a more
+* meaningful error using tevent_req_post().
+*/
+   req = tevent_req_create(mem_ctx, &state, struct echo_request_state);
+   if (req == NULL) {
+   return NULL;
+   }
+
+   /*
+* We need to dispatch new async functions in the callbacks, hold
+* on to the event context.
+*/
+   state->ev = ev;
+
+   /* libecho uses connected UDP sockets, take care of this here */
+   ret = tsocket_address_inet_from_strings(state, "ip", NULL, 0,
+   &local_addr);
+   if (ret != 0) {
+   tevent_req_nte

[SCM] Samba Shared Repository - branch master updated

2010-12-09 Thread Stefan Metzmacher
The branch, master has been updated
   via  5fcbb16 s4:pyrpc_util: s/typename/type_name to avoid c++ warnings
   via  e1485c7 talloc: pytalloc-util should not have an ABI-file yet
  from  377b399 wintest Remove the password expiry as the first step

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


- Log -
commit 5fcbb1676009de9e384a8f76e0c4ab1b43ce3746
Author: Stefan Metzmacher 
Date:   Thu Dec 9 09:59:52 2010 +0100

s4:pyrpc_util: s/typename/type_name to avoid c++ warnings

metze

Autobuild-User: Stefan Metzmacher 
Autobuild-Date: Thu Dec  9 17:55:57 CET 2010 on sn-devel-104

commit e1485c70fc1de2472e54fc1aaa23469e70ec3428
Author: Stefan Metzmacher 
Date:   Thu Dec 9 09:36:55 2010 +0100

talloc: pytalloc-util should not have an ABI-file yet

Somehow I forgot to remove this after discussion with Jelmer.

metze

---

Summary of changes:
 lib/talloc/wscript  |2 --
 source4/librpc/rpc/pyrpc_util.c |   10 +-
 source4/librpc/rpc/pyrpc_util.h |2 +-
 3 files changed, 6 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index a23532a..6316aba 100644
--- a/lib/talloc/wscript
+++ b/lib/talloc/wscript
@@ -106,8 +106,6 @@ def build(bld):
 bld.SAMBA_LIBRARY('pytalloc-util',
 source='pytalloc_util.c',
 public_deps='talloc',
-abi_directory='ABI',
-abi_match='py* Py*',
 pyext=True,
 vnum=VERSION,
 private_library=private_library,
diff --git a/source4/librpc/rpc/pyrpc_util.c b/source4/librpc/rpc/pyrpc_util.c
index 5ad8d2f..3821638 100644
--- a/source4/librpc/rpc/pyrpc_util.c
+++ b/source4/librpc/rpc/pyrpc_util.c
@@ -31,7 +31,7 @@
 #include "lib/messaging/messaging.h"
 #include "lib/messaging/irpc.h"
 
-bool py_check_dcerpc_type(PyObject *obj, const char *module, const char 
*typename)
+bool py_check_dcerpc_type(PyObject *obj, const char *module, const char 
*type_name)
 {
PyObject *mod;
PyTypeObject *type;
@@ -41,15 +41,15 @@ bool py_check_dcerpc_type(PyObject *obj, const char 
*module, const char *typenam
 
if (mod == NULL) {
PyErr_Format(PyExc_RuntimeError, "Unable to import %s to check 
type %s",
-   module, typename);
+   module, type_name);
return NULL;
}
 
-   type = (PyTypeObject *)PyObject_GetAttrString(mod, typename);
+   type = (PyTypeObject *)PyObject_GetAttrString(mod, type_name);
Py_DECREF(mod);
if (type == NULL) {
PyErr_Format(PyExc_RuntimeError, "Unable to find type %s in 
module %s",
-   module, typename);
+   module, type_name);
return NULL;
}
 
@@ -58,7 +58,7 @@ bool py_check_dcerpc_type(PyObject *obj, const char *module, 
const char *typenam
 
if (!ret)
PyErr_Format(PyExc_TypeError, "Expected type %s.%s, got %s",
-   module, typename, Py_TYPE(obj)->tp_name);
+   module, type_name, Py_TYPE(obj)->tp_name);
 
return ret;
 }
diff --git a/source4/librpc/rpc/pyrpc_util.h b/source4/librpc/rpc/pyrpc_util.h
index 445138b..837a33b 100644
--- a/source4/librpc/rpc/pyrpc_util.h
+++ b/source4/librpc/rpc/pyrpc_util.h
@@ -46,7 +46,7 @@ struct PyNdrRpcMethodDef {
const struct ndr_interface_table *table;
 };
 
-bool py_check_dcerpc_type(PyObject *obj, const char *module, const char 
*typename);
+bool py_check_dcerpc_type(PyObject *obj, const char *module, const char 
*type_name);
 bool PyInterface_AddNdrRpcMethods(PyTypeObject *object, const struct 
PyNdrRpcMethodDef *mds);
 PyObject *py_dcerpc_interface_init_helper(PyTypeObject *type, PyObject *args, 
PyObject *kwargs, const struct ndr_interface_table *table);
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-09 Thread Andrew Bartlett
The branch, master has been updated
   via  377b399 wintest Remove the password expiry as the first step
  from  57f2f1d waf: remove the restriction that private libraries must not 
have a vnum

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


- Log -
commit 377b3995b168779d994138848f0ebc6059bba31c
Author: Andrew Bartlett 
Date:   Thu Dec 9 22:05:14 2010 +1100

wintest Remove the password expiry as the first step

This is particularly important before dcpromo, as the password will
otherwise be expired in the new domain.

Andrew Bartlett

Autobuild-User: Andrew Bartlett 
Autobuild-Date: Thu Dec  9 13:33:00 CET 2010 on sn-devel-104

---

Summary of changes:
 wintest/test-s4-howto.py |6 +++---
 wintest/wintest.py   |   11 ++-
 2 files changed, 13 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py
index 2dbb208..e97963f 100755
--- a/wintest/test-s4-howto.py
+++ b/wintest/test-s4-howto.py
@@ -299,7 +299,7 @@ def run_winjoin(t, vm):
 t.info("Joining a windows box to the domain")
 t.vm_poweroff("${WIN_VM}", checkfail=False)
 t.vm_restore("${WIN_VM}", "${WIN_SNAPSHOT}")
-child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_USER}", "${WIN_PASS}", 
set_time=True, set_ip=True)
+child = t.open_telnet("${WIN_HOSTNAME}", "${WIN_USER}", "${WIN_PASS}", 
set_time=True, set_ip=True, set_noexpire=True)
 child.sendline("netdom join ${WIN_HOSTNAME} /Domain:${LCREALM} 
/PasswordD:${PASSWORD1} /UserD:administrator")
 child.expect("The command completed successfully")
 child.expect("C:")
@@ -332,7 +332,7 @@ def run_dcpromo(t, vm):
 t.info("Joining a windows VM ${WIN_VM} to the domain as a DC using 
dcpromo")
 t.vm_poweroff("${WIN_VM}", checkfail=False)
 t.vm_restore("${WIN_VM}", "${WIN_SNAPSHOT}")
-child = t.open_telnet("${WIN_HOSTNAME}", "administrator", "${WIN_PASS}", 
set_ip=True)
+child = t.open_telnet("${WIN_HOSTNAME}", "administrator", "${WIN_PASS}", 
set_ip=True, set_noexpire=True)
 child.sendline("copy /Y con answers.txt")
 child.sendline('''
 [DCINSTALL]
@@ -736,7 +736,7 @@ def run_dcpromo_as_first_dc(t, vm, func_level=None):
 else:
 t.setvar("FUNCTION_LEVEL_INT", str(0))
 
-child = t.open_telnet("${WIN_HOSTNAME}", "administrator", "${WIN_PASS}", 
set_ip=True)
+child = t.open_telnet("${WIN_HOSTNAME}", "administrator", "${WIN_PASS}", 
set_ip=True, set_noexpire=True)
 
 """This server must therefore not yet be a directory server, so we must 
promote it"""
 child.sendline("copy /Y con answers.txt")
diff --git a/wintest/wintest.py b/wintest/wintest.py
index ec2624b..0d65116 100644
--- a/wintest/wintest.py
+++ b/wintest/wintest.py
@@ -371,6 +371,12 @@ class wintest():
 if hostname.upper() == self.getvar("WIN_HOSTNAME").upper():
 return True
 
+def set_noexpire(self, child, username):
+'''Ensure this user's password does not expire'''
+child.sendline('wmic useraccount where name="%s" set 
PasswordExpires=FALSE' % username)
+child.expect("update successful")
+child.expect("C:")
+
 def run_tlntadmn(self, child):
 '''remove the annoying telnet restrictions'''
 child.sendline('tlntadmn config maxconn=1024')
@@ -438,7 +444,7 @@ class wintest():
 
 
 def open_telnet(self, hostname, username, password, retries=60, delay=5, 
set_time=False, set_ip=False,
-disable_firewall=True, run_tlntadmn=True):
+disable_firewall=True, run_tlntadmn=True, 
set_noexpire=False):
 '''open a telnet connection to a windows server, return the pexpect 
child'''
 set_route = False
 set_dns = False
@@ -491,6 +497,9 @@ class wintest():
 if run_tlntadmn:
 self.run_tlntadmn(child)
 run_tlntadmn = False
+if set_noexpire:
+self.set_noexpire(child, username)
+set_noexpire = False
 if disable_firewall:
 self.disable_firewall(child)
 disable_firewall = False


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-12-09 Thread Andrew Tridgell
The branch, master has been updated
   via  57f2f1d waf: remove the restriction that private libraries must not 
have a vnum
   via  ca247be waf: fixed path to abi_directory
  from  154b431 s4-spnego Match Windows 2008, and no longer supply a name 
in the CIFS Negprot

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


- Log -
commit 57f2f1d72a70a80e61a2ed6f1abc63a177a590ab
Author: Andrew Tridgell 
Date:   Thu Dec 9 21:58:20 2010 +1100

waf: remove the restriction that private libraries must not have a vnum

we need the vnum for ABI checking for public libraries built as
private libraries when bundled

Autobuild-User: Andrew Tridgell 
Autobuild-Date: Thu Dec  9 12:47:41 CET 2010 on sn-devel-104

commit ca247bee2fbd444dfd1abe94c83472ac8e3c1ad1
Author: Andrew Tridgell 
Date:   Thu Dec 9 21:49:01 2010 +1100

waf: fixed path to abi_directory

this broke in a recent patch

---

Summary of changes:
 buildtools/wafsamba/wafsamba.py |7 +--
 lib/talloc/wscript  |6 ++
 lib/tdb/wscript |4 +---
 lib/tevent/wscript  |4 +---
 source4/lib/ldb/wscript |6 ++
 5 files changed, 7 insertions(+), 20 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index fa91088..fb68531 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -191,11 +191,6 @@ def SAMBA_LIBRARY(bld, libname, source,
 
 ldflags = TO_LIST(ldflags)
 
-if private_library:
-if vnum:
-Logs.error("vnum is invalid for private libraries")
-sys.exit(1)
-
 features = 'cc cshlib symlink_lib install_lib'
 if target_type == 'PYTHON':
 features += ' pyext'
@@ -238,7 +233,7 @@ def SAMBA_LIBRARY(bld, libname, source,
 name= libname,
 samba_realname  = realname,
 samba_install   = install,
-abi_directory   = abi_directory,
+abi_directory   = "%s/%s" % (bld.path.abspath(), abi_directory),
 abi_match   = abi_match,
 private_library = private_library,
 grouping_library=grouping_library
diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index 3d359c1..a23532a 100644
--- a/lib/talloc/wscript
+++ b/lib/talloc/wscript
@@ -76,7 +76,6 @@ def build(bld):
 bld.PKG_CONFIG_FILES('talloc.pc', vnum=VERSION)
 bld.INSTALL_FILES('${INCLUDEDIR}', 'talloc.h')
 private_library = False
-vnum = VERSION
 
 # should we also install the symlink to libtalloc1.so here?
 bld.SAMBA_LIBRARY('talloc-compat1-%s' % (VERSION),
@@ -89,7 +88,6 @@ def build(bld):
 bld.PKG_CONFIG_FILES('pytalloc-util.pc', vnum=VERSION)
 else:
 private_library = True
-vnum = None
 
 if not bld.CONFIG_SET('USING_SYSTEM_TALLOC'):
 
@@ -99,7 +97,7 @@ def build(bld):
   abi_directory='ABI',
   abi_match='talloc* _talloc*',
   hide_symbols=True,
-  vnum=vnum,
+  vnum=VERSION,
   private_library=private_library,
   manpages='talloc.3')
 
@@ -111,7 +109,7 @@ def build(bld):
 abi_directory='ABI',
 abi_match='py* Py*',
 pyext=True,
-vnum=vnum,
+vnum=VERSION,
 private_library=private_library,
 )
 bld.INSTALL_FILES('${INCLUDEDIR}', 'pytalloc.h')
diff --git a/lib/tdb/wscript b/lib/tdb/wscript
index 5fc64aa..fadd24f 100644
--- a/lib/tdb/wscript
+++ b/lib/tdb/wscript
@@ -66,11 +66,9 @@ def build(bld):
 bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
 bld.PKG_CONFIG_FILES('tdb.pc', vnum=VERSION)
 bld.INSTALL_FILES('${INCLUDEDIR}', 'include/tdb.h', flat=True)
-vnum = VERSION
 private_library = False
 else:
 private_library = True
-vnum = None
 
 if not bld.CONFIG_SET('USING_SYSTEM_TDB'):
 bld.SAMBA_LIBRARY('tdb',
@@ -80,7 +78,7 @@ def build(bld):
   abi_directory='ABI',
   abi_match='tdb_*',
   hide_symbols=True,
-  vnum=vnum,
+  vnum=VERSION,
   private_library=private_library)
 
 bld.SAMBA_BINARY('tdbtorture',
diff --git a/lib/tevent/wscript b/lib/tevent/wscript
index 81cc594..14c4c60 100644
--- a/lib/tevent/wscript
+++ b/lib/tevent/wscript
@@ -71,10 +71,8 @@ def build(bld):
 bld.PKG_CONFIG_FILES('tevent.pc', vnum=VERSION)
 bld.INSTALL_FILES('${INCLUDEDIR}', 'tevent.h')
 private_library = False
-vnum = VERSION
 else:
 private_library = True

autobuild: intermittent test failure detected

2010-12-09 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/2010-12-09-1000/flakey.log

The source3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2010-12-09-1000/source3.stderr
   http://git.samba.org/autobuild.flakey/2010-12-09-1000/source3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2010-12-09-1000/source4.stderr
   http://git.samba.org/autobuild.flakey/2010-12-09-1000/source4.stdout
  
The top commit at the time of the failure was:

commit 154b431093db68b30c429316eb660f776958a56f
Author: Andrew Bartlett 
Date:   Thu Dec 9 17:51:36 2010 +1100

s4-spnego Match Windows 2008, and no longer supply a name in the CIFS 
Negprot

Andrew Bartlett

Autobuild-User: Andrew Bartlett 
Autobuild-Date: Thu Dec  9 08:50:28 CET 2010 on sn-devel-104