Build status as of Tue Oct 13 06:00:03 2009

2009-10-13 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-10-12 
00:00:04.0 -0600
+++ /home/build/master/cache/broken_results.txt 2009-10-13 00:00:05.0 
-0600
@@ -1,22 +1,22 @@
-Build status as of Mon Oct 12 06:00:03 2009
+Build status as of Tue Oct 13 06:00:03 2009
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   1  1  0 
+ccache   2  1  0 
 distcc   0  0  0 
-ldb  5  5  0 
-libreplace   2  1  0 
+ldb  28 28 0 
+libreplace   3  2  0 
 lorikeet 0  0  0 
-pidl 5  5  0 
+pidl 18 17 0 
 ppp  0  0  0 
-rsync3  2  0 
+rsync27 11 0 
 samba-docs   0  0  0 
 samba-web0  0  0 
-samba_3_current 25 22 0 
-samba_3_master 26 25 3 
-samba_3_next 26 26 0 
-samba_4_0_test 27 27 0 
-talloc   4  4  0 
-tdb  1  1  0 
+samba_3_current 24 22 0 
+samba_3_master 25 25 3 
+samba_3_next 25 25 0 
+samba_4_0_test 26 26 0 
+talloc   5  5  0 
+tdb  2  2  0 
 


svn commit: samba-web r1333 - in trunk/patches: . patches-3.2.15

2009-10-13 Thread kseeger
Author: kseeger
Date: 2009-10-13 01:32:46 -0600 (Tue, 13 Oct 2009)
New Revision: 1333

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=1333

Log:
Add patches for 3.2.15
Karolin
Added:
   trunk/patches/patches-3.2.15/
   
trunk/patches/patches-3.2.15/0001-s3-smbclient-Fix-bug-6606-reported-as-6744-in-3.2.patch
   
trunk/patches/patches-3.2.15/0002-Fix-bug-6776-Running-overlapping-Byte-Lock-test-wi.patch
   trunk/patches/patches-3.2.15/series


Changeset:
Sorry, the patch is too large (858 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=1333


svn commit: samba-web r1334 - in trunk/patches: .

2009-10-13 Thread kseeger
Author: kseeger
Date: 2009-10-13 01:33:20 -0600 (Tue, 13 Oct 2009)
New Revision: 1334

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=1334

Log:
Add patches for 3.2.15 to index
Karolin
Modified:
   trunk/patches/index.html


Changeset:
Modified: trunk/patches/index.html
===
--- trunk/patches/index.html2009-10-13 07:32:46 UTC (rev 1333)
+++ trunk/patches/index.html2009-10-13 07:33:20 UTC (rev 1334)
@@ -39,6 +39,25 @@
 
 table class=real
   thead
+trth colspan=2bSamba 3.2.15/b/th/tr
+  /thead
+  tbody
+  tr
+tdemPatch/em/tdtdemDescription/em/td
+  /tr
+  tr
+tda 
href=/samba/patches/patches-3.2.15/0001-s3-smbclient-Fix-bug-6606-reported-as-6744-in-3.2.patchBUG
 6606/a/td
+tdFix file corruption using smbclient with NT4 server./td
+  /tr
+  tr
+tda 
href=/samba/patches/patches-3.2.15/0002-Fix-bug-6776-Running-overlapping-Byte-Lock-test-wi.patchBUG
 6776/a/td
+tdFix core dump when running overlapping Byte Lock test./td
+  /tr
+  /tbody
+/table
+
+table class=real
+  thead
 trth colspan=2bSamba 3.3.0/b/th/tr
   /thead
   tbody



[SCM] Samba Shared Repository - branch master updated

2009-10-13 Thread Günther Deschner
The branch, master has been updated
   via  ebe0e64... s3: use enum netr_SchannelType all over the place.
   via  aa8c142... s3-netlogon: allow to change any type of trust account 
password in trust_pw_find_change_and_store_it().
  from  4423173... s4-repl: check that a DsGetNCChanges is a continuation, 
and fix sorting

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


- Log -
commit ebe0e64ba9815b238cccf7d24821bc473d245707
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 13 10:15:34 2009 +0200

s3: use enum netr_SchannelType all over the place.

Guenther

commit aa8c142b5e1d126b9a5a8e4a6638bc785292fbc2
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 8 00:39:40 2009 +0200

s3-netlogon: allow to change any type of trust account password in 
trust_pw_find_change_and_store_it().

Guenther

---

Summary of changes:
 source3/auth/auth_domain.c |2 +-
 source3/include/proto.h|   14 +-
 source3/libads/util.c  |2 +-
 source3/libsmb/trusts_util.c   |   49 ++--
 source3/passdb/passdb.c|6 +++-
 source3/passdb/secrets.c   |   11 ---
 source3/rpc_client/cli_netlogon.c  |2 +-
 source3/rpc_client/cli_pipe.c  |2 +-
 source3/rpc_server/srv_netlog_nt.c |2 +-
 source3/rpcclient/cmd_netlogon.c   |2 +-
 source3/rpcclient/rpcclient.c  |2 +-
 source3/utils/net.c|4 +-
 source3/utils/net_proto.h  |2 +-
 source3/utils/net_rpc.c|2 +-
 source3/utils/net_rpc_join.c   |2 +-
 source3/winbindd/winbindd_cm.c |2 +-
 16 files changed, 71 insertions(+), 35 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/auth_domain.c b/source3/auth/auth_domain.c
index 7dec6ad..084d84c 100644
--- a/source3/auth/auth_domain.c
+++ b/source3/auth/auth_domain.c
@@ -195,7 +195,7 @@ machine %s. Error was : %s.\n, dc_name, 
nt_errstr(result)));
if (!lp_client_schannel()) {
/* We need to set up a creds chain on an unauthenticated 
netlogon pipe. */
uint32_t neg_flags = NETLOGON_NEG_AUTH2_ADS_FLAGS;
-   uint32 sec_chan_type = 0;
+   enum netr_SchannelType sec_chan_type = 0;
unsigned char machine_pwd[16];
const char *account_name;
 
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 7e31da0..8fc4195 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -3309,7 +3309,7 @@ NTSTATUS trust_pw_change_and_store_it(struct 
rpc_pipe_client *cli, TALLOC_CTX *m
  const char *domain,
  const char *account_name,
  unsigned char orig_trust_passwd_hash[16],
- uint32 sec_channel_type);
+ enum netr_SchannelType sec_channel_type);
 NTSTATUS trust_pw_find_change_and_store_it(struct rpc_pipe_client *cli, 
   TALLOC_CTX *mem_ctx, 
   const char *domain) ;
@@ -4672,14 +4672,14 @@ bool secrets_fetch_domain_sid(const char *domain, 
DOM_SID *sid);
 bool secrets_store_domain_guid(const char *domain, struct GUID *guid);
 bool secrets_fetch_domain_guid(const char *domain, struct GUID *guid);
 void *secrets_get_trust_account_lock(TALLOC_CTX *mem_ctx, const char *domain);
-uint32 get_default_sec_channel(void);
+enum netr_SchannelType get_default_sec_channel(void);
 bool secrets_fetch_trust_account_password_legacy(const char *domain,
 uint8 ret_pwd[16],
 time_t *pass_last_set_time,
-uint32 *channel);
+enum netr_SchannelType 
*channel);
 bool secrets_fetch_trust_account_password(const char *domain, uint8 
ret_pwd[16],
  time_t *pass_last_set_time,
- uint32 *channel);
+ enum netr_SchannelType *channel);
 bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd,
