[SCM] Samba Shared Repository - branch master updated

2012-05-29 Thread Andrew Bartlett
The branch, master has been updated
   via  27fb14b s3-loadparm: Swap synonyms of max/min protocol to server 
max/min protocol
   via  1d3e5ed s3-build: We do not have CHARSET modules any more
   via  dde4d6f lib/param: Put common FN_ macros into param_functions.c
   via  3dcea0f lib/param: Add a few more s3 parameters
   via  9f4b6fa s3-param: Use same function name for "max xmit" as lib/param
   via  2168156 s3-param: Use same variable names as lib/param
   via  56996e0 s3-param: Import parameters from lib/param to make this 
list common
   via  b47f9a0 s3-param: Rename lp_dns_proxy() -> lp_wins_dns_proxy() for 
clarity
   via  38b1a11 lib/param: Import s3 parameters into lib/param to allow the 
parameter lists merge
   via  89981c7 lib/param: Mark a few more parameters const (matching s3)
   via  f0d5300 param: mark realm parameter as const
   via  b225248 param: Sort global param functions macros to ease the s3/s4 
merge
   via  ec14445 lib/param: Add .flags to max/min protocol to match s3
   via  073a370 lib/param: Add .flags to wins parameters to match s3
   via  d3f061b lib/param: Harmonise 'password server' parameter between s3 
and s4
   via  91e4983 s3-build: Remove build of libtdb.so from the autoconf build
   via  ac63b55 s3-build: Remove build of libtalloc.so from the autoconf 
build
   via  53d4ffc s3-iconv: Remove unused script/gen-8bit-gap.sh
   via  c691ada build: Provide .pc file for libsmbsharemodes
   via  3ef6234 build: Provide .pc file for libnetapi
   via  8ddd2a8 build: Remove unused release scripts for tevent
   via  c8877d8 build: Remove unused release scripts for tdb
   via  ccb7642 build: Remove unused release scripts for talloc
  from  aa01908 libcli/dns: Rename UDP-based calls to reflect their use

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


- Log -
commit 27fb14bfbe9d49bacd80fc033132c254267aeb34
Author: Andrew Bartlett 
Date:   Mon May 28 15:00:12 2012 +1000

s3-loadparm: Swap synonyms of max/min protocol to server max/min protocol

This matches the lib/param code, as is a seperate parameter for the
client there.

Andrew Bartlett

Autobuild-User: Andrew Bartlett 
Autobuild-Date: Wed May 30 06:04:41 CEST 2012 on sn-devel-104

commit 1d3e5eda038deebe7e3d2d122c8d9963b548edfb
Author: Andrew Bartlett 
Date:   Wed May 30 08:23:38 2012 +1000

s3-build: We do not have CHARSET modules any more

commit dde4d6fce9e3daa6a2332b9cbc0165a18fca0ccd
Author: Andrew Bartlett 
Date:   Mon May 28 17:30:44 2012 +1000

lib/param: Put common FN_ macros into param_functions.c

This will in turn make it possible to put the actual parameter
definitions in common.

Andrew Bartlett

commit 3dcea0f6c7d8cd08a4affe3b54061cdcb2de1c50
Author: Andrew Bartlett 
Date:   Mon May 28 17:35:30 2012 +1000

lib/param: Add a few more s3 parameters

commit 9f4b6fa0ccdd5b0f499a26aa246e04d6652befc9
Author: Andrew Bartlett 
Date:   Mon May 28 17:28:04 2012 +1000

s3-param: Use same function name for "max xmit" as lib/param

Again, this helps with merging the FN_ list.

Andrew Bartlett

commit 21681569795040c62e5cbd38b39ae4df351cbe23
Author: Andrew Bartlett 
Date:   Mon May 28 17:19:07 2012 +1000

s3-param: Use same variable names as lib/param

Again, this helps with merging the FN_ list.

Andrew Bartlett

commit 56996e00bf26d6a64e2f60f2ed7cb8c2e5068934
Author: Andrew Bartlett 
Date:   Mon May 28 17:14:05 2012 +1000

s3-param: Import parameters from lib/param to make this list common

This will allow the list of FN_ macros to be made a common .c file.

Andrew Bartlett

commit b47f9a09cd5c374b213d9bad83c4903130f61a42
Author: Andrew Bartlett 
Date:   Mon May 28 16:51:47 2012 +1000

s3-param: Rename lp_dns_proxy() -> lp_wins_dns_proxy() for clarity

This avoids some confusion now we have a DNS server as well.

Andrew Bartlett

commit 38b1a1115491f9bdbcf3dde42798fa94bd39dd97
Author: Andrew Bartlett 
Date:   Mon May 28 16:51:15 2012 +1000

lib/param: Import s3 parameters into lib/param to allow the parameter lists 
merge

This will allow us to create just one list of the FN_ macros, included
into both parameter systems.

This will in turn allow the actual parameter definitions
to be merged in a similar way.

Andrew Bartlett

commit 89981c7b17f84cb8d6b8bf0271a2f2869f3a3a99
Author: Andrew Bartlett 
Date:   Mon May 28 16:34:14 2012 +1000

lib/param: Mark a few more parameters const (matching s3)

