Build status as of Fri May 21 06:00:05 2010

2010-05-21 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2010-05-20 
00:00:06.0 -0600
+++ /home/build/master/cache/broken_results.txt 2010-05-21 00:00:25.0 
-0600
@@ -1,4 +1,4 @@
-Build status as of Thu May 20 06:00:05 2010
+Build status as of Fri May 21 06:00:05 2010
 
 Build counts:
 Tree Total  Broken Panic 
@@ -15,8 +15,8 @@
 samba_3_current 28 27 3 
 samba_3_master 28 28 1 
 samba_3_next 28 26 6 
-samba_4_0_test 30 30 1 
-samba_4_0_waf 30 29 3 
+samba_4_0_test 30 30 0 
+samba_4_0_waf 30 29 4 
 talloc   30 5  0 
 tdb  28 9  0 
 


[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Andrew Bartlett
The branch, master has been updated
   via  9453a0f... s4:auth Fix previous commit - segfault in determinging a 
user's groups
  from  80b4d50... Revert Make -k a simple non-bool option.

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


- Log -
commit 9453a0f88f1d0c337a3c1b24a2567e2dde3466e8
Author: Andrew Bartlett abart...@samba.org
Date:   Fri May 21 16:01:34 2010 +1000

s4:auth Fix previous commit - segfault in determinging a user's groups

The previous commit didn't include these vital fixes.

Andrew Bartlett

---

Summary of changes:
 source4/auth/sam.c |8 +++-
 1 files changed, 3 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/sam.c b/source4/auth/sam.c
index 2cc8118..d6d1a50 100644
--- a/source4/auth/sam.c
+++ b/source4/auth/sam.c
@@ -27,8 +27,6 @@
 #include ../lib/util/util_ldb.h
 #include dsdb/samdb/samdb.h
 #include libcli/security/security.h
-#include libcli/ldap/ldap.h
-#include ../libcli/ldap/ldap_ndr.h
 #include librpc/gen_ndr/ndr_netlogon.h
 #include librpc/gen_ndr/ndr_security.h
 #include param/param.h
@@ -367,8 +365,9 @@ NTSTATUS authsam_expand_nested_groups(struct ldb_context 
*sam_ctx,
if (!only_childs) {
*res_sids = talloc_realloc(res_sids_ctx, *res_sids,
struct dom_sid *, *num_res_sids + 1);
-   NT_STATUS_HAVE_NO_MEMORY(*res_sids);
-   (*res_sids)[*num_res_sids] = talloc_steal(*res_sids, sid);
+   NT_STATUS_HAVE_NO_MEMORY_AND_FREE(*res_sids, tmp_ctx);
+   (*res_sids)[*num_res_sids] = dom_sid_dup(*res_sids, sid);
+   NT_STATUS_HAVE_NO_MEMORY_AND_FREE((*res_sids)[*num_res_sids], 
tmp_ctx);
++(*num_res_sids);
}
 
@@ -384,7 +383,6 @@ NTSTATUS authsam_expand_nested_groups(struct ldb_context 
*sam_ctx,
}
}
 
-   talloc_free(res);
talloc_free(tmp_ctx);
 
return NT_STATUS_OK;


-- 
Samba Shared Repository


[SCM] CTDB repository - branch 1.0.112 updated - ctdb-1.0.111-84-g1095be7

2010-05-21 Thread Ronnie Sahlberg
The branch, 1.0.112 has been updated
   via  1095be7fe3c0f8ab810f44d4fe8f22d6fbad5720 (commit)
   via  1ab91b749c24193d0f9bf65c7e9fe9598f8414cc (commit)
  from  e4010008c9e01f6ef32d845cccdc786411d3b8c3 (commit)

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


- Log -
commit 1095be7fe3c0f8ab810f44d4fe8f22d6fbad5720
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Fri May 21 14:32:18 2010 +1000

New version 1.0.112-21

* Fri May 21 2010 : Version 1.0.112-21
 - Fix a bug where we would fail to remove the natgw configuration
   and would leave a ip address for natgw still remaining on loopback.
   BZ 58317
 - In the ctdb command line tool, we do not wait long enough for the 
ipreallocate
   command to finish on the recovery daemon. which sometimes would timeout 
if the
   recovery daemon was busy, or we had rolling recoveries.
   BZ 61783
 - During failed recoveries we could get in a state where recovery attempts 
stopped
   while database priority level 2 or 3 remain frozen.
   BZ 63951

commit 1ab91b749c24193d0f9bf65c7e9fe9598f8414cc
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Fri May 21 14:25:47 2010 +1000

It was possible for -recovery_mode to get out of sync with the new three 
db priorities in such a way that
-recovery_mode was set to normal   but database priorities leven2 or 3 was 
still set to frozen.

causing the recovery daemon to fail to detect that a recovery was needed to 
recover access to the database.

BZ63951

---

Summary of changes:
 packaging/RPM/ctdb.spec.in |   13 -
 server/ctdb_control.c  |   11 ++-
 2 files changed, 22 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index fbd7a2a..d147a3f 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -5,7 +5,7 @@ Vendor: Samba Team
 Packager: Samba Team sa...@samba.org
 Name: ctdb
 Version: 1.0.112
-Release: 20
+Release: 21
 Epoch: 0
 License: GNU GPL version 3
 Group: System Environment/Daemons
@@ -125,6 +125,17 @@ rm -rf $RPM_BUILD_ROOT
 %{_docdir}/ctdb/tests/bin/ctdb_transaction
 
 %changelog
+* Fri May 21 2010 : Version 1.0.112-21
+ - Fix a bug where we would fail to remove the natgw configuration
+   and would leave a ip address for natgw still remaining on loopback.
+   BZ 58317
+ - In the ctdb command line tool, we do not wait long enough for the 
ipreallocate
+   command to finish on the recovery daemon. which sometimes would timeout if 
the
+   recovery daemon was busy, or we had rolling recoveries.
+   BZ 61783
+ - During failed recoveries we could get in a state where recovery attempts 
stopped
+   while database priority level 2 or 3 remain frozen.
+   BZ 63951
 * Tue May 11 2010 : Version 1.0.112-20
  - Add number of recoveries done to the ctdb statistics output.
  - Use the fuill range for IDR values. 
diff --git a/server/ctdb_control.c b/server/ctdb_control.c
index a878550..ed7324c 100644
--- a/server/ctdb_control.c
+++ b/server/ctdb_control.c
@@ -162,7 +162,16 @@ static int32_t ctdb_control_dispatch(struct ctdb_context 
*ctdb,
return ctdb_control_push_db(ctdb, indata);
 
case CTDB_CONTROL_GET_RECMODE: {
-   return ctdb-recovery_mode;
+   int i;
+   if (ctdb-recovery_mode == CTDB_RECOVERY_ACTIVE) {
+   return CTDB_RECOVERY_ACTIVE;
+   } 
+   for (i=1; i=NUM_DB_PRIORITIES; i++) {
+   if (ctdb-freeze_mode[i] == CTDB_FREEZE_FROZEN) {
+   return CTDB_RECOVERY_ACTIVE;
+   }
+   }
+   return CTDB_RECOVERY_NORMAL;
}
 
case CTDB_CONTROL_SET_RECMASTER: {


-- 
CTDB repository


[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Andrew Bartlett
The branch, master has been updated
   via  c8a2314... s4:libcli/ldap Rename ldap.h to libcli_ldap.h
   via  82c97e0... s4:auth Remove un-needed headers.
  from  9453a0f... s4:auth Fix previous commit - segfault in determinging a 
user's groups

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


- Log -
commit c8a23147fe12c693fd7944af7bb09b88393789d9
Author: Andrew Bartlett abart...@samba.org
Date:   Fri May 21 17:39:15 2010 +1000

s4:libcli/ldap Rename ldap.h to libcli_ldap.h

It is a problem if a samba header is called ldap.h if we also want
to use OpenLDAP's ldap.h

Andrew Bartlett

commit 82c97e0ab840d8acfc81c3096bebc8c3d3e0bde3
Author: Andrew Bartlett abart...@samba.org
Date:   Fri May 21 16:38:44 2010 +1000

s4:auth Remove un-needed headers.

---

Summary of changes:
 source4/auth/auth_sam_reply.c   |1 -
 source4/auth/gensec/cyrus_sasl.c|1 -
 source4/auth/sam.c  |4 
 source4/auth/session.c  |2 --
 source4/auth/system_session.c   |1 -
 source4/cldap_server/cldap_server.c |1 -
 source4/cldap_server/cldap_server.h |1 +
 source4/cldap_server/rootdse.c  |1 -
 source4/dsdb/samdb/ldb_modules/local_password.c |1 -
 source4/ldap_server/ldap_backend.c  |1 -
 source4/ldap_server/ldap_bind.c |1 -
 source4/ldap_server/ldap_extended.c |1 -
 source4/ldap_server/ldap_server.c   |1 -
 source4/ldap_server/ldap_server.h   |2 +-
 source4/lib/ldb/ldb_ildap/ldb_ildap.c   |2 +-
 source4/libcli/ldap/ldap_bind.c |2 +-
 source4/libcli/ldap/ldap_client.c   |2 +-
 source4/libcli/ldap/ldap_client.h   |2 +-
 source4/libcli/ldap/ldap_controls.c |2 +-
 source4/libcli/ldap/ldap_ildap.c|2 +-
 source4/libcli/ldap/{ldap.h = libcli_ldap.h}   |0 
 source4/torture/ldap/cldap.c|2 +-
 22 files changed, 9 insertions(+), 24 deletions(-)
 rename source4/libcli/ldap/{ldap.h = libcli_ldap.h} (100%)


Changeset truncated at 500 lines:

diff --git a/source4/auth/auth_sam_reply.c b/source4/auth/auth_sam_reply.c
index 0aa41ae..d7792e5 100644
--- a/source4/auth/auth_sam_reply.c
+++ b/source4/auth/auth_sam_reply.c
@@ -23,7 +23,6 @@
 #include includes.h
 #include auth/auth.h
 #include libcli/security/security.h
-#include librpc/gen_ndr/ndr_netlogon.h
 #include auth/auth_sam_reply.h
 
 NTSTATUS auth_convert_server_info_sambaseinfo(TALLOC_CTX *mem_ctx, 
diff --git a/source4/auth/gensec/cyrus_sasl.c b/source4/auth/gensec/cyrus_sasl.c
index f563867..c4f9544 100644
--- a/source4/auth/gensec/cyrus_sasl.c
+++ b/source4/auth/gensec/cyrus_sasl.c
@@ -24,7 +24,6 @@
 #include auth/credentials/credentials.h
 #include auth/gensec/gensec.h
 #include auth/gensec/gensec_proto.h
-#include lib/socket/socket.h
 #include sasl/sasl.h
 
 struct gensec_sasl_state {
diff --git a/source4/auth/sam.c b/source4/auth/sam.c
index d6d1a50..894ba37 100644
--- a/source4/auth/sam.c
+++ b/source4/auth/sam.c
@@ -24,12 +24,8 @@
 #include system/time.h
 #include auth/auth.h
 #include ldb.h
-#include ../lib/util/util_ldb.h
 #include dsdb/samdb/samdb.h
 #include libcli/security/security.h
-#include librpc/gen_ndr/ndr_netlogon.h
-#include librpc/gen_ndr/ndr_security.h
-#include param/param.h
 #include auth/auth_sam.h
 #include dsdb/common/util.h
 
diff --git a/source4/auth/session.c b/source4/auth/session.c
index a21fbcf..29ba13e 100644
--- a/source4/auth/session.c
+++ b/source4/auth/session.c
@@ -26,8 +26,6 @@
 #include libcli/security/security.h
 #include libcli/auth/libcli_auth.h
 #include dsdb/samdb/samdb.h
-#include auth/credentials/credentials.h
-#include param/param.h
 #include auth/session_proto.h
 
 _PUBLIC_ struct auth_session_info *anonymous_session(TALLOC_CTX *mem_ctx, 
diff --git a/source4/auth/system_session.c b/source4/auth/system_session.c
index 2835a20..8fdf527 100644
--- a/source4/auth/system_session.c
+++ b/source4/auth/system_session.c
@@ -23,7 +23,6 @@
 
 #include includes.h
 #include libcli/security/security.h
-#include libcli/auth/libcli_auth.h
 #include auth/credentials/credentials.h
 #include param/param.h
 #include auth/auth.h /* for auth_serversupplied_info */
diff --git a/source4/cldap_server/cldap_server.c 
b/source4/cldap_server/cldap_server.c
index da59e0c..8bed38b 100644
--- a/source4/cldap_server/cldap_server.c
+++ b/source4/cldap_server/cldap_server.c
@@ -21,7 +21,6 @@
 
 #include includes.h
 #include talloc.h
-#include libcli/ldap/ldap.h
 #include lib/messaging/irpc.h
 #include smbd/service_task.h
 #include smbd/service.h
diff --git a/source4/cldap_server/cldap_server.h 

[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Günther Deschner
The branch, master has been updated
   via  a92b653... s3:passdb Remove use of uint8 uint16 and uint32 in 
favour of C99 types
  from  c8a2314... s4:libcli/ldap Rename ldap.h to libcli_ldap.h

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


- Log -
commit a92b653af964364ee438c6ee69a87eb7603ceab0
Author: Andrew Bartlett abart...@samba.org
Date:   Fri May 21 10:38:04 2010 +1000

s3:passdb Remove use of uint8 uint16 and uint32 in favour of C99 types

Signed-off-by: Günther Deschner g...@samba.org

---

Summary of changes:
 source3/include/passdb.h   |   60 ++--
 source3/include/proto.h|  114 +++---
 source3/lib/time.c |4 +-
 source3/passdb/passdb.c|  206 
 source3/passdb/pdb_get_set.c   |   40 
 source3/passdb/pdb_interface.c |   82 
 source3/passdb/pdb_ldap.c  |  120 
 source3/passdb/pdb_smbpasswd.c |   10 +-
 source3/utils/pdbedit.c|   12 +-
 9 files changed, 324 insertions(+), 324 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/passdb.h b/source3/include/passdb.h
index 1d0f5c1..860eff9 100644
--- a/source3/include/passdb.h
+++ b/source3/include/passdb.h
@@ -104,8 +104,8 @@ enum pdb_value_state {
 /* cache for bad password lockout data, to be used on replicated SAMs */
 struct login_cache {
time_t entry_timestamp;
-   uint32 acct_ctrl;
-   uint16 bad_password_count;
+   uint32_t acct_ctrl;
+   uint16_t bad_password_count;
time_t bad_password_time;
 };
 
@@ -153,18 +153,18 @@ struct samu {
DATA_BLOB nt_pw_his; /* nt hashed password history .data is Null if not 
available */
char* plaintext_pw; /* is Null if not available */
 
-   uint32 acct_ctrl; /* account info (ACB_ bit-mask) */
-   uint32 fields_present; /* 0x00ff  */
+   uint32_t acct_ctrl; /* account info (ACB_ bit-mask) */
+   uint32_t fields_present; /* 0x00ff  */
 
-   uint16 logon_divs; /* 168 - number of hours in a week */
-   uint32 hours_len; /* normally 21 bytes */
-   uint8 hours[MAX_HOURS_LEN];
+   uint16_t logon_divs; /* 168 - number of hours in a week */
+   uint32_t hours_len; /* normally 21 bytes */
+   uint8_t hours[MAX_HOURS_LEN];
 
/* Was unknown_5. */
-   uint16 bad_password_count;
-   uint16 logon_count;
+   uint16_t bad_password_count;
+   uint16_t logon_count;
 
-   uint32 unknown_6; /* 0x 04ec */
+   uint32_t unknown_6; /* 0x 04ec */
 
/* a tag for who added the private methods */
 
@@ -180,13 +180,13 @@ struct samu {
 struct acct_info {
fstring acct_name; /* account name */
fstring acct_desc; /* account name */
-   uint32 rid; /* domain-relative RID */
+   uint32_t rid; /* domain-relative RID */
 };
 
 struct samr_displayentry {
-   uint32 idx;
-   uint32 rid;
-   uint32 acct_flags;
+   uint32_t idx;
+   uint32_t rid;
+   uint32_t acct_flags;
const char *account_name;
const char *fullname;
const char *description;
@@ -201,7 +201,7 @@ enum pdb_search_type {
 struct pdb_search {
enum pdb_search_type type;
struct samr_displayentry *cache;
-   uint32 num_entries;
+   uint32_t num_entries;
ssize_t cache_size;
bool search_ended;
void *private_data;
@@ -249,7 +249,7 @@ enum pdb_policy_type {
  * samr_lookup_rids twice. It was done in the srv_samr_nt.c code as well as in
  * the pdb module. Remove the latter, this might happen more often. VL.
  * changed to version 14 to move lookup_rids and lookup_names to return
- * enum lsa_SidType rather than uint32.
+ * enum lsa_SidType rather than uint32_t.
  * Changed to 16 for access to the trusted domain passwords (obnox).
  * Changed to 17, the sampwent interface is gone.
  * Changed to 18, pdb_rid_algorithm - pdb_capabilities
@@ -270,8 +270,8 @@ struct pdb_methods
NTSTATUS (*getsampwsid)(struct pdb_methods *, struct samu *sam_acct, 
const DOM_SID *sid);
 
NTSTATUS (*create_user)(struct pdb_methods *, TALLOC_CTX *tmp_ctx,
-   const char *name, uint32 acct_flags,
-   uint32 *rid);
+   const char *name, uint32_t acct_flags,
+   uint32_t *rid);
 
NTSTATUS (*delete_user)(struct pdb_methods *, TALLOC_CTX *tmp_ctx,
struct samu *sam_acct);
@@ -294,10 +294,10 @@ struct pdb_methods
 
NTSTATUS (*create_dom_group)(struct pdb_methods *methods,
 TALLOC_CTX *mem_ctx, const char *name,
-uint32 *rid);
+uint32_t 

[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Günther Deschner
The branch, master has been updated
   via  cba7f8b... s3:dom_sid Global replace of DOM_SID with struct dom_sid
  from  a92b653... s3:passdb Remove use of uint8 uint16 and uint32 in 
favour of C99 types

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


- Log -
commit cba7f8b8273e661d3c43652900d93e5a8eab4e5f
Author: Andrew Bartlett abart...@samba.org
Date:   Fri May 21 11:25:01 2010 +1000

s3:dom_sid Global replace of DOM_SID with struct dom_sid

This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner g...@samba.org

---

Summary of changes:
 examples/pdb/test.c|2 +-
 libgpo/gpo_ldap.c  |   10 +-
 source3/auth/auth_util.c   |   20 +-
 source3/auth/server_info.c |   10 +-
 source3/auth/token_util.c  |   48 ++--
 source3/groupdb/mapping.c  |   48 ++--
 source3/groupdb/mapping.h  |   18 +-
 source3/groupdb/mapping_tdb.c  |   48 ++--
 source3/include/ads_protos.h   |   14 +-
 source3/include/auth.h |2 +-
 source3/include/mapping.h  |2 +-
 source3/include/nss_info.h |4 +-
 source3/include/ntquotas.h |2 +-
 source3/include/passdb.h   |   50 ++--
 source3/include/proto.h|  296 
 source3/include/secrets.h  |2 +-
 source3/include/smb.h  |   61 +++---
 source3/include/smbldap.h  |2 +-
 source3/include/trans2.h   |2 +-
 source3/lib/afs.c  |2 +-
 source3/lib/netapi/samr.c  |2 +-
 source3/lib/netapi/user.c  |2 +-
 source3/lib/privileges.c   |   30 ++--
 source3/lib/secdesc.c  |   22 +-
 source3/lib/sharesec.c |2 +-
 source3/lib/substitute.c   |2 +-
 source3/lib/util_nttoken.c |4 +-
 source3/lib/util_sid.c |  128 +-
 source3/lib/winbind_util.c |   46 ++--
 source3/libads/ldap.c  |   44 ++--
 source3/libads/ldap_utils.c|2 +-
 source3/libgpo/gpo_proto.h |4 +-
 source3/libgpo/gpo_reg.c   |   14 +-
 source3/libnet/libnet_samsync_passdb.c |   16 +-
 source3/libsmb/clidgram.c  |2 +-
 source3/libsmb/cliquota.c  |4 +-
 source3/libsmb/libsmb_xattr.c  |   24 +-
 source3/libsmb/samlogon_cache.c|8 +-
 source3/libsmb/trustdom_cache.c|8 +-
 source3/libsmb/trusts_util.c   |4 +-
 source3/modules/nfs4_acls.c|   16 +-
 source3/modules/onefs_acl.c|   18 +-
 source3/modules/vfs_afsacl.c   |   20 +-
 source3/passdb/lookup_sid.c|   52 ++--
 source3/passdb/machine_sid.c   |   22 +-
 source3/passdb/passdb.c|4 +-
 source3/passdb/pdb_ads.c   |   56 +++---
 source3/passdb/pdb_compat.c|8 +-
 source3/passdb/pdb_get_set.c   |   22 +-
 source3/passdb/pdb_interface.c |   88 
 source3/passdb/pdb_ldap.c  |  102 
 source3/passdb/pdb_smbpasswd.c |2 +-
 source3/passdb/pdb_tdb.c   |2 +-
 source3/passdb/pdb_wbc_sam.c   |   40 ++--
 source3/passdb/secrets.c   |4 +-
 source3/passdb/util_builtin.c  |6 +-
 source3/passdb/util_unixsids.c |   20 +-
 source3/passdb/util_wellknown.c|   14 +-
 source3/printing/nt_printing.c |   12 +-
 source3/rpc_client/cli_lsarpc.c|   20 +-
 source3/rpc_client/cli_lsarpc.h|   10 +-
 source3/rpc_server/srv_lsa_nt.c|   34 ++--
 source3/rpc_server/srv_samr_nt.c   |   50 ++--
 source3/rpc_server/srv_spoolss_util.c  |4 +-
 source3/rpcclient/cmd_lsarpc.c |   30 ++--
 source3/rpcclient/cmd_samr.c   |8 +-
 source3/rpcclient/rpcclient.c  |2 +-
 source3/smbd/ntquotas.c|6 +-
 source3/smbd/nttrans.c |6 +-
 

[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Michael Adam
The branch, master has been updated
   via  1240478... s4:torture:winreg: improve error messages in 
test_HKLM_wellknown
   via  67439d4... s4:torture:winreg: improve error messages in 
test_QueryValue_full
  from  cba7f8b... s3:dom_sid Global replace of DOM_SID with struct dom_sid

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


- Log -
commit 124047877d3287b9cbc145682c5e5ce5606d682b
Author: Michael Adam ob...@samba.org
Date:   Fri May 21 10:56:37 2010 +0200

s4:torture:winreg: improve error messages in test_HKLM_wellknown

commit 67439d4297781261ac469d7c9252677f36d8c54a
Author: Michael Adam ob...@samba.org
Date:   Fri May 21 10:53:35 2010 +0200

s4:torture:winreg: improve error messages in test_QueryValue_full

So that one has a chance to tell what part of the test failed. And why.

---

Summary of changes:
 source4/torture/rpc/winreg.c |   22 --
 1 files changed, 12 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index ac9100c..370bd67 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -1677,9 +1677,11 @@ static bool test_QueryValue_full(struct 
dcerpc_binding_handle *b,
uint32_t data_length = 0;
uint8_t *data = NULL;
WERROR expected_error = WERR_BADFILE;
+   const char *errmsg_nonexisting = expected WERR_BADFILE for nonexisting 
value;
 
if (valuename == NULL) {
expected_error = WERR_INVALID_PARAM;
+   errmsg_nonexisting = expected WERR_INVALID_PARAM for NULL 
valuename;
}
 
ZERO_STRUCT(r);
@@ -1701,21 +1703,21 @@ static bool test_QueryValue_full(struct 
dcerpc_binding_handle *b,
torture_assert_ntstatus_ok(tctx, dcerpc_winreg_QueryValue_r(b, tctx, 
r),
QueryValue failed);
torture_assert_werr_equal(tctx, r.out.result, WERR_INVALID_PARAM,
-   QueryValue failed);
+   expected WERR_INVALID_PARAM for missing type length and size);
 
r.in.type = type;
r.out.type = type;
torture_assert_ntstatus_ok(tctx, dcerpc_winreg_QueryValue_r(b, tctx, 
r),
QueryValue failed);
torture_assert_werr_equal(tctx, r.out.result, WERR_INVALID_PARAM,
-   QueryValue failed);
+   expected WERR_INVALID_PARAM for missing length and size);
 
r.in.data_length = data_length;
r.out.data_length = data_length;
torture_assert_ntstatus_ok(tctx, dcerpc_winreg_QueryValue_r(b, tctx, 
r),
QueryValue failed);
torture_assert_werr_equal(tctx, r.out.result, WERR_INVALID_PARAM,
-   QueryValue failed);
+   expected WERR_INVALID_PARAM for missing size);
 
r.in.data_size = data_size;
r.out.data_size = data_size;
@@ -1726,7 +1728,7 @@ static bool test_QueryValue_full(struct 
dcerpc_binding_handle *b,
QueryValue failed);
} else {
torture_assert_werr_equal(tctx, r.out.result, expected_error,
-   QueryValue failed);
+   errmsg_nonexisting);
}
 
real_data_size = *r.out.data_size;
@@ -1740,10 +1742,10 @@ static bool test_QueryValue_full(struct 
dcerpc_binding_handle *b,
QueryValue failed);
if (existing_value) {
torture_assert_werr_equal(tctx, r.out.result, WERR_MORE_DATA,
-   QueryValue failed);
+   expected WERR_MORE_DATA for query with too small 
buffer);
} else {
torture_assert_werr_equal(tctx, r.out.result, expected_error,
-   QueryValue failed);
+   errmsg_nonexisting);
}
 
data = talloc_zero_array(tctx, uint8_t, real_data_size);
@@ -1758,7 +1760,7 @@ static bool test_QueryValue_full(struct 
dcerpc_binding_handle *b,
QueryValue failed);
} else {
torture_assert_werr_equal(tctx, r.out.result, expected_error,
-   QueryValue failed);
+   errmsg_nonexisting);
}
 
return true;
@@ -2091,11 +2093,11 @@ static bool test_HKLM_wellknown(struct torture_context 
*tctx,
torture_assert(tctx, test_QueryValue_full(b, tctx, newhandle, 
VALUE_CURRENT_VERSION, true),
failed to query current version);
torture_assert(tctx, test_QueryValue_full(b, tctx, newhandle, 
IDoNotExist, false),
-   failed to query current version);
+   succeeded to query nonexistent value);
torture_assert(tctx, test_QueryValue_full(b, tctx, newhandle, NULL, 
false),
-   test_QueryValue_full for NULL value failed);
+   succeeded to query value with NULL name);

[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Andrew Bartlett
The branch, master has been updated
   via  50b472a... s4:libcli/ldap Update headermap.txt (autotools build) 
and wscript_build for libcli_ldap.h
  from  1240478... s4:torture:winreg: improve error messages in 
test_HKLM_wellknown

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


- Log -
commit 50b472a772edeb23ec97c3878054fb437db24f9b
Author: Andrew Bartlett abart...@samba.org
Date:   Fri May 21 20:07:18 2010 +1000

s4:libcli/ldap Update headermap.txt (autotools build) and wscript_build for 
libcli_ldap.h

It took a little while to find where to update this...

Andrew Bartlett

---

Summary of changes:
 source4/headermap.txt |2 +-
 source4/libcli/ldap/wscript_build |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/headermap.txt b/source4/headermap.txt
index a998ff9..e8dbbce 100644
--- a/source4/headermap.txt
+++ b/source4/headermap.txt
@@ -32,7 +32,7 @@ rpc_server/dcerpc_server.h: dcerpc_server.h
 rpc_server/common/common.h: dcerpc_server/common.h
 ../libcli/auth/credentials.h: domain_credentials.h
 ../lib/util/charset/charset.h: charset.h
-libcli/ldap/ldap.h: ldap-util.h
+libcli/ldap/libcli_ldap.h: ldap-util.h
 ../lib/torture/torture.h: torture.h
 libcli/libcli.h: client.h
 librpc/gen_ndr/ntp_signd.h: gen_ndr/ntp_signd.h
diff --git a/source4/libcli/ldap/wscript_build 
b/source4/libcli/ldap/wscript_build
index 47372d7..62d6bf3 100644
--- a/source4/libcli/ldap/wscript_build
+++ b/source4/libcli/ldap/wscript_build
@@ -4,7 +4,7 @@ bld.SAMBA_SUBSYSTEM('LIBCLI_LDAP',
source='ldap_client.c ldap_bind.c ldap_ildap.c ldap_controls.c',
autoproto='ldap_proto.h',
public_deps='LIBSAMBA-ERRORS tevent LIBPACKET',
-   public_headers='ldap.h:ldap-util.h',
+   public_headers='libcli_ldap.h:ldap-util.h',
deps='LIBCLI_COMPOSITE samba_socket NDR_SAMR LIBTLS LIBCLI_LDAP_NDR 
LIBNDR LP_RESOLVE gensec LIBCLI_LDAP_MESSAGE'
)
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Stefan Metzmacher
The branch, master has been updated
   via  ab093ff... wafsamba: Disable the abi checks when gdb is not 
available
  from  50b472a... s4:libcli/ldap Update headermap.txt (autotools build) 
and wscript_build for libcli_ldap.h

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


- Log -
commit ab093ffe4637db65afb3779f592f20dd55f4e5f3
Author: Thomas Nagy tnagy2po...@gmail.com
Date:   Fri May 21 12:48:11 2010 +0200

wafsamba: Disable the abi checks when gdb is not available

Try to find gdb during the configuration, if gdb is missing, disable
the abi checks.

Signed-off-by: Stefan Metzmacher me...@samba.org

---

Summary of changes:
 buildtools/wafsamba/wscript |4 
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript
index 56f2e60..7bb2baa 100644
--- a/buildtools/wafsamba/wscript
+++ b/buildtools/wafsamba/wscript
@@ -191,6 +191,10 @@ def configure(conf):
 conf.env.ABI_CHECK = Options.options.ABI_CHECK or Options.options.developer
 if Options.options.ABI_CHECK_DISABLE:
 conf.env.ABI_CHECK = False
+try:
+conf.find_program('gdb', mandatory=True)
+except:
+conf.env.ABI_CHECK = False
 
 conf.CHECK_COMMAND(['uname', '-a'],
msg='Checking build system',


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Stefan Metzmacher
The branch, master has been updated
   via  5fe476b... s4:ldb: add --controls support to ldbedit
  from  ab093ff... wafsamba: Disable the abi checks when gdb is not 
available

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


- Log -
commit 5fe476b6821b731db11225043756470c45c7f66c
Author: Stefan Metzmacher me...@samba.org
Date:   Fri May 21 11:30:20 2010 +0200

s4:ldb: add --controls support to ldbedit

metze

---

Summary of changes:
 source4/lib/ldb/tools/ldbedit.c |   17 -
 1 files changed, 12 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/tools/ldbedit.c b/source4/lib/ldb/tools/ldbedit.c
index 1866cc3..6635466 100644
--- a/source4/lib/ldb/tools/ldbedit.c
+++ b/source4/lib/ldb/tools/ldbedit.c
@@ -33,6 +33,7 @@
 #include ldb_includes.h
 #include ldb.h
 #include tools/cmdline.h
+#include tools/ldbutil.h
 
 static struct ldb_cmdline *options;
 
@@ -56,7 +57,8 @@ static void ldif_write_msg(struct ldb_context *ldb,
 */
 static int modify_record(struct ldb_context *ldb, 
 struct ldb_message *msg1,
-struct ldb_message *msg2)
+struct ldb_message *msg2,
+struct ldb_control **req_ctrls)
 {
struct ldb_message *mod;
 
@@ -74,7 +76,7 @@ static int modify_record(struct ldb_context *ldb,
ldif_write_msg(ldb, stdout, LDB_CHANGETYPE_MODIFY, mod);
}
 
-   if (ldb_modify(ldb, mod) != 0) {
+   if (ldb_modify_ctrl(ldb, mod, req_ctrls) != 0) {
fprintf(stderr, failed to modify %s - %s\n, 
ldb_dn_get_linearized(msg1-dn), ldb_errstring(ldb));
return -1;
@@ -111,6 +113,11 @@ static int merge_edits(struct ldb_context *ldb,
struct ldb_message *msg;
int ret = 0;
int adds=0, modifies=0, deletes=0;
+   struct ldb_control **req_ctrls = ldb_parse_control_strings(ldb, ldb, 
(const char **)options-controls);
+   if (options-controls != NULL  req_ctrls == NULL) {
+   fprintf(stderr, parsing controls failed: %s\n, 
ldb_errstring(ldb));
+   return -1;
+   }
 
if (ldb_transaction_start(ldb) != 0) {
fprintf(stderr, Failed to start transaction: %s\n, 
ldb_errstring(ldb));
@@ -124,7 +131,7 @@ static int merge_edits(struct ldb_context *ldb,
if (options-verbose  0) {
ldif_write_msg(ldb, stdout, LDB_CHANGETYPE_ADD, 
msgs2[i]);
}
-   if (ldb_add(ldb, msgs2[i]) != 0) {
+   if (ldb_add_ctrl(ldb, msgs2[i], req_ctrls) != 0) {
fprintf(stderr, failed to add %s - %s\n,
ldb_dn_get_linearized(msgs2[i]-dn),
ldb_errstring(ldb));
@@ -133,7 +140,7 @@ static int merge_edits(struct ldb_context *ldb,
}
adds++;
} else {
-   if (modify_record(ldb, msg, msgs2[i])  0) {
+   if (modify_record(ldb, msg, msgs2[i], req_ctrls)  0) {
modifies++;
}
}
@@ -146,7 +153,7 @@ static int merge_edits(struct ldb_context *ldb,
if (options-verbose  0) {
ldif_write_msg(ldb, stdout, 
LDB_CHANGETYPE_DELETE, msgs1[i]);
}
-   if (ldb_delete(ldb, msgs1[i]-dn) != 0) {
+   if (ldb_delete_ctrl(ldb, msgs1[i]-dn, req_ctrls) != 0) 
{
fprintf(stderr, failed to delete %s - %s\n,
ldb_dn_get_linearized(msgs1[i]-dn),
ldb_errstring(ldb));


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Andreas Schneider
The branch, master has been updated
   via  b6b3822... s4-torture: Improved the winreg symlink test.
   via  74d0fc1... s4-torture: Disable the security descriptor tests.
   via  225bd02... s4-torture: Try to fix the winreg tests.
  from  5fe476b... s4:ldb: add --controls support to ldbedit

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


- Log -
commit b6b38222894014de029131eb5b6d573294af314e
Author: Andreas Schneider a...@samba.org
Date:   Thu May 20 14:00:57 2010 +0200

s4-torture: Improved the winreg symlink test.

This test is still disabled as we don't know how to remove a symbolic
link. It looks like there only DeleteKey functions which can work on a
handle are able to delete a symbolic link.

Pair-Programmed-With: Michael Adam ob...@samba.org

commit 74d0fc10fd646e493a98a00e524f17e9c4f3df3f
Author: Andreas Schneider a...@samba.org
Date:   Fri May 21 12:49:23 2010 +0200

s4-torture: Disable the security descriptor tests.

commit 225bd02dab1a0656461d3d5e30ad03034e8c64f1
Author: Andreas Schneider a...@samba.org
Date:   Fri May 21 12:42:55 2010 +0200

s4-torture: Try to fix the winreg tests.

---

Summary of changes:
 source4/torture/rpc/winreg.c |  219 +++--
 1 files changed, 165 insertions(+), 54 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 370bd67..67afce2 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -28,18 +28,19 @@
 #include param/param.h
 #include lib/registry/registry.h
 
-#define TEST_KEY_BASE smbtorture test
-#define TEST_KEY1 TEST_KEY_BASE \\spottyfoot
-#define TEST_KEY2 TEST_KEY_BASE \\with a SD (#1)
-#define TEST_KEY3 TEST_KEY_BASE \\with a subkey
-#define TEST_KEY4 TEST_KEY_BASE \\sd_tests
-#define TEST_SUBKEY TEST_KEY3 \\subkey
-#define TEST_SUBKEY_SD  TEST_KEY4 \\subkey_sd
-#define TEST_SUBSUBKEY_SD TEST_KEY4 \\subkey_sd\\subsubkey_sd
+#define TEST_KEY_BASE winreg_torture_test
+#define TEST_KEY1 spottyfoot
+#define TEST_KEY2 with a SD (#1)
+#define TEST_KEY3 with a subkey
+#define TEST_KEY4 sd_tests
+#define TEST_SUBKEY subkey
+#define TEST_SUBKEY_SD  subkey_sd
+#define TEST_SUBSUBKEY_SD subkey_sd\\subsubkey_sd
 #define TEST_VALUE torture_value_name
 #define TEST_KEY_VOLATILE torture_volatile_key
 #define TEST_SUBKEY_VOLATILE torture_volatile_subkey
 #define TEST_KEY_SYMLINK torture_symlink_key
+#define TEST_KEY_SYMLINK_DEST torture_symlink_dest
 
 #define TEST_SID S-1-5-21-1234567890-1234567890-1234567890-500
 
@@ -832,6 +833,8 @@ static bool test_SecurityDescriptorInheritance(struct 
dcerpc_pipe *p,
struct policy_handle new_handle;
bool ret = true;
struct dcerpc_binding_handle *b = p-binding_handle;
+   const char *test_subkey_sd;
+   const char *test_subsubkey_sd;
 
torture_comment(tctx, SecurityDescriptor inheritance\n);
 
@@ -874,12 +877,14 @@ static bool test_SecurityDescriptorInheritance(struct 
dcerpc_pipe *p,
return false;
}
 
-   if (!test_CreateKey(b, tctx, handle, TEST_SUBKEY_SD, NULL)) {
+   test_subkey_sd = talloc_asprintf(tctx, %s\\%s, key, TEST_SUBKEY_SD);
+
+   if (!test_CreateKey(b, tctx, handle, test_subkey_sd, NULL)) {
ret = false;
goto out;
}
 
-   if (!test_OpenKey(b, tctx, handle, TEST_SUBKEY_SD, new_handle)) {
+   if (!test_OpenKey(b, tctx, handle, test_subkey_sd, new_handle)) {
ret = false;
goto out;
}
@@ -890,13 +895,15 @@ static bool test_SecurityDescriptorInheritance(struct 
dcerpc_pipe *p,
goto out;
}
 
+   test_subsubkey_sd = talloc_asprintf(tctx, %s\\%s, key, 
TEST_SUBSUBKEY_SD);
+
test_CloseKey(b, tctx, new_handle);
-   if (!test_CreateKey(b, tctx, handle, TEST_SUBSUBKEY_SD, NULL)) {
+   if (!test_CreateKey(b, tctx, handle, test_subsubkey_sd, NULL)) {
ret = false;
goto out;
}
 
-   if (!test_OpenKey(b, tctx, handle, TEST_SUBSUBKEY_SD, new_handle)) {
+   if (!test_OpenKey(b, tctx, handle, test_subsubkey_sd, new_handle)) {
ret = false;
goto out;
}
@@ -909,10 +916,10 @@ static bool test_SecurityDescriptorInheritance(struct 
dcerpc_pipe *p,
 
  out:
test_CloseKey(b, tctx, new_handle);
-   test_Cleanup(b, tctx, handle, TEST_SUBKEY_SD);
+   test_Cleanup(b, tctx, handle, test_subkey_sd);
test_RestoreSecurity(p, tctx, handle, key, sd_orig);
 
-   return true;
+   return ret;
 }
 
 static bool test_SecurityDescriptorBlockInheritance(struct dcerpc_pipe *p,
@@ -941,6 +948,8 @@ static bool test_SecurityDescriptorBlockInheritance(struct 
dcerpc_pipe *p,
bool ret = true;
uint8_t ace_flags 

[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Kamen Mazdrashki
The branch, master has been updated
   via  a4719a4... s4-drsuapi: Sort ATTID definitions by ATTID value
   via  ffc4676... s4/drsuapi: Yet another set of predefined ATTIDs
  from  b6b3822... s4-torture: Improved the winreg symlink test.

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


- Log -
commit a4719a4e12c69f2602bb6063f635c66d3d4848a0
Author: Kamen Mazdrashki kame...@samba.org
Date:   Fri May 21 05:36:35 2010 +0300

s4-drsuapi: Sort ATTID definitions by ATTID value

commit ffc46769b35083f35a8ff2309e4a066502af9441
Author: Kamen Mazdrashki kame...@samba.org
Date:   Fri May 21 05:27:04 2010 +0300

s4/drsuapi: Yet another set of predefined ATTIDs

---

Summary of changes:
 librpc/idl/drsuapi.idl |   15 +++
 1 files changed, 11 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/drsuapi.idl b/librpc/idl/drsuapi.idl
index cd99038..8540057 100644
--- a/librpc/idl/drsuapi.idl
+++ b/librpc/idl/drsuapi.idl
@@ -390,6 +390,7 @@ interface drsuapi
DRSUAPI_ATTRIBUTE_instanceType  = 0x00020001,
DRSUAPI_ATTRIBUTE_whenCreated   = 0x00020002,
DRSUAPI_ATTRIBUTE_possSuperiors = 0x00020008,
+   DRSUAPI_ATTRIBUTE_displayName   = 0x0002000d,
DRSUAPI_ATTRIBUTE_hasMasterNCs  = 0x0002000e,
DRSUAPI_ATTRIBUTE_subClassOf= 0x00020015,
DRSUAPI_ATTRIBUTE_governsID = 0x00020016,
@@ -415,22 +416,28 @@ interface drsuapi
DRSUAPI_ATTRIBUTE_lDAPDisplayName   = 0x000201cc,
DRSUAPI_ATTRIBUTE_name  = 0x00090001,
DRSUAPI_ATTRIBUTE_userAccountControl= 0x00090008,
+   DRSUAPI_ATTRIBUTE_codePage  = 0x00090010,
+   DRSUAPI_ATTRIBUTE_countryCode   = 0x00090019,
DRSUAPI_ATTRIBUTE_currentValue  = 0x0009001b,
DRSUAPI_ATTRIBUTE_homeDirectory = 0x0009002c,
DRSUAPI_ATTRIBUTE_homeDrive = 0x0009002d,
-   DRSUAPI_ATTRIBUTE_scriptPath= 0x0009003e,
-   DRSUAPI_ATTRIBUTE_profilePath   = 0x0009008b,
-   DRSUAPI_ATTRIBUTE_objectSid = 0x00090092,
-   DRSUAPI_ATTRIBUTE_schemaIDGUID  = 0x00090094,
DRSUAPI_ATTRIBUTE_dBCSPwd   = 0x00090037,/* 
lmPwdHash */
+   DRSUAPI_ATTRIBUTE_scriptPath= 0x0009003e,
DRSUAPI_ATTRIBUTE_logonHours= 0x00090040,
DRSUAPI_ATTRIBUTE_userWorkstations  = 0x00090056,
DRSUAPI_ATTRIBUTE_unicodePwd= 0x0009005a,/* 
ntPwdHash */
DRSUAPI_ATTRIBUTE_ntPwdHistory  = 0x0009005e,
+   DRSUAPI_ATTRIBUTE_pwdLastSet= 0x00090060,
+   DRSUAPI_ATTRIBUTE_primaryGroupID= 0x00090062,
DRSUAPI_ATTRIBUTE_priorValue= 0x00090064,
DRSUAPI_ATTRIBUTE_supplementalCredentials   = 0x0009007d,
DRSUAPI_ATTRIBUTE_trustAuthIncoming = 0x00090081,
DRSUAPI_ATTRIBUTE_trustAuthOutgoing = 0x00090087,
+   DRSUAPI_ATTRIBUTE_profilePath   = 0x0009008b,
+   DRSUAPI_ATTRIBUTE_objectSid = 0x00090092,
+   DRSUAPI_ATTRIBUTE_schemaIDGUID  = 0x00090094,
+   DRSUAPI_ATTRIBUTE_comment   = 0x0009009C,/* 
User-Comment */
+   DRSUAPI_ATTRIBUTE_accountExpires= 0x0009009f,
DRSUAPI_ATTRIBUTE_lmPwdHistory  = 0x000900a0,
DRSUAPI_ATTRIBUTE_systemPossSuperiors   = 0x000900c3,
DRSUAPI_ATTRIBUTE_systemMayContain  = 0x000900c4,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Günther Deschner
The branch, master has been updated
   via  7c979ad... s3-net: fix net_ads_gpo() for non-ads case.
  from  a4719a4... s4-drsuapi: Sort ATTID definitions by ATTID value

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


- Log -
commit 7c979adfbf9433ac00b24e6bcd7adebfd3b74b8c
Author: Günther Deschner g...@samba.org
Date:   Fri May 21 18:06:51 2010 +0200

s3-net: fix net_ads_gpo() for non-ads case.

Guenther

---

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


Changeset truncated at 500 lines:

diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index fa6cf83..8945d99 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -2708,7 +2708,7 @@ int net_ads_group(struct net_context *c, int argc, const 
char **argv)
return net_ads_noads();
 }
 
-int net_ads_gpo(int argc, const char **argv)
+int net_ads_gpo(struct net_context *c, int argc, const char **argv)
 {
return net_ads_noads();
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Günther Deschner
The branch, master has been updated
   via  dd3c367... s4-smbtorture: Fix NetUserPasswordSet2 RAP tests.
   via  94d41dd... s4-smbtorture: fix smbcli_rap_netuserpasswordset2().
   via  032c051... rap: fix rap_NetUserPasswordSet2 IDL.
  from  7c979ad... s3-net: fix net_ads_gpo() for non-ads case.

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


- Log -
commit dd3c367153353407f41642b6da4549057cc4c1e7
Author: Günther Deschner g...@samba.org
Date:   Fri May 21 18:05:48 2010 +0200

s4-smbtorture: Fix NetUserPasswordSet2 RAP tests.

Guenther

commit 94d41ddc8f7c97069f0d3c331f65932365c5eb8e
Author: Günther Deschner g...@samba.org
Date:   Fri May 21 18:05:10 2010 +0200

s4-smbtorture: fix smbcli_rap_netuserpasswordset2().

Guenther

commit 032c0515233551bf1d170a8b0a1fe970425d69c5
Author: Günther Deschner g...@samba.org
Date:   Fri May 21 18:02:45 2010 +0200

rap: fix rap_NetUserPasswordSet2 IDL.

Guenther

---

Summary of changes:
 librpc/idl/rap.idl|4 ++--
 source4/torture/rap/rap.c |4 ++--
 source4/torture/rap/sam.c |   45 -
 3 files changed, 44 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/rap.idl b/librpc/idl/rap.idl
index 8392c27..58afcf4 100644
--- a/librpc/idl/rap.idl
+++ b/librpc/idl/rap.idl
@@ -756,8 +756,8 @@ interface rap
 
[public] void rap_NetUserPasswordSet2(
[in] astring UserName,
-   [in] [charset(DOS)] uint8 OldPassword[16],
-   [in] [charset(DOS)] uint8 NewPassword[16],
+   [in] uint8 OldPassword[16],
+   [in] uint8 NewPassword[16],
[in] uint16 EncryptedPassword,
[in] uint16 RealPasswordLength,
[out] rap_status status,
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index e0c9277..4468545 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -1602,11 +1602,11 @@ NTSTATUS smbcli_rap_netuserpasswordset2(struct 
smbcli_tree *tree,
rap_cli_push_paramdesc(call, 'b');
rap_cli_push_paramdesc(call, '1');
rap_cli_push_paramdesc(call, '6');
-   ndr_push_charset(call-ndr_push_param, NDR_SCALARS, r-in.OldPassword, 
16, sizeof(uint8_t), CH_DOS);
+   ndr_push_array_uint8(call-ndr_push_param, NDR_SCALARS, 
r-in.OldPassword, 16);
rap_cli_push_paramdesc(call, 'b');
rap_cli_push_paramdesc(call, '1');
rap_cli_push_paramdesc(call, '6');
-   ndr_push_charset(call-ndr_push_param, NDR_SCALARS, r-in.NewPassword, 
16, sizeof(uint8_t), CH_DOS);
+   ndr_push_array_uint8(call-ndr_push_param, NDR_SCALARS, 
r-in.NewPassword, 16);
rap_cli_push_word(call, r-in.EncryptedPassword);
rap_cli_push_word(call, r-in.RealPasswordLength);
 
diff --git a/source4/torture/rap/sam.c b/source4/torture/rap/sam.c
index d99c348..0149322 100644
--- a/source4/torture/rap/sam.c
+++ b/source4/torture/rap/sam.c
@@ -49,11 +49,45 @@ static bool test_userpasswordset2_args(struct 
torture_context *tctx,
struct rap_NetUserPasswordSet2 r;
char *newpass = samr_rand_pass(tctx, 8);
 
+   ZERO_STRUCT(r);
+
r.in.UserName = username;
-   r.in.OldPassword = *password;
-   r.in.NewPassword = newpass;
+
+   memcpy(r.in.OldPassword, *password, MIN(strlen(*password), 16));
+   memcpy(r.in.NewPassword, newpass, MIN(strlen(newpass), 16));
r.in.EncryptedPassword = 0;
-   r.in.RealPasswordLength = strlen(r.in.NewPassword);
+   r.in.RealPasswordLength = strlen(newpass);
+
+   torture_comment(tctx, Testing rap_NetUserPasswordSet2(%s)\n, 
r.in.UserName);
+
+   torture_assert_ntstatus_ok(tctx,
+   smbcli_rap_netuserpasswordset2(cli-tree, 
lp_iconv_convenience(tctx-lp_ctx), tctx, r),
+   smbcli_rap_netuserpasswordset2 failed);
+   if (!W_ERROR_IS_OK(W_ERROR(r.out.status))) {
+   torture_warning(tctx, RAP NetUserPasswordSet2 gave: %s\n,
+   win_errstr(W_ERROR(r.out.status)));
+   } else {
+   *password = newpass;
+   }
+
+   return true;
+}
+
+static bool test_userpasswordset2_crypt_args(struct torture_context *tctx,
+struct smbcli_state *cli,
+const char *username,
+const char **password)
+{
+   struct rap_NetUserPasswordSet2 r;
+   char *newpass = samr_rand_pass(tctx, 8);
+
+   r.in.UserName = username;
+
+   E_deshash(*password, r.in.OldPassword);
+   E_deshash(newpass, r.in.NewPassword);
+
+   r.in.RealPasswordLength = strlen(newpass);
+   r.in.EncryptedPassword = 1;
 
torture_comment(tctx, Testing 

[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Jeremy Allison
The branch, master has been updated
   via  28b8d42... s3: added support for fake oplocks in SMB2.
  from  dd3c367... s4-smbtorture: Fix NetUserPasswordSet2 RAP tests.

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


- Log -
commit 28b8d421364a1d55bf28a2552f58b5e4325d2bbb
Author: Ira Cooper sa...@ira.wakeful.net
Date:   Thu May 20 11:13:37 2010 -0400

s3: added support for fake oplocks in SMB2.

---

Summary of changes:
 source3/smbd/smb2_create.c |   16 ++--
 1 files changed, 14 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index cc65df2..31813cc 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -421,9 +421,17 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX 
*mem_ctx,
int info;
struct timespec write_time_ts;
struct smb2_create_blobs out_context_blobs;
+   int requested_oplock_level;
 
ZERO_STRUCT(out_context_blobs);
 
+   if(lp_fake_oplocks(SNUM(smb2req-tcon-compat_conn))) {
+   requested_oplock_level = NO_OPLOCK;
+   } else {
+   requested_oplock_level = in_oplock_level;
+   }
+
+
if (!smb2req-async) {
/* New create call. */
req = tevent_req_create(mem_ctx, state,
@@ -695,7 +703,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX 
*mem_ctx,
 in_create_disposition,
 in_create_options,
 in_file_attributes,
-
map_smb2_oplock_levels_to_samba(in_oplock_level),
+
map_smb2_oplock_levels_to_samba(requested_oplock_level),
 allocation_size,
 0, /* private_flags */
 sec_desc,
@@ -766,7 +774,11 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX 
*mem_ctx,
 
smb2req-compat_chain_fsp = smb1req-chain_fsp;
 
-   state-out_oplock_level = 
map_samba_oplock_levels_to_smb2(result-oplock_type);
+   if(lp_fake_oplocks(SNUM(smb2req-tcon-compat_conn))) {
+   state-out_oplock_level = in_oplock_level;
+   } else {
+   state-out_oplock_level = 
map_samba_oplock_levels_to_smb2(result-oplock_type);
+   }
 
if ((in_create_disposition == FILE_SUPERSEDE)
 (info == FILE_WAS_OVERWRITTEN)) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Jeremy Allison
The branch, master has been updated
   via  8c9ea2b... Set SMB2 max read/write/trans sizes to Win7 compatible - 
1Mb.
  from  28b8d42... s3: added support for fake oplocks in SMB2.

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


- Log -
commit 8c9ea2ba7ce2536ebc9f5342a050eb5bc63feac3
Author: Jeremy Allison j...@samba.org
Date:   Fri May 21 10:32:46 2010 -0700

Set SMB2 max read/write/trans sizes to Win7 compatible - 1Mb.

Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index f79ac88..a78bede 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -5294,9 +5294,9 @@ static void init_globals(bool first_time_only)
 
Globals.bMapUntrustedToDomain = false;
 
-   Globals.ismb2_max_read = 64*1024;
-   Globals.ismb2_max_write = 64*1024;
-   Globals.ismb2_max_trans = 64*1024;
+   Globals.ismb2_max_read = 1024*1024;
+   Globals.ismb2_max_write = 1024*1024;
+   Globals.ismb2_max_trans = 1024*1024;
 }
 
 /***


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Jeremy Allison
The branch, master has been updated
   via  03f2200... Add comments to usage error message for -k to make it 
obvious what this needs.
  from  8c9ea2b... Set SMB2 max read/write/trans sizes to Win7 compatible - 
1Mb.

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


- Log -
commit 03f22005f9692feee150cf51c70d09ce2100ae02
Author: Jeremy Allison j...@samba.org
Date:   Fri May 21 10:35:22 2010 -0700

Add comments to usage error message for -k to make it obvious what this 
needs.

Jeremy.

---

Summary of changes:
 source4/lib/cmdline/popt_credentials.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/cmdline/popt_credentials.c 
b/source4/lib/cmdline/popt_credentials.c
index 80f71eb..1f61d64 100644
--- a/source4/lib/cmdline/popt_credentials.c
+++ b/source4/lib/cmdline/popt_credentials.c
@@ -106,7 +106,8 @@ static void popt_common_credentials_callback(poptContext 
con,
/* Force us to only use kerberos */
if (arg) {
if (!set_boolean(arg, use_kerberos)) {
-   fprintf(stderr, Error parsing -k %s\n, arg);
+   fprintf(stderr, Error parsing -k %s. Should be 

+   -k = [yes|no]\n, arg);
exit(1);
break;
}
@@ -159,7 +160,7 @@ struct poptOption popt_common_credentials[] = {
{ authentication-file, 'A', POPT_ARG_STRING, NULL, 'A', Get the 
credentials from a file, FILE },
{ machine-pass, 'P', POPT_ARG_NONE, NULL, 'P', Use stored machine 
account password (implies -k) },
{ simple-bind-dn, 0, POPT_ARG_STRING, NULL, OPT_SIMPLE_BIND_DN, DN 
to use for a simple bind },
-   { kerberos, 'k', POPT_ARG_STRING, NULL, OPT_KERBEROS, Use Kerberos 
},
+   { kerberos, 'k', POPT_ARG_STRING, NULL, OPT_KERBEROS, Use Kerberos, 
-k = [yes|no] },
{ sign, 'S', POPT_ARG_NONE, NULL, OPT_SIGN, Sign connection to 
prevent modification in transit },
{ encrypt, 'e', POPT_ARG_NONE, NULL, OPT_ENCRYPT, Encrypt connection 
for privacy },
{ NULL }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Jeremy Allison
The branch, master has been updated
   via  f576cc5... Doh! If you're going to give advice in useage, make 
sure it's correct.
  from  03f2200... Add comments to usage error message for -k to make it 
obvious what this needs.

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


- Log -
commit f576cc5410a9074a769ca1fbf786a142449e6058
Author: Jeremy Allison j...@samba.org
Date:   Fri May 21 11:40:54 2010 -0700

Doh! If you're going to give advice in useage, make sure it's correct.

Jeremy.

---

Summary of changes:
 source4/lib/cmdline/popt_credentials.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/cmdline/popt_credentials.c 
b/source4/lib/cmdline/popt_credentials.c
index 1f61d64..1776fb2 100644
--- a/source4/lib/cmdline/popt_credentials.c
+++ b/source4/lib/cmdline/popt_credentials.c
@@ -107,7 +107,7 @@ static void popt_common_credentials_callback(poptContext 
con,
if (arg) {
if (!set_boolean(arg, use_kerberos)) {
fprintf(stderr, Error parsing -k %s. Should be 

-   -k = [yes|no]\n, arg);
+   -k [yes|no]\n, arg);
exit(1);
break;
}
@@ -160,7 +160,7 @@ struct poptOption popt_common_credentials[] = {
{ authentication-file, 'A', POPT_ARG_STRING, NULL, 'A', Get the 
credentials from a file, FILE },
{ machine-pass, 'P', POPT_ARG_NONE, NULL, 'P', Use stored machine 
account password (implies -k) },
{ simple-bind-dn, 0, POPT_ARG_STRING, NULL, OPT_SIMPLE_BIND_DN, DN 
to use for a simple bind },
-   { kerberos, 'k', POPT_ARG_STRING, NULL, OPT_KERBEROS, Use Kerberos, 
-k = [yes|no] },
+   { kerberos, 'k', POPT_ARG_STRING, NULL, OPT_KERBEROS, Use Kerberos, 
-k [yes|no] },
{ sign, 'S', POPT_ARG_NONE, NULL, OPT_SIGN, Sign connection to 
prevent modification in transit },
{ encrypt, 'e', POPT_ARG_NONE, NULL, OPT_ENCRYPT, Encrypt connection 
for privacy },
{ NULL }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Jeremy Allison
The branch, master has been updated
   via  efb2922... Make krb5 over SMB2 identical to the way we handle it in 
SMB1.
  from  f576cc5... Doh! If you're going to give advice in useage, make 
sure it's correct.

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


- Log -
commit efb29227fa46e2c9420b3158ef7422aea4f5846e
Author: Jeremy Allison j...@samba.org
Date:   Fri May 21 12:08:18 2010 -0700

Make krb5 over SMB2 identical to the way we handle it in SMB1.

Jeremy.

---

Summary of changes:
 source3/smbd/smb2_sesssetup.c |   52 +++-
 1 files changed, 50 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_sesssetup.c b/source3/smbd/smb2_sesssetup.c
index ed58189..92e77a5 100644
--- a/source3/smbd/smb2_sesssetup.c
+++ b/source3/smbd/smb2_sesssetup.c
@@ -516,7 +516,7 @@ static NTSTATUS smbd_smb2_session_setup_krb5(struct 
smbd_smb2_session *session,
 
 static NTSTATUS smbd_smb2_spnego_negotiate(struct smbd_smb2_session *session,
struct smbd_smb2_request *smb2req,
-   uint8_t in_security_flags,
+   uint8_t in_security_mode,
DATA_BLOB in_security_buffer,
uint16_t *out_session_flags,
DATA_BLOB *out_security_buffer,
@@ -542,7 +542,7 @@ static NTSTATUS smbd_smb2_spnego_negotiate(struct 
smbd_smb2_session *session,
USE_KERBEROS_KEYTAB) ) {
status = smbd_smb2_session_setup_krb5(session,
smb2req,
-   in_security_flags,
+   in_security_mode,
secblob_in,
kerb_mech,
out_session_flags,
@@ -706,6 +706,54 @@ static NTSTATUS smbd_smb2_spnego_auth(struct 
smbd_smb2_session *session,
return NT_STATUS_LOGON_FAILURE;
}
 
+   if (auth.data[0] == ASN1_APPLICATION(0)) {
+   /* Might be a second negTokenTarg packet */
+   DATA_BLOB secblob_in = data_blob_null;
+   char *kerb_mech = NULL;
+
+   status = parse_spnego_mechanisms(in_security_buffer,
+   secblob_in, kerb_mech);
+   if (!NT_STATUS_IS_OK(status)) {
+   TALLOC_FREE(session);
+   return status;
+   }
+
+#ifdef HAVE_KRB5
+   if (kerb_mech  ((lp_security()==SEC_ADS) ||
+   USE_KERBEROS_KEYTAB) ) {
+   status = smbd_smb2_session_setup_krb5(session,
+   smb2req,
+   in_security_mode,
+   secblob_in,
+   kerb_mech,
+   out_session_flags,
+   out_security_buffer,
+   out_session_id);
+
+   data_blob_free(secblob_in);
+   SAFE_FREE(kerb_mech);
+   if (!NT_STATUS_IS_OK(status)) {
+   TALLOC_FREE(session);
+   }
+   return status;
+   }
+#endif
+
+   /* Can't blunder into NTLMSSP auth if we have
+* a krb5 ticket. */
+
+   if (kerb_mech) {
+   DEBUG(3,(smb2: network 
+   misconfiguration, client sent us a 
+   krb5 ticket and kerberos security 
+   not enabled\n));
+   TALLOC_FREE(session);
+   data_blob_free(secblob_in);
+   SAFE_FREE(kerb_mech);
+   return NT_STATUS_LOGON_FAILURE;
+   }
+   }
+
status = auth_ntlmssp_update(session-auth_ntlmssp_state,
 auth,
 auth_out);


-- 
Samba Shared Repository


Re: [SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Stefan (metze) Metzmacher
Am 21.05.2010 21:09, schrieb Jeremy Allison:
 The branch, master has been updated
via  efb2922... Make krb5 over SMB2 identical to the way we handle it 
 in SMB1.
   from  f576cc5... Doh! If you're going to give advice in useage, make 
 sure it's correct.
 
 http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
 
 
 - Log -
 commit efb29227fa46e2c9420b3158ef7422aea4f5846e
 Author: Jeremy Allison j...@samba.org
 Date:   Fri May 21 12:08:18 2010 -0700
 
 Make krb5 over SMB2 identical to the way we handle it in SMB1.
 
 Jeremy.

I guess we still need the chunked message support, it's less likely
to happen with the smb2 buffer sizes and a really large krb5 PAC
should not cause problems in production environments later...

metze



Re: [SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Jeremy Allison
On Fri, May 21, 2010 at 09:13:38PM +0200, Stefan (metze) Metzmacher wrote:
 Am 21.05.2010 21:09, schrieb Jeremy Allison:
  The branch, master has been updated
 via  efb2922... Make krb5 over SMB2 identical to the way we handle 
  it in SMB1.
from  f576cc5... Doh! If you're going to give advice in useage, 
  make sure it's correct.
  
  http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
  
  
  - Log -
  commit efb29227fa46e2c9420b3158ef7422aea4f5846e
  Author: Jeremy Allison j...@samba.org
  Date:   Fri May 21 12:08:18 2010 -0700
  
  Make krb5 over SMB2 identical to the way we handle it in SMB1.
  
  Jeremy.
 
 I guess we still need the chunked message support, it's less likely
 to happen with the smb2 buffer sizes and a really large krb5 PAC
 should not cause problems in production environments later...

Do we ? I've never seen this over SMB2 - if you can reproduce it
I'd be interested to see that. Maybe we could reproduce it from
the client side against Windows to see if they handle it.

Jeremy


[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Jeremy Allison
The branch, master has been updated
   via  366333c... Fix bug #7448 - smbd crash when sambaLMPassword and 
sambaNTPassword entries missing from ldap.
  from  efb2922... Make krb5 over SMB2 identical to the way we handle it in 
SMB1.

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


- Log -
commit 366333c08fe1d26276a90391dcec0526a65cb2a2
Author: Roel van Meer ro...@bokxing.nl
Date:   Fri May 21 14:17:17 2010 -0700

Fix bug #7448 - smbd crash when sambaLMPassword and sambaNTPassword entries 
missing from ldap.

Protect SMBsesskeygen_ntv1() from a NULL pointer.

---

Summary of changes:
 source3/auth/check_samsec.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/check_samsec.c b/source3/auth/check_samsec.c
index bd8cb4b..db2bde7 100644
--- a/source3/auth/check_samsec.c
+++ b/source3/auth/check_samsec.c
@@ -78,6 +78,9 @@ static NTSTATUS sam_password_ok(TALLOC_CTX *mem_ctx,
}
 
if (client_lm_hash || client_nt_hash) {
+   if (!nt_pw) {
+   return NT_STATUS_WRONG_PASSWORD;
+   }
*user_sess_key = data_blob_talloc(mem_ctx, NULL, 16);
if (!user_sess_key-data) {
return NT_STATUS_NO_MEMORY;


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  6af5e7c... s4:torture/rap/rap.c - quiet discard const warning
   via  bd3e70c... s4:torture/raw/open.c - remove unused variables and fix 
error handling
   via  a05ac30... s4:ntvfs/ipc/vfs_ipc.c - add more const in order to 
fix warnings
   via  6836304... s4:ntvfs/posix/pvfs_wait.c - fix a calculated value 
unused warning
  from  366333c... Fix bug #7448 - smbd crash when sambaLMPassword and 
sambaNTPassword entries missing from ldap.

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


- Log -
commit 6af5e7cde198ac21ed8030fd3744ab0ae7f15fd3
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri May 21 23:23:58 2010 +0200

s4:torture/rap/rap.c - quiet discard const warning

commit bd3e70c1bea906e942755cedfbcb467356b2a483
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri May 21 23:19:23 2010 +0200

s4:torture/raw/open.c - remove unused variables and fix error handling

commit a05ac3039b34f07b730b673c3b2c1a0a923cbd35
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri May 21 23:16:43 2010 +0200

s4:ntvfs/ipc/vfs_ipc.c - add more const in order to fix warnings

commit 68363049579c408e56170933cd0b5094934f7c20
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Fri May 21 23:14:19 2010 +0200

s4:ntvfs/posix/pvfs_wait.c - fix a calculated value unused warning

The calculated value is req (!= NULL) if talloc_reference did work 
correctly
or it is NULL if we ran out of memory.

---

Summary of changes:
 source4/ntvfs/ipc/vfs_ipc.c |4 ++--
 source4/ntvfs/posix/pvfs_wait.c |8 +---
 source4/torture/rap/rap.c   |2 +-
 source4/torture/raw/open.c  |   11 +++
 4 files changed, 11 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/ntvfs/ipc/vfs_ipc.c b/source4/ntvfs/ipc/vfs_ipc.c
index 1455424..676f545 100644
--- a/source4/ntvfs/ipc/vfs_ipc.c
+++ b/source4/ntvfs/ipc/vfs_ipc.c
@@ -249,8 +249,8 @@ static NTSTATUS ipc_open(struct ntvfs_module_context *ntvfs,
struct tevent_req *subreq;
const char *fname;
const char *directory;
-   struct tsocket_address *client_addr;
-   struct tsocket_address *server_addr;
+   const struct tsocket_address *client_addr;
+   const struct tsocket_address *server_addr;
int ret;
DATA_BLOB delegated_creds = data_blob_null;
 
diff --git a/source4/ntvfs/posix/pvfs_wait.c b/source4/ntvfs/posix/pvfs_wait.c
index e6977ef..876ce52 100644
--- a/source4/ntvfs/posix/pvfs_wait.c
+++ b/source4/ntvfs/posix/pvfs_wait.c
@@ -102,9 +102,11 @@ static void pvfs_wait_timeout(struct tevent_context *ev,
 
pwait-reason = PVFS_WAIT_TIMEOUT;
 
-   talloc_reference(ev, req);
-   ntvfs_async_setup(pwait-req, pwait);
-   talloc_unlink(ev, req);
+   req = talloc_reference(ev, req);
+   if (req != NULL) {
+   ntvfs_async_setup(req, pwait);
+   talloc_unlink(ev, req);
+   }
 }
 
 
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 4468545..fb5520d 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -212,7 +212,7 @@ static NTSTATUS rap_pull_string(TALLOC_CTX *mem_ctx, struct 
ndr_pull *ndr,
return NT_STATUS_INVALID_PARAMETER;
 
*dest = talloc_zero_array(mem_ctx, char, len+1);
-   pull_string((char *)*dest, p, len+1, len, STR_ASCII);
+   pull_string(discard_const_p(char, *dest), p, len+1, len, STR_ASCII);
 
return NT_STATUS_OK;
 }
diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c
index 42f693e..c8494ab 100644
--- a/source4/torture/raw/open.c
+++ b/source4/torture/raw/open.c
@@ -1882,13 +1882,10 @@ static bool test_ntcreatexdir(struct torture_context 
*tctx,
 struct smbcli_state *cli)
 {
union smb_open io;
-   union smb_fileinfo finfo;
const char *fname = BASEDIR \\torture_ntcreatex.txt;
const char *dname = BASEDIR \\torture_ntcreatex_dir;
-   NTSTATUS status, expected_status;
-   bool ret = true;
+   NTSTATUS status;
int i;
-   uint32_t access_mask = 0;
 
struct {
uint32_t open_disp;
@@ -1955,7 +1952,7 @@ static bool test_ntcreatexdir(struct torture_context 
*tctx,
__location__, nt_errstr(status),
nt_errstr(open_funcs[i].correct_status),
i, (int)open_funcs[i].open_disp);
-   ret = false;
+   return false;
}
/* Close and delete the file. */
if (NT_STATUS_IS_OK(status)) {
@@ -2063,11 +2060,9 @@ static bool test_ntcreatexdir(struct torture_context 
*tctx,
NTCREATEX_OPTIONS_NON_DIRECTORY_FILE should be returned );
  

[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Jeremy Allison
The branch, master has been updated
   via  b2a7ad8c.. Make DFS work over SMB2.
  from  6af5e7c... s4:torture/rap/rap.c - quiet discard const warning

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


- Log -
commit b2a7ad8c951562d1aea6663064784da0b0a98565
Author: Jeremy Allison j...@samba.org
Date:   Fri May 21 16:56:10 2010 -0700

Make DFS work over SMB2.

Jeremy.

---

Summary of changes:
 libcli/smb/smb2_constants.h |9 +
 source3/include/smb.h   |6 ++
 source3/param/loadparm.c|6 --
 source3/smbd/msdfs.c|3 ++-
 source3/smbd/smb2_create.c  |   17 -
 source3/smbd/smb2_tcon.c|   34 +-
 6 files changed, 58 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/smb/smb2_constants.h b/libcli/smb/smb2_constants.h
index 3047809..a3885f9 100644
--- a/libcli/smb/smb2_constants.h
+++ b/libcli/smb/smb2_constants.h
@@ -81,6 +81,7 @@
 /* SMB2 capabilities - only 1 so far. I'm sure more will be added */
 #define SMB2_CAP_DFS 0x0001
 #define SMB2_CAP_LEASING 0x0002 /* only in dialect 0x210 */
+#define SMB2_CAP_LARGE_MTU  0x0004 /* only in dialect 0x210 */
 /* so we can spot new caps as added */
 #define SMB2_CAP_ALL SMB2_CAP_DFS
 
@@ -88,6 +89,11 @@
 #define SMB2_SESSION_FLAG_IS_GUEST   0x0001
 #define SMB2_SESSION_FLAG_IS_NULL0x0002
 
+/* SMB2 sharetype flags */
+#define SMB2_SHARE_TYPE_DISK   0x1
+#define SMB2_SHARE_TYPE_PIPE   0x2
+#define SMB2_SHARE_TYPE_PRINT  0x3
+
 /* SMB2 share flags */
 #define SMB2_SHAREFLAG_MANUAL_CACHING0x
 #define SMB2_SHAREFLAG_AUTO_CACHING  0x0010
@@ -101,6 +107,9 @@
 #define SMB2_SHAREFLAG_ACCESS_BASED_DIRECTORY_ENUM   0x0800
 #define SMB2_SHAREFLAG_ALL   0x0F33
 
+/* SMB2 share capafilities */
+#define SMB2_SHARE_CAP_DFS 0x8
+
 /* SMB2 create security flags */
 #define SMB2_SECURITY_DYNAMIC_TRACKING   0x01
 #define SMB2_SECURITY_EFFECTIVE_ONLY 0x02
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 93e7323..1ceb54b 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1976,4 +1976,10 @@ struct child_pid {
 /* Used to keep track of deferred opens. */
 struct deferred_open_record;
 
+/* Client-side offline caching policy types */
+#define CSC_POLICY_MANUAL 0
+#define CSC_POLICY_DOCUMENTS 1
+#define CSC_POLICY_PROGRAMS 2
+#define CSC_POLICY_DISABLE 3
+
 #endif /* _SMB_H */
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index a78bede..ba9d816 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -827,12 +827,6 @@ static const struct enum_list enum_bool_auto[] = {
{-1, NULL}
 };
 
-/* Client-side offline caching policy types */
-#define CSC_POLICY_MANUAL 0
-#define CSC_POLICY_DOCUMENTS 1
-#define CSC_POLICY_PROGRAMS 2
-#define CSC_POLICY_DISABLE 3
-
 static const struct enum_list enum_csc_policy[] = {
{CSC_POLICY_MANUAL, manual},
{CSC_POLICY_DOCUMENTS, documents},
diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c
index 6dfa886..92c3e0e 100644
--- a/source3/smbd/msdfs.c
+++ b/source3/smbd/msdfs.c
@@ -50,6 +50,7 @@ static NTSTATUS parse_dfs_path(connection_struct *conn,
struct dfs_path *pdp, /* MUST BE TALLOCED */
bool *ppath_contains_wcard)
 {
+   struct smbd_server_connection *sconn = smbd_server_conn;
char *pathname_local;
char *p,*temp;
char *servicename;
@@ -77,7 +78,7 @@ static NTSTATUS parse_dfs_path(connection_struct *conn,
 
sepchar = pdp-posix_path ? '/' : '\\';
 
-   if (*pathname != sepchar) {
+   if (!sconn-allow_smb2  (*pathname != sepchar)) {
DEBUG(10,(parse_dfs_path: path %s doesn't start with %c\n,
pathname, sepchar ));
/*
diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index 31813cc..b4b265b 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -673,11 +673,18 @@ static struct tevent_req 
*smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
in_create_options = ~(0x10);/* NTCREATEX_OPTIONS_SYNC_ALERT */
in_create_options = ~(0x20);/* NTCREATEX_OPTIONS_ASYNC_ALERT */
 
-   /* convert '\\' into '/' */
-   status = check_path_syntax(fname);
-   if (!NT_STATUS_IS_OK(status)) {
-   tevent_req_nterror(req, status);
-   return tevent_req_post(req, ev);
+/*
+* For a DFS path the function parse_dfs_path()
+* will do the 

[SCM] Samba Shared Repository - branch master updated

2010-05-21 Thread Jeremy Allison
The branch, master has been updated
   via  8248446... Don't forget brackets around bitwise tests.
  from  b2a7ad8c.. Make DFS work over SMB2.

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


- Log -
commit 82484461e3f8f9bba351bbb5f5178c6f17dd049d
Author: Jeremy Allison j...@samba.org
Date:   Fri May 21 17:12:40 2010 -0700

Don't forget brackets around bitwise tests.

Jeremy.

---

Summary of changes:
 source3/smbd/smb2_create.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c
index b4b265b..ed70271 100644
--- a/source3/smbd/smb2_create.c
+++ b/source3/smbd/smb2_create.c
@@ -678,7 +678,7 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX 
*mem_ctx,
 * will do the path processing.
 */
 
-   if (!smb1req-flags2  FLAGS2_DFS_PATHNAMES) {
+   if (!(smb1req-flags2  FLAGS2_DFS_PATHNAMES)) {
/* convert '\\' into '/' */
status = check_path_syntax(fname);
if (!NT_STATUS_IS_OK(status)) {


-- 
Samba Shared Repository