DOM_SID *sid, time_t 
*pass_last_set_time);
 bool secrets_store_trusted_domain_password(const char* domain, const char* pwd,
@@ -4687,10 +4687,10 @@ bool secrets_store_trusted_domain_password(const char* 
domain, const char* pwd,
 bool secrets_delete_machine_password(const char *domain);
 bool secrets_delete_machine_password_ex(const char *domain);
 bool secrets_delete_domain_sid(const char *domain);
-bool secrets_store_machine_password(const char *pass, const char *domain, 

svn commit: samba-web r1335 - in trunk/patches: .

2009-10-13 Thread kseeger
Author: kseeger
Date: 2009-10-13 03:45:44 -0600 (Tue, 13 Oct 2009)
New Revision: 1335

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=1335

Log:
Add a linebreak to separate the tables
Karolin
Modified:
   trunk/patches/index.html


Changeset:
Modified: trunk/patches/index.html
===
--- trunk/patches/index.html2009-10-13 07:33:20 UTC (rev 1334)
+++ trunk/patches/index.html2009-10-13 09:45:44 UTC (rev 1335)
@@ -56,6 +56,8 @@
   /tbody
 /table
 
+br
+
 table class=real
   thead
 trth colspan=2bSamba 3.3.0/b/th/tr



[SCM] CTDB repository - branch 1.0.82 updated - ctdb-1.0.82-52-gb09f54e

2009-10-13 Thread Ronnie Sahlberg
The branch, 1.0.82 has been updated
   via  b09f54e0ad5ad3a9a495ab25e56a84422b8679b5 (commit)
   via  05e809e791dfcdf3bf7f8382171e8ebde6c0165b (commit)
   via  0ca3f46f11502a1a53c86fcbcd6cc9c5b3cfb2cd (commit)
   via  621dd1f8ed03bbda68a5d9a32b6e49db12f82751 (commit)
   via  b8aaa7ee2ff36267c2af386ae5eb18003c588d0d (commit)
   via  827ad3adb59814a16ce543632d52eaeb728cd61d (commit)
   via  653d5d16605679a751ba0eec7e9ab59ce9862519 (commit)
   via  9bd5815d67a2866ef7dbff4bcaa39df174ec10af (commit)
   via  75caa0051e78b9e71a62c77e4cf04d4ed767d1e2 (commit)
  from  5b470e788f9c40f5b510e62fbfd1b990779f2c57 (commit)

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


- Log -
commit b09f54e0ad5ad3a9a495ab25e56a84422b8679b5
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Oct 13 20:58:40 2009 +1100

version 1.0.82-12

commit 05e809e791dfcdf3bf7f8382171e8ebde6c0165b
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Oct 13 20:57:03 2009 +1100

From Volker L

A less intrusive deadlock prevention workaround

commit 0ca3f46f11502a1a53c86fcbcd6cc9c5b3cfb2cd
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Oct 13 20:56:08 2009 +1100

Revert add a control to set a database priority. Let newly created 
databases default to priority 1.

This reverts commit 808b4a6ed9f6122a958146ef6ac6665f0e75fe32.

commit 621dd1f8ed03bbda68a5d9a32b6e49db12f82751
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Oct 13 20:56:00 2009 +1100

Revert add a control to read the db priority from a database

This reverts commit 17516689570e352d5df1b5a6bae3d7c7e4bb5662.

commit b8aaa7ee2ff36267c2af386ae5eb18003c588d0d
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Oct 13 20:55:52 2009 +1100

Revert during recovery, update all remote nodes so they use the same 
priorities

This reverts commit 9bbce3e37e213080e974afea551e9147a43a44af.

commit 827ad3adb59814a16ce543632d52eaeb728cd61d
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Oct 13 20:55:43 2009 +1100

Revert uptade the freeze/thaw commands to be able to send the requested 
database priority to freeze/thaw to the daemon.

This reverts commit a92210bc9572851df327862b325376d56470823c.

commit 653d5d16605679a751ba0eec7e9ab59ce9862519
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Oct 13 20:55:36 2009 +1100

Revert initial attempt at freezing databases in priority order

This reverts commit 499e781b065f5195e021f33d428503b59b2189b8.

commit 9bd5815d67a2866ef7dbff4bcaa39df174ec10af
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Oct 13 20:55:28 2009 +1100

Revert allow setting the recmode even when not completely frozen.

This reverts commit 575210997f7e9aebc721d584b00bf7def15ab600.

commit 75caa0051e78b9e71a62c77e4cf04d4ed767d1e2
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Tue Oct 13 20:55:18 2009 +1100

Revert new version 1.0.82-11

This reverts commit 5b470e788f9c40f5b510e62fbfd1b990779f2c57.

---

Summary of changes:
 client/ctdb_client.c  |   92 ++--
 include/ctdb.h|   15 +---
 include/ctdb_private.h|   17 +---
 packaging/RPM/ctdb.spec   |8 +-
 server/ctdb_control.c |   26 +-
 server/ctdb_daemon.c  |2 +-
 server/ctdb_freeze.c  |  209 +
 server/ctdb_ltdb_server.c |   24 -
 server/ctdb_monitor.c |9 +--
 server/ctdb_recover.c |  106 +++
 server/ctdb_recoverd.c|   93 
 tools/ctdb.c  |  108 ---
 12 files changed, 191 insertions(+), 518 deletions(-)


Changeset truncated at 500 lines:

diff --git a/client/ctdb_client.c b/client/ctdb_client.c
index e60a72e..fa6a990 100644
--- a/client/ctdb_client.c
+++ b/client/ctdb_client.c
@@ -1943,9 +1943,9 @@ int ctdb_ctrl_getpid(struct ctdb_context *ctdb, struct 
timeval timeout, uint32_t
   async freeze send control
  */
 struct ctdb_client_control_state *
-ctdb_ctrl_freeze_send(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx, struct 
timeval timeout, uint32_t destnode, uint32_t priority)
+ctdb_ctrl_freeze_send(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx, struct 
timeval timeout, uint32_t destnode)
 {
-   return ctdb_control_send(ctdb, destnode, priority, 
+   return ctdb_control_send(ctdb, destnode, 0, 
   CTDB_CONTROL_FREEZE, 0, tdb_null, 
   mem_ctx, timeout, NULL);
 }
@@ -1968,43 +1968,30 @@ int ctdb_ctrl_freeze_recv(struct ctdb_context *ctdb, 
TALLOC_CTX *mem_ctx, struct
 }
 
 /*
-  freeze databases of a certain priority
+  freeze a node
  */
-int ctdb_ctrl_freeze_priority(struct ctdb_context *ctdb, struct timeval 

[SCM] Samba Shared Repository - branch master updated

2009-10-13 Thread Günther Deschner
The branch, master has been updated
   via  c2be185... netlogon: add NL_PASSWORD_VERSION to IDL.
  from  ebe0e64... s3: use enum netr_SchannelType all over the place.

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


- Log -
commit c2be185793d66709b0b2ddb92845f4dfd0ab27b6
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 8 00:34:53 2009 +0200

netlogon: add NL_PASSWORD_VERSION to IDL.

Guenther

---

Summary of changes:
 librpc/gen_ndr/netlogon.h |7 +++
 librpc/idl/netlogon.idl   |   12 
 2 files changed, 19 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/netlogon.h b/librpc/gen_ndr/netlogon.h
index e8261d0..402e4a0 100644
--- a/librpc/gen_ndr/netlogon.h
+++ b/librpc/gen_ndr/netlogon.h
@@ -17,6 +17,7 @@
 #define NETLOGON_NEG_128BIT( NETLOGON_NEG_STRONG_KEYS )
 #define NETLOGON_NEG_SCHANNEL  ( NETLOGON_NEG_AUTHENTICATED_RPC )
 #define DSGETDC_VALID_FLAGS( 
(DS_FORCE_REDISCOVERY|DS_DIRECTORY_SERVICE_REQUIRED|DS_DIRECTORY_SERVICE_PREFERRED|DS_GC_SERVER_REQUIRED|DS_PDC_REQUIRED|DS_BACKGROUND_ONLY|DS_IP_REQUIRED|DS_KDC_REQUIRED|DS_TIMESERV_REQUIRED|DS_WRITABLE_REQUIRED|DS_GOOD_TIMESERV_PREFERRED|DS_AVOID_SELF|DS_ONLY_LDAP_NEEDED|DS_IS_FLAT_NAME|DS_IS_DNS_NAME|DS_RETURN_FLAT_NAME|DS_RETURN_DNS_NAME)
 )
+#define NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT   ( 0x02231968 )
 #define DS_GFTI_UPDATE_TDO ( 0x1 )
 struct netr_UasInfo {
const char *account_name;/* [unique,charset(UTF16)] */
@@ -1033,6 +1034,12 @@ union netr_DomainInfo {
struct netr_LsaPolicyInformation *lsa_policy_info;/* [unique,case(2)] */
 };
 
+struct NL_PASSWORD_VERSION {
+   uint32_t ReservedField;
+   uint32_t PasswordVersionNumber;
+   uint32_t PasswordVersionPresent;
+};
+
 struct netr_CryptPassword {
uint8_t data[512];
uint32_t length;
diff --git a/librpc/idl/netlogon.idl b/librpc/idl/netlogon.idl
index b08a893..82a60c7 100644
--- a/librpc/idl/netlogon.idl
+++ b/librpc/idl/netlogon.idl
@@ -1412,6 +1412,18 @@ interface netlogon
 
/*/
/* Function 0x1e */
+
+   /* [MS-NRPC] 2.2.1.3.8 NL_PASSWORD_VERSION */
+
+   /* someone's birthday ? */
+   const int NETLOGON_PASSWORD_VERSION_NUMBER_PRESENT = 0x02231968;
+
+   typedef struct {
+   uint32 ReservedField;
+   uint32 PasswordVersionNumber;
+   uint32 PasswordVersionPresent;
+   } NL_PASSWORD_VERSION;
+
typedef [flag(NDR_PAHEX)] struct {
uint8 data[512];
uint32 length;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-10-13 Thread Günther Deschner
The branch, master has been updated
   via  f394b5b... docs: document wbinfo -t --domain DOMAIN behavior.
  from  c2be185... netlogon: add NL_PASSWORD_VERSION to IDL.

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


- Log -
commit f394b5bc683d55be066f8565f99d157d9848e169
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 13 12:24:57 2009 +0200

docs: document wbinfo -t --domain DOMAIN behavior.

Guenther

---

Summary of changes:
 docs-xml/manpages-3/wbinfo.1.xml |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/wbinfo.1.xml b/docs-xml/manpages-3/wbinfo.1.xml
index 7803d10..8f83f5e 100644
--- a/docs-xml/manpages-3/wbinfo.1.xml
+++ b/docs-xml/manpages-3/wbinfo.1.xml
@@ -283,7 +283,9 @@
term-t|--check-secret/term
listitemparaVerify that the workstation trust account
created when the Samba server is added to the Windows NT
-   domain is working. /para/listitem
+   domain is working. May be used in conjunction with
+   optiondomain/option in order to verify interdomain
+   trust accounts./para/listitem
/varlistentry
 
varlistentry


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-10-13 Thread Günther Deschner
The branch, master has been updated
   via  a3306e3... s3-winbindd: add wbint_ChangeMachineAccount 
implementation.
   via  0c37c23... docs: document wbinfo -c.
   via  0a468fb... nsswitch: add wbinfo -c (change trust account passwords).
   via  74948c9... libwbclient: add wbcChangeTrustCredentials.
  from  f394b5b... docs: document wbinfo -t --domain DOMAIN behavior.

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


- Log -
commit a3306e352dad74c3c6ce441610defc472d570f4f
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 18:26:33 2009 +0200

s3-winbindd: add wbint_ChangeMachineAccount implementation.

Guenther

commit 0c37c23869fe8000609c91be3d44ba269ff38f3b
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 18:20:23 2009 +0200

docs: document wbinfo -c.

Guenther

commit 0a468fbe36e6049f8d7f971c1aa111e1573a406c
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 18:18:00 2009 +0200

nsswitch: add wbinfo -c (change trust account passwords).

Guenther

commit 74948c979ab19f20c7e5824aee50828e9bda0e35
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 18:15:08 2009 +0200

libwbclient: add wbcChangeTrustCredentials.

Guenther

---

Summary of changes:
 docs-xml/manpages-3/wbinfo.1.xml   |9 ++
 nsswitch/libwbclient/wbc_pam.c |   38 +
 nsswitch/libwbclient/wbclient.h|   11 ++
 nsswitch/wbinfo.c  |   39 +
 nsswitch/winbind_struct_protocol.h |1 +
 source3/Makefile.in|1 +
 source3/librpc/gen_ndr/cli_wbint.c |  146 
 source3/librpc/gen_ndr/cli_wbint.h |8 +
 source3/librpc/gen_ndr/ndr_wbint.c |   51 +++-
 source3/librpc/gen_ndr/ndr_wbint.h |   11 +-
 source3/librpc/gen_ndr/srv_wbint.c |   80 +++
 source3/librpc/gen_ndr/srv_wbint.h |2 +
 source3/librpc/gen_ndr/wbint.h |8 +
 source3/librpc/idl/wbint.idl   |5 +-
 source3/winbindd/winbindd.c|2 +
 source3/winbindd/winbindd_cache.c  |1 +
 ...chine_acct.c = winbindd_change_machine_acct.c} |   44 +++
 source3/winbindd/winbindd_dual_srv.c   |   62 
 source3/winbindd/winbindd_proto.h  |7 +
 19 files changed, 496 insertions(+), 30 deletions(-)
 copy source3/winbindd/{winbindd_check_machine_acct.c = 
winbindd_change_machine_acct.c} (58%)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/wbinfo.1.xml b/docs-xml/manpages-3/wbinfo.1.xml
index 8f83f5e..d6628e7 100644
--- a/docs-xml/manpages-3/wbinfo.1.xml
+++ b/docs-xml/manpages-3/wbinfo.1.xml
@@ -23,6 +23,7 @@
arg choice=opt--all-domains/arg
arg choice=opt--allocate-gid/arg
arg choice=opt--allocate-uid/arg
+   arg choice=opt-c/arg
arg choice=opt-D domain/arg
arg choice=opt--domain domain/arg
arg choice=opt-g/arg
@@ -111,6 +112,14 @@
/varlistentry
 
varlistentry
+   term-c|--change-secret/term
+   listitemparaChange the trust account password. May be used
+   in conjunction with optiondomain/option in order to change
+   interdomain trust account passwords.
+   /para/listitem
+   /varlistentry
+
+   varlistentry
term--domain replaceablename/replaceable/term
listitemparaThis parameter sets the domain on which any 
specified
operations will performed.  If special domain name '.' is used 
to represent
diff --git a/nsswitch/libwbclient/wbc_pam.c b/nsswitch/libwbclient/wbc_pam.c
index 4cd212a..7a66a7f 100644
--- a/nsswitch/libwbclient/wbc_pam.c
+++ b/nsswitch/libwbclient/wbc_pam.c
@@ -532,6 +532,44 @@ wbcErr wbcCheckTrustCredentials(const char *domain,
return wbc_status;
 }
 
+/* Trigger a change of the trust credentials for a specific domain */
+wbcErr wbcChangeTrustCredentials(const char *domain,
+struct wbcAuthErrorInfo **error)
+{
+   struct winbindd_request request;
+   struct winbindd_response response;
+   wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE;
+
+   ZERO_STRUCT(request);
+   ZERO_STRUCT(response);
+
+   if (domain) {
+   strncpy(request.domain_name, domain,
+   sizeof(request.domain_name)-1);
+   }
+
+   /* Send request */
+
+   wbc_status = wbcRequestResponse(WINBINDD_CHANGE_MACHACC,
+   request,
+ 

[SCM] Samba Shared Repository - branch master updated

2009-10-13 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  325dc96... Enhance .gitignore file for s4
  from  a3306e3... s3-winbindd: add wbint_ChangeMachineAccount 
implementation.

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


- Log -
commit 325dc960df55bf48fbb2150a5d5663a01dde8949
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Mon Oct 12 23:25:17 2009 +0200

Enhance .gitignore file for s4

---

Summary of changes:
 .gitignore |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/.gitignore b/.gitignore
index 43f7846..9ed25e7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -141,6 +141,7 @@ source4/dsdb/common/proto.h
 source4/dsdb/kcc/kcc_service_proto.h
 source4/dsdb/repl/drepl_service_proto.h
 source4/dsdb/samdb/samdb_proto.h
+source4/dsdb/samdb/ldb_modules/util_proto.h
 source4/dsdb/schema/proto.h
 source4/extra_cflags.txt
 source4/foo.tdb
@@ -264,6 +265,7 @@ pidl/Makefile
 pidl/pm_to_blib
 source4/rpc_server/common/proto.h
 source4/rpc_server/dcerpc_server_proto.h
+source4/rpc_server/service_rpc.h
 source4/rpc_server/lsa/proto.h
 source4/rpc_server/samr/proto.h
 source4/rpc_server/srvsvc/proto.h


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-10-13 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  a889303... s4:ldb_tdb - Revert some introduced trivial gotos
  from  325dc96... Enhance .gitignore file for s4

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


- Log -
commit a889303e3e0488b25015bcb5ee0bc2804873506a
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Mon Oct 12 23:39:40 2009 +0200

s4:ldb_tdb - Revert some introduced trivial gotos

I hope that this makes abartlet  simo happy again (consider mailing list).

---

Summary of changes:
 source4/lib/ldb/ldb_tdb/ldb_tdb.c |   32 +++-
 1 files changed, 11 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c 
b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
index 4943f81..63ce6e7 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -234,7 +234,7 @@ int ltdb_store(struct ldb_module *module, const struct 
ldb_message *msg, int flg
int ret = LDB_SUCCESS;
 
tdb_key = ltdb_key(module, msg-dn);
-   if (!tdb_key.dptr) {
+   if (tdb_key.dptr == NULL) {
return LDB_ERR_OTHER;
}
 
@@ -271,12 +271,11 @@ static int ltdb_add_internal(struct ldb_module *module,
 
ret = ltdb_check_special_dn(module, msg);
if (ret != LDB_SUCCESS) {
-   goto done;
+   return ret;
}
 
if (ltdb_cache_load(module) != 0) {
-   ret = LDB_ERR_OPERATIONS_ERROR;
-   goto done;
+   return LDB_ERR_OPERATIONS_ERROR;
}
 
for (i=0;imsg-num_elements;i++) {
@@ -286,15 +285,13 @@ static int ltdb_add_internal(struct ldb_module *module,
if (el-num_values == 0) {
ldb_asprintf_errstring(ldb, attribute %s on %s 
specified, but with 0 values (illegal), 
   el-name, 
ldb_dn_get_linearized(msg-dn));
-   ret = LDB_ERR_CONSTRAINT_VIOLATION;
-   goto done;
+   return LDB_ERR_CONSTRAINT_VIOLATION;
}
if (a  a-flags  LDB_ATTR_FLAG_SINGLE_VALUE) {
if (el-num_values  1) {
ldb_asprintf_errstring(ldb, SINGLE-VALUE 
attribute %s on %s specified more than once,
   el-name, 
ldb_dn_get_linearized(msg-dn));
-   ret = LDB_ERR_CONSTRAINT_VIOLATION;
-   goto done;
+   return LDB_ERR_CONSTRAINT_VIOLATION;
}
}
}
@@ -306,20 +303,16 @@ static int ltdb_add_internal(struct ldb_module *module,
   Entry %s already exists,
   ldb_dn_get_linearized(msg-dn));
}
-   goto done;
+   return ret;
}
 
ret = ltdb_index_one(module, msg, 1);
if (ret != LDB_SUCCESS) {
-   goto done;
+   return ret;
}
 
ret = ltdb_modified(module, msg-dn);
-   if (ret != LDB_SUCCESS) {
-   goto done;
-   }
 
-done:
return ret;
 }
 
@@ -864,8 +857,7 @@ static int ltdb_rename(struct ltdb_context *ctx)
 
msg = talloc(ctx, struct ldb_message);
if (msg == NULL) {
-   ret = LDB_ERR_OPERATIONS_ERROR;
-   goto done;
+   return LDB_ERR_OPERATIONS_ERROR;
}
 
/* in case any attribute of the message was indexed, we need
@@ -873,13 +865,12 @@ static int ltdb_rename(struct ltdb_context *ctx)
ret = ltdb_search_dn1(module, req-op.rename.olddn, msg);
if (ret != LDB_SUCCESS) {
/* not finding the old record is an error */
-   goto done;
+   return ret;
}
 
msg-dn = ldb_dn_copy(msg, req-op.rename.newdn);
if (msg-dn == NULL) {
-   ret = LDB_ERR_OPERATIONS_ERROR;
-   goto done;
+   return LDB_ERR_OPERATIONS_ERROR;
}
 
/* Always delete first then add, to avoid conflicts with
@@ -888,12 +879,11 @@ static int ltdb_rename(struct ltdb_context *ctx)
 */
ret = ltdb_delete_internal(module, req-op.rename.olddn);
if (ret != LDB_SUCCESS) {
-   goto done;
+   return ret;
}
 
ret = ltdb_add_internal(module, msg);
 
-done:
return ret;
 }
 


-- 
Samba Shared Repository


Re: [SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-963-g6a4efcc

2009-10-13 Thread Matthias Dieter Wallnöfer

Jelmer, have you done some more investigations on this one?

Matthias

Matthias Dieter Wallnöfer schrieb:

Hi Jelmer,

could you please look for a solution for this (locale setting - I 
personally don't know much about)? So I can reactivate this code snippet.


Matthias

Jelmer Vernooij schrieb:

Hi Matthias,

On Sat, 2009-10-03 at 09:55 -0500, Matthias Dieter Wallnöfer wrote:
 
@@ -1254,7 +1254,9 @@ member: CN=ldaptestutf8user 
èùéìòà,CN=Users, + self.base_dn + 

 self.assertTrue(member not in res[0])
 
 print Testing ldb.search for ((cn=ldaptestutf8user 
ÈÙÉÌÒÀ)(objectClass=user))
-res = ldb.search(expression=((cn=ldaptestutf8user 
ÈÙÉÌÒÀ)(objectClass=user)))

+# TODO UTF8 users don't seem to work fully anymore
+#res = ldb.search(expression=((cn=ldaptestutf8user 
ÈÙÉÌÒÀ)(objectClass=user)))
+res = ldb.search(expression=((cn=ldaptestutf8user 
èùéìòà)(objectclass=user)))
 self.assertEquals(len(res), 1, Could not find 
((cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user)))
 
 self.assertEquals(str(res[0].dn), (CN=ldaptestutf8user 
èùéìòà,CN=Users, + self.base_dn))
@@ -1275,9 +1277,9 @@ member: CN=ldaptestutf8user 
èùéìòà,CN=Users, + self.base_dn + 

 ldb.delete((CN=ldaptestgroup2,CN=Users, + self.base_dn))
 
 print Testing ldb.search for ((cn=ldaptestutf8user2 
ÈÙÉÌÒÀ)(objectClass=user))
-res = ldb.search(expression=((cn=ldaptestutf8user 
ÈÙÉÌÒÀ)(objectClass=user)))

-
-#FIXME: self.assert len(res) == 1, Could not find (expect 
space collapse, win2k3 fails) ((cn=ldaptestutf8user2 
ÈÙÉÌÒÀ)(objectClass=user))

+# TODO UTF8 users don't seem to work fully anymore
+#res = ldb.search(expression=((cn=ldaptestutf8user 
ÈÙÉÌÒÀ)(objectClass=user)))
+#self.assertEquals(len(res), 1, Could not find 
((cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user)))
 
 print Testing that we can't get at the configuration DN 
from the main search base
 res = ldb.search(self.base_dn, 
expression=objectClass=crossRef, scope=SCOPE_SUBTREE, attrs=[cn])
@@ -1360,8 +1362,8 @@ member: CN=ldaptestutf8user 
èùéìòà,CN=Users, + self.base_dn + 
 self.delete_force(self.ldb, 
cn=ldaptestcomputer,cn=computers, + self.base_dn)
 self.delete_force(self.ldb, 
cn=ldaptest2computer,cn=computers, + self.base_dn)
 self.delete_force(self.ldb, 
cn=ldaptestcomputer3,cn=computers, + self.base_dn)
-self.delete_force(self.ldb, cn=ldaptestutf8user èùéìòà 
,cn=users, + self.base_dn)
-self.delete_force(self.ldb, cn=ldaptestutf8user2  èùéìòà 
,cn=users, + self.base_dn)
+self.delete_force(self.ldb, cn=ldaptestutf8user 
èùéìòà,cn=users, + self.base_dn)
+self.delete_force(self.ldb, cn=ldaptestutf8user2  
èùéìòà,cn=users, + self.base_dn)
 self.delete_force(self.ldb, cn=ldaptestcontainer, + 
self.base_dn)
 self.delete_force(self.ldb, cn=ldaptestcontainer2, + 
self.base_dn)


These tests still run fine, but unfortunately we seem to depend on a
particular locale being set (in the environment?). We might want to
force a particular locale during these tests .

Cheers,

Jelmer
  







[SCM] Samba Shared Repository - branch master updated

2009-10-13 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  6b91a2a... s4:dcesrv_samr - prevent ldb_modify on a possibly 
empty message
   via  7c53386... s4:dcesrv_samr - Add additional talloc_frees
   via  6e19a9e... s4:dcesrv_samr - Cosmetics
  from  a889303... s4:ldb_tdb - Revert some introduced trivial gotos

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


- Log -
commit 6b91a2ad8ebf6368c81eefdd225548e42a2ed0c4
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Tue Oct 13 00:48:15 2009 +0200

s4:dcesrv_samr - prevent ldb_modify on a possibly empty message

In this code part under certain circumstances we can end up with an empty 
message.
Since our new behaviour denies them (like the real AD) we need to bypass 
them
on LDB modify calls.

commit 7c53386adfb4658df11ed951614bbb7ec74af1cb
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Tue Oct 13 00:45:26 2009 +0200

s4:dcesrv_samr - Add additional talloc_frees

commit 6e19a9e05d6085224c0e6a0b46a0f7e468188124
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Tue Oct 13 00:15:19 2009 +0200

s4:dcesrv_samr - Cosmetics

Make more use of constants and add some braces around if blocks

---

Summary of changes:
 source4/rpc_server/samr/dcesrv_samr.c |   74 +++-
 1 files changed, 44 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/samr/dcesrv_samr.c 
b/source4/rpc_server/samr/dcesrv_samr.c
index b8af5fd..00820a3 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -949,7 +949,7 @@ static NTSTATUS dcesrv_samr_SetDomainInfo(struct 
dcesrv_call_state *dce_call, TA
 
/* modify the samdb record */
ret = ldb_modify(sam_ctx, msg);
-   if (ret != 0) {
+   if (ret != LDB_SUCCESS) {
DEBUG(1,(Failed to modify record %s: %s\n,
 ldb_dn_get_linearized(d_state-domain_dn),
 ldb_errstring(sam_ctx)));
@@ -1234,7 +1234,7 @@ static NTSTATUS dcesrv_samr_CreateUser2(struct 
dcesrv_call_state *dce_call, TALL
 */
 
ret = ldb_transaction_start(d_state-sam_ctx);
-   if (ret != 0) {
+   if (ret != LDB_SUCCESS) {
DEBUG(0,(Failed to start a transaction for user creation: 
%s\n,
 ldb_errstring(d_state-sam_ctx)));
return NT_STATUS_INTERNAL_DB_CORRUPTION;
@@ -1389,7 +1389,7 @@ static NTSTATUS dcesrv_samr_CreateUser2(struct 
dcesrv_call_state *dce_call, TALL
 
/* modify the samdb record */
ret = samdb_replace(a_state-sam_ctx, mem_ctx, msg);
-   if (ret != 0) {
+   if (ret != LDB_SUCCESS) {
DEBUG(0,(Failed to modify account record %s to set 
userAccountControl: %s\n,
 ldb_dn_get_linearized(msg-dn),
 ldb_errstring(d_state-sam_ctx)));
@@ -1400,7 +1400,7 @@ static NTSTATUS dcesrv_samr_CreateUser2(struct 
dcesrv_call_state *dce_call, TALL
}
 
ret = ldb_transaction_commit(d_state-sam_ctx);
-   if (ret != 0) {
+   if (ret != LDB_SUCCESS) {
DEBUG(0,(Failed to commit transaction to add and modify 
account record %s: %s\n,
 ldb_dn_get_linearized(msg-dn),
 ldb_errstring(d_state-sam_ctx)));
@@ -2193,7 +2193,7 @@ static NTSTATUS dcesrv_samr_SetGroupInfo(struct 
dcesrv_call_state *dce_call, TAL
 
/* modify the samdb record */
ret = ldb_modify(g_state-sam_ctx, msg);
-   if (ret != 0) {
+   if (ret != LDB_SUCCESS) {
/* we really need samdb.c to return NTSTATUS */
return NT_STATUS_UNSUCCESSFUL;
}
@@ -2224,8 +2224,9 @@ static NTSTATUS dcesrv_samr_AddGroupMember(struct 
dcesrv_call_state *dce_call, T
d_state = a_state-domain_state;
 
membersid = dom_sid_add_rid(mem_ctx, d_state-domain_sid, r-in.rid);
-   if (membersid == NULL)
+   if (membersid == NULL) {
return NT_STATUS_NO_MEMORY;
+   }
 
/* In native mode, AD can also nest domain groups. Not sure yet
 * whether this is also available via RPC. */
@@ -2234,7 +2235,7 @@ static NTSTATUS dcesrv_samr_AddGroupMember(struct 
dcesrv_call_state *dce_call, T
 ((objectSid=%s)(objectclass=user)),
 ldap_encode_ndr_dom_sid(mem_ctx, membersid));
 
-   if (ret != 0) {
+   if (ret != LDB_SUCCESS) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}
 
@@ -2258,9 +2259,11 @@ static NTSTATUS dcesrv_samr_AddGroupMember(struct 
dcesrv_call_state *dce_call, T
 
mod-dn = talloc_reference(mem_ctx, a_state-account_dn);
 
-   if (samdb_msg_add_addval(d_state-sam_ctx, mem_ctx, mod, member,
- 

[SCM] Samba Shared Repository - branch master updated

2009-10-13 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  11a8a54... s4:hdb-samba4 - Don't double-free db
   via  c183acc... s4:dcesrv_samr - add another constant
  from  6b91a2a... s4:dcesrv_samr - prevent ldb_modify on a possibly 
empty message

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


- Log -
commit 11a8a54c825a52d7dd6ab78bc7aeff2d719327d2
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Tue Oct 13 17:36:58 2009 +0200

s4:hdb-samba4 - Don't double-free db

db is freed anyway after the destructor terminates so this does really 
make
no sense here (rather it makes code crash).

Should fix bug #6801.

commit c183acc782ffa881dac770b093f3a50cc24b6262
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Tue Oct 13 17:29:52 2009 +0200

s4:dcesrv_samr - add another constant

---

Summary of changes:
 source4/kdc/hdb-samba4.c  |1 -
 source4/rpc_server/samr/dcesrv_samr.c |2 +-
 2 files changed, 1 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/kdc/hdb-samba4.c b/source4/kdc/hdb-samba4.c
index 4062e13..bed6ee9 100644
--- a/source4/kdc/hdb-samba4.c
+++ b/source4/kdc/hdb-samba4.c
@@ -1442,7 +1442,6 @@ static krb5_error_code hdb_samba4_nextkey(krb5_context 
context, HDB *db, unsigne
 
 static krb5_error_code hdb_samba4_destroy(krb5_context context, HDB *db)
 {
-   talloc_free(db);
return 0;
 }
 
diff --git a/source4/rpc_server/samr/dcesrv_samr.c 
b/source4/rpc_server/samr/dcesrv_samr.c
index 00820a3..6c5f5b8 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -2646,7 +2646,7 @@ static NTSTATUS dcesrv_samr_SetAliasInfo(struct 
dcesrv_call_state *dce_call, TAL
 
/* modify the samdb record */
ret = ldb_modify(a_state-sam_ctx, msg);
-   if (ret != 0) {
+   if (ret != LDB_SUCCESS) {
/* we really need samdb.c to return NTSTATUS */
return NT_STATUS_UNSUCCESSFUL;
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2009-10-13 Thread Karolin Seeger
The branch, master has been updated
   via  5ec557d... s3/loadparm: Fix severe HPUX compiler issue.
  from  11a8a54... s4:hdb-samba4 - Don't double-free db

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


- Log -
commit 5ec557d9f6137dc96b2c099fb13726e6552fb1fe
Author: Olaf Flebbe o.fle...@science-computing.de
Date:   Tue Oct 13 14:13:06 2009 +0200

s3/loadparm: Fix severe HPUX compiler issue.

Members of struct should be initialized explictly.
Fixes bug #6804.

---

Summary of changes:
 source3/param/loadparm.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 7bac72e..fa0577b 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3275,6 +3275,8 @@ static struct parm_struct parm_table[] = {
.type   = P_LIST,
.p_class= P_GLOBAL,
.ptr= Globals.szInitLogonDelayedHosts,
+   .special= NULL,
+   .enum_list  = NULL,
.flags  = FLAG_ADVANCED,
},
 
@@ -3283,6 +3285,8 @@ static struct parm_struct parm_table[] = {
.type   = P_INTEGER,
.p_class= P_GLOBAL,
.ptr= Globals.InitLogonDelay,
+   .special= NULL,
+   .enum_list  = NULL,
.flags  = FLAG_ADVANCED,
 
},
@@ -3672,6 +3676,7 @@ static struct parm_struct parm_table[] = {
.type   = P_ENUM,
.p_class= P_GLOBAL,
.ptr= Globals.ldap_ref_follow,
+   .special= NULL,
.enum_list  = enum_bool_auto,
.flags  = FLAG_ADVANCED,
},


-- 
Samba Shared Repository


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

2009-10-13 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  4c7d2aa... s3/loadparm: Fix severe HPUX compiler issue.
  from  f1529c3... torture: fixed socket leak in BENCH-TCON test

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


- Log -
commit 4c7d2aa2da9935248ee772d574f5225bbb9afd5d
Author: Olaf Flebbe o.fle...@science-computing.de
Date:   Tue Oct 13 14:13:06 2009 +0200

s3/loadparm: Fix severe HPUX compiler issue.

Members of struct should be initialized explictly.
Fixes bug #6804.
(cherry picked from commit 5ec557d9f6137dc96b2c099fb13726e6552fb1fe)

---

Summary of changes:
 source3/param/loadparm.c |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 7bac72e..fa0577b 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3275,6 +3275,8 @@ static struct parm_struct parm_table[] = {
.type   = P_LIST,
.p_class= P_GLOBAL,
.ptr= Globals.szInitLogonDelayedHosts,
+   .special= NULL,
+   .enum_list  = NULL,
.flags  = FLAG_ADVANCED,
},
 
@@ -3283,6 +3285,8 @@ static struct parm_struct parm_table[] = {
.type   = P_INTEGER,
.p_class= P_GLOBAL,
.ptr= Globals.InitLogonDelay,
+   .special= NULL,
+   .enum_list  = NULL,
.flags  = FLAG_ADVANCED,
 
},
@@ -3672,6 +3676,7 @@ static struct parm_struct parm_table[] = {
.type   = P_ENUM,
.p_class= P_GLOBAL,
.ptr= Globals.ldap_ref_follow,
+   .special= NULL,
.enum_list  = enum_bool_auto,
.flags  = FLAG_ADVANCED,
},


-- 
Samba Shared Repository


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

2009-10-13 Thread Karolin Seeger
The branch, v3-4-test has been updated
   via  bf64668... s3/loadparm: Fix hpux compiler issue.
  from  a5e71f7... s3: Fix a memleak reported by dmarkey (cherry picked 
from commit 5aeb954ba9382e1975c64ac96f1e377ed6af3ae0)

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


- Log -
commit bf64668cb114ca7afdc81545d229bcb73b59c8f6
Author: Olaf Flebbe o.fle...@science-computing.de
Date:   Tue Oct 13 11:39:49 2009 +0200

s3/loadparm: Fix hpux compiler issue.

Fixes bug #6804.

---

Summary of changes:
 source3/param/loadparm.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 4bd48ab..cd27fe4 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3245,6 +3245,8 @@ static struct parm_struct parm_table[] = {
.type   = P_LIST,
.p_class= P_GLOBAL,
.ptr= Globals.szInitLogonDelayedHosts,
+   .special= NULL,
+   .enum_list  = NULL,
.flags  = FLAG_ADVANCED,
},
 
@@ -3253,6 +3255,8 @@ static struct parm_struct parm_table[] = {
.type   = P_INTEGER,
.p_class= P_GLOBAL,
.ptr= Globals.InitLogonDelay,
+   .special= NULL,
+   .enum_list  = NULL,
.flags  = FLAG_ADVANCED,
 
},


-- 
Samba Shared Repository


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

2009-10-13 Thread Günther Deschner
The branch, v3-5-test has been updated
   via  ec646e5... s3-winbindd: add wbint_ChangeMachineAccount 
implementation.
   via  e3fa32a... docs: document wbinfo -c.
   via  e816b11... nsswitch: add wbinfo -c (change trust account passwords).
   via  507de11... libwbclient: add wbcChangeTrustCredentials.
   via  6a7320d... docs: document wbinfo -t --domain DOMAIN behavior.
   via  b5ab612... netlogon: add NL_PASSWORD_VERSION to IDL.
   via  bf82532... s3: use enum netr_SchannelType all over the place.
   via  d1dffa6... s3-netlogon: allow to change any type of trust account 
password in trust_pw_find_change_and_store_it().
   via  488e228... s3-netlogon: pass down account name to remote password 
set functions.
   via  68ffe06... s3-docs: remove xml artefact from net.8.xml.
  from  4c7d2aa... s3/loadparm: Fix severe HPUX compiler issue.

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


- Log -
commit ec646e5e094639f750e56bde4779ab3b0ac23e47
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 18:26:33 2009 +0200

s3-winbindd: add wbint_ChangeMachineAccount implementation.

Guenther
(cherry picked from commit a3306e352dad74c3c6ce441610defc472d570f4f)

commit e3fa32aa37ce913d0daad6aa1b6bb81986dce4bf
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 18:20:23 2009 +0200

docs: document wbinfo -c.

Guenther
(cherry picked from commit 0c37c23869fe8000609c91be3d44ba269ff38f3b)

commit e816b11d564df42a467c7c330f4b75db923d497e
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 18:18:00 2009 +0200

nsswitch: add wbinfo -c (change trust account passwords).

Guenther
(cherry picked from commit 0a468fbe36e6049f8d7f971c1aa111e1573a406c)

commit 507de11191b28b8d14eda43084621e731e7a82f7
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 6 18:15:08 2009 +0200

libwbclient: add wbcChangeTrustCredentials.

Guenther
(cherry picked from commit 74948c979ab19f20c7e5824aee50828e9bda0e35)

commit 6a7320d73a51d84cdba08e43c8b50991339de267
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 13 12:24:57 2009 +0200

docs: document wbinfo -t --domain DOMAIN behavior.

Guenther
(cherry picked from commit f394b5bc683d55be066f8565f99d157d9848e169)

commit b5ab612c5f9b5afd04618b705153fbf5150382f4
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 8 00:34:53 2009 +0200

netlogon: add NL_PASSWORD_VERSION to IDL.

Guenther
(cherry picked from commit c2be185793d66709b0b2ddb92845f4dfd0ab27b6)

commit bf8253211c478280d41e3f8afdf7a97acc9ca898
Author: Günther Deschner g...@samba.org
Date:   Tue Oct 13 10:15:34 2009 +0200

s3: use enum netr_SchannelType all over the place.

Guenther
(cherry picked from commit ebe0e64ba9815b238cccf7d24821bc473d245707)

commit d1dffa6244fb7b5eb95d3bea9a585d7bd0d92484
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 8 00:39:40 2009 +0200

s3-netlogon: allow to change any type of trust account password in 
trust_pw_find_change_and_store_it().

Guenther
(cherry picked from commit aa8c142b5e1d126b9a5a8e4a6638bc785292fbc2)

commit 488e228fc9b469c6b40a372c0f2ff0658e176c27
Author: Günther Deschner g...@samba.org
Date:   Thu Oct 8 00:34:05 2009 +0200

s3-netlogon: pass down account name to remote password set functions.

Guenther
(cherry picked from commit 4a1b50afd567313cc25d5bbc14e01e170aa62a00)

commit 68ffe06565746c6172f6052ce6809036dd27
Author: Günther Deschner g...@samba.org
Date:   Mon Oct 12 14:28:53 2009 +0200

s3-docs: remove xml artefact from net.8.xml.

Guenther
(cherry picked from commit 5eb14b2994b4508156c0760cc4adf4db70eee9cc)

---

Summary of changes:
 docs-xml/manpages-3/net.8.xml  |2 +-
 docs-xml/manpages-3/wbinfo.1.xml   |   13 ++-
 librpc/gen_ndr/netlogon.h  |7 +
 librpc/idl/netlogon.idl|   12 ++
 nsswitch/libwbclient/wbc_pam.c |   38 +
 nsswitch/libwbclient/wbclient.h|   11 ++
 nsswitch/wbinfo.c  |   39 +
 nsswitch/winbind_struct_protocol.h |1 +
 source3/Makefile.in|1 +
 source3/auth/auth_domain.c |2 +-
 source3/include/proto.h|   16 ++-
 source3/libads/util.c  |2 +-
 source3/libnet/libnet_join.c   |1 +
 source3/librpc/gen_ndr/cli_wbint.c |  146 
 source3/librpc/gen_ndr/cli_wbint.h |8 +
 source3/librpc/gen_ndr/ndr_wbint.c |   51 +++-
 source3/librpc/gen_ndr/ndr_wbint.h |   11 +-
 

[SCM] Samba Shared Repository - branch master updated

2009-10-13 Thread Volker Lendecke
The branch, master has been updated
   via  94d5417... s3:torture: Add a notify-bench test
   via  1302526... s3:libsmb: Add cli_notify
   via  f3869f9... s3:rpc: Fix is_known_pipename for dynamically loaded 
pipes
   via  1341d45... s3: Fix some nonempty blank lines
   via  6e48aad... s3: Fix vfs_shadow_copy2 to allow in-path @GMT-xxx
  from  5ec557d... s3/loadparm: Fix severe HPUX compiler issue.

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


- Log -
commit 94d5417d10a9baa281a19b86d157fb856430dd13
Author: Volker Lendecke v...@samba.org
Date:   Mon Oct 12 17:29:45 2009 +0200

s3:torture: Add a notify-bench test

This is a test that creates and deletes files in a directory as fast as the
network allows it. At the same time, it opens a filechangenotify. This test 
is
done to just torture handling a single directory together with the notify
infrastructure.

commit 1302526a74fe71b4cb56ff3c0ce26d6c5b71d360
Author: Volker Lendecke v...@samba.org
Date:   Mon Oct 12 16:43:19 2009 +0200

s3:libsmb: Add cli_notify

commit f3869f90f5efeabd404cc0c61f41cc5fcaeefc61
Author: Volker Lendecke v...@samba.org
Date:   Sat Oct 3 15:33:12 2009 +0200

s3:rpc: Fix is_known_pipename for dynamically loaded pipes

commit 1341d4509c715ab115425698c82e05ad4fc9f5f8
Author: Volker Lendecke v...@samba.org
Date:   Sun Oct 4 16:52:08 2009 +0200

s3: Fix some nonempty blank lines

commit 6e48aad3be53f06cf75fb8278457e08c510198fc
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 16 03:22:56 2009 +0200

s3: Fix vfs_shadow_copy2 to allow in-path @GMT-xxx

---

Summary of changes:
 source3/include/nss_info.h |6 +-
 source3/include/proto.h|8 +
 source3/libsmb/clifile.c   |  144 +
 source3/modules/vfs_shadow_copy2.c |  147 +++--
 source3/passdb/util_unixsids.c |   10 +-
 source3/rpc_server/srv_pipe.c  |   23 ++-
 source3/torture/torture.c  |  403 
 7 files changed, 711 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/nss_info.h b/source3/include/nss_info.h
index a60a6f0..7514289 100644
--- a/source3/include/nss_info.h
+++ b/source3/include/nss_info.h
@@ -8,12 +8,12 @@
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
-   
+
This library 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
Library General Public License for more details.
-   
+
You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
@@ -36,7 +36,7 @@
 
 struct nss_function_entry {
struct nss_function_entry *prev, *next;
-   
+
const char *name;
struct nss_info_methods *methods;
 };
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 8fc4195..6475a03 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2659,6 +2659,14 @@ struct tevent_req *cli_posix_rmdir_send(TALLOC_CTX 
*mem_ctx,
const char *fname);
 NTSTATUS cli_posix_rmdir_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx);
 NTSTATUS cli_posix_rmdir(struct cli_state *cli, const char *fname);
+struct tevent_req *cli_notify_send(TALLOC_CTX *mem_ctx,
+  struct tevent_context *ev,
+  struct cli_state *cli, uint16_t fnum,
+  uint32_t buffer_size,
+  uint32_t completion_filter, bool recursive);
+NTSTATUS cli_notify_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+uint32_t *pnum_changes,
+struct notify_change **pchanges);
 
 /* The following definitions come from libsmb/clifsinfo.c  */
 
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index b15aa8d..5eb8bd4 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -5027,3 +5027,147 @@ NTSTATUS cli_posix_rmdir(struct cli_state *cli, const 
char *fname)
}
return status;
 }
+
+/
+ filechangenotify
+/
+
+struct cli_notify_state {
+   uint8_t setup[8];
+   uint32_t num_changes;
+   struct notify_change *changes;
+};
+
+static void cli_notify_done(struct tevent_req *subreq);
+
+struct tevent_req *cli_notify_send(TALLOC_CTX *mem_ctx,
+

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

2009-10-13 Thread Volker Lendecke
The branch, v3-5-test has been updated
   via  7ff4fc5... s3: Fix vfs_shadow_copy2 to allow in-path @GMT-xxx
  from  ec646e5... s3-winbindd: add wbint_ChangeMachineAccount 
implementation.

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


- Log -
commit 7ff4fc589ce25c48409cdf399e437262b9799223
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 16 03:22:56 2009 +0200

s3: Fix vfs_shadow_copy2 to allow in-path @GMT-xxx

---

Summary of changes:
 source3/modules/vfs_shadow_copy2.c |  147 ++-
 1 files changed, 126 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_shadow_copy2.c 
b/source3/modules/vfs_shadow_copy2.c
index eac83fc..61f71b7 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -76,31 +76,99 @@ static int vfs_shadow_copy2_debug_level = DBGC_VFS;
 /*
   make very sure it is one of our special names 
  */
-static inline bool shadow_copy2_match_name(const char *name)
+static inline bool shadow_copy2_match_name(const char *name, const char 
**gmt_start)
 {
unsigned year, month, day, hr, min, sec;
-   if (name[0] != '@') return False;
-   if (strncmp(name, @GMT-, 5) != 0) return False;
-   if (sscanf(name, @GMT-%04u.%02u.%02u-%02u.%02u.%02u, year, month,
+   const char *p;
+   if (gmt_start) {
+   (*gmt_start) = NULL;
+   }
+   p = strstr_m(name, @GMT-);
+   if (p == NULL) return false;
+   if (p  name  p[-1] != '/') return False;
+   if (sscanf(p, @GMT-%04u.%02u.%02u-%02u.%02u.%02u, year, month,
   day, hr, min, sec) != 6) {
return False;
}
-   if (name[24] != 0  name[24] != '/') {
+   if (p[24] != 0  p[24] != '/') {
return False;
}
+   if (gmt_start) {
+   (*gmt_start) = p;
+   }
return True;
 }
 
 /*
+  shadow copy paths can also come into the server in this form:
+
+/foo/bar/@GMT-X/some/file
+
+  This function normalises the filename to be of the form:
+
+@GMT-/foo/bar/some/file
+ */
+static const char *shadow_copy2_normalise_path(TALLOC_CTX *mem_ctx, const char 
*path, const char *gmt_start)
+{
+   char *pcopy;
+   char buf[GMT_NAME_LEN];
+   size_t prefix_len;
+
+   if (path == gmt_start) {
+   return path;
+   }
+
+   prefix_len = gmt_start - path - 1;
+
+   DEBUG(10, (path=%s, gmt_start=%s, prefix_len=%d\n, path, gmt_start,
+  (int)prefix_len));
+
+   /*
+* We've got a/b/c/@GMT-.MM.DD-HH.MM.SS/d/e. convert to
+* @GMT-.MM.DD-HH.MM.SS/a/b/c/d/e before further
+* processing. As many VFS calls provide a const char *,
+* unfortunately we have to make a copy.
+*/
+
+   pcopy = talloc_strdup(talloc_tos(), path);
+   if (pcopy == NULL) {
+   return NULL;
+   }
+
+   gmt_start = pcopy + prefix_len;
+
+   /*
+* Copy away @GMT-.MM.DD-HH.MM.SS
+*/
+   memcpy(buf, gmt_start+1, GMT_NAME_LEN);
+
+   /*
+* Make space for it including a trailing /
+*/
+   memmove(pcopy + GMT_NAME_LEN + 1, pcopy, prefix_len);
+
+   /*
+* Move in @GMT-.MM.DD-HH.MM.SS/ at the beginning again
+*/
+   memcpy(pcopy, buf, GMT_NAME_LEN);
+   pcopy[GMT_NAME_LEN] = '/';
+
+   DEBUG(10, (shadow_copy2_normalise_path: %s - %s\n, path, pcopy));
+
+   return pcopy;
+}
+
+/*
   convert a name to the shadow directory
  */
 
 #define _SHADOW2_NEXT(op, args, rtype, eret, extra) do { \
const char *name = fname; \
-   if (shadow_copy2_match_name(fname)) { \
+   const char *gmt_start; \
+   if (shadow_copy2_match_name(fname, gmt_start)) {   \
char *name2; \
rtype ret; \
-   name2 = convert_shadow2_name(handle, fname); \
+   name2 = convert_shadow2_name(handle, fname, gmt_start); \
if (name2 == NULL) { \
errno = EINVAL; \
return eret; \
@@ -116,11 +184,12 @@ static inline bool shadow_copy2_match_name(const char 
*name)
 } while (0)
 
 #define _SHADOW2_NEXT_SMB_FNAME(op, args, rtype, eret, extra) do { \
-   if (shadow_copy2_match_name(smb_fname-base_name)) { \
+   const char *gmt_start; \
+   if (shadow_copy2_match_name(smb_fname-base_name, gmt_start)) 
{\
char *name2; \
char *smb_base_name_tmp = NULL; \
rtype ret; \
-   name2 = convert_shadow2_name(handle, smb_fname-base_name); \
+   name2 = convert_shadow2_name(handle, smb_fname-base_name, 
gmt_start); \
if (name2 == NULL) { \
errno = 

Re: [SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-963-g6a4efcc

2009-10-13 Thread Jelmer Vernooij
Hi Matthias,

On Tue, Oct 13, 2009 at 04:18:17PM +0200, Matthias Dieter Wallnöfer wrote:
 Jelmer, have you done some more investigations on this one?
Sorry, I don't have time to look into this one right now. 

Chers,

Jelmer

 
 Matthias Dieter Wallnöfer schrieb:
 Hi Jelmer,
 
 could you please look for a solution for this (locale setting - I
 personally don't know much about)? So I can reactivate this code
 snippet.
 
 Matthias
 
 Jelmer Vernooij schrieb:
 Hi Matthias,
 
 On Sat, 2009-10-03 at 09:55 -0500, Matthias Dieter Wallnöfer wrote:
 @@ -1254,7 +1254,9 @@ member: CN=ldaptestutf8user
 èùéìòà,CN=Users, + self.base_dn + 
  self.assertTrue(member not in res[0])
print Testing ldb.search for
 ((cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user))
 -res = ldb.search(expression=((cn=ldaptestutf8user
 ÈÙÉÌÒÀ)(objectClass=user)))
 +# TODO UTF8 users don't seem to work fully anymore
 +#res = ldb.search(expression=((cn=ldaptestutf8user
 ÈÙÉÌÒÀ)(objectClass=user)))
 +res = ldb.search(expression=((cn=ldaptestutf8user
 èùéìòà)(objectclass=user)))
  self.assertEquals(len(res), 1, Could not find
 ((cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user)))
self.assertEquals(str(res[0].dn),
 (CN=ldaptestutf8user èùéìòà,CN=Users, + self.base_dn))
 @@ -1275,9 +1277,9 @@ member: CN=ldaptestutf8user
 èùéìòà,CN=Users, + self.base_dn + 
  ldb.delete((CN=ldaptestgroup2,CN=Users, + self.base_dn))
print Testing ldb.search for
 ((cn=ldaptestutf8user2 ÈÙÉÌÒÀ)(objectClass=user))
 -res = ldb.search(expression=((cn=ldaptestutf8user
 ÈÙÉÌÒÀ)(objectClass=user)))
 -
 -#FIXME: self.assert len(res) == 1, Could not find
 (expect space collapse, win2k3 fails) ((cn=ldaptestutf8user2
 ÈÙÉÌÒÀ)(objectClass=user))
 +# TODO UTF8 users don't seem to work fully anymore
 +#res = ldb.search(expression=((cn=ldaptestutf8user
 ÈÙÉÌÒÀ)(objectClass=user)))
 +#self.assertEquals(len(res), 1, Could not find
 ((cn=ldaptestutf8user ÈÙÉÌÒÀ)(objectClass=user)))
print Testing that we can't get at the
 configuration DN from the main search base
  res = ldb.search(self.base_dn,
 expression=objectClass=crossRef, scope=SCOPE_SUBTREE,
 attrs=[cn])
 @@ -1360,8 +1362,8 @@ member: CN=ldaptestutf8user
 èùéìòà,CN=Users, + self.base_dn + 
  self.delete_force(self.ldb,
 cn=ldaptestcomputer,cn=computers, + self.base_dn)
  self.delete_force(self.ldb,
 cn=ldaptest2computer,cn=computers, + self.base_dn)
  self.delete_force(self.ldb,
 cn=ldaptestcomputer3,cn=computers, + self.base_dn)
 -self.delete_force(self.ldb, cn=ldaptestutf8user
 èùéìòà ,cn=users, + self.base_dn)
 -self.delete_force(self.ldb, cn=ldaptestutf8user2
 èùéìòà ,cn=users, + self.base_dn)
 +self.delete_force(self.ldb, cn=ldaptestutf8user
 èùéìòà,cn=users, + self.base_dn)
 +self.delete_force(self.ldb, cn=ldaptestutf8user2
 èùéìòà,cn=users, + self.base_dn)
  self.delete_force(self.ldb, cn=ldaptestcontainer, +
 self.base_dn)
  self.delete_force(self.ldb, cn=ldaptestcontainer2,
 + self.base_dn)
 These tests still run fine, but unfortunately we seem to depend on a
 particular locale being set (in the environment?). We might want to
 force a particular locale during these tests .
 
 Cheers,
 
 Jelmer
 
 
 

-- 


[SCM] Samba Shared Repository - branch master updated

2009-10-13 Thread Jeremy Allison
The branch, master has been updated
   via  3f5c077... Remove use of int ret when we already have errcode. 
Jeremy.
   via  df22f8d... Catch one more erroneous use of errno. Jeremy.
   via  367cb71... correctly handle aio_error() and errno
  from  94d5417... s3:torture: Add a notify-bench test

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


- Log -
commit 3f5c077f2d175d21bb2699d2e21e59f3c3cac939
Author: Jeremy Allison j...@samba.org
Date:   Tue Oct 13 13:28:57 2009 -0700

Remove use of int ret when we already have errcode.
Jeremy.

commit df22f8dbd91699713ac99fcab391093bc6c77651
Author: Jeremy Allison j...@samba.org
Date:   Tue Oct 13 13:03:39 2009 -0700

Catch one more erroneous use of errno.
Jeremy.

commit 367cb714a3aa7ba18bb44e246662bb567cea5754
Author: Olaf Flebbe o.fle...@science-computing.de
Date:   Tue Oct 13 15:48:19 2009 +0200

correctly handle aio_error() and errno

---

Summary of changes:
 source3/smbd/aio.c |   66 ++--
 1 files changed, 28 insertions(+), 38 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 491dd79..751fed1 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -45,11 +45,11 @@ struct aio_extra {
files_struct *fsp;
struct smb_request *req;
char *outbuf;
-   int (*handle_completion)(struct aio_extra *ex);
+   int (*handle_completion)(struct aio_extra *ex, int errcode);
 };
 
-static int handle_aio_read_complete(struct aio_extra *aio_ex);
-static int handle_aio_write_complete(struct aio_extra *aio_ex);
+static int handle_aio_read_complete(struct aio_extra *aio_ex, int errcode);
+static int handle_aio_write_complete(struct aio_extra *aio_ex, int errcode);
 
 static int aio_extra_destructor(struct aio_extra *aio_ex)
 {
@@ -319,9 +319,8 @@ bool schedule_aio_write_and_X(connection_struct *conn,
  Returns errno or zero if all ok.
 */
 
-static int handle_aio_read_complete(struct aio_extra *aio_ex)
+static int handle_aio_read_complete(struct aio_extra *aio_ex, int errcode)
 {
-   int ret = 0;
int outsize;
char *outbuf = aio_ex-outbuf;
char *data = smb_buf(outbuf);
@@ -333,18 +332,11 @@ static int handle_aio_read_complete(struct aio_extra 
*aio_ex)
   will return an error. Hopefully this is
   true JRA. */
 
-   /* If errno is ECANCELED then don't return anything to the
-* client. */
-   if (errno == ECANCELED) {
-   return 0;
-   }
-
-   DEBUG( 3,( handle_aio_read_complete: file %s nread == -1. 
+   DEBUG( 3,( handle_aio_read_complete: file %s nread == %d. 
   Error = %s\n,
-  fsp_str_dbg(aio_ex-fsp), strerror(errno)));
+  fsp_str_dbg(aio_ex-fsp), (int)nread, 
strerror(errcode)));
 
-   ret = errno;
-   ERROR_NT(map_nt_error_from_unix(ret));
+   ERROR_NT(map_nt_error_from_unix(errcode));
outsize = srv_set_message(outbuf,0,0,true);
} else {
outsize = srv_set_message(outbuf,12,nread,False);
@@ -377,17 +369,16 @@ static int handle_aio_read_complete(struct aio_extra 
*aio_ex)
  fsp_str_dbg(aio_ex-fsp), (double)aio_ex-acb.aio_offset,
  (unsigned int)nread ));
 
-   return ret;
+   return errcode;
 }
 
 /
  Complete the write and return the data or error back to the client.
- Returns errno or zero if all ok.
+ Returns error code or zero if all ok.
 */
 
-static int handle_aio_write_complete(struct aio_extra *aio_ex)
+static int handle_aio_write_complete(struct aio_extra *aio_ex, int errcode)
 {
-   int ret = 0;
files_struct *fsp = aio_ex-fsp;
char *outbuf = aio_ex-outbuf;
ssize_t numtowrite = aio_ex-acb.aio_nbytes;
@@ -399,8 +390,7 @@ static int handle_aio_write_complete(struct aio_extra 
*aio_ex)
DEBUG(5,(handle_aio_write_complete: 
 aio_write_behind failed ! File %s 
 is corrupt ! Error %s\n,
-fsp_str_dbg(fsp), strerror(errno)));
-   ret = errno;
+fsp_str_dbg(fsp), strerror(errcode)));
} else {
DEBUG(0,(handle_aio_write_complete: 
 aio_write_behind failed ! File %s 

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

2009-10-13 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  75b8839... Remove use of int ret when we already have errcode. 
Jeremy.
   via  4cbb0fb... Catch one more erroneous use of errno. Jeremy.
   via  e5aecfa... correctly handle aio_error() and errno
  from  7ff4fc5... s3: Fix vfs_shadow_copy2 to allow in-path @GMT-xxx

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


- Log -
commit 75b88390b481545ed1210ea498fba45901ae26e3
Author: Jeremy Allison j...@samba.org
Date:   Tue Oct 13 13:28:57 2009 -0700

Remove use of int ret when we already have errcode.
Jeremy.

commit 4cbb0fb9f628f08a4bd1fcf08f50a4a1418fe2e7
Author: Jeremy Allison j...@samba.org
Date:   Tue Oct 13 13:03:39 2009 -0700

Catch one more erroneous use of errno.
Jeremy.

commit e5aecfa81d0e496ba972e5fef532e4b6464ff364
Author: Olaf Flebbe o.fle...@science-computing.de
Date:   Tue Oct 13 15:48:19 2009 +0200

correctly handle aio_error() and errno

---

Summary of changes:
 source3/smbd/aio.c |   66 ++--
 1 files changed, 28 insertions(+), 38 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/aio.c b/source3/smbd/aio.c
index 491dd79..751fed1 100644
--- a/source3/smbd/aio.c
+++ b/source3/smbd/aio.c
@@ -45,11 +45,11 @@ struct aio_extra {
files_struct *fsp;
struct smb_request *req;
char *outbuf;
-   int (*handle_completion)(struct aio_extra *ex);
+   int (*handle_completion)(struct aio_extra *ex, int errcode);
 };
 
-static int handle_aio_read_complete(struct aio_extra *aio_ex);
-static int handle_aio_write_complete(struct aio_extra *aio_ex);
+static int handle_aio_read_complete(struct aio_extra *aio_ex, int errcode);
+static int handle_aio_write_complete(struct aio_extra *aio_ex, int errcode);
 
 static int aio_extra_destructor(struct aio_extra *aio_ex)
 {
@@ -319,9 +319,8 @@ bool schedule_aio_write_and_X(connection_struct *conn,
  Returns errno or zero if all ok.
 */
 
-static int handle_aio_read_complete(struct aio_extra *aio_ex)
+static int handle_aio_read_complete(struct aio_extra *aio_ex, int errcode)
 {
-   int ret = 0;
int outsize;
char *outbuf = aio_ex-outbuf;
char *data = smb_buf(outbuf);
@@ -333,18 +332,11 @@ static int handle_aio_read_complete(struct aio_extra 
*aio_ex)
   will return an error. Hopefully this is
   true JRA. */
 
-   /* If errno is ECANCELED then don't return anything to the
-* client. */
-   if (errno == ECANCELED) {
-   return 0;
-   }
-
-   DEBUG( 3,( handle_aio_read_complete: file %s nread == -1. 
+   DEBUG( 3,( handle_aio_read_complete: file %s nread == %d. 
   Error = %s\n,
-  fsp_str_dbg(aio_ex-fsp), strerror(errno)));
+  fsp_str_dbg(aio_ex-fsp), (int)nread, 
strerror(errcode)));
 
-   ret = errno;
-   ERROR_NT(map_nt_error_from_unix(ret));
+   ERROR_NT(map_nt_error_from_unix(errcode));
outsize = srv_set_message(outbuf,0,0,true);
} else {
outsize = srv_set_message(outbuf,12,nread,False);
@@ -377,17 +369,16 @@ static int handle_aio_read_complete(struct aio_extra 
*aio_ex)
  fsp_str_dbg(aio_ex-fsp), (double)aio_ex-acb.aio_offset,
  (unsigned int)nread ));
 
-   return ret;
+   return errcode;
 }
 
 /
  Complete the write and return the data or error back to the client.
- Returns errno or zero if all ok.
+ Returns error code or zero if all ok.
 */
 
-static int handle_aio_write_complete(struct aio_extra *aio_ex)
+static int handle_aio_write_complete(struct aio_extra *aio_ex, int errcode)
 {
-   int ret = 0;
files_struct *fsp = aio_ex-fsp;
char *outbuf = aio_ex-outbuf;
ssize_t numtowrite = aio_ex-acb.aio_nbytes;
@@ -399,8 +390,7 @@ static int handle_aio_write_complete(struct aio_extra 
*aio_ex)
DEBUG(5,(handle_aio_write_complete: 
 aio_write_behind failed ! File %s 
 is corrupt ! Error %s\n,
-fsp_str_dbg(fsp), strerror(errno)));
-   ret = errno;
+fsp_str_dbg(fsp), strerror(errcode)));
} else {
DEBUG(0,(handle_aio_write_complete: 
 

[SCM] Samba Shared Repository - branch master updated

2009-10-13 Thread Björn Jacke
The branch, master has been updated
   via  8a27fde... s3:net: Fix a segfault in net rpc trustdom list for 
overlong domain names
  from  3f5c077... Remove use of int ret when we already have errcode. 
Jeremy.

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


- Log -
commit 8a27fdea89bc54aa35e363a376836662103c7cb7
Author: Volker Lendecke v...@samba.org
Date:   Tue Oct 13 15:56:00 2009 +0200

s3:net: Fix a segfault in net rpc trustdom list for overlong domain names

That was a complicated way to say %-20.s... But that code was from 2002 
...

---

Summary of changes:
 source3/utils/net_rpc.c |   10 ++
 1 files changed, 2 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index afda1a7..0e325b5 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -6012,14 +6012,13 @@ static int rpc_trustdom_list(struct net_context *c, int 
argc, const char **argv)
NTSTATUS nt_status;
const char *domain_name = NULL;
DOM_SID *queried_dom_sid;
-   fstring padding;
int ascii_dom_name_len;
struct policy_handle connect_hnd;
union lsa_PolicyInformation *info = NULL;
 
/* trusted domains listing variables */
unsigned int num_domains, enum_ctx = 0;
-   int i, pad_len, col_len = 20;
+   int i;
struct lsa_DomainList dom_list;
fstring pdc_name;
 
@@ -6228,17 +6227,12 @@ static int rpc_trustdom_list(struct net_context *c, int 
argc, const char **argv)
if (ascii_dom_name_len  ascii_dom_name_len  
FSTRING_LEN)
str[ascii_dom_name_len - 1] = '\0';
 
-   /* calculate padding space for d_printf to look nicer */
-   pad_len = col_len - strlen(str);
-   padding[pad_len] = 0;
-   do padding[--pad_len] = ' '; while (pad_len);
-
/* set opt_* variables to remote domain */
strupper_m(str);
c-opt_workgroup = talloc_strdup(mem_ctx, str);
c-opt_target_workgroup = c-opt_workgroup;
 
-   d_printf(%s%s, str, padding);
+   d_printf(%-20s, str);
 
/* connect to remote domain controller */
nt_status = net_make_ipc_connection(c,


-- 
Samba Shared Repository


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

2009-10-13 Thread Björn Jacke
The branch, v3-5-test has been updated
   via  b3cc2f7... s3:net: Fix a segfault in net rpc trustdom list for 
overlong domain names
  from  75b8839... Remove use of int ret when we already have errcode. 
Jeremy.

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


- Log -
commit b3cc2f70cb672f28f9223cdd165cf505642deca6
Author: Volker Lendecke v...@samba.org
Date:   Tue Oct 13 15:56:00 2009 +0200

s3:net: Fix a segfault in net rpc trustdom list for overlong domain names

That was a complicated way to say %-20.s... But that code was from 2002 
...

---

Summary of changes:
 source3/utils/net_rpc.c |   10 ++
 1 files changed, 2 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index afda1a7..0e325b5 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -6012,14 +6012,13 @@ static int rpc_trustdom_list(struct net_context *c, int 
argc, const char **argv)
NTSTATUS nt_status;
const char *domain_name = NULL;
DOM_SID *queried_dom_sid;
-   fstring padding;
int ascii_dom_name_len;
struct policy_handle connect_hnd;
union lsa_PolicyInformation *info = NULL;
 
/* trusted domains listing variables */
unsigned int num_domains, enum_ctx = 0;
-   int i, pad_len, col_len = 20;
+   int i;
struct lsa_DomainList dom_list;
fstring pdc_name;
 
@@ -6228,17 +6227,12 @@ static int rpc_trustdom_list(struct net_context *c, int 
argc, const char **argv)
if (ascii_dom_name_len  ascii_dom_name_len  
FSTRING_LEN)
str[ascii_dom_name_len - 1] = '\0';
 
-   /* calculate padding space for d_printf to look nicer */
-   pad_len = col_len - strlen(str);
-   padding[pad_len] = 0;
-   do padding[--pad_len] = ' '; while (pad_len);
-
/* set opt_* variables to remote domain */
strupper_m(str);
c-opt_workgroup = talloc_strdup(mem_ctx, str);
c-opt_target_workgroup = c-opt_workgroup;
 
-   d_printf(%s%s, str, padding);
+   d_printf(%-20s, str);
 
/* connect to remote domain controller */
nt_status = net_make_ipc_connection(c,


-- 
Samba Shared Repository


[SCM] CTDB repository - branch 1.0.82 updated - ctdb-1.0.82-54-g0bbe9df

2009-10-13 Thread Ronnie Sahlberg
The branch, 1.0.82 has been updated
   via  0bbe9df9ec0805d29dc8e207d1113caa03d8e698 (commit)
   via  b74ba9a75db431a59b0e68a4b57c48d8c28221d5 (commit)
  from  b09f54e0ad5ad3a9a495ab25e56a84422b8679b5 (commit)

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


- Log -
commit 0bbe9df9ec0805d29dc8e207d1113caa03d8e698
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Oct 14 08:25:44 2009 +1100

New version 1.0.82-3

commit b74ba9a75db431a59b0e68a4b57c48d8c28221d5
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Oct 14 08:23:49 2009 +1100

From Wolfgang Mueller,
when we detect a dmaster migration error, create a recovery to replair the 
databases instead of calling ctdb_fatal()

---

Summary of changes:
 packaging/RPM/ctdb.spec |4 +++-
 server/ctdb_call.c  |8 +++-
 2 files changed, 10 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RPM/ctdb.spec b/packaging/RPM/ctdb.spec
index dc4e023..4af01db 100644
--- a/packaging/RPM/ctdb.spec
+++ b/packaging/RPM/ctdb.spec
@@ -5,7 +5,7 @@ Vendor: Samba Team
 Packager: Samba Team sa...@samba.org
 Name: ctdb
 Version: 1.0.82
-Release: 12
+Release: 13
 Epoch: 0
 License: GNU GPL version 3
 Group: System Environment/Daemons
@@ -133,6 +133,8 @@ fi
 %{_libdir}/pkgconfig/ctdb.pc
 
 %changelog
+* Wed Oct 14 2009 : Version 1.0.82-13
+ - Recover the database instead of shutting down when there is a dmaster error 
detected - from Wolfgang Mueller.
 * Tue Oct 13 2009 : Version 1.0.82-12
  - Revert the lock order patch and apply a simpler workaround from Volker 
instead.
 * Thu Oct 10 2009 : Version 1.0.82-10
diff --git a/server/ctdb_call.c b/server/ctdb_call.c
index b666a9e..c2591a7 100644
--- a/server/ctdb_call.c
+++ b/server/ctdb_call.c
@@ -343,7 +343,13 @@ void ctdb_request_dmaster(struct ctdb_context *ctdb, 
struct ctdb_req_header *hdr
 (unsigned long long)c-rsn, (unsigned long 
long)header.rsn, c-hdr.reqid,
 (key.dsize = 4)?(*(uint32_t *)key.dptr):0));
if (header.rsn != 0 || header.dmaster != ctdb-pnn) {
-   ctdb_fatal(ctdb, ctdb_req_dmaster from non-master);
+   /*
+* we used to exit here with a ctdb_fatal(ctdb, 
ctdb_req_dmaster from non-master);
+* as long as we haven't found a protocol problem we 
just initiate recovery
+*/
+   DEBUG(DEBUG_ALERT,(__location__real-dmaster problem 
triggering recovery\n));
+   ctdb-recovery_mode = CTDB_RECOVERY_ACTIVE;
+   ctdb_ltdb_unlock(ctdb_db, key);
return;
}
}


-- 
CTDB repository


[SCM] CTDB repository - branch master updated - ctdb-1.0.95-2-g70e7781

2009-10-13 Thread Ronnie Sahlberg
The branch, master has been updated
   via  70e7781df1f118a0e2632a9c634f3fd388fa6c8c (commit)
  from  346fa055f4106497b87df97da5ebd6e51fa1ef8c (commit)

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


- Log -
commit 70e7781df1f118a0e2632a9c634f3fd388fa6c8c
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Oct 14 08:17:49 2009 +1100

Port Volkers deadlock avoidance patch to HEAD.
This patch ensures that we lock all non-notify related databases first and
then the notify databases to avoiud a deadlock where samba needs to lock 
records on two databases at once (and notify being the second database).

Newer versions of samba would instead use the set-db-prio control to set 
this explicitely on a database per database basis instead of relying on  
hardcoded database names. This patch will be reverted in the future when all 
updated versions of samba has been pushed out.

---

Summary of changes:
 server/ctdb_freeze.c  |   21 +
 server/ctdb_recover.c |   20 
 2 files changed, 41 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_freeze.c b/server/ctdb_freeze.c
index da7272f..a2b765b 100644
--- a/server/ctdb_freeze.c
+++ b/server/ctdb_freeze.c
@@ -33,10 +33,31 @@
 static int ctdb_lock_all_databases(struct ctdb_context *ctdb, uint32_t 
priority)
 {
struct ctdb_db_context *ctdb_db;
+   /* REMOVE later */
+   /* This double loop is for backward compatibility and deadlock
+  avoidance for old samba versions that not yet support
+  the set prio call.
+  This code shall be removed later
+   */
for (ctdb_db=ctdb-db_list;ctdb_db;ctdb_db=ctdb_db-next) {
if (ctdb_db-priority != priority) {
continue;
}
+   if (strstr(ctdb_db-db_name, notify) != NULL) {
+   continue;
+   }
+   DEBUG(DEBUG_INFO,(locking database 0x%08x priority:%u %s\n, 
ctdb_db-db_id, ctdb_db-priority, ctdb_db-db_name));
+   if (tdb_lockall(ctdb_db-ltdb-tdb) != 0) {
+   return -1;
+   }
+   }
+   for (ctdb_db=ctdb-db_list;ctdb_db;ctdb_db=ctdb_db-next) {
+   if (ctdb_db-priority != priority) {
+   continue;
+   }
+   if (strstr(ctdb_db-db_name, notify) == NULL) {
+   continue;
+   }
DEBUG(DEBUG_INFO,(locking database 0x%08x priority:%u %s\n, 
ctdb_db-db_id, ctdb_db-priority, ctdb_db-db_name));
if (tdb_lockall(ctdb_db-ltdb-tdb) != 0) {
return -1;
diff --git a/server/ctdb_recover.c b/server/ctdb_recover.c
index 40544f1..21dc28d 100644
--- a/server/ctdb_recover.c
+++ b/server/ctdb_recover.c
@@ -44,10 +44,30 @@ static int ctdb_lock_all_databases_mark(struct ctdb_context 
*ctdb, uint32_t prio
DEBUG(DEBUG_ERR,(Attempt to mark all databases locked when not 
frozen\n));
return -1;
}
+   /* The dual loop is a woraround for older versions of samba
+  that does not yet support the set-db-priority/lock order
+  call. So that we get basic deadlock avoiidance also for
+  these old versions of samba.
+  This code will be removed in the future.
+   */
for (ctdb_db=ctdb-db_list;ctdb_db;ctdb_db=ctdb_db-next) {
if (ctdb_db-priority != priority) {
continue;
}
+   if (strstr(ctdb_db-db_name, notify) != NULL) {
+   continue;
+   }
+   if (tdb_lockall_mark(ctdb_db-ltdb-tdb) != 0) {
+   return -1;
+   }
+   }
+   for (ctdb_db=ctdb-db_list;ctdb_db;ctdb_db=ctdb_db-next) {
+   if (ctdb_db-priority != priority) {
+   continue;
+   }
+   if (strstr(ctdb_db-db_name, notify) == NULL) {
+   continue;
+   }
if (tdb_lockall_mark(ctdb_db-ltdb-tdb) != 0) {
return -1;
}


-- 
CTDB repository


[SCM] CTDB repository - branch master updated - ctdb-1.0.95-3-gf6e39d3

2009-10-13 Thread Ronnie Sahlberg
The branch, master has been updated
   via  f6e39d35713475defaa08a623e194f3f2f8f7d53 (commit)
  from  70e7781df1f118a0e2632a9c634f3fd388fa6c8c (commit)

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


- Log -
commit f6e39d35713475defaa08a623e194f3f2f8f7d53
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Oct 14 09:15:24 2009 +1100

always create the nfs state directories during the monitor event.
this allows us to configure and enable nfs at runtime without having to 
restart ctdbd

---

Summary of changes:
 config/events.d/61.nfstickle |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/61.nfstickle b/config/events.d/61.nfstickle
index 60c13bc..332d006 100755
--- a/config/events.d/61.nfstickle
+++ b/config/events.d/61.nfstickle
@@ -56,6 +56,11 @@ case $cmd in
;;
 
  monitor)
+# always create these direcotries since NFS might be enabled at runtime
+   # and we dont want to restart ctdbd
+   mkdir -p $CTDB_BASE/state/nfstickle
+   mkdir -p $NFS_TICKLE_SHARED_DIRECTORY/`hostname`
+
mydir=$NFS_TICKLE_SHARED_DIRECTORY/`hostname`
rm -f $mydir/*
# record our connections to shared storage


-- 
CTDB repository


[SCM] Samba Shared Repository - branch master updated

2009-10-13 Thread Björn Jacke
The branch, master has been updated
   via  e33c23d... s3:net: simplify padding to single printf call
   via  6deb1fc... s3:net simplify padding to single printf call
  from  8a27fde... s3:net: Fix a segfault in net rpc trustdom list for 
overlong domain names

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


- Log -
commit e33c23dc5cc2a0fc58f6af1d37f57675cc2c698f
Author: Björn Jacke b...@sernet.de
Date:   Wed Oct 14 00:22:08 2009 +0200

s3:net: simplify padding to single printf call

commit 6deb1fcc8899c9d462a30712bcc20019819fc176
Author: Björn Jacke b...@sernet.de
Date:   Wed Oct 14 00:19:35 2009 +0200

s3:net simplify padding to single printf call

---

Summary of changes:
 source3/utils/net_rpc.c   |   10 ++
 source3/utils/net_rpc_audit.c |   10 +-
 2 files changed, 3 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 0e325b5..455405a 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -5777,18 +5777,12 @@ static NTSTATUS rpc_query_domain_sid(struct net_context 
*c,
 
 static void print_trusted_domain(DOM_SID *dom_sid, const char 
*trusted_dom_name)
 {
-   fstring ascii_sid, padding;
-   int pad_len, col_len = 20;
+   fstring ascii_sid;
 
/* convert sid into ascii string */
sid_to_fstring(ascii_sid, dom_sid);
 
-   /* calculate padding space for d_printf to look nicer */
-   pad_len = col_len - strlen(trusted_dom_name);
-   padding[pad_len] = 0;
-   do padding[--pad_len] = ' '; while (pad_len);
-
-   d_printf(%s%s%s\n, trusted_dom_name, padding, ascii_sid);
+   d_printf(%-20s%s\n, trusted_dom_name, ascii_sid);
 }
 
 static NTSTATUS vampire_trusted_domain(struct rpc_pipe_client *pipe_hnd,
diff --git a/source3/utils/net_rpc_audit.c b/source3/utils/net_rpc_audit.c
index f0b440d..bc3ed3d 100644
--- a/source3/utils/net_rpc_audit.c
+++ b/source3/utils/net_rpc_audit.c
@@ -40,9 +40,6 @@ static int net_help_audit(struct net_context *c, int argc, 
const char **argv)
 
 static void print_auditing_category(const char *policy, const char *value)
 {
-   fstring padding;
-   int pad_len, col_len = 30;
-
if (policy == NULL) {
policy = N_(Unknown);
}
@@ -50,12 +47,7 @@ static void print_auditing_category(const char *policy, 
const char *value)
value = N_(Invalid);
}
 
-   /* calculate padding space for d_printf to look nicer */
-   pad_len = col_len - strlen(policy);
-   padding[pad_len] = 0;
-   do padding[--pad_len] = ' '; while (pad_len  0);
-
-   d_printf(_(\t%s%s%s\n), policy, padding, value);
+   d_printf(_(\t%-30s%s\n), policy, value);
 }
 
 /


-- 
Samba Shared Repository


[SCM] CTDB repository - branch master updated - ctdb-1.0.95-4-g343c005

2009-10-13 Thread Ronnie Sahlberg
The branch, master has been updated
   via  343c005367789e108c0320e95d7a264535d68dd8 (commit)
  from  f6e39d35713475defaa08a623e194f3f2f8f7d53 (commit)

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


- Log -
commit 343c005367789e108c0320e95d7a264535d68dd8
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Oct 14 10:14:03 2009 +1100

allow a pre .95 version of a recovery master to freeze databases on a post 
.95 node by remapping priority numbers and log this to log.ctdb

---

Summary of changes:
 server/ctdb_freeze.c |   10 ++
 1 files changed, 10 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/server/ctdb_freeze.c b/server/ctdb_freeze.c
index a2b765b..69e70ab 100644
--- a/server/ctdb_freeze.c
+++ b/server/ctdb_freeze.c
@@ -251,6 +251,11 @@ static int ctdb_freeze_waiter_destructor(struct 
ctdb_freeze_waiter *w)
  */
 int ctdb_start_freeze(struct ctdb_context *ctdb, uint32_t priority)
 {
+   if (priority == 0) {
+   DEBUG(DEBUG_ERR,(Freeze priority 0 requested, remapping to 
priority 1\n));
+   priority = 1;
+   }
+
if ((priority  1) || (priority  NUM_DB_PRIORITIES)) {
DEBUG(DEBUG_ERR,(__location__  Invalid db priority : %u\n, 
priority));
return -1;
@@ -283,6 +288,11 @@ int32_t ctdb_control_freeze(struct ctdb_context *ctdb, 
struct ctdb_req_control *
 
DEBUG(DEBUG_ERR, (Freeze priority %u\n, priority));
 
+   if (priority == 0) {
+   DEBUG(DEBUG_ERR,(Freeze priority 0 requested, remapping to 
priority 1\n));
+   priority = 1;
+   }
+
if ((priority  1) || (priority  NUM_DB_PRIORITIES)) {
DEBUG(DEBUG_ERR,(__location__  Invalid db priority : %u\n, 
priority));
return -1;


-- 
CTDB repository


[SCM] Samba Shared Repository - branch master updated

2009-10-13 Thread Andrew Bartlett
The branch, master has been updated
   via  e0e7ca4... Revert s4:hdb-samba4 - Don't double-free db
   via  3493b62... s4:heimdal A real fix for bug 6801
  from  e33c23d... s3:net: simplify padding to single printf call

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


- Log -
commit e0e7ca4ee83dac62f5b1d61a711a852679e0c0a0
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Oct 14 09:10:01 2009 +1100

Revert s4:hdb-samba4 - Don't double-free db

This reverts commit 11a8a54c825a52d7dd6ab78bc7aeff2d719327d2.

The actual fix for bug 6801 is in hdb_end_seq_get() - this attempt
leaks 'db' instead.

Andrew Bartlett

commit 3493b62b4b6e2f36f960164c251168b50d9722a3
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Oct 14 09:04:16 2009 +1100

s4:heimdal A real fix for bug 6801

The issue was that we would free the entry after the database, not
knowing that the entry was a talloc child of the database.

Andrew Bartlett

---

Summary of changes:
 source4/heimdal/lib/hdb/keytab.c |6 +++---
 source4/kdc/hdb-samba4.c |1 +
 2 files changed, 4 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/heimdal/lib/hdb/keytab.c b/source4/heimdal/lib/hdb/keytab.c
index a557de0..6cab8a4 100644
--- a/source4/heimdal/lib/hdb/keytab.c
+++ b/source4/heimdal/lib/hdb/keytab.c
@@ -401,12 +401,12 @@ hdb_end_seq_get(krb5_context context,
 {
 struct hdb_cursor *c = cursor-data;
 
-(c-db-hdb_close)(context, c-db);
-(c-db-hdb_destroy)(context, c-db);
-
 if (!c-next)
hdb_free_entry(context, c-hdb_entry);
 
+(c-db-hdb_close)(context, c-db);
+(c-db-hdb_destroy)(context, c-db);
+
 free(c);
 return 0;
 }
diff --git a/source4/kdc/hdb-samba4.c b/source4/kdc/hdb-samba4.c
index bed6ee9..4062e13 100644
--- a/source4/kdc/hdb-samba4.c
+++ b/source4/kdc/hdb-samba4.c
@@ -1442,6 +1442,7 @@ static krb5_error_code hdb_samba4_nextkey(krb5_context 
context, HDB *db, unsigne
 
 static krb5_error_code hdb_samba4_destroy(krb5_context context, HDB *db)
 {
+   talloc_free(db);
return 0;
 }
 


-- 
Samba Shared Repository


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

2009-10-13 Thread Jeremy Allison
The branch, v3-5-test has been updated
   via  23b3fad... s3:torture: Add a notify-bench test
   via  bd40e01... s3:libsmb: Add cli_notify
   via  476a5df... s3:rpc: Fix is_known_pipename for dynamically loaded 
pipes
   via  a85ea69... s3: Fix some nonempty blank lines
  from  b3cc2f7... s3:net: Fix a segfault in net rpc trustdom list for 
overlong domain names

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


- Log -
commit 23b3fade10c5ecb5678e087e9507c527c36bdc48
Author: Volker Lendecke v...@samba.org
Date:   Mon Oct 12 17:29:45 2009 +0200

s3:torture: Add a notify-bench test

This is a test that creates and deletes files in a directory as fast as the
network allows it. At the same time, it opens a filechangenotify. This test 
is
done to just torture handling a single directory together with the notify
infrastructure.

commit bd40e01692ec209d13352d30fa4335c744f1d3ea
Author: Volker Lendecke v...@samba.org
Date:   Mon Oct 12 16:43:19 2009 +0200

s3:libsmb: Add cli_notify

commit 476a5df4a3434687b17e91c0d70d0fd8d0f91c4a
Author: Volker Lendecke v...@samba.org
Date:   Sat Oct 3 15:33:12 2009 +0200

s3:rpc: Fix is_known_pipename for dynamically loaded pipes

commit a85ea69e9971b3c195bced474f61479c8da4616b
Author: Volker Lendecke v...@samba.org
Date:   Sun Oct 4 16:52:08 2009 +0200

s3: Fix some nonempty blank lines

---

Summary of changes:
 source3/include/nss_info.h |6 +-
 source3/include/proto.h|8 +
 source3/libsmb/clifile.c   |  144 ++
 source3/passdb/util_unixsids.c |   10 +-
 source3/rpc_server/srv_pipe.c  |   23 +++-
 source3/torture/torture.c  |  403 
 6 files changed, 585 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/nss_info.h b/source3/include/nss_info.h
index 90d992a..0f9ad48 100644
--- a/source3/include/nss_info.h
+++ b/source3/include/nss_info.h
@@ -8,12 +8,12 @@
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 3 of the License, or (at your option) any later version.
-   
+
This library 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
Library General Public License for more details.
-   
+
You should have received a copy of the GNU Lesser General Public License
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
@@ -36,7 +36,7 @@
 
 struct nss_function_entry {
struct nss_function_entry *prev, *next;
-   
+
const char *name;
struct nss_info_methods *methods;
 };
diff --git a/source3/include/proto.h b/source3/include/proto.h
index d71060a..cc9fe87 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2659,6 +2659,14 @@ struct tevent_req *cli_posix_rmdir_send(TALLOC_CTX 
*mem_ctx,
const char *fname);
 NTSTATUS cli_posix_rmdir_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx);
 NTSTATUS cli_posix_rmdir(struct cli_state *cli, const char *fname);
+struct tevent_req *cli_notify_send(TALLOC_CTX *mem_ctx,
+  struct tevent_context *ev,
+  struct cli_state *cli, uint16_t fnum,
+  uint32_t buffer_size,
+  uint32_t completion_filter, bool recursive);
+NTSTATUS cli_notify_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+uint32_t *pnum_changes,
+struct notify_change **pchanges);
 
 /* The following definitions come from libsmb/clifsinfo.c  */
 
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index b15aa8d..5eb8bd4 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -5027,3 +5027,147 @@ NTSTATUS cli_posix_rmdir(struct cli_state *cli, const 
char *fname)
}
return status;
 }
+
+/
+ filechangenotify
+/
+
+struct cli_notify_state {
+   uint8_t setup[8];
+   uint32_t num_changes;
+   struct notify_change *changes;
+};
+
+static void cli_notify_done(struct tevent_req *subreq);
+
+struct tevent_req *cli_notify_send(TALLOC_CTX *mem_ctx,
+  struct tevent_context *ev,
+  struct cli_state *cli, uint16_t fnum,
+  uint32_t buffer_size,
+  uint32_t completion_filter, bool recursive)
+{
+   struct tevent_req *req, *subreq;
+   struct 

[SCM] CTDB repository - branch master updated - ctdb-1.0.95-7-ga3406c1

2009-10-13 Thread Ronnie Sahlberg
The branch, master has been updated
   via  a3406c10d70f89d332eab25d481083142dff987d (commit)
   via  eb854f65f978f24583e221138eb4f9b917b89285 (commit)
   via  3807681e74f4bfe92befdae6ed616ff5f1a99880 (commit)
  from  343c005367789e108c0320e95d7a264535d68dd8 (commit)

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


- Log -
commit a3406c10d70f89d332eab25d481083142dff987d
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Oct 14 14:14:28 2009 +1100

add more debugging output to eventscripts and when a script has timed out,
print a full pstree -p to the log.

Example :
|-ctdbd(29826)-+-ctdbd(29862)
|  `-ctdbd(31897)-+-00.ctdb(31898)---sleep(31908)

change the default timeout to 60 seconds for eventscripts

commit eb854f65f978f24583e221138eb4f9b917b89285
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Oct 14 12:12:04 2009 +1100

move the logging of the warning No reclock file used to the startup case 
so we only print this warning on service ctdb start and not for service ctdb 
*

commit 3807681e74f4bfe92befdae6ed616ff5f1a99880
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Oct 14 11:59:16 2009 +1100

when we change state between healthy/unhealthy, make sure we ask the 
recovery
master to perform an explicit ip reallocation.

This is more reliable and faster than having the recovery dameon track these
changes, and since we now have an explicit method to ask the recovery daemon
to perform an explicit ip reallocation, we should use this.

---

Summary of changes:
 config/ctdb.init   |7 ++---
 include/ctdb.h |5 
 include/ctdb_private.h |8 +++
 server/ctdb_monitor.c  |   25 
 server/ctdb_tunables.c |2 +-
 server/eventscript.c   |   49 ---
 tools/ctdb.c   |2 +-
 7 files changed, 88 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/ctdb.init b/config/ctdb.init
index 9b965a9..d4b9424 100755
--- a/config/ctdb.init
+++ b/config/ctdb.init
@@ -43,10 +43,6 @@ unset TMPDIR
 loadconfig network
 loadconfig ctdb
 
-[ -z $CTDB_RECOVERY_LOCK ]  {
-echo No recovery lock specified. Starting CTDB without split brain 
prevention
-}
-
 # check networking is up (for redhat)
 [ $NETWORKING = no ]  exit 0
 
@@ -83,6 +79,9 @@ build_ctdb_options () {
CTDB_OPTIONS=${CTDB_OPTIONS}${CTDB_OPTIONS:+ }${1}${sep}${val}
 }
 
+[ -z $CTDB_RECOVERY_LOCK ]  {
+echo No recovery lock specified. Starting CTDB without split brain 
prevention
+}
 maybe_set --reclock$CTDB_RECOVERY_LOCK
 
 # build up CTDB_OPTIONS variable from optional parameters
diff --git a/include/ctdb.h b/include/ctdb.h
index b9a7685..abe09a3 100644
--- a/include/ctdb.h
+++ b/include/ctdb.h
@@ -106,6 +106,11 @@ struct ctdb_call_info {
 */
 #define CTDB_SRVID_DISABLE_IP_CHECK  0xFC00LL
 
+/* A dummy port used for sending back ipreallocate resposnes to the main
+   daemon
+*/
+#define CTDB_SRVID_TAKEOVER_RUN_RESPONSE  0xFD00LL
+
 /* used on the domain socket, send a pdu to the local daemon */
 #define CTDB_CURRENT_NODE 0xF001
 /* send a broadcast to all nodes in the cluster, active or not */
diff --git a/include/ctdb_private.h b/include/ctdb_private.h
index acaaf5f..af77556 100644
--- a/include/ctdb_private.h
+++ b/include/ctdb_private.h
@@ -46,6 +46,14 @@ struct rd_memdump_reply {
 };
 
 /*
+  description for a TAKEOVER_RUN message reply address
+ */
+struct takeover_run_reply {
+   uint32_t pnn;
+   uint64_t srvid;
+};
+
+/*
   a tcp connection description
  */
 struct ctdb_tcp_connection {
diff --git a/server/ctdb_monitor.c b/server/ctdb_monitor.c
index 4a554d4..fc96fd7 100644
--- a/server/ctdb_monitor.c
+++ b/server/ctdb_monitor.c
@@ -110,10 +110,19 @@ static void ctdb_health_callback(struct ctdb_context 
*ctdb, int status, void *p)
TDB_DATA data;
struct ctdb_node_flag_change c;
uint32_t next_interval;
+   int ret;
+   TDB_DATA rddata;
+   struct takeover_run_reply rd;
 
c.pnn = ctdb-pnn;
c.old_flags = node-flags;
 
+   rd.pnn   = ctdb-pnn;
+   rd.srvid = CTDB_SRVID_TAKEOVER_RUN_RESPONSE;
+
+   rddata.dptr = (uint8_t *)rd;
+   rddata.dsize = sizeof(rd);
+
if (status != 0  !(node-flags  NODE_FLAGS_UNHEALTHY)) {
DEBUG(DEBUG_NOTICE,(monitor event failed - disabling node\n));
node-flags |= NODE_FLAGS_UNHEALTHY;
@@ -124,12 +133,28 @@ static void ctdb_health_callback(struct ctdb_context 
*ctdb, int status, void *p)
}
 
ctdb_run_notification_script(ctdb, unhealthy);
+
+   /* ask the recmaster to reallocate 

[SCM] CTDB repository - branch master updated - ctdb-1.0.95-8-g536229f

2009-10-13 Thread Ronnie Sahlberg
The branch, master has been updated
   via  536229fd120bc3fdc2419e22d3bd6ab243dd6667 (commit)
  from  a3406c10d70f89d332eab25d481083142dff987d (commit)

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


- Log -
commit 536229fd120bc3fdc2419e22d3bd6ab243dd6667
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Oct 14 14:52:24 2009 +1100

version 1.0.96

---

Summary of changes:
 packaging/RPM/ctdb.spec |   19 ++-
 1 files changed, 18 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RPM/ctdb.spec b/packaging/RPM/ctdb.spec
index 4582967..25cbc0e 100644
--- a/packaging/RPM/ctdb.spec
+++ b/packaging/RPM/ctdb.spec
@@ -4,7 +4,7 @@ Summary: Clustered TDB
 Vendor: Samba Team
 Packager: Samba Team sa...@samba.org
 Name: ctdb
-Version: 1.0.95
+Version: 1.0.96
 Release: 1
 Epoch: 0
 License: GNU GPL version 3
@@ -132,6 +132,23 @@ fi
 %{_libdir}/pkgconfig/ctdb.pc
 
 %changelog
+* Tue Oct 13 2009 : Version 1.0.96
+ - Add more debugging output when eventscripts have trouble. Print a 
+   pstree -p to the log when scripts have hung.
+ - Update the initscript,  only print the No reclock file used warning
+   when we do service ctdb start, dont also print them for all other
+   actions.
+ - When changing between unhealthy/healthy state, push a request to the
+   recovery master to perform an ip reallocation   instead of waiting for the
+   recovery master to pull and check the state change.
+ - Fix a bug in the new db-priority handling where a pre-.95 recovery master
+   could no longer lock the databases on a post-.95 daemon.
+ - Always create the nfs state directories during the monitor event.
+   This makes it easier to configure and enable nfs at runtime.
+ - From Volker, forward-port a simper deadlock avoiding patch from the 1.0.82
+   branch. This is a simpler versionof the db priority lock order patch
+   that went into 1.0.95, and will be kept for a few versions until samba
+   has been updated to use the functionality from 1.0.95.
 * Mon Oct 12 2009 : Version 1.0.95
  - Add database priorities. Allow samba to set the priority of databases
and lock the databases in priority order during recovery


-- 
CTDB repository


[SCM] CTDB repository - annotated tag ctdb-1.0.96 created - ctdb-1.0.96

2009-10-13 Thread Ronnie Sahlberg
The annotated tag, ctdb-1.0.96 has been created
at  786922011f7d9dd6c35cf7e16df8d782c7fc7657 (tag)
   tagging  536229fd120bc3fdc2419e22d3bd6ab243dd6667 (commit)
  replaces  ctdb-1.0.95
 tagged by  Ronnie Sahlberg
on  Wed Oct 14 14:53:19 2009 +1100

- Log -
tag for 1.0.96
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBK1Us+2aJ36aon/y8RAjkkAJ9Qc5wV5akP/Ot5TzExDgntp/RFZQCfTcJA
3PMrqRuDHePhmiNyPm0WV9Q=
=Nwpp
-END PGP SIGNATURE-

Ronnie Sahlberg (8):
  we must break the loop as soon as we find a suitable recmaster does exist
  Port Volkers deadlock avoidance patch to HEAD.
  always create the nfs state directories during the monitor event.
  allow a pre .95 version of a recovery master to freeze databases on a 
post .95 node by remapping priority numbers and log this to log.ctdb
  when we change state between healthy/unhealthy, make sure we ask the 
recovery
  move the logging of the warning No reclock file used to the startup 
case so we only print this warning on service ctdb start and not for service 
ctdb *
  add more debugging output to eventscripts and when a script has timed out,
  version 1.0.96

---


-- 
CTDB repository


Re: [SCM] CTDB repository - branch master updated - ctdb-1.0.95-7-ga3406c1

2009-10-13 Thread Volker Lendecke
On Tue, Oct 13, 2009 at 10:20:14PM -0500, Ronnie Sahlberg wrote:
 The branch, master has been updated
via  a3406c10d70f89d332eab25d481083142dff987d (commit)
via  eb854f65f978f24583e221138eb4f9b917b89285 (commit)
via  3807681e74f4bfe92befdae6ed616ff5f1a99880 (commit)
   from  343c005367789e108c0320e95d7a264535d68dd8 (commit)
 
 http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master
 
 
 - Log -
 commit a3406c10d70f89d332eab25d481083142dff987d
 Author: Ronnie Sahlberg ronniesahlb...@gmail.com
 Date:   Wed Oct 14 14:14:28 2009 +1100
 
 add more debugging output to eventscripts and when a script has timed out,
 print a full pstree -p to the log.
 
 Example :
 |-ctdbd(29826)-+-ctdbd(29862)
 |  `-ctdbd(31897)-+-00.ctdb(31898)---sleep(31908)
 
 change the default timeout to 60 seconds for eventscripts

Are you sure that is a good idea? pstree might be *huge*.

Volker


signature.asc
Description: Digital signature