While this makes no difference in the lib/param code, this allows the C 
files
to be compared and merged.

Andrew Bartlett

commit f0d53009383ed9055f8daaf2f589e8c32cdeb3d8
Author: Andrew Bartlett 
Date:   Mon May 28 16:26:11 2012 +1000

param: mark realm param

[SCM] CTDB repository - branch master updated - ctdb-1.13-194-g1a6a011

2012-05-29 Thread Ronnie Sahlberg
The branch, master has been updated
   via  1a6a011c772f7d302d114d7c8a151fa7820ec85f (commit)
  from  ac89da4eea98fa686408c5671a6c44c0fd1d7a58 (commit)

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


- Log -
commit 1a6a011c772f7d302d114d7c8a151fa7820ec85f
Author: Ronnie Sahlberg 
Date:   Wed May 30 11:50:13 2012 +1000

Run the shutdown eventscript before we tear down the transport

This allows eventscripts to still be able to call and use ctdb during the 
shutdown phase.

---

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


Changeset truncated at 500 lines:

diff --git a/server/ctdb_control.c b/server/ctdb_control.c
index 5c1eedd..9708acd 100644
--- a/server/ctdb_control.c
+++ b/server/ctdb_control.c
@@ -323,10 +323,10 @@ static int32_t ctdb_control_dispatch(struct ctdb_context 
*ctdb,
ctdb_stop_keepalive(ctdb);
ctdb_stop_monitoring(ctdb);
ctdb_release_all_ips(ctdb);
+   ctdb_event_script(ctdb, CTDB_EVENT_SHUTDOWN);
if (ctdb->methods != NULL) {
ctdb->methods->shutdown(ctdb);
}
-   ctdb_event_script(ctdb, CTDB_EVENT_SHUTDOWN);
exit(0);
 
case CTDB_CONTROL_TAKEOVER_IPv4:


-- 
CTDB repository


[SCM] CTDB repository - branch 1.13 updated - ctdb-1.43-12-gba94ccc

2012-05-29 Thread Ronnie Sahlberg
The branch, 1.13 has been updated
   via  ba94a0a9ccad7c1de0939e74f0163ae41102 (commit)
  from  33a1661443d90ff4e72c219560a8c6a69c679bb5 (commit)

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


- Log -
commit ba94a0a9ccad7c1de0939e74f0163ae41102
Author: Ronnie Sahlberg 
Date:   Wed May 30 11:50:13 2012 +1000

Run the shutdown eventscript before we tear down the transport

This allows eventscripts to still be able to call and use ctdb during the 
shutdown phase.

---

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


Changeset truncated at 500 lines:

diff --git a/server/ctdb_control.c b/server/ctdb_control.c
index 2a16a23..3268877 100644
--- a/server/ctdb_control.c
+++ b/server/ctdb_control.c
@@ -323,10 +323,10 @@ static int32_t ctdb_control_dispatch(struct ctdb_context 
*ctdb,
ctdb_stop_keepalive(ctdb);
ctdb_stop_monitoring(ctdb);
ctdb_release_all_ips(ctdb);
+   ctdb_event_script(ctdb, CTDB_EVENT_SHUTDOWN);
if (ctdb->methods != NULL) {
ctdb->methods->shutdown(ctdb);
}
-   ctdb_event_script(ctdb, CTDB_EVENT_SHUTDOWN);
exit(0);
 
case CTDB_CONTROL_TAKEOVER_IPv4:


-- 
CTDB repository


[SCM] Samba Shared Repository - branch master updated

2012-05-29 Thread Kai Blin
The branch, master has been updated
   via  aa01908 libcli/dns: Rename UDP-based calls to reflect their use
   via  42e1b94 Add myself as libcli/dns maintainer
   via  6a1ad76 s4-dns: Use W_ERROR_HAVE_NO_MEMORY in create_response_rr
   via  9d128bb s4-dns: Use proper talloc hierarchy for NS records in 
create_response_rr
   via  ffc568e s4-dns: Use proper talloc hierarchy for  records in 
create_response_rr
   via  d5ce36b s4-dns: Remove sync dns_process
   via  d4998cc s4-dns: Make the TCP dns server async
   via  230f933b s4-dns: Make the UDP dns server async
   via  4dbbd30 s4-dns: Remove sync dns_server_process_query
   via  2b6b7c6 s4-dns: Make dns_process_send asyn
   via  28b5219 s4-dns: Remove unused sync ask_forwarder wrapper
   via  03b3521 s4-dns: Make dns_server_process_query async
   via  e2c1a8b s4-dns: Make ask_forwarder async
   via  54cde76 lib: add tevent_req_poll_werror
   via  6cdbce2 s4-dns: Create a proper talloc hierarchy in 
create_response_rr
   via  1171c56 s4-dns: Add debug output for unmappable WERROR to DNS 
errcode
   via  0b2743c s4-dns: Fix some typos
   via  5bc261f librpc: Fix some typos
   via  da74d54 s4-dns: Remove some break; statements
   via  577a065 s4-dns: Fix an unlikely potential memleak
   via  1bdaf4b s4-dns: Use talloc_asprintf_append_buffer in 
create_response_rr
   via  1bbdf22 s4-dns: Add some NULL checks to create_response_rr
  from  40e47d0 s4:dbchecker - handle the "none" case correctly

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


- Log -
commit aa0190825d4dcd9d6680638a06df5b4b7d89fd29
Author: Kai Blin 
Date:   Tue May 29 23:05:14 2012 +0200

libcli/dns: Rename UDP-based calls to reflect their use

Autobuild-User: Kai Blin 
Autobuild-Date: Wed May 30 02:35:27 CEST 2012 on sn-devel-104

commit 42e1b94f88dd47e4999af751b6d6c3278de3e422
Author: Kai Blin 
Date:   Fri May 25 07:54:39 2012 +0200

Add myself as libcli/dns maintainer

commit 6a1ad76c5ef7f77475192cb17a26dd0ecc26aade
Author: Kai Blin 
Date:   Wed May 30 00:30:29 2012 +0200

s4-dns: Use W_ERROR_HAVE_NO_MEMORY in create_response_rr

commit 9d128bbb628bb2240cc95695c114d8befa331a6e
Author: Kai Blin 
Date:   Wed May 30 00:23:33 2012 +0200

s4-dns: Use proper talloc hierarchy for NS records in create_response_rr

commit ffc568eb4202e50d7ac203d491a6716bdea74e9a
Author: Kai Blin 
Date:   Wed May 30 00:23:14 2012 +0200

s4-dns: Use proper talloc hierarchy for  records in create_response_rr

commit d5ce36b1487d679ef22198427d298ecad38b8af6
Author: Volker Lendecke 
Date:   Tue May 29 10:03:13 2012 +0200

s4-dns: Remove sync dns_process

Signed-off-by: Kai Blin 

commit d4998ccce73e1ca782b8bd40430be1a625a4c8fb
Author: Volker Lendecke 
Date:   Mon May 28 18:42:54 2012 +0200

s4-dns: Make the TCP dns server async

Signed-off-by: Kai Blin 

commit 230f933babe72536a1bbb930b6c9d71df8b2b903
Author: Volker Lendecke 
Date:   Mon May 28 18:42:54 2012 +0200

s4-dns: Make the UDP dns server async

Signed-off-by: Kai Blin 

commit 4dbbd304e65cc9687fa4eaf1a1f3422588720ac4
Author: Volker Lendecke 
Date:   Mon May 28 18:23:50 2012 +0200

s4-dns: Remove sync dns_server_process_query

Signed-off-by: Kai Blin 

commit 2b6b7c64e137145dc5c3786eb8acb85645c51ba2
Author: Volker Lendecke 
Date:   Thu May 24 17:02:57 2012 +0200

s4-dns: Make dns_process_send asyn

Signed-off-by: Kai Blin 

commit 28b5219ad9abcefbee7c466ae42901d0e0d207ca
Author: Volker Lendecke 
Date:   Thu May 24 16:46:29 2012 +0200

s4-dns: Remove unused sync ask_forwarder wrapper

Signed-off-by: Kai Blin 

commit 03b35211ab7ca659edf1f23fe84b49f0b3ee6ab5
Author: Volker Lendecke 
Date:   Thu May 24 14:53:47 2012 +0200

s4-dns: Make dns_server_process_query async

Signed-off-by: Kai Blin 

commit e2c1a8b87ae9fc563711e9fe5d02b915eec2cd3b
Author: Volker Lendecke 
Date:   Thu May 24 13:49:41 2012 +0200

s4-dns: Make ask_forwarder async

Signed-off-by: Kai Blin 

commit 54cde76e376b7e6a781ff2841234d7f37eb6ea93
Author: Volker Lendecke 
Date:   Thu May 24 13:49:26 2012 +0200

lib: add tevent_req_poll_werror

Signed-off-by: Kai Blin 

commit 6cdbce266b6ecccf181429949104df700d58351c
Author: Volker Lendecke 
Date:   Tue May 29 15:20:21 2012 +0200

s4-dns: Create a proper talloc hierarchy in create_response_rr

Pair-Programmed-With: Michael Adam 

Signed-off-by: Kai Blin 

commit 1171c562f6ba074413b730086c97787661ec9634
Author: Volker Lendecke 
Date:   Tue May 29 09:45:44 2012 +0200

s4-dns: Add debug output for unmappable WERROR to DNS errcode

Signed-off-by: Kai Blin 

commit 0b2743c71e509d40a587e278a4227950205bf50c
Author: Volker Lendecke 
Date:   Tue May 29 08:53:44 2012 +0200

s4-dns: Fix some typos

Signed-off-by: Kai

[SCM] CTDB repository - branch master updated - ctdb-1.13-193-gac89da4

2012-05-29 Thread Ronnie Sahlberg
The branch, master has been updated
   via  ac89da4eea98fa686408c5671a6c44c0fd1d7a58 (commit)
   via  0be452958db95c8253c362a1c08a1966e53a1f99 (commit)
   via  bc55e09fdac9f743d6428bfe0be77840ad0fd1ba (commit)
   via  6e5cbe8fff71985e5a2fc16b7e9f2b868011ff5d (commit)
  from  fd3b73d7e634f16cbb99d7d5a548e12f00d1aadb (commit)

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


- Log -
commit ac89da4eea98fa686408c5671a6c44c0fd1d7a58
Author: Amitay Isaacs 
Date:   Fri May 25 15:57:14 2012 +1000

tests: Increment RSN always in ctdb_update_record_persistent test

If the record does not exist in persistent DB, RSN for that record is
considered 0. To write a record, RSN for that record should be set to 1,
otherwise the RSN check would fail.

Signed-off-by: Amitay Isaacs 

commit 0be452958db95c8253c362a1c08a1966e53a1f99
Author: Amitay Isaacs 
Date:   Fri May 25 11:40:38 2012 +1000

tests: Fix ctdb_fetch test (parse extra lines of output)

Signed-off-by: Amitay Isaacs 

commit bc55e09fdac9f743d6428bfe0be77840ad0fd1ba
Author: Amitay Isaacs 
Date:   Thu May 24 16:46:07 2012 +1000

tests: Fix flakey behavior of ctdb_fetch test

There were two issues with this test:

1. Since the messages are sent from one node to the next, if a node
   does not register for messages before CTDB on that nodes receives
   the message, it will never be seen by ctdb_fetch and it would
   block on receive and would not send any messages to next node.
   The crude solution is to sleep just before the messages are sent,
   so that ctdb_fetch on all nodes have registered for the messages.

2. If ctdb_fetch stops sending messages after timelimit expiry, the
   next node will keep waiting to receive messages in event_loop_once().
   The default timeout is 30 seconds for event_loop_once(). Adding a
   timed event will always set the timeout value to the time remaining
   for the timed event to expire.

Signed-off-by: Amitay Isaacs 

commit 6e5cbe8fff71985e5a2fc16b7e9f2b868011ff5d
Author: Amitay Isaacs 
Date:   Thu May 17 16:08:37 2012 +1000

server: Replace BOOL datatype with bool, True/False with true/false

Signed-off-by: Amitay Isaacs 

---

Summary of changes:
 client/ctdb_client.c  |8 
 common/rb_tree.c  |6 +++---
 include/includes.h|7 +--
 lib/util/util.c   |2 +-
 server/ctdb_call.c|8 
 server/ctdb_control.c |2 +-
 server/ctdb_daemon.c  |4 ++--
 server/ctdb_freeze.c  |2 +-
 server/ctdb_takeover.c|2 +-
 server/ctdbd.c|2 +-
 tests/simple/52_ctdb_fetch.sh |2 +-
 tests/src/ctdb_fetch.c|   17 +
 tests/src/ctdb_update_record_persistent.c |4 ++--
 13 files changed, 39 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/client/ctdb_client.c b/client/ctdb_client.c
index 69b0a04..9162a47 100644
--- a/client/ctdb_client.c
+++ b/client/ctdb_client.c
@@ -2023,7 +2023,7 @@ static void traverse_handler(struct ctdb_context *ctdb, 
uint64_t srvid, TDB_DATA
if (data.dsize < sizeof(uint32_t) ||
d->length != data.dsize) {
DEBUG(DEBUG_ERR,("Bad data size %u in traverse_handler\n", 
(unsigned)data.dsize));
-   state->done = True;
+   state->done = true;
return;
}
 
@@ -2034,7 +2034,7 @@ static void traverse_handler(struct ctdb_context *ctdb, 
uint64_t srvid, TDB_DATA
 
if (key.dsize == 0 && data.dsize == 0) {
/* end of traverse */
-   state->done = True;
+   state->done = true;
return;
}
 
@@ -2046,7 +2046,7 @@ static void traverse_handler(struct ctdb_context *ctdb, 
uint64_t srvid, TDB_DATA
}
 
if (state->fn(ctdb, key, data, state->private_data) != 0) {
-   state->done = True;
+   state->done = true;
}
 
state->count++;
@@ -2071,7 +2071,7 @@ static int ctdb_traverse_ext(struct ctdb_db_context 
*ctdb_db,
uint64_t srvid = (getpid() | 0xFLL<<60);
struct traverse_state state;
 
-   state.done = False;
+   state.done = false;
state.count = 0;
state.private_data = private_data;
state.fn = fn;
diff --git a/common/rb_tree.c b/common/rb_tree.c
index bff7c5a..6b131bc 100644
--- a/common/rb_tree.c
+++ b/common/rb_tree.c
@@ -447,7 +447,7 @@ trbt_delete_case1(trbt_node_t *node)
 }
 
 static void
-delete_node(trbt_node_t *node, BOOL from_destructor)
+delete_node(trbt_node_t *node,

[SCM] Samba Shared Repository - branch master updated

2012-05-29 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  40e47d0 s4:dbchecker - handle the "none" case correctly
  from  cee146f s3:smb2_ioctl: verify credit charge

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


- Log -
commit 40e47d08af8d287d1e8b66ffb96e3ed051516403
Author: Matthias Dieter Wallnöfer 
Date:   Thu May 24 20:43:17 2012 +0200

s4:dbchecker - handle the "none" case correctly

This means that *no* fixing will be done, also the first possible one
will be omitted as well.

Reviewed-by: abartlet

Autobuild-User: Matthias Dieter Wallnöfer 
Autobuild-Date: Tue May 29 21:36:25 CEST 2012 on sn-devel-104

---

Summary of changes:
 source4/scripting/python/samba/dbchecker.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/dbchecker.py 
b/source4/scripting/python/samba/dbchecker.py
index 587d63c..95be1ce 100644
--- a/source4/scripting/python/samba/dbchecker.py
+++ b/source4/scripting/python/samba/dbchecker.py
@@ -110,7 +110,7 @@ class dbcheck(object):
 return True
 if c == 'NONE':
 setattr(self, all_attr, 'NONE')
-return True
+return False
 return c
 
 def do_modify(self, m, controls, msg, validate=True):


-- 
Samba Shared Repository


autobuild: intermittent test failure detected

2012-05-29 Thread autobuild
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2012-05-29-2016/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-05-29-2016/samba3.stderr
   http://git.samba.org/autobuild.flakey/2012-05-29-2016/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-05-29-2016/samba4.stderr
   http://git.samba.org/autobuild.flakey/2012-05-29-2016/samba4.stdout
  
The top commit at the time of the failure was:

commit cee146ff7c2250d3c723f19357fd1c8541191d08
Author: Stefan Metzmacher 
Date:   Tue May 29 14:08:43 2012 +0200

s3:smb2_ioctl: verify credit charge

Based on a patch from Christian Ambach .

metze

Autobuild-User: Stefan Metzmacher 
Autobuild-Date: Tue May 29 18:55:29 CEST 2012 on sn-devel-104


[SCM] Samba Shared Repository - branch master updated

2012-05-29 Thread Stefan Metzmacher
The branch, master has been updated
   via  cee146f s3:smb2_ioctl: verify credit charge
   via  8b4e677 s3:smb2_ioctl: add more validation checks
   via  4ac57a3 s3:smb2_ioctl: add some more validation checks
  from  c17f981 s4-torture: verify #8373 and add ndr nbt tests for 
LOGON_PRIMARY_QUERY nbt_netlogon_requests.

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


- Log -
commit cee146ff7c2250d3c723f19357fd1c8541191d08
Author: Stefan Metzmacher 
Date:   Tue May 29 14:08:43 2012 +0200

s3:smb2_ioctl: verify credit charge

Based on a patch from Christian Ambach .

metze

Autobuild-User: Stefan Metzmacher 
Autobuild-Date: Tue May 29 18:55:29 CEST 2012 on sn-devel-104

commit 8b4e6777206d7df4174f9d61830d1c337a46089f
Author: Stefan Metzmacher 
Date:   Tue May 29 13:25:31 2012 +0200

s3:smb2_ioctl: add more validation checks

metze

commit 4ac57a3c965603684c55dbc6b02d882331d85ede
Author: Stefan Metzmacher 
Date:   Tue May 29 12:06:22 2012 +0200

s3:smb2_ioctl: add some more validation checks

Based on a patch from Christian Ambach .

metze

---

Summary of changes:
 source3/smbd/smb2_ioctl.c |  141 
 1 files changed, 128 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/smb2_ioctl.c b/source3/smbd/smb2_ioctl.c
index cd303ed..0d17407 100644
--- a/source3/smbd/smb2_ioctl.c
+++ b/source3/smbd/smb2_ioctl.c
@@ -46,14 +46,27 @@ NTSTATUS smbd_smb2_request_process_ioctl(struct 
smbd_smb2_request *req)
NTSTATUS status;
const uint8_t *inbody;
int i = req->current_idx;
+   uint32_t min_buffer_offset;
+   uint32_t max_buffer_offset;
+   uint32_t min_output_offset;
+   uint32_t allowed_length_in;
+   uint32_t allowed_length_out;
uint32_t in_ctl_code;
uint64_t in_file_id_persistent;
uint64_t in_file_id_volatile;
uint32_t in_input_offset;
uint32_t in_input_length;
-   DATA_BLOB in_input_buffer;
+   DATA_BLOB in_input_buffer = data_blob_null;
+   uint32_t in_max_input_length;
+   uint32_t in_output_offset;
+   uint32_t in_output_length;
+   DATA_BLOB in_output_buffer = data_blob_null;
uint32_t in_max_output_length;
uint32_t in_flags;
+   uint32_t data_length_in;
+   uint32_t data_length_out;
+   uint32_t data_length_tmp;
+   uint32_t data_length_max;
struct tevent_req *subreq;
 
status = smbd_smb2_request_verify_sizes(req, 0x39);
@@ -67,9 +80,16 @@ NTSTATUS smbd_smb2_request_process_ioctl(struct 
smbd_smb2_request *req)
in_file_id_volatile = BVAL(inbody, 0x10);
in_input_offset = IVAL(inbody, 0x18);
in_input_length = IVAL(inbody, 0x1C);
+   in_max_input_length = IVAL(inbody, 0x20);
+   in_output_offset= IVAL(inbody, 0x24);
+   in_output_length= IVAL(inbody, 0x28);
in_max_output_length= IVAL(inbody, 0x2C);
in_flags= IVAL(inbody, 0x30);
 
+   min_buffer_offset = SMB2_HDR_BODY + req->in.vector[i+1].iov_len;
+   max_buffer_offset = min_buffer_offset + req->in.vector[i+2].iov_len;
+   min_output_offset = min_buffer_offset;
+
/*
 * InputOffset (4 bytes): The offset, in bytes, from the beginning of
 * the SMB2 header to the input data buffer. If no input data is
@@ -78,25 +98,120 @@ NTSTATUS smbd_smb2_request_process_ioctl(struct 
smbd_smb2_request *req)
 * <49> If no input data is required for the FSCTL/IOCTL command being
 * issued, Windows-based clients set this field to any value.
 */
-   if ((in_input_length > 0)
-&& (in_input_offset != (SMB2_HDR_BODY + req->in.vector[i+1].iov_len))) 
{
+   allowed_length_in = 0;
+   if ((in_input_offset > 0) && (in_input_length > 0)) {
+   uint32_t tmp_ofs;
+
+   if (in_input_offset < min_buffer_offset) {
+   return smbd_smb2_request_error(req,
+   NT_STATUS_INVALID_PARAMETER);
+   }
+   if (in_input_offset > max_buffer_offset) {
+   return smbd_smb2_request_error(req,
+   NT_STATUS_INVALID_PARAMETER);
+   }
+   allowed_length_in = max_buffer_offset - in_input_offset;
+
+   tmp_ofs = in_input_offset - min_buffer_offset;
+   in_input_buffer.data = (uint8_t *)req->in.vector[i+2].iov_base;
+   in_input_buffer.data += tmp_ofs;
+   in_input_buffer.length = in_input_length;
+   min_output_offset += tmp_ofs;
+   min_output_offset += in_input_length;
+   }
+
+   if (in_input_length > allowed_lengt

[SCM] Samba Shared Repository - branch master updated

2012-05-29 Thread Günther Deschner
The branch, master has been updated
   via  c17f981 s4-torture: verify #8373 and add ndr nbt tests for 
LOGON_PRIMARY_QUERY nbt_netlogon_requests.
  from  9102ccf s4:torture report connection error via torture_fail

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


- Log -
commit c17f9817453a37e94e77a541d6ba675d1d29431e
Author: Günther Deschner 
Date:   Fri May 25 14:50:11 2012 +0200

s4-torture: verify #8373 and add ndr nbt tests for LOGON_PRIMARY_QUERY 
nbt_netlogon_requests.

Guenther

Autobuild-User: Günther Deschner 
Autobuild-Date: Tue May 29 15:49:10 CEST 2012 on sn-devel-104

---

Summary of changes:
 selftest/skip |1 +
 source4/torture/ndr/nbt.c |   37 -
 2 files changed, 37 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/skip b/selftest/skip
index f2f6b69..bd11312 100644
--- a/selftest/skip
+++ b/selftest/skip
@@ -102,3 +102,4 @@ bench # don't run benchmarks in our selftest
 ^samba4.drs.delete_object.python # flakey test
 ^samba4.rpc.unixinfo # This contains a server-side getpwuid call which hangs 
the server when nss_winbindd is in use
 ^samba.tests.dcerpc.unix  # This contains a server-side getpwuid call which 
hangs the server when nss_winbindd is in use
+^samba.*.local.ndr.nbt_netlogon_packet # until bug #8373 is fixed
diff --git a/source4/torture/ndr/nbt.c b/source4/torture/ndr/nbt.c
index 21cd571..a753c2f 100644
--- a/source4/torture/ndr/nbt.c
+++ b/source4/torture/ndr/nbt.c
@@ -2,7 +2,7 @@
Unix SMB/CIFS implementation.
test suite for nbt ndr operations
 
-   Copyright (C) Guenther Deschner 2010,2011
+   Copyright (C) Guenther Deschner 2010-2012
 
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -136,12 +136,42 @@ static bool nbt_netlogon_packet_check(struct 
torture_context *tctx,
return true;
 }
 
+static const uint8_t nbt_netlogon_packet_logon_primary_query_data[] = {
+   0x07, 0x00, 0x58, 0x50, 0x44, 0x41, 0x54, 0x45, 0x56, 0x2d, 0x50, 0x52,
+   0x4f, 0x00, 0x5c, 0x4d, 0x41, 0x49, 0x4c, 0x53, 0x4c, 0x4f, 0x54, 0x5c,
+   0x4e, 0x45, 0x54, 0x5c, 0x47, 0x45, 0x54, 0x44, 0x43, 0x38, 0x31, 0x37,
+   0x00, 0x00, 0x58, 0x00, 0x50, 0x00, 0x44, 0x00, 0x41, 0x00, 0x54, 0x00,
+   0x45, 0x00, 0x56, 0x00, 0x2d, 0x00, 0x50, 0x00, 0x52, 0x00, 0x4f, 0x00,
+   0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff
+};
+
+static bool nbt_netlogon_packet_logon_primary_query_check(struct 
torture_context *tctx,
+ struct 
nbt_netlogon_packet *r)
+{
+   torture_assert_int_equal(tctx, r->command, LOGON_PRIMARY_QUERY, 
"command");
+   torture_assert_str_equal(tctx, r->req.pdc.computer_name, "XPDATEV-PRO", 
"computer_name");
+   torture_assert_str_equal(tctx, r->req.pdc.mailslot_name, 
"\\MAILSLOT\\NET\\GETDC817", "mailslot_name");
+   torture_assert_int_equal(tctx, r->req.pdc._pad.length, 1, 
"_pad.length");
+   torture_assert_int_equal(tctx, r->req.pdc._pad.data[0], 0, "_pad.data");
+   torture_assert_str_equal(tctx, r->req.pdc.unicode_name, "XPDATEV-PRO", 
"unicode_name");
+   torture_assert_int_equal(tctx, r->req.pdc.nt_version, 0x000b, 
"nt_version");
+   torture_assert_int_equal(tctx, r->req.pdc.lmnt_token, 0x, 
"lmnt_token");
+   torture_assert_int_equal(tctx, r->req.pdc.lm20_token, 0x, 
"lm20_token");
+
+   return true;
+}
+
 struct torture_suite *ndr_nbt_suite(TALLOC_CTX *ctx)
 {
struct torture_suite *suite = torture_suite_create(ctx, "nbt");
 
torture_suite_add_ndr_pull_test(suite, nbt_netlogon_packet, 
netlogon_logon_request_req_data, netlogon_logon_request_req_check);
 
+   torture_suite_add_ndr_pull_test(suite,
+   nbt_netlogon_packet,
+   
nbt_netlogon_packet_logon_primary_query_data,
+   
nbt_netlogon_packet_logon_primary_query_check);
+
torture_suite_add_ndr_pull_test(suite, nbt_netlogon_response2, 
netlogon_logon_request_resp_data, netlogon_logon_request_resp_check);
 
torture_suite_add_ndr_pull_test(suite,
@@ -159,5 +189,10 @@ struct torture_suite *ndr_nbt_suite(TALLOC_CTX *ctx)

data_blob_const(nbt_netlogon_packet_data, sizeof(nbt_netlogon_packet_data)),
nbt_netlogon_packet_check);
 
+   torture_suite_add_ndr_pullpush_test(suite,
+   nbt_netlogon_packet,
+   
data_blob_const(nbt_netlogon_packet_logon_primary_query_data, 
sizeof(nbt_netlogon_packet_logon_primary_query_data)),

[SCM] Samba Shared Repository - branch master updated

2012-05-29 Thread Stefan Metzmacher
The branch, master has been updated
   via  9102ccf s4:torture report connection error via torture_fail
   via  aa7cd05 s3:smbd/smb2_find add a debug message
   via  1bd3c0a s3:smbd/smb2_getinfo add a debug message
   via  f94d3d1 s3:smbd/smb2_setinfo add a debug message
   via  ac6417d s3:smbd/smb2_read improve debug message
   via  f61c241 libcli/smb: add some more FSCTL_* defines
   via  244cf05 s3:smb2cli_ioctl: fix requests without output_buffer.length 
> 0 against windows
  from  3085225 s3: fix compile of krb5 locator on Solaris

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


- Log -
commit 9102ccf648e4f1fb4c20fc3aece45364e94294e0
Author: Christian Ambach 
Date:   Thu May 10 14:51:13 2012 +0200

s4:torture report connection error via torture_fail

to make smbtorture report the error instead of complaining about missing 
torture_ call

Signed-off-by: Stefan Metzmacher 

Autobuild-User: Stefan Metzmacher 
Autobuild-Date: Tue May 29 13:57:42 CEST 2012 on sn-devel-104

commit aa7cd05e5b2efc45985a92c9f329099d40516876
Author: Christian Ambach 
Date:   Fri May 11 19:03:50 2012 +0200

s3:smbd/smb2_find add a debug message

like the ones in the other calls that check for max sizes

Signed-off-by: Stefan Metzmacher 

commit 1bd3c0aefbaa3ee78b9a4bcae97d2a4b5d09d76b
Author: Christian Ambach 
Date:   Fri May 11 19:03:32 2012 +0200

s3:smbd/smb2_getinfo add a debug message

like the ones in the other calls that check for max sizes

Signed-off-by: Stefan Metzmacher 

commit f94d3d17e8a4ee7df0f1a8a95a23b4d6de40c089
Author: Christian Ambach 
Date:   Fri May 11 19:02:21 2012 +0200

s3:smbd/smb2_setinfo add a debug message

similar to the ones present in other paths

Signed-off-by: Stefan Metzmacher 

commit ac6417dfc6f0571dfb357d131222daf054abe7e6
Author: Christian Ambach 
Date:   Fri May 11 19:01:43 2012 +0200

s3:smbd/smb2_read improve debug message

make the message similar to the ones in other paths

Signed-off-by: Stefan Metzmacher 

commit f61c24166e2b98a1ac1ee6ad76b82050b39faccf
Author: Stefan Metzmacher 
Date:   Tue May 29 10:08:51 2012 +0200

libcli/smb: add some more FSCTL_* defines

metze

commit 244cf059f09fcbf7d5a85c97deed8f94756e8a4a
Author: Stefan Metzmacher 
Date:   Tue May 29 07:27:14 2012 +0200

s3:smb2cli_ioctl: fix requests without output_buffer.length > 0 against 
windows

This fixes DCERPC over SMB2 against windows servers.

metze

---

Summary of changes:
 libcli/smb/smb2cli_ioctl.c  |2 +-
 libcli/smb/smb_constants.h  |8 
 source3/smbd/smb2_find.c|4 
 source3/smbd/smb2_getinfo.c |8 
 source3/smbd/smb2_read.c|3 ++-
 source3/smbd/smb2_setinfo.c |4 
 source4/torture/smb2/smb2.c |9 -
 7 files changed, 35 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/smb/smb2cli_ioctl.c b/libcli/smb/smb2cli_ioctl.c
index 2881c74..9836469 100644
--- a/libcli/smb/smb2cli_ioctl.c
+++ b/libcli/smb/smb2cli_ioctl.c
@@ -77,7 +77,7 @@ struct tevent_req *smb2cli_ioctl_send(TALLOC_CTX *mem_ctx,
 
if (in_output_buffer) {
output_buffer_offset = SMB2_HDR_BODY+0x38;
-   if (input_buffer_length > 0) {
+   if (input_buffer_length > 0 && output_buffer_length > 0) {
uint32_t tmp;
output_buffer_offset += input_buffer_length;
tmp = output_buffer_offset;
diff --git a/libcli/smb/smb_constants.h b/libcli/smb/smb_constants.h
index 4b7d1f2..aaf87c1 100644
--- a/libcli/smb/smb_constants.h
+++ b/libcli/smb/smb_constants.h
@@ -356,6 +356,7 @@ enum csc_policy {
 
 #define FSCTL_DFS  0x0006
 #define FSCTL_DFS_GET_REFERRALS(FSCTL_DFS | FSCTL_ACCESS_ANY | 
0x0194 | FSCTL_METHOD_BUFFERED)
+#define FSCTL_DFS_GET_REFERRALS_EX (FSCTL_DFS | FSCTL_ACCESS_ANY | 0x01B0 
| FSCTL_METHOD_BUFFERED)
 
 #define FSCTL_FILESYSTEM   0x0009
 #define FSCTL_REQUEST_OPLOCK_LEVEL_1(FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 
0x | FSCTL_METHOD_BUFFERED)
@@ -377,6 +378,9 @@ enum csc_policy {
 #define FSCTL_CREATE_OR_GET_OBJECT_ID  (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 
0x00C0 | FSCTL_METHOD_BUFFERED)
 #define FSCTL_SET_SPARSE   (FSCTL_FILESYSTEM | FSCTL_ACCESS_ANY | 
0x00C4 | FSCTL_METHOD_BUFFERED)
 #define FSCTL_QUERY_ALLOCATED_RANGES   (FSCTL_FILESYSTEM | FSCTL_ACCESS_READ | 
0x00CC | FSCTL_METHOD_NEITHER)
+#define FSCTL_FILE_LEVEL_TRIM  (FSCTL_FILESYSTEM | FSCTL_ACCESS_WRITE 
| 0x0208 | FSCTL_METHOD_BUFFERED)
+#define FSCTL_OFFLOAD_READ (FSCTL_FILESYSTEM | FSCTL_ACCESS_READ | 
0x0264 | FSCTL_METHOD_BUFFERED)
+#define FSCTL_OFFLOAD_WRIT

[SCM] Samba Shared Repository - branch master updated

2012-05-29 Thread Björn Jacke
The branch, master has been updated
   via  3085225 s3: fix compile of krb5 locator on Solaris
  from  27503ce freebsd9: support both WAF MIT krb5 build and autoconf 
build against MIT krb5

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


- Log -
commit 3085225e72c75abf84d7740334459cd971ee4c56
Author: Björn Jacke 
Date:   Tue May 29 08:01:40 2012 +0200

s3: fix compile of krb5 locator on Solaris

the krb5 locator plugin on Solaris needs LIBREPLACE_LIBS (bug #8732)

Autobuild-User: Björn Jacke 
Autobuild-Date: Tue May 29 09:58:42 CEST 2012 on sn-devel-104

---

Summary of changes:
 source3/Makefile.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 88872ad..132cd6f 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -2754,7 +2754,7 @@ bin/vlp: $(BINARY_PREREQS) $(VLP_OBJ) $(LIBTDB) 
$(LIBTALLOC)
 bin/winbind_krb5_locator.@SHLIBEXT@: $(BINARY_PREREQS) 
$(WINBIND_KRB5_LOCATOR_OBJ) $(LIBWBCLIENT)
@echo "Linking $@"
@$(SHLD) $(LDSHFLAGS) -o $@ $(WINBIND_KRB5_LOCATOR_OBJ) 
$(LIBWBCLIENT_LIBS) $(KRB5LIBS) \
-   @SONAMEFLAG@`basename $@`
+   $(LIBREPLACE_LIBS) @SONAMEFLAG@`basename $@`
 
 bin/pam_winbind.@SHLIBEXT@: $(BINARY_PREREQS) $(PAM_WINBIND_OBJ) $(LIBTALLOC) 
$(LIBWBCLIENT)
@echo "Linking shared library $@"


-- 
Samba Shared Repository