[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-267-gc96534c

2009-01-30 Thread Stefan Metzmacher
The branch, master has been updated
   via  c96534cd6e3eb3bef88ee538838519437870a085 (commit)
   via  c0fdc71ecdf437c978ade36603f0280afb1addb5 (commit)
   via  50db8ede23dd9bf28a4f329edebb9105be215d3e (commit)
  from  2fe137e7bce425adf9cc64664eb493dfa8a7e885 (commit)

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


- Log -
commit c96534cd6e3eb3bef88ee538838519437870a085
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jan 30 14:00:32 2009 +0100

s3:selftest: run the same tests as 'make test'

Only the tests with samba4's smbtorture are missing.

metze

commit c0fdc71ecdf437c978ade36603f0280afb1addb5
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jan 30 13:57:24 2009 +0100

s3:tests: add a guard arround . $incdir/test_functions.sh

So that caller can overwrite the functions.

metze

commit 50db8ede23dd9bf28a4f329edebb9105be215d3e
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jan 30 14:36:48 2009 +0100

s3:smbconftort: don't use reserved words ('test:', 'failure:', 'success:')

Temporary results printfs should not contain reserved subunit words.

metze

---

Summary of changes:
 source3/lib/smbconf/testsuite.c|   60 -
 source3/script/tests/test_functions.sh |1 +
 source3/script/tests/test_local_s3.sh  |2 +
 source3/script/tests/test_net_misc.sh  |2 +
 source3/script/tests/test_net_registry.sh  |2 +
 source3/script/tests/test_net_s3.sh|2 +
 source3/script/tests/test_ntlm_auth_s3.sh  |2 +
 source3/script/tests/test_posix_s3.sh  |2 +
 source3/script/tests/test_smbclient_s3.sh  |2 +
 source3/script/tests/test_smbtorture_s3.sh |2 +
 source3/script/tests/test_testparm_s3.sh   |2 +
 source3/script/tests/test_wbinfo_s3.sh |2 +
 source3/selftest/tests.sh  |  102 
 13 files changed, 123 insertions(+), 60 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/smbconf/testsuite.c b/source3/lib/smbconf/testsuite.c
index 3d3c2d0..b31dec0 100644
--- a/source3/lib/smbconf/testsuite.c
+++ b/source3/lib/smbconf/testsuite.c
@@ -41,11 +41,11 @@ static bool test_get_includes(struct smbconf_ctx *ctx)
char **includes = NULL;
TALLOC_CTX *mem_ctx = talloc_stackframe();
 
-   printf(test: get_includes\n);
+   printf(TEST: get_includes\n);
werr = smbconf_get_global_includes(ctx, mem_ctx,
   num_includes, includes);
if (!W_ERROR_IS_OK(werr)) {
-   printf(failure: get_includes - %s\n, win_errstr(werr));
+   printf(FAIL: get_includes - %s\n, win_errstr(werr));
goto done;
}
 
@@ -53,7 +53,7 @@ static bool test_get_includes(struct smbconf_ctx *ctx)
   (num_includes  0) ? : : .);
print_strings(, num_includes, (const char **)includes);
 
-   printf(success: get_includes\n);
+   printf(OK: get_includes\n);
ret = true;
 
 done:
@@ -75,11 +75,11 @@ static bool test_set_get_includes(struct smbconf_ctx *ctx)
uint32_t get_num_includes = 0;
TALLOC_CTX *mem_ctx = talloc_stackframe();
 
-   printf(test: set_get_includes\n);
+   printf(TEST: set_get_includes\n);
 
werr = smbconf_set_global_includes(ctx, set_num_includes, set_includes);
if (!W_ERROR_IS_OK(werr)) {
-   printf(failure: get_set_includes (setting includes) - %s\n,
+   printf(FAIL: get_set_includes (setting includes) - %s\n,
   win_errstr(werr));
goto done;
}
@@ -87,13 +87,13 @@ static bool test_set_get_includes(struct smbconf_ctx *ctx)
werr = smbconf_get_global_includes(ctx, mem_ctx, get_num_includes,
   get_includes);
if (!W_ERROR_IS_OK(werr)) {
-   printf(failure: get_set_includes (getting includes) - %s\n,
+   printf(FAIL: get_set_includes (getting includes) - %s\n,
   win_errstr(werr));
goto done;
}
 
if (get_num_includes != set_num_includes) {
-   printf(failure: get_set_includes - set %d includes, got %d\n,
+   printf(FAIL: get_set_includes - set %d includes, got %d\n,
   set_num_includes, get_num_includes);
goto done;
}
@@ -105,12 +105,12 @@ static bool test_set_get_includes(struct smbconf_ctx *ctx)
printf(got: \n);
print_strings(* , get_num_includes,
  (const char **)get_includes);
-   printf(failure: get_set_includes - data mismatch:\n);
+   printf(FAIL: get_set_includes - data mismatch:\n

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-268-g40b67c3

2009-01-30 Thread Stefan Metzmacher
The branch, master has been updated
   via  40b67c3426042ea46d2497e459807ef9551e62f1 (commit)
  from  c96534cd6e3eb3bef88ee538838519437870a085 (commit)

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


- Log -
commit 40b67c3426042ea46d2497e459807ef9551e62f1
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jan 30 20:38:27 2009 +0100

selftest: pass down the path to python for provisioning samba4

metze

---

Summary of changes:
 selftest/target/Samba4.pm  |3 +++
 source4/selftest/config.mk |3 ++-
 2 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 208824d..5ca1a6a 100644
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -717,6 +717,9 @@ nogroup:x:65534:nobody
if (defined($ENV{VALGRIND_PROVISION})) {
push (@provision_options, valgrind);
}
+   if (defined($ENV{PYTHON})) {
+   push (@provision_options, $ENV{PYTHON});
+   }
push (@provision_options, $self-{setupdir}/provision);
push (@provision_options, split(' ', $configuration));
push (@provision_options, --host-name=$netbiosname);
diff --git a/source4/selftest/config.mk b/source4/selftest/config.mk
index c5f7c5a..324532c 100644
--- a/source4/selftest/config.mk
+++ b/source4/selftest/config.mk
@@ -1,6 +1,7 @@
 TEST_FORMAT = plain
 
-SELFTEST = $(LD_LIBPATH_OVERRIDE) $(PERL) $(selftestdir)/selftest.pl 
--prefix=${selftest_prefix} \
+SELFTEST = $(LD_LIBPATH_OVERRIDE) PYTHON=$(PYTHON) \
+$(PERL) $(selftestdir)/selftest.pl --prefix=${selftest_prefix} \
 --builddir=$(builddir) --srcdir=$(srcdir) \
 --expected-failures=$(srcdir)/selftest/knownfail \
--format=$(TEST_FORMAT) \


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-272-g4519eae

2009-01-30 Thread Stefan Metzmacher
The branch, master has been updated
   via  4519eae158e7821dcd2f818eea830cfcdd4a0105 (commit)
   via  03bd9b2683ab7abf967118b5970f6a59c101782a (commit)
  from  f6d08849e11775eb2530f04ecb055269ea445539 (commit)

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


- Log -
commit 4519eae158e7821dcd2f818eea830cfcdd4a0105
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jan 30 22:19:50 2009 +0100

s4:lib/socket: don't use gethostbyname2()

metze

commit 03bd9b2683ab7abf967118b5970f6a59c101782a
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jan 30 22:19:10 2009 +0100

s4:heimdal_build: heimdal requires u_int32_t and u_char

metze

---

Summary of changes:
 source4/heimdal_build/internal.m4 |3 +++
 source4/lib/socket/config.m4  |1 -
 source4/lib/socket/socket_ip.c|   33 +
 3 files changed, 28 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/heimdal_build/internal.m4 
b/source4/heimdal_build/internal.m4
index 06e798c..b2f64a6 100644
--- a/source4/heimdal_build/internal.m4
+++ b/source4/heimdal_build/internal.m4
@@ -33,6 +33,9 @@ esac
 
 ])
 
+AC_CHECK_TYPE(u_char, uint8_t)
+AC_CHECK_TYPE(u_int32_t, uint32_t)
+
 dnl Not all systems have err.h, so we provide a replacement. Heimdal
 dnl unconditionally #includes err.h, so we need to create an err.h,
 dnl but we can't just have a static one because we don't want to use
diff --git a/source4/lib/socket/config.m4 b/source4/lib/socket/config.m4
index 9c0072d..fa987a1 100644
--- a/source4/lib/socket/config.m4
+++ b/source4/lib/socket/config.m4
@@ -1,6 +1,5 @@
 AC_CHECK_FUNCS(writev)
 AC_CHECK_FUNCS(readv)
-AC_CHECK_FUNCS(gethostbyname2)
 
 
 # check for unix domain sockets
diff --git a/source4/lib/socket/socket_ip.c b/source4/lib/socket/socket_ip.c
index bca0aab..cdb75fe 100644
--- a/source4/lib/socket/socket_ip.c
+++ b/source4/lib/socket/socket_ip.c
@@ -549,19 +549,36 @@ _PUBLIC_ const struct socket_ops *socket_ipv4_ops(enum 
socket_type type)
 
 static struct in6_addr interpret_addr6(const char *name)
 {
-   struct hostent *he;
-   
-   if (name == NULL) return in6addr_any;
+   char addr[INET6_ADDRSTRLEN];
+   struct in6_addr dest6;
+   const char *sp = name;
+   char *p = strchr_m(sp, '%');
+   int ret;
+
+   if (sp == NULL) return in6addr_any;
 
-   if (strcasecmp(name, localhost) == 0) {
-   name = ::1;
+   if (strcasecmp(sp, localhost) == 0) {
+   sp = ::1;
}
 
-   he = gethostbyname2(name, PF_INET6);
+   /*
+* Cope with link-local.
+* This is IP:v6:addr%ifname.
+*/
+
+   if (p  (p  sp)  (if_nametoindex(p+1) != 0)) {
+   strlcpy(addr, sp,
+   MIN(PTR_DIFF(p,sp)+1,
+   sizeof(addr)));
+   sp = addr;
+   }
 
-   if (he == NULL) return in6addr_any;
+   ret = inet_pton(AF_INET6, sp, dest6);
+   if (ret  0) {
+   return dest6;
+   }
 
-   return *((struct in6_addr *)he-h_addr);
+   return in6addr_any;
 }
 
 static NTSTATUS ipv6_init(struct socket_context *sock)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-282-gae19f5a

2009-01-30 Thread Stefan Metzmacher
The branch, master has been updated
   via  ae19f5acddee6d6507225c0c9a625383255a6d4c (commit)
   via  6028e8f34626e7443ee58becaf1d27b9e2c56088 (commit)
  from  0245b9b97363f08786c25d4412ed293ca6f94cd5 (commit)

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


- Log -
commit ae19f5acddee6d6507225c0c9a625383255a6d4c
Author: Stefan Metzmacher me...@samba.org
Date:   Sat Jan 31 08:55:49 2009 +0100

s4:build: require ldb 0.9.3 when building against an external library

metze

commit 6028e8f34626e7443ee58becaf1d27b9e2c56088
Author: Stefan Metzmacher me...@samba.org
Date:   Sat Jan 31 08:53:26 2009 +0100

heimdal: void functions should not return a value

metze

---

Summary of changes:
 source3/samba4.m4   |2 +-
 source4/configure.ac|2 +-
 source4/heimdal/lib/krb5/error_string.c |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/samba4.m4 b/source3/samba4.m4
index fd0cc83..ee47fcc 100644
--- a/source3/samba4.m4
+++ b/source3/samba4.m4
@@ -71,7 +71,7 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBTEVENT, tevent = 0.9.2,
 
 SMB_INCLUDE_MK(../lib/tevent/python.mk) 
 
-SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb = 0.9.1,
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb = 0.9.3,
[
SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk)
SMB_INCLUDE_MK(lib/ldb/tools/config.mk)
diff --git a/source4/configure.ac b/source4/configure.ac
index ef3bfd7..3277879 100644
--- a/source4/configure.ac
+++ b/source4/configure.ac
@@ -66,7 +66,7 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBTEVENT, tevent = 0.9.2,
 
 SMB_INCLUDE_MK(../lib/tevent/python.mk) 
 
-SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb = 0.9.1,
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb = 0.9.3,
[
SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk)
SMB_INCLUDE_MK(lib/ldb/tools/config.mk)
diff --git a/source4/heimdal/lib/krb5/error_string.c 
b/source4/heimdal/lib/krb5/error_string.c
index db2df47..6374fa1 100644
--- a/source4/heimdal/lib/krb5/error_string.c
+++ b/source4/heimdal/lib/krb5/error_string.c
@@ -271,7 +271,7 @@ void KRB5_LIB_FUNCTION
 krb5_clear_error_string(krb5_context context)
  __attribute__((deprecated))
 {
-return krb5_clear_error_message(context);
+krb5_clear_error_message(context);
 }
 
 #endif /* !HEIMDAL_SMALLER */


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-284-g412b89a

2009-01-31 Thread Stefan Metzmacher
The branch, master has been updated
   via  412b89afbab91e3c104b012a2c1ec8b770ee6ab8 (commit)
   via  21522e4a9a3b223d29858cb35fe5e61ef8faf5b0 (commit)
  from  ae19f5acddee6d6507225c0c9a625383255a6d4c (commit)

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


- Log -
commit 412b89afbab91e3c104b012a2c1ec8b770ee6ab8
Author: Stefan Metzmacher me...@samba.org
Date:   Sat Jan 31 09:32:14 2009 +0100

lib/replace: move MAXHOSTNAMELEN to system/network.h

Some platforms define it in netdb.h, so we should
define the replace after including metdb.h.

metze

commit 21522e4a9a3b223d29858cb35fe5e61ef8faf5b0
Author: Stefan Metzmacher me...@samba.org
Date:   Sat Jan 31 09:04:12 2009 +0100

s4:heimdal_build: fix the build of asn1_compile and compile_et

We should not link in heimdal_build/replace.ho twice.
HEIMDAL_ROKEN has everything we need

metze

---

Summary of changes:
 lib/replace/replace.h |   12 
 lib/replace/system/network.h  |6 +-
 source4/heimdal_build/internal.mk |6 ++
 3 files changed, 7 insertions(+), 17 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index 688a746..c5b8676 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -503,18 +503,6 @@ ssize_t rep_pwrite(int __fd, const void *__buf, size_t 
__nbytes, off_t __offset)
  ? ~ (t) 0  (sizeof (t) * CHAR_BIT - 1) : (t) 0))
 #define _TYPE_MAXIMUM(t) ((t) (~ (t) 0 - _TYPE_MINIMUM (t)))
 
-#ifndef HOST_NAME_MAX
-#define HOST_NAME_MAX 255
-#endif
-
-/*
- * Some older systems seem not to have MAXHOSTNAMELEN
- * defined.
- */
-#ifndef MAXHOSTNAMELEN
-#define MAXHOSTNAMELEN HOST_NAME_MAX
-#endif
-
 #ifndef UINT16_MAX
 #define UINT16_MAX 65535
 #endif
diff --git a/lib/replace/system/network.h b/lib/replace/system/network.h
index 473d79b..40d20db 100644
--- a/lib/replace/system/network.h
+++ b/lib/replace/system/network.h
@@ -271,7 +271,11 @@ int rep_socketpair(int d, int type, int protocol, int 
sv[2]);
 #endif
 
 #ifndef HOST_NAME_MAX
-#define HOST_NAME_MAX 256
+#define HOST_NAME_MAX 255
+#endif
+
+#ifndef MAXHOSTNAMELEN
+#define MAXHOSTNAMELEN HOST_NAME_MAX
 #endif
 
 #ifndef HAVE_SA_FAMILY_T
diff --git a/source4/heimdal_build/internal.mk 
b/source4/heimdal_build/internal.mk
index 92bef08..9e32898 100644
--- a/source4/heimdal_build/internal.mk
+++ b/source4/heimdal_build/internal.mk
@@ -656,7 +656,7 @@ HEIMDAL_COM_ERR_OBJ_FILES = \
 # Start BINARY asn1_compile
 [BINARY::asn1_compile]
 USE_HOSTCC = YES
-PRIVATE_DEPENDENCIES = HEIMDAL_ROKEN LIBREPLACE_NETWORK
+PRIVATE_DEPENDENCIES = HEIMDAL_ROKEN
 
 ASN1C = $(builddir)/bin/asn1_compile
 
@@ -682,7 +682,6 @@ asn1_compile_OBJ_FILES = \
$(asn1_compile_ASN1_OBJ_FILES) \
$(heimdalsrcdir)/lib/vers/print_version.ho \
$(socketwrappersrcdir)/socket_wrapper.ho \
-   $(heimdalbuildsrcdir)/replace.ho
 
 $(asn1_compile_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) 
-I$(heimdalsrcdir)/lib/asn1 -I$(heimdalsrcdir)/lib/roken 
-I$(socketwrappersrcdir)
 
@@ -700,7 +699,7 @@ $(eval $(call heimdal_proto_header_template, \
 # Start BINARY compile_et
 [BINARY::compile_et]
 USE_HOSTCC = YES
-PRIVATE_DEPENDENCIES = HEIMDAL_ROKEN LIBREPLACE_NETWORK
+PRIVATE_DEPENDENCIES = HEIMDAL_ROKEN
 # End BINARY compile_et
 ###
 
@@ -711,7 +710,6 @@ compile_et_OBJ_FILES = 
$(heimdalsrcdir)/lib/vers/print_version.ho \
$(heimdalsrcdir)/lib/com_err/lex.ho \
$(heimdalsrcdir)/lib/com_err/compile_et.ho \
$(socketwrappersrcdir)/socket_wrapper.ho \
-   $(heimdalbuildsrcdir)/replace.ho
 
 $(compile_et_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) 
-I$(heimdalsrcdir)/lib/com_err -I$(heimdalsrcdir)/lib/roken  
-I$(socketwrappersrcdir)
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-285-gea157f4

2009-01-31 Thread Stefan Metzmacher
The branch, master has been updated
   via  ea157f495fec9906736ed3c79a84d9b71ae6ded3 (commit)
  from  412b89afbab91e3c104b012a2c1ec8b770ee6ab8 (commit)

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


- Log -
commit ea157f495fec9906736ed3c79a84d9b71ae6ded3
Author: Stefan Metzmacher me...@samba.org
Date:   Sat Jan 31 09:44:27 2009 +0100

s4:repl_meta_data: fix segfault after ldb changes

metze

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c 
b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 1ea1ab1..41f4e8e 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -258,7 +258,7 @@ static int replmd_add(struct ldb_module *module, struct 
ldb_request *req)
return ldb_next_request(module, req);
}
 
-   ldb = ldb_module_get_ctx(ac-module);
+   ldb = ldb_module_get_ctx(module);
 
ldb_debug(ldb, LDB_DEBUG_TRACE, replmd_add\n);
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-289-g582b27b

2009-01-31 Thread Stefan Metzmacher
The branch, master has been updated
   via  582b27be242ad4453e42020cf5309293710768c4 (commit)
  from  cee0d85e0b2be27d9314206f3fe832fc0c75b0f3 (commit)

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


- Log -
commit 582b27be242ad4453e42020cf5309293710768c4
Author: Stefan Metzmacher me...@samba.org
Date:   Sat Jan 31 11:34:12 2009 +0100

s4:auth: try to fix the build on Solaris

MAXHOSTNAMELEN comes in via system/network.h now.

metze

---

Summary of changes:
 source4/auth/ntlmssp/ntlmssp_server.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/ntlmssp/ntlmssp_server.c 
b/source4/auth/ntlmssp/ntlmssp_server.c
index 37cc5f3..30bf159 100644
--- a/source4/auth/ntlmssp/ntlmssp_server.c
+++ b/source4/auth/ntlmssp/ntlmssp_server.c
@@ -22,6 +22,7 @@
 */
 
 #include includes.h
+#include system/network.h
 #include auth/ntlmssp/ntlmssp.h
 #include auth/ntlmssp/msrpc_parse.h
 #include ../lib/crypto/crypto.h


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-304-g5f13710

2009-01-31 Thread Stefan Metzmacher
The branch, master has been updated
   via  5f13710ced2565355c3cdcef04067cacdf74a9ad (commit)
   via  96f176dbd84090fd18b8c796f869ddaa2da39e59 (commit)
   via  f3f2dfc51a25080290e13ed1d1f8c85932e0be31 (commit)
   via  15239f742cfcebe0bce4dbf4cb74eb2e8dcab364 (commit)
   via  06a24497dc167853bbd2171e50945595a62c5623 (commit)
  from  99f021d0ef5f1e8e7793c28f1c5ed03912218142 (commit)

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


- Log -
commit 5f13710ced2565355c3cdcef04067cacdf74a9ad
Author: Stefan Metzmacher me...@samba.org
Date:   Sun Feb 1 00:03:47 2009 +0100

s4:irpc: avoid c++ reserved word 'private'

metze

commit 96f176dbd84090fd18b8c796f869ddaa2da39e59
Author: Stefan Metzmacher me...@samba.org
Date:   Sun Feb 1 00:02:17 2009 +0100

s4:lib/messaging: fix warnings in testsuite

metze

commit f3f2dfc51a25080290e13ed1d1f8c85932e0be31
Author: Stefan Metzmacher me...@samba.org
Date:   Sat Jan 31 23:57:02 2009 +0100

s4:lib/messaging: avoid c++ reserved word 'private'

metze

commit 15239f742cfcebe0bce4dbf4cb74eb2e8dcab364
Author: Stefan Metzmacher me...@samba.org
Date:   Sat Jan 31 23:43:43 2009 +0100

s4:kdc: avoid c++ reserved word 'private'

metze

commit 06a24497dc167853bbd2171e50945595a62c5623
Author: Stefan Metzmacher me...@samba.org
Date:   Sat Jan 31 23:32:01 2009 +0100

s4:nbt_server/wins/: fix compiler warnings in winsdb.c

metze

---

Summary of changes:
 source4/kdc/hdb-samba4.c   |   52 ++--
 source4/kdc/kdc.c  |   15 
 source4/kdc/pac-glue.c |   34 +-
 source4/lib/messaging/irpc.h   |   18 +-
 source4/lib/messaging/messaging.c  |   42 +++---
 source4/lib/messaging/tests/irpc.c |   12 +++---
 source4/libcli/composite/composite.c   |2 +-
 source4/libcli/finddcs.c   |2 +-
 source4/libcli/wbclient/wbclient.c |4 +-
 source4/nbt_server/irpc.c  |5 ++-
 source4/nbt_server/wins/winsdb.c   |2 +-
 source4/nbt_server/wins/winswack.c |4 +-
 source4/smb_server/management.c|6 ++-
 source4/winbind/wb_irpc.c  |4 +-
 source4/wrepl_server/wrepl_apply_records.c |   12 +++---
 source4/wrepl_server/wrepl_scavenging.c|4 +-
 16 files changed, 111 insertions(+), 107 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/kdc/hdb-samba4.c b/source4/kdc/hdb-samba4.c
index 937839d..daeed77 100644
--- a/source4/kdc/hdb-samba4.c
+++ b/source4/kdc/hdb-samba4.c
@@ -186,9 +186,9 @@ static HDBFlags uf2HDBFlags(krb5_context context, int 
userAccountControl, enum h
return flags;
 }
 
-static int hdb_ldb_destructor(struct hdb_ldb_private *private)
+static int hdb_ldb_destructor(struct hdb_ldb_private *p)
 {
-hdb_entry_ex *entry_ex = private-entry_ex;
+hdb_entry_ex *entry_ex = p-entry_ex;
 free_hdb_entry(entry_ex-entry);
 return 0;
 }
@@ -509,7 +509,7 @@ static krb5_error_code LDB_message2entry(krb5_context 
context, HDB *db,
nCName,
ldb_dn_new(mem_ctx, 
(struct ldb_context *)db-hdb_db, NULL));
 
-   struct hdb_ldb_private *private;
+   struct hdb_ldb_private *p;
NTTIME acct_expiry;
 
struct ldb_message_element *objectclasses;
@@ -531,19 +531,19 @@ static krb5_error_code LDB_message2entry(krb5_context 
context, HDB *db,
goto out;
}

-   private = talloc(mem_ctx, struct hdb_ldb_private);
-   if (!private) {
+   p = talloc(mem_ctx, struct hdb_ldb_private);
+   if (!p) {
ret = ENOMEM;
goto out;
}
 
-   private-entry_ex = entry_ex;
-   private-iconv_convenience = lp_iconv_convenience(lp_ctx);
-   private-netbios_name = lp_netbios_name(lp_ctx);
+   p-entry_ex = entry_ex;
+   p-iconv_convenience = lp_iconv_convenience(lp_ctx);
+   p-netbios_name = lp_netbios_name(lp_ctx);
 
-   talloc_set_destructor(private, hdb_ldb_destructor);
+   talloc_set_destructor(p, hdb_ldb_destructor);
 
-   entry_ex-ctx = private;
+   entry_ex-ctx = p;
entry_ex-free_entry = hdb_ldb_free_entry;
 
userAccountControl = ldb_msg_find_attr_as_uint(msg, 
userAccountControl, 0);
@@ -655,7 +655,7 @@ static krb5_error_code LDB_message2entry(krb5_context 
context, HDB *db,
entry_ex-entry.generation = NULL;
 
/* Get keys from the db */
-   ret = LDB_message2entry_keys(context, private-iconv_convenience, 
private, msg, userAccountControl, entry_ex);
+   ret = LDB_message2entry_keys(context, p-iconv_convenience

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-314-g0931bb8

2009-02-01 Thread Stefan Metzmacher
The branch, master has been updated
   via  0931bb8937eaec55844dee0cdeefafa162053c53 (commit)
  from  50ca5af9f38b46fb3c7dea5b50997d3bd1c7e46f (commit)

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


- Log -
commit 0931bb8937eaec55844dee0cdeefafa162053c53
Author: Björn Jacke b...@sernet.de
Date:   Sun Feb 1 13:28:06 2009 +0100

test expects only one =

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

---

Summary of changes:
 source4/build/m4/check_path.m4 |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/build/m4/check_path.m4 b/source4/build/m4/check_path.m4
index f7266e6..1751a89 100644
--- a/source4/build/m4/check_path.m4
+++ b/source4/build/m4/check_path.m4
@@ -43,7 +43,7 @@ if test x$fhs = xyes; then
 
winbindd_privileged_socket_dir=${localstatedir}/lib/samba/winbindd_privileged
 else
# Check to prevent installing directly under /usr without the FHS
-   AS_IF([test $prefix == /usr || test $prefix == /usr/local],[
+   AS_IF([test $prefix = /usr || test $prefix = /usr/local],[
AC_MSG_ERROR([Don't install directly under /usr or 
/usr/local without using the FHS option (--enable-fhs). This could lead to 
file loss!])
])
 fi


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-409-g45940ef

2009-02-02 Thread Stefan Metzmacher
The branch, master has been updated
   via  45940ef23a6560a100ba400249e92451eb6d5b84 (commit)
   via  161961711a457fd362dbb356b4a8c8c27892c719 (commit)
   via  cc5ad06abb380ec109f59c83ef935ce6ab713ef1 (commit)
   via  9aa7698c0e88039465dfec8bf5a5511cd7933d30 (commit)
   via  cec5414f4680d93e1e385397eff2d4e27c1ae3b5 (commit)
   via  0963028d1d6ed854c1d8946a8c7d923dd782c540 (commit)
   via  91c292249b6368a6212055692747ed818ce683cc (commit)
   via  eb012dd212c85b9a4833b3b062cd6ba89cc0a441 (commit)
   via  426dc44c5cff7ee2b6ba02f3fc7967a71a51cdd9 (commit)
   via  886df1ac86a025e6af06205872cf4b7d43c2b202 (commit)
   via  662e05f7a92310c3e7913af06ef2e03fa593ecc2 (commit)
  from  4934744962cf74d67c568387b1cad3a5db6b2a77 (commit)

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


- Log -
commit 45940ef23a6560a100ba400249e92451eb6d5b84
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 2 13:58:13 2009 +0100

s3:selftest: pass correct arguments to $SCRIPTDIR/test_smbtorture_s3.sh

metze

commit 161961711a457fd362dbb356b4a8c8c27892c719
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 2 15:07:35 2009 +0100

s4:build: add a comment why we need CFLAG_NO_CAST_QUAL and 
CFLAG_NO_UNUSED_MACROS

metze

commit cc5ad06abb380ec109f59c83ef935ce6ab713ef1
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 2 15:05:33 2009 +0100

s4:param: swig_ldb was renamed to pyldb in 
d965ff05c9923c8a0e440e905d0d9fe662cc5db0

metze

commit 9aa7698c0e88039465dfec8bf5a5511cd7933d30
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 2 15:00:20 2009 +0100

s4:scripting/python: we should not silence warnings on handwritten python 
bindings

metze

commit cec5414f4680d93e1e385397eff2d4e27c1ae3b5
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 2 14:59:58 2009 +0100

s4:param: we should not silence warnings on handwritten python bindings

metze

commit 0963028d1d6ed854c1d8946a8c7d923dd782c540
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 2 14:57:10 2009 +0100

s4:libcli: remove unused line in config.mk

metze

commit 91c292249b6368a6212055692747ed818ce683cc
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 2 14:55:47 2009 +0100

s4:lib/ldb: we should not silence warnings on handwritten python bindings

metze

commit eb012dd212c85b9a4833b3b062cd6ba89cc0a441
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 2 14:54:35 2009 +0100

s4:auth/credentials: the python bindings don't use swig anymore

metze

commit 426dc44c5cff7ee2b6ba02f3fc7967a71a51cdd9
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 2 14:48:08 2009 +0100

s4:auth: the python bindings don't use swig anymore

metze

commit 886df1ac86a025e6af06205872cf4b7d43c2b202
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 2 14:40:48 2009 +0100

lib/tevent: the python bindings don't use swig anymore

metze

commit 662e05f7a92310c3e7913af06ef2e03fa593ecc2
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 2 14:38:05 2009 +0100

lib/tdb: the python bindings don't use swig anymore

metze

---

Summary of changes:
 lib/tdb/python.mk  |6 ++
 lib/tevent/python.mk   |9 ++---
 source3/selftest/tests.sh  |4 ++--
 source4/auth/config.mk |5 ++---
 source4/auth/credentials/config.mk |6 ++
 source4/build/m4/check_cc.m4   |   11 +++
 source4/lib/ldb/python.mk  |2 --
 source4/lib/registry/config.mk |2 +-
 source4/libcli/config.mk   |2 --
 source4/librpc/config.mk   |   32 
 source4/param/config.mk|4 +---
 source4/scripting/python/config.mk |4 ++--
 12 files changed, 37 insertions(+), 50 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdb/python.mk b/lib/tdb/python.mk
index a4e6037..1f2d4ca 100644
--- a/lib/tdb/python.mk
+++ b/lib/tdb/python.mk
@@ -1,8 +1,6 @@
-[PYTHON::swig_tdb]
+[PYTHON::pytdb]
 LIBRARY_REALNAME = tdb.$(SHLIBEXT)
 PUBLIC_DEPENDENCIES = LIBTDB DYNCONFIG
 
-swig_tdb_OBJ_FILES = $(tdbsrcdir)/pytdb.o
-
-$(swig_tdb_OBJ_FILES): CFLAGS+=$(CFLAG_NO_CAST_QUAL)
+pytdb_OBJ_FILES = $(tdbsrcdir)/pytdb.o
 
diff --git a/lib/tevent/python.mk b/lib/tevent/python.mk
index abc60fa..0c1beca 100644
--- a/lib/tevent/python.mk
+++ b/lib/tevent/python.mk
@@ -1,10 +1,5 @@
-# TODO: Change python stuff to tevent
-[PYTHON::swig_events]
+[PYTHON::pytevent]
 LIBRARY_REALNAME = tevent.$(SHLIBEXT)
 PRIVATE_DEPENDENCIES = LIBTEVENT PYTALLOC LIBSAMBA-UTIL LIBREPLACE
 
-swig_events_OBJ_FILES = $(libteventsrcdir)/pytevent.o
-
-$(swig_events_OBJ_FILES): CFLAGS+=$(CFLAG_NO_CAST_QUAL)
-
-PC_FILES += $(libteventsrcdir)/tevent.pc

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-396-g0165987

2009-02-02 Thread Stefan Metzmacher
The branch, master has been updated
   via  016598717b60c9c8731739789a394ddaecdb90eb (commit)
  from  bab629426958907e675765ce0620f321dcc5f780 (commit)

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


- Log -
commit 016598717b60c9c8731739789a394ddaecdb90eb
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 2 12:43:20 2009 +0100

selftest: remove source4 specific stuff from selftest.pl

metze

---

Summary of changes:
 selftest/selftest.pl |   15 +++
 1 files changed, 7 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index d4fd57e..f6561cc 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -365,7 +365,8 @@ unless (defined($ENV{VALGRIND})) {
$ENV{MALLOC_CHECK_} = 2;
 }
 
-my $old_pwd = $RealBin/..;
+my $bindir = ($opt_bindir or $builddir/bin);
+my $bindir_abs = abs_path($bindir);
 
 # Backwards compatibility:
 if (defined($ENV{TEST_LDAP}) and $ENV{TEST_LDAP} eq yes) {
@@ -410,8 +411,8 @@ if (defined($ENV{RUN_FROM_BUILD_FARM}) and
 
 my $tls_enabled = not $opt_quick;
 $ENV{TLS_ENABLED} = ($tls_enabled?yes:no);
-$ENV{LDB_MODULES_PATH} = $old_pwd/source4/bin/modules/ldb;
-$ENV{LD_SAMBA_MODULE_PATH} = $old_pwd/source4/bin/modules;
+$ENV{LDB_MODULES_PATH} = $bindir_abs/modules/ldb;
+$ENV{LD_SAMBA_MODULE_PATH} = $bindir_abs/modules;
 sub prefix_pathvar($$)
 {
my ($name, $newpath) = @_;
@@ -421,8 +422,8 @@ sub prefix_pathvar($$)
$ENV{$name} = $newpath;
}
 }
-prefix_pathvar(PKG_CONFIG_PATH, $old_pwd/source4/bin/pkgconfig);
-prefix_pathvar(PYTHONPATH, $old_pwd/source4/bin/python);
+prefix_pathvar(PKG_CONFIG_PATH, $bindir_abs/pkgconfig);
+prefix_pathvar(PYTHONPATH, $bindir_abs/python);
 
 if ($opt_socket_wrapper_keep_pcap) {
# Socket wrapper keep pcap implies socket wrapper pcap
@@ -450,10 +451,8 @@ my $testenv_default = none;
 if ($opt_target eq samba4) {
$testenv_default = member;
require target::Samba4;
-   $target = new Samba4($opt_bindir or $builddir/bin,
-$ldap, $srcdir/setup, $exeext);
+   $target = new Samba4($bindir, $ldap, $srcdir/setup, $exeext);
 } elsif ($opt_target eq samba3) {
-   my $bindir = ($opt_bindir or $builddir/bin);
if ($opt_socket_wrapper and `$bindir/smbd -b | grep SOCKET_WRAPPER` eq 
) {
die(You must include --enable-socket-wrapper when compiling 
Samba in order to execute 'make test'.  Exiting);
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-395-gbab6294

2009-02-02 Thread Stefan Metzmacher
The branch, master has been updated
   via  bab629426958907e675765ce0620f321dcc5f780 (commit)
   via  4bbfdb2ded3b34fe001757c67d6ca617ea781d2e (commit)
   via  900a5a6f87d37c1a8cd6bfdc7c24a8d87a83ea48 (commit)
   via  fb5346f3bbbde389295bb56de3ab97df50ddc2ee (commit)
   via  3131ca2340dcdb43257fe9a75c749c93f6931948 (commit)
   via  03ed70c9f3485e99b7a9574f076c98a631a358bf (commit)
   via  b4af7074b789b434f083a89a70c7cf7f8e43f4d4 (commit)
   via  0c3bc60a01a3353557abe42f6a689c54b9369e7f (commit)
   via  8249a467e365d7dc5eb52fd4c1315870405debb4 (commit)
   via  21571e64a9c338b8e0be092f01a99813674b9ed1 (commit)
   via  aa9c6b58f52b79c644cb894cc25b41cecd79b226 (commit)
   via  48a0721606b789a8b5086ae41b7208e753c415c9 (commit)
   via  5e6e370c4ed44e2b13d0817f3c1c1c36efb74cba (commit)
   via  62a3947d53aa38a2dab5ddf163d41a58a26bff14 (commit)
   via  82466db35dd21064f3f3754fb9ebdedaf13566bc (commit)
   via  73aea83966851e11923d2f5fd69171be385e22f7 (commit)
   via  44625f76c174e97e8a2c03a196358c604e78f694 (commit)
   via  45c26648c3545804aeeddb0ca9aa5e2b6a85182b (commit)
   via  f956dddf57b35408966d58f85864c7274bce15e2 (commit)
   via  9c387c189ebb925b22a28f74620b8773c6bf8b32 (commit)
   via  87ce6b198ac394f6f683ef125d59c1b18becbc19 (commit)
   via  d9c30894a1cb3d0814ba281dd6e9f5ca63c987d5 (commit)
   via  1441e87e249190bd9fea72773b8fd014a05f9861 (commit)
   via  0ac7792e022107c352f5464f52563c4e885272dd (commit)
   via  e5e0a064853ff5cd7f9bea0d9a6db8a0ae497635 (commit)
   via  62c8f6b1a57e3f03965358e5b6c3e55eeb7aaa8b (commit)
   via  5bca70a0c275f545433afad624b1e54adc27986d (commit)
   via  476aa1f00d298bdbefd92ba9505109167e3dfa1e (commit)
   via  e08dfe008e63789347cf7dc360b70ba1a1cb5b20 (commit)
   via  1bb0104070eb1188ed0256535907f2bed006a939 (commit)
   via  24d31c0e81c2332a610bb94acb1227fb9690443a (commit)
   via  d0ad2ecdeadcfdc99ead63000d484dfba5745ac2 (commit)
   via  0fadddf8d417f34dbe964ffd20483d24bf308325 (commit)
   via  2dc838341dd9f44437e3782cf49bf8163ec72fd2 (commit)
   via  096b4a9bd054650f3f01be41e23b4168686ed9f2 (commit)
   via  23bec6c670073fc419908c65918d885e6d9553e2 (commit)
   via  ab7f003aad6d16103c72ec3330836340e83a230a (commit)
   via  35f7cee25db3f4a3db9bfa6d7a12f1d9d6698ca0 (commit)
   via  7237d777d5fb208a7ae305090d07c11bb6e6ba34 (commit)
   via  100f4e318e2cf61413a70bb269efadc2c73228c8 (commit)
   via  e3dfbc9b7684e969776d3f7dbc7c4dad4108791b (commit)
   via  29cc638c2cfe4ab785d52c3cc61e81dfaf387b29 (commit)
   via  5bf95a71ddfeb6d2a77d7b4f488a4f5cf57f00f0 (commit)
   via  4523a634cb1702f96cc41099d9761a073c7a6d49 (commit)
   via  0854950b34dedbbd03120fa359403e3451161a38 (commit)
   via  5e9ee5406049a07d986da83c28c3401dccf1c08a (commit)
   via  7bb44616443babf9fa1f755dc5eb245576b3f8c2 (commit)
   via  42f92109d2cd5c1ecb58b246de00bd9ede14703f (commit)
   via  2110ef3c5d4b2085310f706c62e6bf11299dc2eb (commit)
   via  7ee87c339bc328f89d08afc0e5c9e095ceb1f746 (commit)
   via  8a95f4d2d6dc4ad3e0434c6f5e53b87ff3fdecb1 (commit)
   via  33e8f4772544a457bc2adc200235e065cba3c239 (commit)
   via  0c64c213e84f644b39f1c654e0be9ca601173eca (commit)
   via  24fb16f1f6d1e5ecbc1c6468bc1f35e7ecb3b0aa (commit)
   via  50ad5239fd13fcec2b18eaa2ced55fd0e1b00a65 (commit)
   via  c463bc127c911dcc3177e208931819ffc2f4fadb (commit)
   via  74e783bf5850658124d60503d7b5d2fba8a9bb87 (commit)
   via  c005bbddb713c25f3201d6007e6ef1114084d041 (commit)
   via  58ca4d4e3184580fbd895cec80d01b01768ae378 (commit)
   via  71e318cf319606828657338ad49d0ad73ba2cc19 (commit)
   via  1ee4bbec1a573be26360568275bd3882837dca9b (commit)
   via  0db079b9eb9446f63a3b1c08cd6de34faa0f6088 (commit)
   via  8d379008283415a9895ea9b0f9acc262f5859a8d (commit)
   via  ea7ea27f2f5d729629cf326424ea8b1123b9fc6e (commit)
   via  79ae2de00135b3047dcb835c14a3afac6eb168eb (commit)
   via  7db458a56c9296c96c65f903a75453ac635a42c8 (commit)
   via  735af62105c563f9ee2ffd8bc21e914499d5ee76 (commit)
   via  b7f298348934e86b1f8026bd445ec167439581f6 (commit)
   via  2e82a4ced2282eec55983b443e9e54f57e8b443d (commit)
   via  e7454d46d4cf6125e14ed7c9a36132eea929f19c (commit)
  from  73f4fc1f802f31459b70dba4777d142d00fcdd92 (commit)

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


- Log -
commit bab629426958907e675765ce0620f321dcc5f780
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 2 08:52:44 2009 +0100

s4:includes: copy #error DONT_USE_CPLUSPLUS_RESERVED_NAMES from source3

We should not use c++ reserved names in source4 too.

metze

commit 4bbfdb2ded3b34fe001757c67d6ca617ea781d2e
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 2 13:04:40 2009 +0100

s4:torture

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-415-gdf4e38f

2009-02-02 Thread Stefan Metzmacher
The branch, master has been updated
   via  df4e38fcc3232da3ed63ebca6f7b9ff7665b1e40 (commit)
   via  7f283b29f14fc3c39fdb164f2c8e9ca18b4442ea (commit)
  from  6ed02233c3d873d4aa6ee4306d61cc2aad465a5d (commit)

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


- Log -
commit df4e38fcc3232da3ed63ebca6f7b9ff7665b1e40
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Jan 30 14:00:54 2009 +0100

s3:selftest: run test_posix_s3.sh tests

metze

commit 7f283b29f14fc3c39fdb164f2c8e9ca18b4442ea
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 3 00:08:24 2009 +0100

s3:build: pass the path to smbtorture4 down to make with and without '-t' 
prefix

metze

---

Summary of changes:
 source3/Makefile.in   |7 +--
 source3/m4/check_path.m4  |4 +++-
 source3/samba4.m4 |3 ++-
 source3/selftest/tests.sh |   39 +++
 4 files changed, 49 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 5d15e0f..531f64f 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -19,6 +19,7 @@ datarootd...@datarootdir@
 selftest_pref...@selftest_prefix@
 selftest_shrd...@selftest_shrdir@
 smbtorture4_pa...@smbtorture4_path@
+smbtorture4_opti...@smbtorture4_option@
 selftest_custom_co...@selftest_custom_conf@
 
 li...@libs@
@@ -2932,7 +2933,7 @@ test_pam_modules:: pam_modules
 ## Targets for 'make test'
 ##
 
-TEST_EXTRA_ARGS = ${smbtorture4_path} ${selftest_shrdir} 
${selftest_custom_conf}
+TEST_EXTRA_ARGS = ${smbtorture4_option} ${selftest_shrdir} 
${selftest_custom_conf}
 
 test:: all torture timelimit
@echo Running Test suite
@@ -2953,7 +2954,9 @@ selftestdir = ../selftest
 S3_LD_LIBPATH_OVERRIDE = $(LIB_PATH_VAR)=$(builddir)/bin
 
 selftest:: all torture timelimit
-   @$(S3_LD_LIBPATH_OVERRIDE) PERL=$(PERL) \
+   @LIB_PATH_VAR=$(LIB_PATH_VAR) $(S3_LD_LIBPATH_OVERRIDE) \
+   SAMBA4SHAREDDIR=$(builddir)/bin/shared 
SMBTORTURE4=$(smbtorture4_path) \
+   PERL=$(PERL) PYTHON=$(PYTHON) \
$(PERL) $(selftestdir)/selftest.pl \
--prefix=${selftest_prefix} --target=samba3 \
--testlist=$(srcdir)/selftest/tests.sh| \
diff --git a/source3/m4/check_path.m4 b/source3/m4/check_path.m4
index 12b9987..0a61733 100644
--- a/source3/m4/check_path.m4
+++ b/source3/m4/check_path.m4
@@ -332,6 +332,8 @@ AC_ARG_WITH(selftest-shrdir,
 # set path of samba4's smbtorture
 smbtorture4_path=
 AC_SUBST(smbtorture4_path)
+smbtorture4_option=
+AC_SUBST(smbtorture4_option)
 AC_ARG_WITH(smbtorture4_path,
 [AS_HELP_STRING([--with-smbtorture4-path=PATH], [The path to a samba4 
smbtorture for make test (none)])],
 [ case $withval in
@@ -343,7 +345,7 @@ AC_ARG_WITH(smbtorture4_path,
 if test -z $smbtorture4_path -a ! -f $smbtorture4_path; then
AC_MSG_ERROR(['$smbtorture_path' does not  exist!])
 fi
-smbtorture4_path=-t $withval
+smbtorture4_option=-t $withval
   ;;
  esac
 ])
diff --git a/source3/samba4.m4 b/source3/samba4.m4
index ee47fcc..e2c754b 100644
--- a/source3/samba4.m4
+++ b/source3/samba4.m4
@@ -1,5 +1,6 @@
 AC_SUBST(BLDSHARED)
-smbtorture4_path=-t bin/smbtorture4
+smbtorture4_path=bin/smbtorture4
+smbtorture4_option=-t bin/smbtorture4
 m4_include(build/m4/public.m4)
 
 m4_include(../m4/check_python.m4)
diff --git a/source3/selftest/tests.sh b/source3/selftest/tests.sh
index 0ac194e..812a3a7 100755
--- a/source3/selftest/tests.sh
+++ b/source3/selftest/tests.sh
@@ -129,3 +129,42 @@ plantest blackbox.smbclient_s3.crypt dc BINDIR=$BINDIR 
script/tests/test_smb
 
 plantest blackbox.net_s3 dc BINDIR=$BINDIR SCRIPTDIR=$SCRIPTDIR 
script/tests/test_net_s3.sh
 
+(
+   shift $#
+   testitprefix=posix_s3.
+   testitenv=dc:local
+
+   SMBTORTURE4BINARY=$SMBTORTURE4
+   TORTURE4_OPTIONS=
+   TORTURE4_OPTIONS=$TORTURE4_OPTIONS --configfile=\$SMB_CONF_PATH
+   TORTURE4_OPTIONS=$TORTURE4_OPTIONS --maximum-runtime=$SELFTEST_MAXTIME
+   TORTURE4_OPTIONS=$TORTURE4_OPTIONS --target=$SELFTEST_TARGET
+   TORTURE4_OPTIONS=$TORTURE4_OPTIONS --basedir=$SELFTEST_PREFIX
+   if [ -n $SELFTEST_VERBOSE ]; then
+   TORTURE4_OPTIONS=$TORTURE4_OPTIONS 
--option=torture:progress=no
+   fi
+   TORTURE_OPTIONS=$TORTURE4_OPTIONS --format=subunit
+   if [ -n $SELFTEST_QUICK ]; then
+   TORTURE4_OPTIONS=$TORTURE4_OPTIONS --option=torture:quick=yes
+   fi
+
+   # This is an ugly hack...
+   TORTURE4_OPTIONS=$TORTURE4_OPTIONS 
--option=torture:localdir=$SELFTEST_PREFIX/dc/share
+
+   if [ -x $SMBTORTURE4 ]; then
+   LIB_PATH_VAR_VAR=\$`echo $LIB_PATH_VAR`
+   S4_LIB_PREFIX=`eval echo 
$LIB_PATH_VAR=\$SAMBA4SHAREDDIR:$LIB_PATH_VAR_VAR

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-418-ge6bb55c

2009-02-03 Thread Stefan Metzmacher
The branch, master has been updated
   via  e6bb55c3d5b491ab9e6d568e6ce7594695e53322 (commit)
  from  810b670b754f1f1f547c94c1b9bcff40154e7bb2 (commit)

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


- Log -
commit e6bb55c3d5b491ab9e6d568e6ce7594695e53322
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 3 02:31:47 2009 +0100

lib/tdb: don't generate a static library for the samba4 build

We also don't do this for talloc and ldb.

metze

---

Summary of changes:
 lib/tdb/config.mk |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tdb/config.mk b/lib/tdb/config.mk
index 90c9ba2..38b03b9 100644
--- a/lib/tdb/config.mk
+++ b/lib/tdb/config.mk
@@ -1,7 +1,7 @@
 
 # Start SUBSYSTEM LIBTDB
 [LIBRARY::LIBTDB]
-OUTPUT_TYPE = STATIC_LIBRARY
+OUTPUT_TYPE = MERGED_OBJ
 CFLAGS = -I$(tdbsrcdir)/include
 #
 # End SUBSYSTEM ldb


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-420-g20a1cb1

2009-02-03 Thread Stefan Metzmacher
The branch, master has been updated
   via  20a1cb15699c781651593c68685ece91c03e6a18 (commit)
  from  fda8abac17892e51c2d5fcdc1f405477bef320ed (commit)

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


- Log -
commit 20a1cb15699c781651593c68685ece91c03e6a18
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 3 15:02:14 2009 +0100

s3:test: try to find why creating BUILTIN\Administrators doesn't work in 
the build-farm

metze

---

Summary of changes:
 source3/script/tests/selftest.sh |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh
index c02e0ee..af01d0f 100755
--- a/source3/script/tests/selftest.sh
+++ b/source3/script/tests/selftest.sh
@@ -346,9 +346,11 @@ START=`date`
  MAKE_TEST_BINARY=
 
  MAKE_TEST_BINARY=bin/net
- printf %s creating BUILTIN\\Administrators...
- bin/net -s $SERVERCONFFILE sam createbuiltingroup \
-   Administrators  /dev/null 21 ||  exit 1
+ printf %s\n creating BUILTIN\\Administrators...
+ bin/net -s $SERVERCONFFILE sam createbuiltingroup Administrators || {
+   echo FAILED: $?
+   exit 1
+ }
  echo DONE
  MAKE_TEST_BINARY=
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-440-g8b408f7

2009-02-03 Thread Stefan Metzmacher
The branch, master has been updated
   via  8b408f781970b3f2b310389f9ae73ad0c5e42881 (commit)
   via  7c72853b50b14653fe3c62fde3bf653b45c755f8 (commit)
   via  a5f9816263b67d87a62bb7e18aa10a7b0ba44794 (commit)
   via  388da7ca97b86aef9e344c2259d0d910dd0659d5 (commit)
   via  e2aab39e560dc395fe8aba53ffd6fc42b025aa36 (commit)
   via  adc9d105cdce4500d16f86b39401ae3aa3b0cacd (commit)
   via  c3ab29265546a56377a22ddc67701871ea41262c (commit)
  from  63bb31e11812264aa377abdd4c256c46dde236b0 (commit)

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


- Log -
commit 8b408f781970b3f2b310389f9ae73ad0c5e42881
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 3 16:23:13 2009 +0100

s4:selftest: avoid hardcoded pathes in blackbox tests

metze

commit 7c72853b50b14653fe3c62fde3bf653b45c755f8
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 3 16:21:54 2009 +0100

s4:selftest: don't use hardcoded pathes

metze

commit a5f9816263b67d87a62bb7e18aa10a7b0ba44794
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 3 16:20:24 2009 +0100

selftest: don't use hardcoded path to nmblookup in Samba4.pm

metze

commit 388da7ca97b86aef9e344c2259d0d910dd0659d5
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 3 16:19:46 2009 +0100

selftest: export BUILDDIR, BUILDDIR_ABS and EXEEXT

metze

commit e2aab39e560dc395fe8aba53ffd6fc42b025aa36
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 3 16:16:17 2009 +0100

s4:lib/ldb: call ldb utils always via $VALGRIND ldbfoo$EXEEXT in the tests

metze

commit adc9d105cdce4500d16f86b39401ae3aa3b0cacd
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 3 16:10:52 2009 +0100

merged-build: link in LIBREPLACE into samba4 code as in the native build

metze

commit c3ab29265546a56377a22ddc67701871ea41262c
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 3 02:32:57 2009 +0100

merged-build: force non-shared build for samba4

This should fix 'make test4'.

metze

---

Summary of changes:
 nsswitch/tests/test_wbinfo.sh  |4 +-
 selftest/selftest.pl   |4 ++
 selftest/target/Samba4.pm  |   25 +-
 source3/configure.in   |3 +
 source3/samba4-templates.mk|8 ++--
 source3/samba4.m4  |   18 +++
 source4/client/tests/test_cifsdd.sh|4 +-
 source4/client/tests/test_smbclient.sh |4 +-
 source4/lib/ldb/tests/test-extended.sh |6 +-
 source4/lib/ldb/tests/test-generic.sh  |   68 ++--
 source4/lib/ldb/tests/test-tdb-features.sh |   34 +++---
 source4/lib/ldb/tests/test-tdb.sh  |4 +-
 source4/librpc/tests/test_ndrdump.sh   |4 +-
 source4/selftest/tests.sh  |   36 +++---
 source4/torture/tests/test_gentest.sh  |4 +-
 source4/torture/tests/test_locktest.sh |4 +-
 source4/torture/tests/test_masktest.sh |4 +-
 source4/utils/tests/test_net.sh|7 ++-
 source4/utils/tests/test_nmblookup.sh  |   15 ---
 testprogs/blackbox/test_kinit.sh   |   22 +
 testprogs/blackbox/test_ldb.sh |   45 ++-
 21 files changed, 179 insertions(+), 144 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/tests/test_wbinfo.sh b/nsswitch/tests/test_wbinfo.sh
index 84876e3..2e94c24 100755
--- a/nsswitch/tests/test_wbinfo.sh
+++ b/nsswitch/tests/test_wbinfo.sh
@@ -14,8 +14,8 @@ TARGET=$4
 shift 4
 
 failed=0
-samba4bindir=`dirname $0`/../../source4/bin
-wbinfo=$samba4bindir/wbinfo
+samba4bindir=$BUILDDIR/bin
+wbinfo=$samba4bindir/wbinfo$EXEEXT
 
 . `dirname $0`/../../testprogs/blackbox/subunit.sh
 
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index f6561cc..0be2e78 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -394,6 +394,7 @@ mkdir($prefix, 0777) unless -d $prefix;
 
 my $prefix_abs = abs_path($prefix);
 my $srcdir_abs = abs_path($srcdir);
+my $builddir_abs = abs_path($builddir);
 
 die(using an empty absolute prefix isn't allowed) unless $prefix_abs ne ;
 die(using '/' as absolute prefix isn't allowed) unless $prefix_abs ne /;
@@ -403,6 +404,9 @@ $ENV{KRB5CCNAME} = $prefix/krb5ticket;
 $ENV{PREFIX_ABS} = $prefix_abs;
 $ENV{SRCDIR} = $srcdir;
 $ENV{SRCDIR_ABS} = $srcdir_abs;
+$ENV{BUILDDIR} = $builddir;
+$ENV{BUILDDIR_ABS} = $builddir_abs;
+$ENV{EXEEXT} = $exeext;
 
 if (defined($ENV{RUN_FROM_BUILD_FARM}) and 
($ENV{RUN_FROM_BUILD_FARM} eq yes)) {
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 5ca1a6a..0f7d317 100644
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -159,18 +159,19 @@ sub wait_for_start

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-443-g98e2fe5

2009-02-03 Thread Stefan Metzmacher
The branch, master has been updated
   via  98e2fe5e6d7634aa1ecf12b1b1fb23c82b3f16c5 (commit)
   via  484c4a5955d0365beb9587bb15c73fe3ed3301ce (commit)
   via  aa9592991a1f406708fc08fd32cd630f0e9ed43d (commit)
  from  8b408f781970b3f2b310389f9ae73ad0c5e42881 (commit)

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


- Log -
commit 98e2fe5e6d7634aa1ecf12b1b1fb23c82b3f16c5
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 3 17:43:23 2009 +0100

s3:selftest: fix blackbox.net_s3 tests

metze

commit 484c4a5955d0365beb9587bb15c73fe3ed3301ce
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 3 17:05:24 2009 +0100

Revert s3:selftest: create BUILTIN\\Administrators at startup

This reverts commit a849183f9492d09ccd7e273f955d4d8f2668fdf3.

This is to racy for most of the build-farm machines,
because winbindd doesn't start fast enough.

metze

commit aa9592991a1f406708fc08fd32cd630f0e9ed43d
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 3 17:04:42 2009 +0100

Revert s3:test: try to find why creating BUILTIN\Administrators doesn't 
work in the build-farm

This reverts commit 20a1cb15699c781651593c68685ece91c03e6a18.

I will also revert a849183f9492d09ccd7e273f955d4d8f2668fdf3

metze

---

Summary of changes:
 source3/script/tests/selftest.sh  |9 -
 source3/script/tests/test_net_registry.sh |   15 ++-
 source3/selftest/tests.sh |2 +-
 3 files changed, 11 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh
index af01d0f..9462184 100755
--- a/source3/script/tests/selftest.sh
+++ b/source3/script/tests/selftest.sh
@@ -345,15 +345,6 @@ START=`date`
  bin/smbclient $CONFIGURATION -L $SERVER_IP -U% -p 139 | head -2
  MAKE_TEST_BINARY=
 
- MAKE_TEST_BINARY=bin/net
- printf %s\n creating BUILTIN\\Administrators...
- bin/net -s $SERVERCONFFILE sam createbuiltingroup Administrators || {
-   echo FAILED: $?
-   exit 1
- }
- echo DONE
- MAKE_TEST_BINARY=
-
  failed=0
 
  . $SCRIPTDIR/tests_$SUBTESTS.sh
diff --git a/source3/script/tests/test_net_registry.sh 
b/source3/script/tests/test_net_registry.sh
index a3d1a24..52a78bc 100755
--- a/source3/script/tests/test_net_registry.sh
+++ b/source3/script/tests/test_net_registry.sh
@@ -7,10 +7,8 @@ RPC=$1
 
 NET=$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION
 
-NETREMOTE=${NET} -U${USERNAME}%${PASSWORD} -S ${SERVER} -I ${SERVER_IP}
-
 if test x${RPC} = xrpc ; then
-   NETREG=${NETREMOTE} rpc registry
+   NETREG=${NET} -U${USERNAME}%${PASSWORD} -I ${SERVER_IP} rpc registry
 else
NETREG=${NET} registry
 fi
@@ -336,7 +334,14 @@ test_setvalue_twice()
 
 give_administrative_rights()
 {
-   ${NETREMOTE} rpc group addmem BUILTIN\\Administrators $USERNAME
+   bin/net -s $SERVERCONFFILE sam createbuiltingroup Administrators
+   if test x$? != x0 ; then
+   echo ERROR: creating builtin group Administrators
+   false
+   return
+   fi
+
+   bin/net -s $SERVERCONFFILE sam addmem BUILTIN\\Administrators $USERNAME
if test x$? != x0 ; then
echo ERROR: adding user $USERNAME to BUILTIN\\Administrators
false
@@ -347,7 +352,7 @@ give_administrative_rights()
 
 take_administrative_rights()
 {
-   ${NETREMOTE} rpc group delmem BUILTIN\\Administrators $USERNAME
+   bin/net -s $SERVERCONFFILE sam delmem BUILTIN\\Administrators $USERNAME
if test x$? != x0 ; then
echo ERROR: removing user $USERNAME from 
BUILTIN\\Administrators
false
diff --git a/source3/selftest/tests.sh b/source3/selftest/tests.sh
index 812a3a7..f88dab0 100755
--- a/source3/selftest/tests.sh
+++ b/source3/selftest/tests.sh
@@ -127,7 +127,7 @@ plantest blackbox.smbclient_s3.crypt dc BINDIR=$BINDIR 
script/tests/test_smb
 #plantest blackbox.smbclient_s3.crypt member creds member BINDIR=$BINDIR 
script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP \$SERVER\$USERNAME 
\$PASSWORD -e
 #plantest blackbox.smbclient_s3.crypt domain creds member BINDIR=$BINDIR 
script/tests/test_smbclient_s3.sh \$SERVER \$SERVER_IP 
\$DOMAIN\$DC_USERNAME \$DC_PASSWORD -e
 
-plantest blackbox.net_s3 dc BINDIR=$BINDIR SCRIPTDIR=$SCRIPTDIR 
script/tests/test_net_s3.sh
+plantest blackbox.net_s3 dc:local BINDIR=$BINDIR SCRIPTDIR=$SCRIPTDIR 
SERVERCONFFILE=\$SMB_CONF_PATH script/tests/test_net_s3.sh
 
 (
shift $#


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-446-g76db6f1

2009-02-04 Thread Stefan Metzmacher
The branch, master has been updated
   via  76db6f15dcc5338b1968f26287674cf0b3244e0f (commit)
  from  a4c5054b5a92c08498f522b39472d64a32a3cebb (commit)

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


- Log -
commit 76db6f15dcc5338b1968f26287674cf0b3244e0f
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 4 08:33:15 2009 +0100

selftest/Samba3: use the same logic for make test and make selftest

See also commit 484c4a5955d0365beb9587bb15c73fe3ed3301ce

metze

---

Summary of changes:
 selftest/target/Samba3.pm |5 -
 1 files changed, 0 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index bb074b7..49984f1 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -551,11 +551,6 @@ sub wait_for_start($$)
system($self-binpath(smbclient) . $envvars-{CONFIGURATION} -L 
$envvars-{SERVER_IP} -U% -p 139 | head -2);
system($self-binpath(smbclient) . $envvars-{CONFIGURATION} -L 
$envvars-{SERVER_IP} -U% -p 139 | head -2);
 
-   print creating BUILTIN\\Administrators\n;
-   $ENV{WINBINDD_SOCKET_DIR} = $envvars-{WINBINDD_SOCKET_DIR};
-   system($self-binpath(net) . $envvars-{CONFIGURATION} sam 
createbuiltingroup Administrators);
-   delete $ENV{WINBINDD_SOCKET_DIR};
-
print $self-getlog_env($envvars);
 }
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-496-g71d2287

2009-02-05 Thread Stefan Metzmacher
The branch, master has been updated
   via  71d2287ec7740cf2089ddbef6991e7c3a80dcae0 (commit)
  from  f289851d70ea7a8f66a31e9af7d9fc6e16ebffef (commit)

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


- Log -
commit 71d2287ec7740cf2089ddbef6991e7c3a80dcae0
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 5 17:27:53 2009 +0100

examples/VFS: fix the configure and make with the new directory layout

metze

---

Summary of changes:
 examples/VFS/Makefile.in|   12 +++-
 examples/VFS/configure.in   |8 
 examples/VFS/skel_opaque.c  |6 +++---
 examples/VFS/skel_transparent.c |6 +++---
 4 files changed, 17 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/VFS/Makefile.in b/examples/VFS/Makefile.in
index 4de0efd..8fe414a 100644
--- a/examples/VFS/Makefile.in
+++ b/examples/VFS/Makefile.in
@@ -9,12 +9,14 @@ SHLIBEXT  = @SHLIBEXT@
 OBJEXT = @OBJEXT@ 
 FLAGS  =  $(CFLAGS) $(CPPFLAGS) -fPIC \
-Iinclude -I$(SAMBA_SOURCE)/include \
-   -I$(SAMBA_SOURCE)/popt  \
-   -I$(SAMBA_SOURCE)/lib/replace  \
-   -I$(SAMBA_SOURCE)/lib/talloc  \
-   -I$(SAMBA_SOURCE)/lib/tdb/include  \
-   -I$(SAMBA_SOURCE)/smbwrapper \
+   -I$(SAMBA_SOURCE)/../popt  \
+   -I$(SAMBA_SOURCE)/../lib/replace  \
+   -I$(SAMBA_SOURCE)/../lib/talloc  \
+   -I$(SAMBA_SOURCE)/../lib/tevent  \
+   -I$(SAMBA_SOURCE)/../lib/tdb/include  \
-I$(SAMBA_SOURCE)/librpc \
+   -I$(SAMBA_SOURCE)/../librpc \
+   -I$(SAMBA_SOURCE)/../ \
-I$(SAMBA_SOURCE) -I.
 
 
diff --git a/examples/VFS/configure.in b/examples/VFS/configure.in
index b8e10d4..4e9d465 100644
--- a/examples/VFS/configure.in
+++ b/examples/VFS/configure.in
@@ -27,11 +27,11 @@ AC_ARG_WITH(fhs,
 
 AC_SUBST(libdir)
 
-SAMBA_SOURCE=../../source
+SAMBA_SOURCE=../../source3
 
 # set the location location of the samba source tree
 AC_ARG_WITH(samba-source,
-[  --with-samba-source=DIR Where is the samba source tree (../../source)],
+[  --with-samba-source=DIR Where is the samba source tree (../../source3)],
 [ case $withval in
   yes|no)
   #
@@ -337,11 +337,11 @@ AC_CACHE_CHECK([whether building shared libraries 
actually works],
ac_cv_shlib_works=no
# try building a trivial shared library
if test $PICSUFFIX = po; then
- $CC $CPPFLAGS $CFLAGS $PICFLAGS -c -o shlib.po 
${srcdir-.}/../../source/tests/shlib.c 
+ $CC $CPPFLAGS $CFLAGS $PICFLAGS -c -o shlib.po 
${srcdir-.}/../../tests/shlib.c 
$CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.$SHLIBEXT 
shlib.po 
ac_cv_shlib_works=yes
else
- $CC $CPPFLAGS $CFLAGS $PICFLAGS -c -o shlib.$PICSUFFIX 
${srcdir-.}/tests/shlib.c 
+ $CC $CPPFLAGS $CFLAGS $PICFLAGS -c -o shlib.$PICSUFFIX 
${srcdir-.}/../../tests/shlib.c 
mv shlib.$PICSUFFIX shlib.po 
$CC $CPPFLAGS $CFLAGS `eval echo $LDSHFLAGS` -o shlib.$SHLIBEXT 
shlib.po 
ac_cv_shlib_works=yes
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index 48b4979..2eb7a94 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -52,9 +52,9 @@ static void skel_disconnect(vfs_handle_struct *handle, 
connection_struct *conn)
return;
 }
 
-static SMB_BIG_UINT skel_disk_free(vfs_handle_struct *handle,  const char 
*path,
-   bool small_query, SMB_BIG_UINT *bsize,
-   SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+static uint64_t skel_disk_free(vfs_handle_struct *handle,  const char *path,
+   bool small_query, uint64_t *bsize,
+   uint64_t *dfree, uint64_t *dsize)
 {
return vfswrap_disk_free(NULL,  path, small_query, bsize, 
 dfree, dsize);
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index f5562a5..5670965 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -46,9 +46,9 @@ static void skel_disconnect(vfs_handle_struct *handle)
SMB_VFS_NEXT_DISCONNECT(handle);
 }
 
-static SMB_BIG_UINT skel_disk_free(vfs_handle_struct *handle,  const char 
*path,
-   bool small_query, SMB_BIG_UINT *bsize,
-   SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize)
+static uint64_t skel_disk_free(vfs_handle_struct *handle,  const char *path,
+   bool small_query, uint64_t *bsize,
+   uint64_t *dfree, uint64_t *dsize)
 {
return SMB_VFS_NEXT_DISK_FREE(handle, path, small_query, bsize, 
 dfree, dsize);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-511-gf023bf9

2009-02-05 Thread Stefan Metzmacher
The branch, master has been updated
   via  f023bf94f1cfb0523cbbd24b5a44c6ae6450f261 (commit)
   via  40c3ab2fbc39e2fcd2e6713ecb08fe7b5b61ba17 (commit)
   via  e5a6eadd8214b56da34f733318a0fecaebbe5ef5 (commit)
   via  c8b9679e4091b7dc78c4288aa868f5ec923fb843 (commit)
   via  ba0042fcdb028688768184d0831a9f6afb8f7269 (commit)
   via  0872fa7b1f60aeb4e6d5bb1eb40fcba35fdf85d4 (commit)
   via  1d22e0eceffc19a611f0bfe850f3714352f4c297 (commit)
   via  ea546df5739e59a4302b09d7ba515c8b665394b7 (commit)
   via  4cb9ccd84125708613074c2371f9507755ad4115 (commit)
   via  b493bc1aa11bfd479420318f57944285182ab548 (commit)
   via  d25a3c749f10647f0b73106f432eb390624cc2e1 (commit)
   via  0fe9980fa08ac488f19086d650646017acaaf6e9 (commit)
   via  fdd6c106cf236150e4c5e7c6176156230c3ccfa9 (commit)
   via  3d6587c777408bbc1c1ecfb82750136874c5e565 (commit)
   via  5fbbddec353a9f809db549d21c16e5c9d9fbbd5b (commit)
  from  71d2287ec7740cf2089ddbef6991e7c3a80dcae0 (commit)

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


- Log -
commit f023bf94f1cfb0523cbbd24b5a44c6ae6450f261
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 5 18:18:33 2009 +0100

s4:libcli/smb2: fix c++ warning

metze

commit 40c3ab2fbc39e2fcd2e6713ecb08fe7b5b61ba17
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 5 18:18:09 2009 +0100

s4:auth/ntlm: fix c++ warning

metze

commit e5a6eadd8214b56da34f733318a0fecaebbe5ef5
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 5 15:58:40 2009 +0100

s4:pyregistry: fix compiler warnings

metze

commit c8b9679e4091b7dc78c4288aa868f5ec923fb843
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 5 15:57:59 2009 +0100

s4:pyauth: fix compiler warnings

metze

commit ba0042fcdb028688768184d0831a9f6afb8f7269
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 5 11:18:12 2009 +0100

s4:pyrpc: fix compiler warnings

metze

commit 0872fa7b1f60aeb4e6d5bb1eb40fcba35fdf85d4
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 5 11:13:08 2009 +0100

s4:pycredentials: fix compiler warnings

metze

commit 1d22e0eceffc19a611f0bfe850f3714352f4c297
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 5 11:04:28 2009 +0100

s4:pyldb: fix compiler warnings

metze

commit ea546df5739e59a4302b09d7ba515c8b665394b7
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 5 10:04:01 2009 +0100

s4:pyparam: fix compiler warnings

metze

commit 4cb9ccd84125708613074c2371f9507755ad4115
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 5 09:39:03 2009 +0100

s4:lib/registry: fix c++ warnings

metze

commit b493bc1aa11bfd479420318f57944285182ab548
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 5 09:33:59 2009 +0100

s4:build: remove not commited files under librpc/gen_ndr with make clean

metze

commit d25a3c749f10647f0b73106f432eb390624cc2e1
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 5 09:33:16 2009 +0100

s4:pvfs_aio: fix compiler warning

metze

commit 0fe9980fa08ac488f19086d650646017acaaf6e9
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 5 09:31:41 2009 +0100

LDAP-UPTODATEVECTOR: fix segfault against samba4 as server

metze

commit fdd6c106cf236150e4c5e7c6176156230c3ccfa9
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 4 08:53:45 2009 +0100

s4:pvfs: remove compiler warning

metze

commit 3d6587c777408bbc1c1ecfb82750136874c5e565
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 4 08:52:41 2009 +0100

s4:pvfs: use talloc_get_type() to cast from void *

metze

commit 5fbbddec353a9f809db549d21c16e5c9d9fbbd5b
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 4 08:50:46 2009 +0100

s4:pvfs: fix some talloc related compiler warnings

metze

---

Summary of changes:
 source4/auth/credentials/pycredentials.c |   49 +--
 source4/auth/credentials/pycredentials.h |2 +-
 source4/auth/ntlm/auth.c |2 +-
 source4/auth/pyauth.h|2 +-
 source4/lib/ldb/pyldb.c  |  137 ++---
 source4/lib/registry/patchfile_preg.c|   14 ++--
 source4/lib/registry/pyregistry.c|   29 ---
 source4/lib/registry/regf.c  |2 +-
 source4/libcli/smb2/request.c|2 +-
 source4/librpc/config.mk |4 +-
 source4/librpc/rpc/pyrpc.c   |8 +-
 source4/ntvfs/posix/pvfs_acl.c   |2 +-
 source4/ntvfs/posix/pvfs_aio.c   |2 +-
 source4/ntvfs/posix/pvfs_flush.c |3 +-
 source4/ntvfs/posix/pvfs_fsinfo.c|3 +-
 source4/ntvfs/posix/pvfs_ioctl.c |3 +-
 source4/ntvfs/posix

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-535-g2170a81

2009-02-06 Thread Stefan Metzmacher
The branch, master has been updated
   via  2170a810ed16043c6292eb3e39437a8cf96a8be6 (commit)
  from  1609dbaf88a22bcab75fa490ec632d846a1b5f5a (commit)

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


- Log -
commit 2170a810ed16043c6292eb3e39437a8cf96a8be6
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 6 12:10:23 2009 +0100

s4:pyregistry: fix crash bugs introduced by 
e5a6eadd8214b56da34f733318a0fecaebbe5ef5

The registry api uses wild casts in the returned types, so we can't check
the talloc name against the type used in the public api...

metze

---

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


Changeset truncated at 500 lines:

diff --git a/source4/lib/registry/pyregistry.c 
b/source4/lib/registry/pyregistry.c
index 9ebd136..30becbb 100644
--- a/source4/lib/registry/pyregistry.c
+++ b/source4/lib/registry/pyregistry.c
@@ -36,8 +36,9 @@ PyAPI_DATA(PyTypeObject) PyRegistry;
 PyAPI_DATA(PyTypeObject) PyHiveKey;
 
 /*#define PyRegistryKey_AsRegistryKey(obj) py_talloc_get_type(obj, struct 
registry_key)*/
-#define PyRegistry_AsRegistryContext(obj) py_talloc_get_type(obj, struct 
registry_context)
-#define PyHiveKey_AsHiveKey(obj) py_talloc_get_type(obj, struct hive_key)
+#define PyRegistry_AsRegistryContext(obj) ((struct registry_context 
*)py_talloc_get_ptr(obj))
+#define PyHiveKey_AsHiveKey(obj) ((struct hive_key*)py_talloc_get_ptr(obj))
+
 
 static PyObject *py_get_predefined_key_by_name(PyObject *self, PyObject *args)
 {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-635-gc6b440d

2009-02-09 Thread Stefan Metzmacher
The branch, master has been updated
   via  c6b440d1b7f88af2897b9b2e9b09f05b488a1685 (commit)
   via  5438d7dad8d349f8fdc07a89870ddafb9c54a68f (commit)
  from  15243c13e914b1ecc6f0eec924cc587a4069c62b (commit)

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


- Log -
commit c6b440d1b7f88af2897b9b2e9b09f05b488a1685
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 9 11:56:05 2009 +0100

s4:Makefile: fix PUBLIC_HEADERS typo

metze

commit 5438d7dad8d349f8fdc07a89870ddafb9c54a68f
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 9 11:54:34 2009 +0100

testprogs/win32: add npecho_*2.c

This exlores some details of message type named pipes.

metze

---

Summary of changes:
 source4/Makefile|2 +-
 testprogs/win32/npecho/GNUmakefile  |   23 +++--
 testprogs/win32/npecho/NMakefile|   12 ++-
 testprogs/win32/npecho/npecho_client2.c |   48 +++
 testprogs/win32/npecho/npecho_server2.c |   55 +++
 5 files changed, 128 insertions(+), 12 deletions(-)
 create mode 100755 testprogs/win32/npecho/npecho_client2.c
 create mode 100755 testprogs/win32/npecho/npecho_server2.c


Changeset truncated at 500 lines:

diff --git a/source4/Makefile b/source4/Makefile
index 267e302..508836f 100644
--- a/source4/Makefile
+++ b/source4/Makefile
@@ -146,7 +146,7 @@ endif
 clean::
@find ../lib ../libcli ../librpc ../nsswitch -name '*.o' -o -name 
'*.ho' | xargs rm -f
 
-PUBLIC_HEADES += $(srcdir)/version.h
+PUBLIC_HEADERS += $(srcdir)/version.h
 
 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
 modules:: $(PLUGINS)
diff --git a/testprogs/win32/npecho/GNUmakefile 
b/testprogs/win32/npecho/GNUmakefile
index 33cf95d..64fb79f 100755
--- a/testprogs/win32/npecho/GNUmakefile
+++ b/testprogs/win32/npecho/GNUmakefile
@@ -1,20 +1,23 @@
 INCLUDES=-I.
-CFLAGS=$(INCLUDES) 
+CFLAGS=$(INCLUDES)
 
-all: npecho_client.exe npecho_server.exe
+NPECHO = npecho_client.exe
+#npecho_server.exe
+
+NPECHO2 = npecho_client2.exe npecho_server2.exe
+
+all: $(NPECHO) $(NPECHO2)
 
 CC = i586-mingw32msvc-gcc
 
-.SUFFIXES: .c .obj
+.SUFFIXES: .c .obj .exe
 
-.c.obj: 
+.c.obj:
$(CC) $(CFLAGS) -c $ -o $@
 
-clean:
-   del *~ *.obj *.exe 
+.obj.exe:
+   $(CC) $(CFLAGS) -o $@ $ $(LIBS)
 
-npecho_client.exe: npecho_client.obj
-npecho_server.exe: npecho_server.obj
+clean:
+   del *~ *.obj *.exe
 
-%.exe: 
-   $(CC) $(CFLAGS) -o $@ $ $(LIBS)
diff --git a/testprogs/win32/npecho/NMakefile b/testprogs/win32/npecho/NMakefile
index b52a9c7..a0951b0 100755
--- a/testprogs/win32/npecho/NMakefile
+++ b/testprogs/win32/npecho/NMakefile
@@ -1,7 +1,11 @@
 INCLUDES=-I 
 CFLAGS=$(INCLUDES) -Zi -nologo
 
-all: npecho_client.exe npecho_server.exe
+NPECHO = npecho_client.exe
+# missing npecho_server.exe
+NPECHO2 = npecho_client2.exe npecho_server2.exe
+
+all: $(NPECHO) $(NPECHO2)
 
 clean:
del *~ *.obj *.exe 
@@ -11,3 +15,9 @@ npecho_client.exe: npecho_client.obj
 
 npecho_server.exe: npecho_server.obj 
$(CC) $(CFLAGS) -o npecho_server.exe npecho_server.obj $(LIBS)
+
+npecho_client2.exe: npecho_client2.obj
+   $(CC) $(CFLAGS) -o npecho_client2.exe npecho_client2.obj $(LIBS)
+
+npecho_server2.exe: npecho_server2.obj
+   $(CC) $(CFLAGS) -o npecho_server2.exe npecho_server2.obj $(LIBS)
diff --git a/testprogs/win32/npecho/npecho_client2.c 
b/testprogs/win32/npecho/npecho_client2.c
new file mode 100755
index 000..0486cef
--- /dev/null
+++ b/testprogs/win32/npecho/npecho_client2.c
@@ -0,0 +1,48 @@
+/*
+ * Simple Named Pipe Client
+ * (C) 2005 Jelmer Vernooij jel...@samba.org
+ * (C) 2009 Stefan Metzmacher me...@samba.org
+ * Published to the public domain
+ */
+
+#include windows.h
+#include stdio.h
+
+#define ECHODATA Black Dog
+
+int main(int argc, char *argv[])
+{
+   HANDLE h;
+   DWORD numread = 0;
+   char *outbuffer = malloc(sizeof(ECHODATA)*2);
+
+   if (argc == 1) {
+   printf(Usage: %s pipename\n, argv[0]);
+   printf(  Where pipename is something like 
servername\\NPECHO\n);
+   return -1;
+   }
+
+   h = CreateFile(argv[1], GENERIC_READ|GENERIC_WRITE, 0, NULL, 
OPEN_EXISTING, 0, NULL);
+   if (h == INVALID_HANDLE_VALUE) {
+   printf(Error opening: %d\n, GetLastError());
+   return -1;
+   }
+
+   Sleep(1000);
+
+   if (!ReadFile(h, outbuffer, sizeof(ECHODATA)*2, numread, NULL)) {
+   printf(Error reading: %d\n, GetLastError());
+   return -1;
+   }
+
+   printf(Read: %s %d\n, outbuffer, numread);
+
+   if (!ReadFile(h, outbuffer, sizeof(ECHODATA)*2, numread, NULL)) {
+   printf(Error reading: %d\n, GetLastError());
+   return -1;
+   }
+
+   printf(Read: %s %d\n

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-636-g1bf51ea

2009-02-09 Thread Stefan Metzmacher
The branch, master has been updated
   via  1bf51ea26293120a63e445e07b08ddf718487900 (commit)
  from  c6b440d1b7f88af2897b9b2e9b09f05b488a1685 (commit)

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


- Log -
commit 1bf51ea26293120a63e445e07b08ddf718487900
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 9 12:09:01 2009 +0100

testprogs/win32: make it possible to run in byte or message mode in 
npecho_server2

metze

---

Summary of changes:
 testprogs/win32/npecho/npecho_client2.c |2 +-
 testprogs/win32/npecho/npecho_server2.c |   29 +
 2 files changed, 26 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/testprogs/win32/npecho/npecho_client2.c 
b/testprogs/win32/npecho/npecho_client2.c
index 0486cef..892574b 100755
--- a/testprogs/win32/npecho/npecho_client2.c
+++ b/testprogs/win32/npecho/npecho_client2.c
@@ -28,7 +28,7 @@ int main(int argc, char *argv[])
return -1;
}
 
-   Sleep(1000);
+   Sleep(5000);
 
if (!ReadFile(h, outbuffer, sizeof(ECHODATA)*2, numread, NULL)) {
printf(Error reading: %d\n, GetLastError());
diff --git a/testprogs/win32/npecho/npecho_server2.c 
b/testprogs/win32/npecho/npecho_server2.c
index 72edb02..281fc45 100755
--- a/testprogs/win32/npecho/npecho_server2.c
+++ b/testprogs/win32/npecho/npecho_server2.c
@@ -15,16 +15,32 @@ int main(int argc, char *argv[])
HANDLE h;
DWORD numread = 0;
char *outbuffer = malloc(sizeof(ECHODATA));
+   BOOL msgmode = FALSE;
+   DWORD type = 0;
 
if (argc == 1) {
-   printf(Usage: %s pipename\n, argv[0]);
-   printf(  Where pipename is something like 
servername\\NPECHO\n);
-   return -1;
+   goto usage;
+   } else if (argc = 3) {
+   if (strcmp(argv[2], byte) == 0) {
+   msgmode = FALSE;
+   } else if (strcmp(argv[2], message) == 0) {
+   msgmode = TRUE;
+   } else {
+   goto usage;
+   }
+   }
+
+   if (msgmode == TRUE) {
+   printf(using message mode\n);
+   type = PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | PIPE_WAIT;
+   } else {
+   printf(using byte mode\n);
+   type = PIPE_TYPE_BYTE | PIPE_READMODE_BYTE | PIPE_WAIT;
}
 
h = CreateNamedPipe(argv[1],
PIPE_ACCESS_DUPLEX,
-   PIPE_TYPE_MESSAGE | PIPE_READMODE_MESSAGE | 
PIPE_WAIT,
+   type,
PIPE_UNLIMITED_INSTANCES,
1024,
1024,
@@ -52,4 +68,9 @@ int main(int argc, char *argv[])
CloseHandle(h);
 
return 0;
+usage:
+   printf(Usage: %s pipename [mode]\n, argv[0]);
+   printf(  Where pipename is something like 
servername\\PIPE\\NPECHO\n);
+   printf(  Where mode is 'byte' or 'message'\n);
+   return -1;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-657-g3ce8951

2009-02-09 Thread Stefan Metzmacher
The branch, master has been updated
   via  3ce895181be9f0a91c17c1c5261a92159f154a86 (commit)
  from  d78fd1954714cbd033247668bad80a92bbd048e1 (commit)

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


- Log -
commit 3ce895181be9f0a91c17c1c5261a92159f154a86
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 9 13:31:03 2009 +0100

testprogs/win32: add an option to trigger small reads in npecho_client2.c

metze

---

Summary of changes:
 testprogs/win32/npecho/npecho_client2.c |   83 ---
 1 files changed, 76 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/testprogs/win32/npecho/npecho_client2.c 
b/testprogs/win32/npecho/npecho_client2.c
index 892574b..ebf4f9a 100755
--- a/testprogs/win32/npecho/npecho_client2.c
+++ b/testprogs/win32/npecho/npecho_client2.c
@@ -15,11 +15,20 @@ int main(int argc, char *argv[])
HANDLE h;
DWORD numread = 0;
char *outbuffer = malloc(sizeof(ECHODATA)*2);
+   BOOL small_reads = FALSE;
+   DWORD state = 0;
+   DWORD flags = 0;
 
if (argc == 1) {
-   printf(Usage: %s pipename\n, argv[0]);
-   printf(  Where pipename is something like 
servername\\NPECHO\n);
-   return -1;
+   goto usage;
+   } else if (argc = 3) {
+   if (strcmp(argv[2], large) == 0) {
+   small_reads = FALSE;
+   } else if (strcmp(argv[2], small) == 0) {
+   small_reads = TRUE;
+   } else {
+   goto usage;
+   }
}
 
h = CreateFile(argv[1], GENERIC_READ|GENERIC_WRITE, 0, NULL, 
OPEN_EXISTING, 0, NULL);
@@ -28,14 +37,69 @@ int main(int argc, char *argv[])
return -1;
}
 
-   Sleep(5000);
+   GetNamedPipeHandleState(h, state, NULL, NULL, NULL, NULL, 0);
 
-   if (!ReadFile(h, outbuffer, sizeof(ECHODATA)*2, numread, NULL)) {
-   printf(Error reading: %d\n, GetLastError());
-   return -1;
+   if (state  PIPE_READMODE_MESSAGE) {
+   printf(message read mode\n);
+   } else {
+   printf(byte read mode\n);
}
 
+   Sleep(5000);
+
+   if (small_reads) {
+   DWORD ofs, size, nread;
+   const char *more = ;
+   printf(small reads\n);
+   numread = 0;
+   ofs = 0;
+   size = sizeof(ECHODATA)/2;
+   if (ReadFile(h, outbuffer+ofs, size, nread, NULL)) {
+   if (state  PIPE_READMODE_MESSAGE) {
+   printf(Error message mode small read 
succeeded\n);
+   return -1;
+   }
+   } else if (GetLastError() == ERROR_MORE_DATA) {
+   if (!(state  PIPE_READMODE_MESSAGE)) {
+   printf(Error byte mode small read returned 
ERROR_MORE_DATA\n);
+   return -1;
+   }
+   more =  more data;
+   } else {
+   printf(Error reading: %d\n, GetLastError());
+   return -1;
+   }
+   printf(Small Read: %d%s\n, nread, more);
+   numread += nread;
+   ofs = size;
+   size = sizeof(ECHODATA) - ofs;
+   if (!ReadFile(h, outbuffer+ofs, size, nread, NULL)) {
+   printf(Error reading: %d\n, GetLastError());
+   return -1;
+   }
+   printf(Small Read: %d\n, nread);
+   numread += nread;
+   } else {
+   printf(large read\n);
+   if (!ReadFile(h, outbuffer, sizeof(ECHODATA)*2, numread, 
NULL)) {
+   printf(Error reading: %d\n, GetLastError());
+   return -1;
+   }
+   }
printf(Read: %s %d\n, outbuffer, numread);
+   if (state  PIPE_READMODE_MESSAGE) {
+   if (numread != sizeof(ECHODATA)) {
+   printf(message mode returned %d bytes should be %s\n,
+  numread, sizeof(ECHODATA));
+   return -1;
+   }
+   } else {
+   if (numread != (sizeof(ECHODATA)*2)) {
+   printf(message mode returned %d bytes should be %s\n,
+  numread, (sizeof(ECHODATA)*2));
+   return -1;
+   }
+   }
 
if (!ReadFile(h, outbuffer, sizeof(ECHODATA)*2, numread, NULL)) {
printf(Error reading: %d\n, GetLastError());
@@ -45,4 +109,9 @@ int main(int argc, char *argv[])
printf(Read: %s %d\n, outbuffer, numread);
 
return 0;
+usage

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-733-gf0e75ff

2009-02-10 Thread Stefan Metzmacher
The branch, master has been updated
   via  f0e75ff36390549d811557c3763d19a7f656b0d4 (commit)
   via  76a2d068f5fe6e29ac2506e0d38859a2db8892c4 (commit)
   via  bb88b038467284d2ef8bdd7236bc07492b6e22ce (commit)
   via  3c1feb82c87fe97b75ad671cd491d02432f1a839 (commit)
   via  b5e2e725117241fe9b5f346768b6a21adb5d6ec8 (commit)
   via  4248a8bf99671c33169262c88af92e9577fdfd50 (commit)
  from  cab2de7bb0bfede9fe88b212c0eba7ebf162c04a (commit)

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


- Log -
commit f0e75ff36390549d811557c3763d19a7f656b0d4
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 4 15:17:14 2009 +0100

selftest: s/SMBD/SAMBA/ in Samba.pm

metze

commit 76a2d068f5fe6e29ac2506e0d38859a2db8892c4
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 4 15:16:42 2009 +0100

selftest: allow skip as max runtime for smbd, nmbd and winbindd

metze

commit bb88b038467284d2ef8bdd7236bc07492b6e22ce
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 4 11:26:46 2009 +0100

selftest: Samba3 protect against removing /*

metze

commit 3c1feb82c87fe97b75ad671cd491d02432f1a839
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 4 11:21:29 2009 +0100

selftest: add target::Template

metze

commit b5e2e725117241fe9b5f346768b6a21adb5d6ec8
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 4 11:20:39 2009 +0100

merged-build: pass PYTHON and PERL down to make test4

metze

commit 4248a8bf99671c33169262c88af92e9577fdfd50
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 4 11:20:14 2009 +0100

selftest: add my copyright

metze

---

Summary of changes:
 selftest/selftest.pl|2 +
 selftest/target/Samba3.pm   |   35 -
 selftest/target/Samba4.pm   |   36 +++---
 selftest/target/Template.pm |   52 +++
 source3/samba4.mk   |3 +-
 5 files changed, 108 insertions(+), 20 deletions(-)
 create mode 100644 selftest/target/Template.pm


Changeset truncated at 500 lines:

diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 0be2e78..ef4c385 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -1,6 +1,7 @@
 #!/usr/bin/perl
 # Bootstrap Samba and run a number of tests against it.
 # Copyright (C) 2005-2008 Jelmer Vernooij jel...@samba.org
+# Copyright (C) 2007-2009 Stefan Metzmacher me...@samba.org
 # Published under the GNU GPL, v3 or later.
 
 =pod
@@ -287,6 +288,7 @@ sub ShowHelp()
 {
print Samba test runner
 Copyright (C) Jelmer Vernooij jelm...@samba.org
+Copyright (C) Stefan Metzmacher met...@samba.org
 
 Usage: $Script [OPTIONS] TESTNAME-REGEX
 
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 49984f1..e1bea16 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -187,7 +187,7 @@ sub stop_sig_term($$) {
 
 sub stop_sig_kill($$) {
my ($self, $pid) = @_;
-   kill(ALRM, $pid) or warn(Unable to kill $pid: $!);
+   kill(KILL, $pid) or warn(Unable to kill $pid: $!);
 }
 
 sub write_pid($$$)
@@ -226,6 +226,16 @@ sub check_or_start() {
$ENV{NSS_WRAPPER_PASSWD} = $env_vars-{NSS_WRAPPER_PASSWD};
$ENV{NSS_WRAPPER_GROUP} = $env_vars-{NSS_WRAPPER_GROUP};
 
+   if ($nmbd_maxtime eq skip) {
+   $SIG{USR1} = $SIG{ALRM} = $SIG{INT} = $SIG{QUIT} = 
$SIG{TERM} = sub {
+   my $signame = shift;
+   print(Skip nmbd received signal $signame);
+   exit 0;
+   };
+   sleep(99);
+   exit 0;
+   }
+
my @optargs = (-d0);
if (defined($ENV{NMBD_OPTIONS})) {
@optargs = split(/ /, $ENV{NMBD_OPTIONS});
@@ -257,6 +267,16 @@ sub check_or_start() {
$ENV{NSS_WRAPPER_PASSWD} = $env_vars-{NSS_WRAPPER_PASSWD};
$ENV{NSS_WRAPPER_GROUP} = $env_vars-{NSS_WRAPPER_GROUP};
 
+   if ($winbindd_maxtime eq skip) {
+   $SIG{USR1} = $SIG{ALRM} = $SIG{INT} = $SIG{QUIT} = 
$SIG{TERM} = sub {
+   my $signame = shift;
+   print(Skip winbindd received signal $signame);
+   exit 0;
+   };
+   sleep(99);
+   exit 0;
+   }
+
my @optargs = (-d0);
if (defined($ENV{WINBINDD_OPTIONS})) {
@optargs = split(/ /, $ENV{WINBINDD_OPTIONS});
@@ -288,6 +308,16 @@ sub check_or_start() {
$ENV{NSS_WRAPPER_PASSWD} = $env_vars-{NSS_WRAPPER_PASSWD

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-737-gc3baf15

2009-02-10 Thread Stefan Metzmacher
The branch, master has been updated
   via  c3baf1529ddd0191e839096ea2e68e3a3457c2d5 (commit)
   via  0d9531e2d3c94c85d607d4b246473d3ce8c3b927 (commit)
   via  cfb9cbdf686073957c16a6780448b3458990498d (commit)
   via  da12481df61b959b5d8b5114e1c0c88cb3baa405 (commit)
  from  f0e75ff36390549d811557c3763d19a7f656b0d4 (commit)

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


- Log -
commit c3baf1529ddd0191e839096ea2e68e3a3457c2d5
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 10 18:00:48 2009 +0100

selftest/Samba4: pass down the kdc address down to provision_raw_*()

metze

commit 0d9531e2d3c94c85d607d4b246473d3ce8c3b927
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 10 17:55:54 2009 +0100

selftest/Samba4: split out ldap specific stuff from provision_raw_*()

metze

commit cfb9cbdf686073957c16a6780448b3458990498d
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 10 17:01:51 2009 +0100

selftest/Samba4: split out share configurations of provision_raw*()

metze

commit da12481df61b959b5d8b5114e1c0c88cb3baa405
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 4 11:18:32 2009 +0100

selftest/Samba4: split provision() into provision_raw_prepare() and 
provision_raw_run()

This functions will be reused soon for a Samba34.pm used by
a 'make selftest34'

metze

---

Summary of changes:
 selftest/target/Samba4.pm |  503 ++--
 1 files changed, 297 insertions(+), 206 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index da1aabd..7264ddb 100644
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -506,191 +506,205 @@ EOF
close(ADMINCERTFILE);
 }
 
-sub provision($$)
+#
+# provision_raw_prepare() is also used by Samba34.pm!
+#
+sub provision_raw_prepare($$$)
 {
-   my ($self, $prefix, $server_role, $netbiosname, $netbiosalias, 
$swiface, $password) = @_;
-
-   my $server_loglevel = 1;
-   my $username = administrator;
-   my $domain = SAMBADOMAIN;
-   my $realm = SAMBA.EXAMPLE.COM;
-   my $dnsname = samba.example.com;
-   my $basedn = dc=samba,dc=example,dc=com;
-   my $unix_name = ($ENV{USER} or $ENV{LOGNAME} or `whoami`);
-   chomp $unix_name;
-   my $unix_uid = $;
-   my $unix_gids_str = $);
-   my @unix_gids = split( , $unix_gids_str);
+   my ($self, $prefix, $server_role, $netbiosname, $netbiosalias, 
$swiface, $password, $kdc_ipv4) = @_;
+   my $ctx;
+
-d $prefix or mkdir($prefix, 0777) or die(Unable to create $prefix);
my $prefix_abs = abs_path($prefix);
-   my $tmpdir = $prefix_abs/tmp;
-   my $etcdir = $prefix_abs/etc;
-   my $piddir = $prefix_abs/pid;
-   my $conffile = $etcdir/smb.conf;
-   my $krb5_config = $etcdir/krb5.conf;
-   my $privatedir = $prefix_abs/private;
-   my $ncalrpcdir = $prefix_abs/ncalrpc;
-   my $lockdir = $prefix_abs/lockdir;
-   my $winbindd_socket_dir = $prefix_abs/winbindd_socket;
-   my $winbindd_privileged_socket_dir = 
$prefix_abs/winbindd_privileged_socket;
-   my $ntp_signd_socket_dir = $prefix_abs/ntp_signd_socket;
-   my $nsswrap_passwd = $etcdir/passwd;
-   my $nsswrap_group = $etcdir/group;
 
-   my $configuration = --configfile=$conffile;
-   my $ldapdir = $privatedir/ldap;
+   die (prefix='') if $prefix_abs eq ;
+   die (prefix='/') if $prefix_abs eq /;
+
+   (system(rm -rf $prefix_abs/*) == 0) or die(Unable to clean up);
+
+   $ctx-{prefix} = $prefix;
+   $ctx-{prefix_abs} = $prefix_abs;
+   $ctx-{server_role} = $server_role;
+   $ctx-{netbiosname} = $netbiosname;
+   $ctx-{netbiosalias} = $netbiosalias;
+   $ctx-{swiface} = $swiface;
+   $ctx-{password} = $password;
+   $ctx-{kdc_ipv4} = $kdc_ipv4;
 
-   my $tlsdir = $privatedir/tls;
+   $ctx-{server_loglevel} = 1;
+   $ctx-{username} = administrator;
+   $ctx-{domain} = SAMBADOMAIN;
+   $ctx-{realm} = SAMBA.EXAMPLE.COM;
+   $ctx-{dnsname} = samba.example.com;
+   $ctx-{basedn} = dc=samba,dc=example,dc=com;
 
-   my $ifaceipv4 = 127.0.0.$swiface;
-   my $interfaces = $ifaceipv4/8;
+   my $unix_name = ($ENV{USER} or $ENV{LOGNAME} or `whoami`);
+   chomp $unix_name;
+   $ctx-{unix_name} = $unix_name;
+   $ctx-{unix_uid} = $;
+   $ctx-{unix_gids_str} = $);
+   @{$ctx-{unix_gids}} = split( , $ctx-{unix_gids_str});
+
+   $ctx-{etcdir} = $prefix_abs/etc;
+   $ctx-{piddir} = $prefix_abs/pid;
+   $ctx-{smb_conf} = $ctx-{etcdir}/smb.conf;
+   $ctx-{krb5_conf} = $ctx-{etcdir}/krb5.conf;
+   $ctx-{privatedir} = $prefix_abs/private;
+   $ctx-{ncalrpcdir} = $prefix_abs/ncalrpc

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-846-ge7f7ed8

2009-02-13 Thread Stefan Metzmacher
The branch, master has been updated
   via  e7f7ed8bf6281ef01aca53ea44acdd4af4c51aa7 (commit)
   via  f14e4d4e54f424c05147cb0e635c9b8930270262 (commit)
  from  c2f7f1b40b20e20fbc111fba59adc49a35f4fda0 (commit)

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


- Log -
commit e7f7ed8bf6281ef01aca53ea44acdd4af4c51aa7
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 11 11:47:41 2009 +0100

s3:auth: only create_local_token() should add S-1-22-X-Y sids

metze

commit f14e4d4e54f424c05147cb0e635c9b8930270262
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 11 11:46:18 2009 +0100

s3:auth: add S-1-22-X-Y sids to the local token

metze

---

Summary of changes:
 source3/auth/auth_util.c |   65 +++---
 1 files changed, 38 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 892e5c4..1f00e22 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -572,9 +572,6 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info 
**server_info,
struct passwd *pwd;
gid_t *gids;
auth_serversupplied_info *result;
-   int i;
-   size_t num_gids;
-   DOM_SID unix_group_sid;
const char *username = pdb_get_username(sampass);
NTSTATUS status;
 
@@ -646,30 +643,6 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info 
**server_info,
}
}
 
-   /* Add the Unix Group SID for each gid to catch mapped groups
-  and their Unix equivalent.  This is to solve the backwards 
-  compatibility problem of 'valid users = +ntadmin' where 
-  ntadmin has been paired with Domain Admins in the group 
-  mapping table.  Otherwise smb.conf would need to be changed
-  to 'valid user = Domain Admins'.  --jerry */
-   
-   num_gids = result-num_sids;
-   for ( i=0; inum_gids; i++ ) {
-   if ( !gid_to_unix_groups_sid( gids[i], unix_group_sid ) ) {
-   DEBUG(1,(make_server_info_sam: Failed to create SID 
-   for gid %d!\n, gids[i]));
-   continue;
-   }
-   status = add_sid_to_array_unique(result, unix_group_sid,
-result-sids,
-result-num_sids);
-   if (!NT_STATUS_IS_OK(status)) {
-   result-sam_account = NULL; /* Don't free on error 
exit. */
-   TALLOC_FREE(result);
-   return status;
-   }
-   }
-
/* For now we throw away the gids and convert via sid_to_gid
 * later. This needs fixing, but I'd like to get the code straight and
 * simple first. */
@@ -736,6 +709,7 @@ NTSTATUS create_local_token(auth_serversupplied_info 
*server_info)
 {
NTSTATUS status;
size_t i;
+   struct dom_sid tmp_sid;
 
/*
 * If winbind is not around, we can not make much use of the SIDs the
@@ -788,7 +762,44 @@ NTSTATUS create_local_token(auth_serversupplied_info 
*server_info)
server_info-utok.ngroups);
}
 
+   /*
+* Add the Unix Group SID for each gid to catch mapped groups
+* and their Unix equivalent.  This is to solve the backwards
+* compatibility problem of 'valid users = +ntadmin' where
+* ntadmin has been paired with Domain Admins in the group
+* mapping table.  Otherwise smb.conf would need to be changed
+* to 'valid user = Domain Admins'.  --jerry
+*
+* For consistency we also add the Unix User SID,
+* so that the complete unix token is represented within
+* the nt token.
+*/
+
+   if (!uid_to_unix_users_sid(server_info-utok.uid, tmp_sid)) {
+   DEBUG(1,(create_local_token: Failed to create SID 
+   for uid %d!\n, server_info-utok.uid));
+   }
+   add_sid_to_array_unique(server_info-ptok, tmp_sid,
+   server_info-ptok-user_sids,
+   server_info-ptok-num_sids);
+
+   for ( i=0; iserver_info-utok.ngroups; i++ ) {
+   if (!gid_to_unix_groups_sid( server_info-utok.groups[i], 
tmp_sid ) ) {
+   DEBUG(1,(create_local_token: Failed to create SID 
+   for gid %d!\n, server_info-utok.groups[i]));
+   continue;
+   }
+   add_sid_to_array_unique(server_info-ptok, tmp_sid,
+   server_info-ptok-user_sids,
+   server_info-ptok-num_sids

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-850-gabb96e2

2009-02-13 Thread Stefan Metzmacher
The branch, master has been updated
   via  abb96e202b93f044d39b4ed17422248e8c721811 (commit)
  from  c6f82b525913856c9b483c8df43e5eecd896203b (commit)

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


- Log -
commit abb96e202b93f044d39b4ed17422248e8c721811
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 13 13:35:19 2009 +0100

s4:torture/samba3rpc: fix the build after get_myname() changes

metze

---

Summary of changes:
 source4/torture/rpc/samba3rpc.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 5f803b0..9cb36fc 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -1249,7 +1249,7 @@ bool torture_netlogon_samba3(struct torture_context 
*torture)
 
wks_name = torture_setting_string(torture, wksname, NULL);
if (wks_name == NULL) {
-   wks_name = get_myname();
+   wks_name = get_myname(torture);
}
 
mem_ctx = talloc_init(torture_netlogon_samba3);
@@ -1426,7 +1426,7 @@ bool torture_samba3_sessionkey(struct torture_context 
*torture)
struct cli_credentials *anon_creds;
const char *wks_name;
 
-   wks_name = torture_setting_string(torture, wksname, get_myname());
+   wks_name = torture_setting_string(torture, wksname, 
get_myname(torture));
 
if (!(anon_creds = cli_credentials_init_anon(torture))) {
d_printf(create_anon_creds failed\n);
@@ -3024,7 +3024,7 @@ static NTSTATUS enumvalues(struct dcerpc_pipe *p, struct 
policy_handle *handle,
 
while (1) {
struct winreg_EnumValue r;
-   struct winreg_StringBuf name;
+   struct winreg_ValNameBuf name;
enum winreg_Type type = 0;
uint8_t buf8[1024];
NTSTATUS status;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4947-gcc1c764

2009-02-13 Thread Stefan Metzmacher
The branch, v3-3-test has been updated
   via  cc1c764effd07bb124b5b5cf03fb5a4565c8ed36 (commit)
   via  490f7214f0d26e7466f0fdfb978e4b09f2433146 (commit)
  from  3077f2ab45b08595b4849add56110a37069d12ec (commit)

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


- Log -
commit cc1c764effd07bb124b5b5cf03fb5a4565c8ed36
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 11 11:47:41 2009 +0100

s3:auth: only create_local_token() should add S-1-22-X-Y sids

metze
(cherry picked from commit e7f7ed8bf6281ef01aca53ea44acdd4af4c51aa7)

commit 490f7214f0d26e7466f0fdfb978e4b09f2433146
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 11 11:46:18 2009 +0100

s3:auth: add S-1-22-X-Y sids to the local token

metze
(cherry picked from commit f14e4d4e54f424c05147cb0e635c9b8930270262)

---

Summary of changes:
 source/auth/auth_util.c |   65 +++---
 1 files changed, 38 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c
index 9ee19ca..b84c168 100644
--- a/source/auth/auth_util.c
+++ b/source/auth/auth_util.c
@@ -555,9 +555,6 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info 
**server_info,
struct passwd *pwd;
gid_t *gids;
auth_serversupplied_info *result;
-   int i;
-   size_t num_gids;
-   DOM_SID unix_group_sid;
const char *username = pdb_get_username(sampass);
NTSTATUS status;
 
@@ -629,30 +626,6 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info 
**server_info,
}
}
 
-   /* Add the Unix Group SID for each gid to catch mapped groups
-  and their Unix equivalent.  This is to solve the backwards 
-  compatibility problem of 'valid users = +ntadmin' where 
-  ntadmin has been paired with Domain Admins in the group 
-  mapping table.  Otherwise smb.conf would need to be changed
-  to 'valid user = Domain Admins'.  --jerry */
-   
-   num_gids = result-num_sids;
-   for ( i=0; inum_gids; i++ ) {
-   if ( !gid_to_unix_groups_sid( gids[i], unix_group_sid ) ) {
-   DEBUG(1,(make_server_info_sam: Failed to create SID 
-   for gid %d!\n, gids[i]));
-   continue;
-   }
-   status = add_sid_to_array_unique(result, unix_group_sid,
-result-sids,
-result-num_sids);
-   if (!NT_STATUS_IS_OK(status)) {
-   result-sam_account = NULL; /* Don't free on error 
exit. */
-   TALLOC_FREE(result);
-   return status;
-   }
-   }
-
/* For now we throw away the gids and convert via sid_to_gid
 * later. This needs fixing, but I'd like to get the code straight and
 * simple first. */
@@ -719,6 +692,7 @@ NTSTATUS create_local_token(auth_serversupplied_info 
*server_info)
 {
NTSTATUS status;
size_t i;
+   struct dom_sid tmp_sid;
 
/*
 * If winbind is not around, we can not make much use of the SIDs the
@@ -771,7 +745,44 @@ NTSTATUS create_local_token(auth_serversupplied_info 
*server_info)
server_info-utok.ngroups);
}
 
+   /*
+* Add the Unix Group SID for each gid to catch mapped groups
+* and their Unix equivalent.  This is to solve the backwards
+* compatibility problem of 'valid users = +ntadmin' where
+* ntadmin has been paired with Domain Admins in the group
+* mapping table.  Otherwise smb.conf would need to be changed
+* to 'valid user = Domain Admins'.  --jerry
+*
+* For consistency we also add the Unix User SID,
+* so that the complete unix token is represented within
+* the nt token.
+*/
+
+   if (!uid_to_unix_users_sid(server_info-utok.uid, tmp_sid)) {
+   DEBUG(1,(create_local_token: Failed to create SID 
+   for uid %d!\n, server_info-utok.uid));
+   }
+   add_sid_to_array_unique(server_info-ptok, tmp_sid,
+   server_info-ptok-user_sids,
+   server_info-ptok-num_sids);
+
+   for ( i=0; iserver_info-utok.ngroups; i++ ) {
+   if (!gid_to_unix_groups_sid( server_info-utok.groups[i], 
tmp_sid ) ) {
+   DEBUG(1,(create_local_token: Failed to create SID 
+   for gid %d!\n, server_info-utok.groups[i]));
+   continue;
+   }
+   add_sid_to_array_unique(server_info-ptok, tmp_sid

[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3455-gebd7f45

2009-02-13 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  ebd7f45f9fe12b15dacc8ba52006ca25cb14fa0d (commit)
   via  2ac198ed8e219ce57d811d199cbdb1ae10770b15 (commit)
  from  566f4e92390312feddedf16f2175139ef62ac45e (commit)

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


- Log -
commit ebd7f45f9fe12b15dacc8ba52006ca25cb14fa0d
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 11 11:47:41 2009 +0100

s3:auth: only create_local_token() should add S-1-22-X-Y sids

metze
(cherry picked from commit e7f7ed8bf6281ef01aca53ea44acdd4af4c51aa7)
(cherry picked from commit cc1c764effd07bb124b5b5cf03fb5a4565c8ed36)

commit 2ac198ed8e219ce57d811d199cbdb1ae10770b15
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 11 11:46:18 2009 +0100

s3:auth: add S-1-22-X-Y sids to the local token

metze
(cherry picked from commit f14e4d4e54f424c05147cb0e635c9b8930270262)
(cherry picked from commit 490f7214f0d26e7466f0fdfb978e4b09f2433146)

---

Summary of changes:
 source/auth/auth_util.c |   75 +--
 1 files changed, 40 insertions(+), 35 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c
index 2f9cfa3..2039e92 100644
--- a/source/auth/auth_util.c
+++ b/source/auth/auth_util.c
@@ -547,9 +547,6 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info 
**server_info,
struct passwd *pwd;
gid_t *gids;
auth_serversupplied_info *result;
-   int i;
-   size_t num_gids;
-   DOM_SID unix_group_sid;
const char *username = pdb_get_username(sampass);
NTSTATUS status;
 
@@ -614,30 +611,6 @@ NTSTATUS make_server_info_sam(auth_serversupplied_info 
**server_info,
}
}
 
-   /* Add the Unix Group SID for each gid to catch mapped groups
-  and their Unix equivalent.  This is to solve the backwards 
-  compatibility problem of 'valid users = +ntadmin' where 
-  ntadmin has been paired with Domain Admins in the group 
-  mapping table.  Otherwise smb.conf would need to be changed
-  to 'valid user = Domain Admins'.  --jerry */
-   
-   num_gids = result-num_sids;
-   for ( i=0; inum_gids; i++ ) {
-   if ( !gid_to_unix_groups_sid( gids[i], unix_group_sid ) ) {
-   DEBUG(1,(make_server_info_sam: Failed to create SID 
-   for gid %d!\n, gids[i]));
-   continue;
-   }
-   status = add_sid_to_array_unique(result, unix_group_sid,
-result-sids,
-result-num_sids);
-   if (!NT_STATUS_IS_OK(status)) {
-   result-sam_account = NULL; /* Don't free on error 
exit. */
-   TALLOC_FREE(result);
-   return status;
-   }
-   }
-
/* For now we throw away the gids and convert via sid_to_gid
 * later. This needs fixing, but I'd like to get the code straight and
 * simple first. */
@@ -700,13 +673,7 @@ NTSTATUS create_local_token(auth_serversupplied_info 
*server_info)
TALLOC_CTX *mem_ctx;
NTSTATUS status;
size_t i;
-   
-
-   mem_ctx = talloc_new(NULL);
-   if (mem_ctx == NULL) {
-   DEBUG(0, (talloc_new failed\n));
-   return NT_STATUS_NO_MEMORY;
-   }
+   struct dom_sid tmp_sid;
 
/*
 * If winbind is not around, we can not make much use of the SIDs the
@@ -758,8 +725,46 @@ NTSTATUS create_local_token(auth_serversupplied_info 
*server_info)
add_gid_to_array_unique(server_info, gid, server_info-groups,
server_info-n_groups);
}
-   
+
+   if (!uid_to_unix_users_sid(server_info-uid, tmp_sid)) {
+   DEBUG(1,(create_local_token: Failed to create SID 
+   for uid %d!\n, server_info-uid));
+   }
+   add_sid_to_array_unique(server_info-ptok, tmp_sid,
+   server_info-ptok-user_sids,
+   server_info-ptok-num_sids);
+
+   if (!gid_to_unix_groups_sid( server_info-gid, tmp_sid)) {
+   DEBUG(1,(create_local_token: Failed to create SID 
+   for gid %d!\n, server_info-gid));
+   }
+   add_sid_to_array_unique(server_info-ptok, tmp_sid,
+   server_info-ptok-user_sids,
+   server_info-ptok-num_sids);
+
+   for ( i=0; iserver_info-ngroups; i++ ) {
+   if (!gid_to_unix_groups_sid( server_info-groups[i], tmp_sid ) 
) {
+   DEBUG(1,(create_local_token: Failed to create SID

[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3456-g6c52b5c

2009-02-13 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  6c52b5cb48d93934fe472eb57511dd05a89eb523 (commit)
  from  ebd7f45f9fe12b15dacc8ba52006ca25cb14fa0d (commit)

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


- Log -
commit 6c52b5cb48d93934fe472eb57511dd05a89eb523
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 13 17:38:52 2009 +0100

s3:auth_util.c: fix the build

metze

---

Summary of changes:
 source/auth/auth_util.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c
index 2039e92..939fbee 100644
--- a/source/auth/auth_util.c
+++ b/source/auth/auth_util.c
@@ -742,7 +742,7 @@ NTSTATUS create_local_token(auth_serversupplied_info 
*server_info)
server_info-ptok-user_sids,
server_info-ptok-num_sids);
 
-   for ( i=0; iserver_info-ngroups; i++ ) {
+   for ( i=0; iserver_info-n_groups; i++ ) {
if (!gid_to_unix_groups_sid( server_info-groups[i], tmp_sid ) 
) {
DEBUG(1,(create_local_token: Failed to create SID 
for gid %d!\n, server_info-groups[i]));
@@ -757,7 +757,7 @@ NTSTATUS create_local_token(auth_serversupplied_info 
*server_info)
debug_unix_user_token(DBGC_AUTH, 10,
  server_info-uid,
  server_info-gid,
- server_info-ngroups,
+ server_info-n_groups,
  server_info-groups);
 
mem_ctx = talloc_new(NULL);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-860-gf326202

2009-02-13 Thread Stefan Metzmacher
The branch, master has been updated
   via  f3262027a3314edda8c0659f7d7b27dbdbea0203 (commit)
   via  946573aaed89c7f2900e2d5b49ccc6b9389a5e89 (commit)
   via  113651c517209c5424303331238a2f6913094775 (commit)
   via  f337974ed55ff0217dfb59243574fcdd01e87ffc (commit)
   via  fa2461ae73e5add4b51b9eb6a44a7b7a4cb26a78 (commit)
   via  1d949fe742f3470010ee032b6b465857cc41d582 (commit)
   via  f131718c607eba5e94e32ae6c4ce81d65ec98718 (commit)
   via  f3c5bd9b776def71517a6395c595f3bd941434eb (commit)
   via  3c9ad421fb03c70f49ec60666fce592e122d5616 (commit)
   via  66b2604ef185228bb2ec5b5b0983ea39b55cd17c (commit)
  from  abb96e202b93f044d39b4ed17422248e8c721811 (commit)

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


- Log -
commit f3262027a3314edda8c0659f7d7b27dbdbea0203
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 13 18:52:40 2009 +0100

s4:configure: require the same version for external and internal libtevent

Until we reach 1.0.0, we better require the exact same version.

metze

commit 946573aaed89c7f2900e2d5b49ccc6b9389a5e89
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 13 18:51:28 2009 +0100

tevent: raise version to 0.9.3

- aio events are removed
- tevent_req infrastructure was added

metze

commit 113651c517209c5424303331238a2f6913094775
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 13 15:37:35 2009 +0100

lib/tevent: add tevent_req infrastructure

This is almost a copy of the async_req code,
which will be removed later.

metze

commit f337974ed55ff0217dfb59243574fcdd01e87ffc
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 13 15:43:04 2009 +0100

lib/tevent: add tevent_req.c as copy of lib/async_req/async_req.c

metze

commit fa2461ae73e5add4b51b9eb6a44a7b7a4cb26a78
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 13 15:36:16 2009 +0100

lib/tevent: expose ev_timeval_zero() for internal usage

metze

commit 1d949fe742f3470010ee032b6b465857cc41d582
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 13 14:05:41 2009 +0100

lib/tevent: remove broken tevent_aio support

It makes no sense to support aio events because,
the current implementation was based on IOCB_CMD_EPOLL_WAIT
which never made it into the main kernel tree.

The native linux aio can be used with select/epoll
using eventfd(), which means we can implement aio
with fd events and implement aio outside of tevent.

metze

commit f131718c607eba5e94e32ae6c4ce81d65ec98718
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 13 13:07:58 2009 +0100

s4:lib/socket: add socket_address_copy()

metze

commit f3c5bd9b776def71517a6395c595f3bd941434eb
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 13 11:38:21 2009 +0100

s4:ldb_ildap: remove compiler warnings

metze

commit 3c9ad421fb03c70f49ec60666fce592e122d5616
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 13 11:37:15 2009 +0100

s4:libcli/ldap: use const char * const *attributes as in all other places

metze

commit 66b2604ef185228bb2ec5b5b0983ea39b55cd17c
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 13 11:35:17 2009 +0100

s4:ntvfs_generic: use talloc_get_type() to remote compiler warnings

metze

---

Summary of changes:
 lib/tevent/configure.ac   |2 +-
 lib/tevent/libtevent.m4   |   12 +-
 lib/tevent/tevent.c   |   19 --
 lib/tevent/tevent.h   |  185 ++--
 lib/tevent/tevent_aio.c   |  545 -
 lib/tevent/tevent_internal.h  |   15 +-
 lib/tevent/tevent_req.c   |  276 +
 lib/tevent/tevent_timed.c |2 +-
 source3/samba4.m4 |2 +-
 source4/configure.ac  |2 +-
 source4/lib/ldb/ldb_ildap/ldb_ildap.c |   13 +-
 source4/lib/socket/socket.c   |   33 ++
 source4/lib/socket/socket.h   |2 +
 source4/libcli/ldap/ldap.h|2 +-
 source4/libcli/ldap/ldap_ildap.c  |2 +-
 source4/ntvfs/ntvfs_generic.c |8 +-
 16 files changed, 496 insertions(+), 624 deletions(-)
 delete mode 100644 lib/tevent/tevent_aio.c
 create mode 100644 lib/tevent/tevent_req.c


Changeset truncated at 500 lines:

diff --git a/lib/tevent/configure.ac b/lib/tevent/configure.ac
index 3cc06a1..4333461 100644
--- a/lib/tevent/configure.ac
+++ b/lib/tevent/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.50)
-AC_INIT(tevent, 0.9.2)
+AC_INIT(tevent, 0.9.3)
 AC_CONFIG_SRCDIR([tevent.c])
 AC_CONFIG_HEADER(config.h)
 
diff --git a/lib/tevent/libtevent.m4 b/lib/tevent/libtevent.m4
index ec2ed9c..cbfb981 100644
--- a/lib/tevent/libtevent.m4

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-913-g6211162

2009-02-15 Thread Stefan Metzmacher
The branch, master has been updated
   via  6211162d3eeebcfde86a039c67119e6388e6dfbc (commit)
  from  9a5d5cc1db0ee60486f932e34cd7961b90c70a56 (commit)

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


- Log -
commit 6211162d3eeebcfde86a039c67119e6388e6dfbc
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 16 08:52:06 2009 +0100

lib/tevent: change to LGPLv3+

metze

---

Summary of changes:
 lib/tevent/pytevent.c|   28 
 lib/tevent/tests.py  |   28 
 lib/tevent/testsuite.c   |   32 ++--
 lib/tevent/tevent.c  |   29 +
 lib/tevent/tevent.h  |   28 
 lib/tevent/tevent_debug.c|   22 +-
 lib/tevent/tevent_epoll.c|   30 +-
 lib/tevent/tevent_fd.c   |   24 ++--
 lib/tevent/tevent_internal.h |   30 +-
 lib/tevent/tevent_liboop.c   |   28 
 lib/tevent/tevent_req.c  |   22 +-
 lib/tevent/tevent_select.c   |   30 +-
 lib/tevent/tevent_signal.c   |   28 
 lib/tevent/tevent_standard.c |   30 +-
 lib/tevent/tevent_timed.c|   30 +-
 lib/tevent/tevent_util.c |   22 +-
 16 files changed, 253 insertions(+), 188 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c
index 5c34064..9bffe3d 100644
--- a/lib/tevent/pytevent.c
+++ b/lib/tevent/pytevent.c
@@ -1,19 +1,23 @@
 /* 
Unix SMB/CIFS implementation.
Copyright (C) Jelmer Vernooij jel...@samba.org 2007-2008
-   
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-   
-   This program is distributed in the hope that it will be useful,
+
+ ** NOTE! The following LGPL license applies to the tevent
+ ** library. This does NOT imply that all of Samba is released
+ ** under the LGPL
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see http://www.gnu.org/licenses/.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, see http://www.gnu.org/licenses/.
 */
 
 #include replace.h
diff --git a/lib/tevent/tests.py b/lib/tevent/tests.py
index bf594a1..53e00b0 100644
--- a/lib/tevent/tests.py
+++ b/lib/tevent/tests.py
@@ -2,19 +2,23 @@
 
 # Unix SMB/CIFS implementation.
 # Copyright (C) Jelmer Vernooij jel...@samba.org 2007
-#   
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#   
-# This program is distributed in the hope that it will be useful,
+#
+#  ** NOTE! The following LGPL license applies to the tevent
+#  ** library. This does NOT imply that all of Samba is released
+#  ** under the LGPL
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#   
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see http://www.gnu.org/licenses/.
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-921-g201a033

2009-02-16 Thread Stefan Metzmacher
The branch, master has been updated
   via  201a033c8f19f37117b6f779cbabcf9def3bf655 (commit)
   via  df75afdefbac1b9aaa766bd365850d9298a39fd1 (commit)
   via  a096a4c2aec34cb57d9fa54dda7d62be0acf0247 (commit)
   via  406e6d61147e044bd07d5478fee58c9fa3618881 (commit)
  from  8e19a288052bca5efdb0277a40c1e0fdd099cc2b (commit)

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


- Log -
commit 201a033c8f19f37117b6f779cbabcf9def3bf655
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 16 09:42:24 2009 +0100

s4:netlogon: always return correct negotiate_flags in Authenticate[2|3]()

metze

commit df75afdefbac1b9aaa766bd365850d9298a39fd1
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 16 09:41:44 2009 +0100

librpc: rerun make idl

metze

commit a096a4c2aec34cb57d9fa54dda7d62be0acf0247
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 16 09:40:36 2009 +0100

netlogon.idl: add NETLOGON_REG_SUPPORTS_AES_SHA2 flags and use correct 
names for some other flags

metze

commit 406e6d61147e044bd07d5478fee58c9fa3618881
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 13 19:03:38 2009 +0100

tevent: fix compiler warning in pytevent.c

metze

---

Summary of changes:
 lib/tevent/pytevent.c |4 ++-
 librpc/gen_ndr/ndr_netlogon.c |5 ++-
 librpc/gen_ndr/netlogon.h |7 -
 librpc/idl/netlogon.idl   |8 -
 source4/rpc_server/netlogon/dcerpc_netlogon.c |   32 -
 5 files changed, 48 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c
index 9bffe3d..4c0cbfd 100644
--- a/lib/tevent/pytevent.c
+++ b/lib/tevent/pytevent.c
@@ -77,7 +77,9 @@ static PyObject *py_event_ctx_new(PyTypeObject *type, 
PyObject *args, PyObject *
 char *name = NULL;
 struct tevent_context *ev_ctx;
 PyTEventContextObject *ret;
-if (!PyArg_ParseTupleAndKeywords(args, kwargs, |s, (char **)kwnames, 
name))
+if (!PyArg_ParseTupleAndKeywords(args, kwargs, |s,
+discard_const_p(char *, kwnames),
+name))
 return NULL;
 
 if (name == NULL)
diff --git a/librpc/gen_ndr/ndr_netlogon.c b/librpc/gen_ndr/ndr_netlogon.c
index 751967a..11a3c5e 100644
--- a/librpc/gen_ndr/ndr_netlogon.c
+++ b/librpc/gen_ndr/ndr_netlogon.c
@@ -6486,7 +6486,7 @@ _PUBLIC_ void ndr_print_netr_NegotiateFlags(struct 
ndr_print *ndr, const char *n
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_CONCURRENT_RPC, NETLOGON_NEG_CONCURRENT_RPC, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL, NETLOGON_NEG_AVOID_ACCOUNT_DB_REPL, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL, 
NETLOGON_NEG_AVOID_SECURITYAUTH_DB_REPL, r);
-   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), NETLOGON_NEG_128BIT, 
NETLOGON_NEG_128BIT, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_STRONG_KEYS, NETLOGON_NEG_STRONG_KEYS, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_TRANSITIVE_TRUSTS, NETLOGON_NEG_TRANSITIVE_TRUSTS, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_DNS_DOMAIN_TRUSTS, NETLOGON_NEG_DNS_DOMAIN_TRUSTS, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_PASSWORD_SET2, NETLOGON_NEG_PASSWORD_SET2, r);
@@ -6494,8 +6494,9 @@ _PUBLIC_ void ndr_print_netr_NegotiateFlags(struct 
ndr_print *ndr, const char *n
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_CROSS_FOREST_TRUSTS, NETLOGON_NEG_CROSS_FOREST_TRUSTS, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION, NETLOGON_NEG_NEUTRALIZE_NT4_EMULATION, 
r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_RODC_PASSTHROUGH, NETLOGON_NEG_RODC_PASSTHROUGH, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_SUPPORTS_AES_SHA2, NETLOGON_NEG_SUPPORTS_AES_SHA2, r);
ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_AUTHENTICATED_RPC_LSASS, NETLOGON_NEG_AUTHENTICATED_RPC_LSASS, 
r);
-   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), NETLOGON_NEG_SCHANNEL, 
NETLOGON_NEG_SCHANNEL, r);
+   ndr_print_bitmap_flag(ndr, sizeof(uint32_t), 
NETLOGON_NEG_AUTHENTICATED_RPC, NETLOGON_NEG_AUTHENTICATED_RPC, r);
ndr-depth--;
 }
 
diff --git a/librpc/gen_ndr/netlogon.h b/librpc/gen_ndr/netlogon.h
index 74f5c2b..97116c8 100644
--- a/librpc/gen_ndr/netlogon.h
+++ b/librpc/gen_ndr/netlogon.h
@@ -12,6 +12,8 @@
 #ifndef _HEADER_netlogon
 #define _HEADER_netlogon
 
+#define NETLOGON_NEG_128BIT( NETLOGON_NEG_STRONG_KEYS )
+#define

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-925-gfe417b2

2009-02-16 Thread Stefan Metzmacher
The branch, master has been updated
   via  fe417b29bd23b7b935669993e0f01de4c7de2378 (commit)
   via  94abbead1b76e7aafee8c59233b096a3f03b35c8 (commit)
   via  81e556f366322e3c07c1d7be4e989542380aed0e (commit)
   via  8339969ed39e4cf3577971869ef2fd127f1c3ae3 (commit)
  from  201a033c8f19f37117b6f779cbabcf9def3bf655 (commit)

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


- Log -
commit fe417b29bd23b7b935669993e0f01de4c7de2378
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 16 10:20:55 2009 +0100

s3:netlogon: implement _netr_LogonGetCapabilities() with 
NT_STATUS_NOT_IMPLEMENTED

This hopefully fixes bug #6100.

metze

commit 94abbead1b76e7aafee8c59233b096a3f03b35c8
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 16 11:00:07 2009 +0100

s4:netlogon: implement netr_LogonGetCapabilities with 
NT_STATUS_NOT_IMPLEMENTED

This hopefully fixes bug #6109.

metze

commit 81e556f366322e3c07c1d7be4e989542380aed0e
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 16 10:59:45 2009 +0100

librpc: rerun make idl

metze

commit 8339969ed39e4cf3577971869ef2fd127f1c3ae3
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 16 10:42:43 2009 +0100

netlogon.idl: add idl for netr_LogonGetCapabilities()

metze

---

Summary of changes:
 librpc/gen_ndr/cli_netlogon.c |   32 +++--
 librpc/gen_ndr/cli_netlogon.h |   11 +-
 librpc/gen_ndr/ndr_netlogon.c |  221 +++--
 librpc/gen_ndr/ndr_netlogon.h |5 +-
 librpc/gen_ndr/netlogon.h |   18 ++-
 librpc/gen_ndr/srv_netlogon.c |   37 +++--
 librpc/gen_ndr/srv_netlogon.h |4 +-
 librpc/idl/netlogon.idl   |   13 ++-
 source3/rpc_server/srv_netlog_nt.c|7 +-
 source4/rpc_server/netlogon/dcerpc_netlogon.c |9 +-
 10 files changed, 302 insertions(+), 55 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/cli_netlogon.c b/librpc/gen_ndr/cli_netlogon.c
index 456bb71..eb726f0 100644
--- a/librpc/gen_ndr/cli_netlogon.c
+++ b/librpc/gen_ndr/cli_netlogon.c
@@ -1086,23 +1086,33 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct 
rpc_pipe_client *cli,
return werror_to_ntstatus(r.out.result);
 }
 
-NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli,
-   TALLOC_CTX *mem_ctx,
-   WERROR *werror)
+NTSTATUS rpccli_netr_LogonGetCapabilities(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ const char *server_name /* [in] 
[charset(UTF16)] */,
+ const char *computer_name /* [in] 
[unique,charset(UTF16)] */,
+ struct netr_Authenticator *credential 
/* [in] [ref] */,
+ struct netr_Authenticator 
*return_authenticator /* [in,out] [ref] */,
+ uint32_t query_level /* [in]  */,
+ union netr_Capabilities *capabilities 
/* [out] [ref,switch_is(query_level)] */)
 {
-   struct netr_NETRLOGONDUMMYROUTINE1 r;
+   struct netr_LogonGetCapabilities r;
NTSTATUS status;
 
/* In parameters */
+   r.in.server_name = server_name;
+   r.in.computer_name = computer_name;
+   r.in.credential = credential;
+   r.in.return_authenticator = return_authenticator;
+   r.in.query_level = query_level;
 
if (DEBUGLEVEL = 10) {
-   NDR_PRINT_IN_DEBUG(netr_NETRLOGONDUMMYROUTINE1, r);
+   NDR_PRINT_IN_DEBUG(netr_LogonGetCapabilities, r);
}
 
status = cli-dispatch(cli,
mem_ctx,
ndr_table_netlogon,
-   NDR_NETR_NETRLOGONDUMMYROUTINE1,
+   NDR_NETR_LOGONGETCAPABILITIES,
r);
 
if (!NT_STATUS_IS_OK(status)) {
@@ -1110,7 +1120,7 @@ NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct 
rpc_pipe_client *cli,
}
 
if (DEBUGLEVEL = 10) {
-   NDR_PRINT_OUT_DEBUG(netr_NETRLOGONDUMMYROUTINE1, r);
+   NDR_PRINT_OUT_DEBUG(netr_LogonGetCapabilities, r);
}
 
if (NT_STATUS_IS_ERR(status)) {
@@ -1118,13 +1128,11 @@ NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct 
rpc_pipe_client *cli,
}
 
/* Return variables */
+   *return_authenticator = *r.out.return_authenticator;
+   *capabilities = *r.out.capabilities;
 
/* Return result */
-   if (werror) {
-   *werror = r.out.result

[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-4976-g3dc256a

2009-02-17 Thread Stefan Metzmacher
The branch, v3-3-test has been updated
   via  3dc256ad0f1d2b1c131d67e033533dd316eab252 (commit)
   via  9d56f847b6fb88ab0529fdc6318dff5389c9d3db (commit)
   via  eb1a2e4aea76462086a4303ba325c4da49e891cd (commit)
   via  2f858cb914842e9af1331477ec6eb9782dbd0cf5 (commit)
   via  5410134c70e3302c05b73109610c28dfa1a0dc69 (commit)
  from  1cbfcd7dcb90c117fa623246d6924e157ec5be3f (commit)

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


- Log -
commit 3dc256ad0f1d2b1c131d67e033533dd316eab252
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 17 10:28:37 2009 +0100

s3:make: use pidl/pidl for 'make idl'

metze

commit 9d56f847b6fb88ab0529fdc6318dff5389c9d3db
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 17 10:28:04 2009 +0100

fix proto.h after idl changes

metze

commit eb1a2e4aea76462086a4303ba325c4da49e891cd
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 17 09:04:58 2009 +0100

librpc: rerun 'PIDL=pidl/pidl make idl'

metze

commit 2f858cb914842e9af1331477ec6eb9782dbd0cf5
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 16 10:20:55 2009 +0100

s3:netlogon: implement _netr_LogonGetCapabilities() with 
NT_STATUS_NOT_IMPLEMENTED

This hopefully fixes bug #6100.

metze
(cherry picked from commit fe417b29bd23b7b935669993e0f01de4c7de2378)

commit 5410134c70e3302c05b73109610c28dfa1a0dc69
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 16 10:42:43 2009 +0100

netlogon.idl: add idl for netr_LogonGetCapabilities()

metze
(cherry picked from commit 8339969ed39e4cf3577971869ef2fd127f1c3ae3)

---

Summary of changes:
 source/Makefile.in   |4 +-
 source/include/proto.h   |6 +-
 source/librpc/gen_ndr/cli_netlogon.c |   32 +++--
 source/librpc/gen_ndr/cli_netlogon.h |   11 ++-
 source/librpc/gen_ndr/ndr_netlogon.c |  221 +++--
 source/librpc/gen_ndr/ndr_netlogon.h |5 +-
 source/librpc/gen_ndr/netlogon.h |   18 +++-
 source/librpc/gen_ndr/srv_netlogon.c |   24 +++--
 source/librpc/gen_ndr/srv_netlogon.h |2 +-
 source/librpc/idl/netlogon.idl   |   13 ++-
 source/rpc_server/srv_netlog_nt.c|7 +-
 11 files changed, 292 insertions(+), 51 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index 5fe1ead..a77ec48 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -1201,8 +1201,10 @@ IDL_FILES = lsa.idl dfs.idl echo.idl winreg.idl 
initshutdown.idl \
dssetup.idl krb5pac.idl ntsvcs.idl libnetapi.idl drsuapi.idl 
drsblobs.idl \
nbt.idl
 
+PIDL = $(srcdir)/pidl/pidl
+
 idl::
-   @IDL_FILES=$(IDL_FILES) CPP=$(CPP) PERL=$(PERL) \
+   @IDL_FILES=$(IDL_FILES) CPP=$(CPP) PERL=$(PERL) PIDL=$(PIDL)\
 srcdir=$(srcdir) $(srcdir)/script/build_idl.sh $(PIDL_ARGS)
 
 
diff --git a/source/include/proto.h b/source/include/proto.h
index 04ceb83..fd712c0 100644
--- a/source/include/proto.h
+++ b/source/include/proto.h
@@ -2968,7 +2968,7 @@ _PUBLIC_ void ndr_print_netr_DatabaseRedo(struct 
ndr_print *ndr, const char *nam
 _PUBLIC_ void ndr_print_netr_LogonControl2Ex(struct ndr_print *ndr, const char 
*name, int flags, const struct netr_LogonControl2Ex *r);
 _PUBLIC_ void ndr_print_netr_NetrEnumerateTrustedDomains(struct ndr_print 
*ndr, const char *name, int flags, const struct 
netr_NetrEnumerateTrustedDomains *r);
 _PUBLIC_ void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char 
*name, int flags, const struct netr_DsRGetDCName *r);
-_PUBLIC_ void ndr_print_netr_NETRLOGONDUMMYROUTINE1(struct ndr_print *ndr, 
const char *name, int flags, const struct netr_NETRLOGONDUMMYROUTINE1 *r);
+_PUBLIC_ void ndr_print_netr_Capabilities(struct ndr_print *ndr, const char 
*name, const union netr_Capabilities *r);
 _PUBLIC_ void ndr_print_netr_NETRLOGONSETSERVICEBITS(struct ndr_print *ndr, 
const char *name, int flags, const struct netr_NETRLOGONSETSERVICEBITS *r);
 _PUBLIC_ void ndr_print_netr_LogonGetTrustRid(struct ndr_print *ndr, const 
char *name, int flags, const struct netr_LogonGetTrustRid *r);
 _PUBLIC_ void ndr_print_netr_NETRLOGONCOMPUTESERVERDIGEST(struct ndr_print 
*ndr, const char *name, int flags, const struct 
netr_NETRLOGONCOMPUTESERVERDIGEST *r);
@@ -8547,8 +8547,8 @@ WERROR _netr_LogonControl2Ex(pipes_struct *p,
 struct netr_LogonControl2Ex *r);
 WERROR _netr_DsRGetDCName(pipes_struct *p,
  struct netr_DsRGetDCName *r);
-WERROR _netr_NETRLOGONDUMMYROUTINE1(pipes_struct *p,
-   struct netr_NETRLOGONDUMMYROUTINE1 *r);
+NTSTATUS _netr_LogonGetCapabilities(pipes_struct *p,
+   struct netr_LogonGetCapabilities *r);
 WERROR _netr_NETRLOGONSETSERVICEBITS

[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3472-g47bbea2

2009-02-17 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  47bbea27c8972ca320e90c7c678fe6da28a269f1 (commit)
   via  e065eff98c9bd57155be824eef319f4c4d191e5e (commit)
   via  9edecdaa12fa42a356008b90710475ad9a1ae581 (commit)
   via  4a353efc45480d3de91f91f618135faf8eb0429e (commit)
  from  37a29ad53eae02a29fbb0bf14731487328150d23 (commit)

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


- Log -
commit 47bbea27c8972ca320e90c7c678fe6da28a269f1
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 17 10:28:37 2009 +0100

s3:make: use pidl/pidl for 'make idl'

metze
(cherry picked from commit 3dc256ad0f1d2b1c131d67e033533dd316eab252)

commit e065eff98c9bd57155be824eef319f4c4d191e5e
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 17 09:04:58 2009 +0100

librpc: rerun 'PIDL=pidl/pidl make idl'

metze
(cherry picked from commit eb1a2e4aea76462086a4303ba325c4da49e891cd)

commit 9edecdaa12fa42a356008b90710475ad9a1ae581
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 16 10:20:55 2009 +0100

s3:netlogon: implement _netr_LogonGetCapabilities() with 
NT_STATUS_NOT_IMPLEMENTED

This hopefully fixes bug #6100.

metze
(cherry picked from commit fe417b29bd23b7b935669993e0f01de4c7de2378)
(cherry picked from commit 2f858cb914842e9af1331477ec6eb9782dbd0cf5)

commit 4a353efc45480d3de91f91f618135faf8eb0429e
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 16 10:42:43 2009 +0100

netlogon.idl: add idl for netr_LogonGetCapabilities()

metze
(cherry picked from commit 8339969ed39e4cf3577971869ef2fd127f1c3ae3)
(cherry picked from commit 5410134c70e3302c05b73109610c28dfa1a0dc69)

---

Summary of changes:
 source/Makefile.in   |4 +-
 source/librpc/gen_ndr/cli_netlogon.c |   32 +++--
 source/librpc/gen_ndr/cli_netlogon.h |   11 ++-
 source/librpc/gen_ndr/ndr_netlogon.c |  221 +++--
 source/librpc/gen_ndr/ndr_netlogon.h |5 +-
 source/librpc/gen_ndr/netlogon.h |   18 +++-
 source/librpc/gen_ndr/srv_netlogon.c |   24 +++--
 source/librpc/gen_ndr/srv_netlogon.h |2 +-
 source/librpc/idl/netlogon.idl   |   13 ++-
 source/rpc_server/srv_netlog_nt.c|7 +-
 10 files changed, 289 insertions(+), 48 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/Makefile.in b/source/Makefile.in
index 7a30c04..a7ddf9c 100644
--- a/source/Makefile.in
+++ b/source/Makefile.in
@@ -1153,8 +1153,10 @@ IDL_FILES = lsa.idl dfs.idl echo.idl winreg.idl 
initshutdown.idl \
epmapper.idl messaging.idl xattr.idl misc.idl samr.idl security.idl \
dssetup.idl krb5pac.idl ntsvcs.idl libnetapi.idl
 
+PIDL = $(srcdir)/pidl/pidl
+
 idl::
-   @IDL_FILES=$(IDL_FILES) CPP=$(CPP) PERL=$(PERL) \
+   @IDL_FILES=$(IDL_FILES) CPP=$(CPP) PERL=$(PERL) PIDL=$(PIDL)\
 srcdir=$(srcdir) $(srcdir)/script/build_idl.sh $(PIDL_ARGS)
 
 
diff --git a/source/librpc/gen_ndr/cli_netlogon.c 
b/source/librpc/gen_ndr/cli_netlogon.c
index f5b4715..e6b77ee 100644
--- a/source/librpc/gen_ndr/cli_netlogon.c
+++ b/source/librpc/gen_ndr/cli_netlogon.c
@@ -1107,24 +1107,34 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct 
rpc_pipe_client *cli,
return werror_to_ntstatus(r.out.result);
 }
 
-NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli,
-   TALLOC_CTX *mem_ctx,
-   WERROR *werror)
+NTSTATUS rpccli_netr_LogonGetCapabilities(struct rpc_pipe_client *cli,
+ TALLOC_CTX *mem_ctx,
+ const char *server_name /* [in] 
[charset(UTF16)] */,
+ const char *computer_name /* [in] 
[unique,charset(UTF16)] */,
+ struct netr_Authenticator *credential 
/* [in] [ref] */,
+ struct netr_Authenticator 
*return_authenticator /* [in,out] [ref] */,
+ uint32_t query_level /* [in]  */,
+ union netr_Capabilities *capabilities 
/* [out] [ref,switch_is(query_level)] */)
 {
-   struct netr_NETRLOGONDUMMYROUTINE1 r;
+   struct netr_LogonGetCapabilities r;
NTSTATUS status;
 
/* In parameters */
+   r.in.server_name = server_name;
+   r.in.computer_name = computer_name;
+   r.in.credential = credential;
+   r.in.return_authenticator = return_authenticator;
+   r.in.query_level = query_level;
 
if (DEBUGLEVEL = 10) {
-   NDR_PRINT_IN_DEBUG(netr_NETRLOGONDUMMYROUTINE1, r);
+   NDR_PRINT_IN_DEBUG(netr_LogonGetCapabilities, r);
}
 
status = cli_do_rpc_ndr(cli

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-957-g3f147cb

2009-02-18 Thread Stefan Metzmacher
The branch, master has been updated
   via  3f147cb7a3706d00a3cbac51013e09f93e9b7055 (commit)
  from  48ba64010046bece3b54009131f88c851ec82047 (commit)

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


- Log -
commit 3f147cb7a3706d00a3cbac51013e09f93e9b7055
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 18 06:26:30 2009 +0100

s4:netlogon: don't mix in and out negotiate_flags in 
dcesrv_netr_ServerAuthenticate()

metze

---

Summary of changes:
 source4/rpc_server/netlogon/dcerpc_netlogon.c |7 ---
 1 files changed, 4 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c 
b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index ac7ce73..0fa638e 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -273,7 +273,8 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate(struct 
dcesrv_call_state *dce_cal
 *
 * (I think ... = 0; seems wrong here --metze)
 */
-   uint32_t negotiate_flags = 0;  
+   uint32_t negotiate_flags_in = 0;
+   uint32_t negotiate_flags_out = 0;
 
r3.in.server_name = r-in.server_name;
r3.in.account_name = r-in.account_name;
@@ -281,8 +282,8 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate(struct 
dcesrv_call_state *dce_cal
r3.in.computer_name = r-in.computer_name;
r3.in.credentials = r-in.credentials;
r3.out.return_credentials = r-out.return_credentials;
-   r3.in.negotiate_flags = negotiate_flags;
-   r3.out.negotiate_flags = negotiate_flags;
+   r3.in.negotiate_flags = negotiate_flags_in;
+   r3.out.negotiate_flags = negotiate_flags_out;
r3.out.rid = rid;

return dcesrv_netr_ServerAuthenticate3(dce_call, mem_ctx, r3);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-959-g975a881

2009-02-18 Thread Stefan Metzmacher
The branch, master has been updated
   via  975a881d54a4223fa616895778a69b08e9243aae (commit)
   via  7f6618a3deb77fc5c4724c598ecacdbf87c5e9c4 (commit)
  from  3f147cb7a3706d00a3cbac51013e09f93e9b7055 (commit)

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


- Log -
commit 975a881d54a4223fa616895778a69b08e9243aae
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 17 10:22:33 2009 +0100

tevent: add tevent_wakeup_send/recv()

This can be used as tevent_req based timer event.

metze

commit 7f6618a3deb77fc5c4724c598ecacdbf87c5e9c4
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 17 10:15:18 2009 +0100

tevent: rename tevent_req_set_timeout() = tevent_req_set_endtime()

This makes more clear what the function does.

metze

---

Summary of changes:
 lib/tevent/libtevent.m4|3 +-
 lib/tevent/tevent.h|6 +++-
 lib/tevent/tevent_req.c|2 +-
 lib/tevent/tevent_wakeup.c |   70 
 4 files changed, 78 insertions(+), 3 deletions(-)
 create mode 100644 lib/tevent/tevent_wakeup.c


Changeset truncated at 500 lines:

diff --git a/lib/tevent/libtevent.m4 b/lib/tevent/libtevent.m4
index cbfb981..29a64ae 100644
--- a/lib/tevent/libtevent.m4
+++ b/lib/tevent/libtevent.m4
@@ -26,7 +26,8 @@ AC_SUBST(TEVENT_LIBS)
 
 TEVENT_CFLAGS=-I$teventdir
 
-TEVENT_OBJ=tevent.o tevent_fd.o tevent_timed.o tevent_signal.o tevent_req.o 
tevent_debug.o tevent_util.o
+TEVENT_OBJ=tevent.o tevent_fd.o tevent_timed.o tevent_signal.o tevent_debug.o 
tevent_util.o
+TEVENT_OBJ=$TEVENT_OBJ tevent_req.o tevent_wakeup.o
 TEVENT_OBJ=$TEVENT_OBJ tevent_standard.o tevent_select.o
 
 AC_CHECK_HEADERS(sys/epoll.h)
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index 8e3d097..16fac73 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -278,7 +278,7 @@ struct tevent_req *_tevent_req_create(TALLOC_CTX *mem_ctx,
_tevent_req_create((_mem_ctx), (_pstate), sizeof(_type), \
   #_type, __location__)
 
-bool tevent_req_set_timeout(struct tevent_req *req,
+bool tevent_req_set_endtime(struct tevent_req *req,
struct tevent_context *ev,
struct timeval endtime);
 
@@ -299,6 +299,10 @@ bool tevent_req_is_error(struct tevent_req *req,
 enum tevent_req_state *state,
 uint64_t *error);
 
+struct tevent_req *tevent_wakeup_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct timeval wakeup_time);
+bool tevent_wakeup_recv(struct tevent_req *req);
 
 int tevent_timeval_compare(const struct timeval *tv1,
   const struct timeval *tv2);
diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index 0846413..800e385 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -262,7 +262,7 @@ static void tevent_req_timedout(struct tevent_context *ev,
tevent_req_finish(req, TEVENT_REQ_TIMED_OUT);
 }
 
-bool tevent_req_set_timeout(struct tevent_req *req,
+bool tevent_req_set_endtime(struct tevent_req *req,
struct tevent_context *ev,
struct timeval endtime)
 {
diff --git a/lib/tevent/tevent_wakeup.c b/lib/tevent/tevent_wakeup.c
new file mode 100644
index 000..82c3942
--- /dev/null
+++ b/lib/tevent/tevent_wakeup.c
@@ -0,0 +1,70 @@
+/*
+   Unix SMB/CIFS implementation.
+   Infrastructure for async requests
+   Copyright (C) Volker Lendecke 2008
+   Copyright (C) Stefan Metzmacher 2009
+
+ ** NOTE! The following LGPL license applies to the tevent
+ ** library. This does NOT imply that all of Samba is released
+ ** under the LGPL
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, see http://www.gnu.org/licenses/.
+*/
+
+#include replace.h
+#include tevent.h
+#include tevent_internal.h
+#include tevent_util.h
+
+struct tevent_wakeup_state {
+   struct timeval wakeup_time;
+};
+
+struct tevent_req *tevent_wakeup_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ struct timeval wakeup_time)
+{
+   struct

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-997-g052f3f0

2009-02-19 Thread Stefan Metzmacher
The branch, master has been updated
   via  052f3f0d4da01d27835ef265036a36d20941f1a8 (commit)
   via  7082e4526f268fa1d09d04b246025bce3174aab3 (commit)
   via  d61e152b2970057a6ab34f8371fd19bd922b284e (commit)
   via  6563c2b7e4c15cf220ed618da72331d0aca4e282 (commit)
  from  96b3242f124d60fd8d8b6f5a34b57c26c42dfd14 (commit)

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


- Log -
commit 052f3f0d4da01d27835ef265036a36d20941f1a8
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 19 11:12:33 2009 +0100

s4:librpc/ndr: if uninitialized variable in string_array code

metze

commit 7082e4526f268fa1d09d04b246025bce3174aab3
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 19 11:11:28 2009 +0100

s3:librpc/ndr: if uninitialized variable in string_array code

metze

commit d61e152b2970057a6ab34f8371fd19bd922b284e
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 19 11:11:04 2009 +0100

librpc: rerun make idl

commit 6563c2b7e4c15cf220ed618da72331d0aca4e282
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 19 10:32:48 2009 +0100

pidl:NDR/Parser: don't call [noopnum] function when creating the 
ndr_interface_table

metze

---

Summary of changes:
 librpc/gen_ndr/ndr_spoolss.c |2 +-
 pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm |6 +++---
 source3/librpc/ndr/ndr_string.c  |2 +-
 source4/librpc/ndr/ndr_string.c  |2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/gen_ndr/ndr_spoolss.c b/librpc/gen_ndr/ndr_spoolss.c
index 23eccfc..4aafa4a 100644
--- a/librpc/gen_ndr/ndr_spoolss.c
+++ b/librpc/gen_ndr/ndr_spoolss.c
@@ -23639,7 +23639,7 @@ const struct ndr_interface_table ndr_table_spoolss = {
NDR_SPOOLSS_VERSION
},
.helpstring = NDR_SPOOLSS_HELPSTRING,
-   .num_calls  = 114,
+   .num_calls  = 96,
.calls  = spoolss_calls,
.endpoints  = spoolss_endpoints,
.authservices   = spoolss_authservices
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 
b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
index 84752da..af6885f 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
@@ -2236,7 +2236,7 @@ sub AuthServiceStruct($$$)
 sub FunctionCallEntry($$)
 {
my ($self, $d) = @_;
-   return if not defined($d-{OPNUM});
+   return 0 if not defined($d-{OPNUM});
$self-pidl(\t{);
$self-pidl(\t\t\$d-{NAME}\,);
$self-pidl(\t\tsizeof(struct $d-{NAME}),);
@@ -2245,6 +2245,7 @@ sub FunctionCallEntry($$)
$self-pidl(\t\t(ndr_print_function_t) ndr_print_$d-{NAME},);
$self-pidl(\t\t.($d-{ASYNC}?true:false).,);
$self-pidl(\t},);
+   return 1;
 }
 
 #
@@ -2261,8 +2262,7 @@ sub FunctionTable($$)
$self-pidl(static const struct ndr_interface_call 
$interface-{NAME}\_calls[] = {);
 
foreach my $d 
(@{$interface-{INHERITED_FUNCTIONS}},@{$interface-{FUNCTIONS}}) {
-   $self-FunctionCallEntry($d);
-   $count++;
+   $count += $self-FunctionCallEntry($d);
}
$self-pidl(\t{ NULL, 0, NULL, NULL, NULL, false });
$self-pidl(};);
diff --git a/source3/librpc/ndr/ndr_string.c b/source3/librpc/ndr/ndr_string.c
index 985d0f4..519be7b 100644
--- a/source3/librpc/ndr/ndr_string.c
+++ b/source3/librpc/ndr/ndr_string.c
@@ -443,7 +443,7 @@ _PUBLIC_ uint32_t ndr_size_string(int ret, const char * 
const* string, int flags
 */
 _PUBLIC_ enum ndr_err_code ndr_pull_string_array(struct ndr_pull *ndr, int 
ndr_flags, const char ***_a)
 {
-   const char **a = *_a;
+   const char **a = NULL;
uint32_t count;
unsigned flags = ndr-flags;
unsigned saved_flags = ndr-flags;
diff --git a/source4/librpc/ndr/ndr_string.c b/source4/librpc/ndr/ndr_string.c
index a2fcdea..1b5da2d 100644
--- a/source4/librpc/ndr/ndr_string.c
+++ b/source4/librpc/ndr/ndr_string.c
@@ -443,7 +443,7 @@ _PUBLIC_ uint32_t ndr_size_string(int ret, const char * 
const* string, int flags
 */
 _PUBLIC_ enum ndr_err_code ndr_pull_string_array(struct ndr_pull *ndr, int 
ndr_flags, const char ***_a)
 {
-   const char **a = *_a;
+   const char **a = NULL;
uint32_t count;
unsigned flags = ndr-flags;
unsigned saved_flags = ndr-flags;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-1074-gcd6ae0d

2009-02-23 Thread Stefan Metzmacher
The branch, master has been updated
   via  cd6ae0de52164dd6f50b3614f2511acb3eb15993 (commit)
  from  09a7f93f6be66a8f2a124e49b4effe2b5863f01d (commit)

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


- Log -
commit cd6ae0de52164dd6f50b3614f2511acb3eb15993
Author: Björn Jacke b...@sernet.de
Date:   Sun Feb 22 00:43:38 2009 +0100

all BSDs use this evironment variable

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

---

Summary of changes:
 lib/replace/libreplace_ld.m4 |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/libreplace_ld.m4 b/lib/replace/libreplace_ld.m4
index 81bde46..9529c5e 100644
--- a/lib/replace/libreplace_ld.m4
+++ b/lib/replace/libreplace_ld.m4
@@ -292,7 +292,7 @@ AC_DEFUN([AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR],
*linux*)
LIB_PATH_VAR=LD_LIBRARY_PATH
;;
-   *netbsd*)
+   *bsd*)
LIB_PATH_VAR=LD_LIBRARY_PATH
;;
*solaris*)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-5002-g1ad5f50

2009-02-23 Thread Stefan Metzmacher
The branch, v3-3-test has been updated
   via  1ad5f50bdab761c7d3894e94f8fe3b171ec1b219 (commit)
  from  fdb5c65fc51784b6a159748ec4df3953b7d2c1cb (commit)

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


- Log -
commit 1ad5f50bdab761c7d3894e94f8fe3b171ec1b219
Author: Björn Jacke b...@sernet.de
Date:   Sun Feb 22 00:43:38 2009 +0100

all BSDs use this evironment variable

Signed-off-by: Stefan Metzmacher me...@samba.org
(cherry picked from commit cd6ae0de52164dd6f50b3614f2511acb3eb15993)

---

Summary of changes:
 source/lib/replace/libreplace_ld.m4 |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/replace/libreplace_ld.m4 
b/source/lib/replace/libreplace_ld.m4
index 81bde46..9529c5e 100644
--- a/source/lib/replace/libreplace_ld.m4
+++ b/source/lib/replace/libreplace_ld.m4
@@ -292,7 +292,7 @@ AC_DEFUN([AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR],
*linux*)
LIB_PATH_VAR=LD_LIBRARY_PATH
;;
-   *netbsd*)
+   *bsd*)
LIB_PATH_VAR=LD_LIBRARY_PATH
;;
*solaris*)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3483-gbc53054

2009-02-23 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  bc53054616d442b1b28086181d81776f1c33834f (commit)
  from  b19f58ccd088a10e487a1261cadb4f3f41987391 (commit)

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


- Log -
commit bc53054616d442b1b28086181d81776f1c33834f
Author: Björn Jacke b...@sernet.de
Date:   Sun Feb 22 00:43:38 2009 +0100

all BSDs use this evironment variable

Signed-off-by: Stefan Metzmacher me...@samba.org
(cherry picked from commit cd6ae0de52164dd6f50b3614f2511acb3eb15993)
(cherry picked from commit 1ad5f50bdab761c7d3894e94f8fe3b171ec1b219)

---

Summary of changes:
 source/lib/replace/libreplace_ld.m4 |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/replace/libreplace_ld.m4 
b/source/lib/replace/libreplace_ld.m4
index 9995d69..cb54c25 100644
--- a/source/lib/replace/libreplace_ld.m4
+++ b/source/lib/replace/libreplace_ld.m4
@@ -292,7 +292,7 @@ AC_DEFUN([AC_LIBREPLACE_RUNTIME_LIB_PATH_VAR],
*linux*)
LIB_PATH_VAR=LD_LIBRARY_PATH
;;
-   *netbsd*)
+   *bsd*)
LIB_PATH_VAR=LD_LIBRARY_PATH
;;
*solaris*)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-1136-g023164f

2009-02-24 Thread Stefan Metzmacher
The branch, master has been updated
   via  023164f77e36694f4dc7435119f28f42ea0fb0ec (commit)
   via  f6b0a99cefaedfa7642af31f8fcc4457bacb07a3 (commit)
   via  7b1c5c94f6a08108d90a73ba78a91df661d68064 (commit)
   via  18b30e5646d7a484c1714eac9b9ce1f8c1a8241a (commit)
   via  7aaec963c1764869b042240fb5b5d6a339ee052b (commit)
   via  ef0fa403f1c5d670b7991770e7fbb8394879de4b (commit)
   via  536318549fba35a4d9eb60fbb2d0e91b88c44a7b (commit)
   via  1ab9c1a40290fbecf8b7090492363eab0443c7c6 (commit)
   via  12184d413205d2ad7cbb9e1aaf2db97c7bcb4fc2 (commit)
   via  d1922725c66c9f4de25c1d664ae03c90e6c098fb (commit)
   via  dc03a328d8ff55df30a5b996b4a17e82db29708b (commit)
  from  d7ca4997017e86b6f23ced64f1f1672bfb15716b (commit)

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


- Log -
commit 023164f77e36694f4dc7435119f28f42ea0fb0ec
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 24 14:23:12 2009 +0100

s3:Makefile: build libcli/ldap files

metze

commit f6b0a99cefaedfa7642af31f8fcc4457bacb07a3
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 24 16:49:26 2009 +0100

libcli/ldap: move generic ldap control encoding code to ldap_message.c

As they can we static there, we pass the specific handlers as parameter
where we need to support controls.

metze

commit 7b1c5c94f6a08108d90a73ba78a91df661d68064
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 24 14:45:01 2009 +0100

s4:libcli/ldap: don't use 'void **out' as arguments as the behavior is not 
defined in C.

metze

commit 18b30e5646d7a484c1714eac9b9ce1f8c1a8241a
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 24 12:50:43 2009 +0100

libcli/ldap: move ldap_ndr from source4/ to toplevel

metze

commit 7aaec963c1764869b042240fb5b5d6a339ee052b
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 24 12:29:59 2009 +0100

libcli/ldap: fix compiler warnings

metze

commit ef0fa403f1c5d670b7991770e7fbb8394879de4b
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 24 16:52:37 2009 +0100

libcli/ldap: move ldap_errors.h to the toplevel and install it

metze

commit 536318549fba35a4d9eb60fbb2d0e91b88c44a7b
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 24 12:13:41 2009 +0100

libcli/ldap: move ldap_message.[ch] from source4/ to the toplevel

metze

commit 1ab9c1a40290fbecf8b7090492363eab0443c7c6
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 24 12:09:11 2009 +0100

s4:libcli/ldap: remove reference to DEBUG()

This prepares using ldap_message.c in source3/ later

metze

commit 12184d413205d2ad7cbb9e1aaf2db97c7bcb4fc2
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 24 11:40:18 2009 +0100

s4:libcli: split out LIBCLI_LDAP_MESSAGE subsystem

metze

commit d1922725c66c9f4de25c1d664ae03c90e6c098fb
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 24 14:06:27 2009 +0100

s3: remove unused smb_ldap.h

metze

commit dc03a328d8ff55df30a5b996b4a17e82db29708b
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 24 15:28:54 2009 +0100

s3:example/VFS: fix the build

metze

---

Summary of changes:
 examples/VFS/skel_opaque.c |6 +-
 examples/VFS/skel_transparent.c|6 +-
 libcli/ldap/config.mk  |   15 +
 libcli/ldap/ldap_errors.h  |   68 ++
 libcli/ldap/ldap_message.c | 1611 
 libcli/ldap/ldap_message.h |  235 
 libcli/ldap/ldap_ndr.c |   96 ++
 {source4/libcli = libcli}/ldap/ldap_ndr.h |0 
 source3/Makefile.in|   23 +-
 source3/include/includes.h |2 -
 source3/include/smb_ldap.h |  255 -
 source4/headermap.txt  |4 +-
 source4/ldap_server/ldap_server.c  |4 +-
 source4/libcli/cldap/cldap.c   |   12 +-
 source4/libcli/ldap/config.mk  |   16 +-
 source4/libcli/ldap/ldap.c | 1411 
 source4/libcli/ldap/ldap.h |  191 +
 source4/libcli/ldap/ldap_client.c  |4 +-
 source4/libcli/ldap/ldap_controls.c|  168 +---
 source4/libcli/ldap/ldap_errors.h  |   66 --
 source4/libcli/ldap/ldap_msg.c |   87 --
 source4/libcli/ldap/ldap_ndr.c |   96 --
 source4/libcli/util/nterr.c|2 +-
 source4/main.mk|2 +
 24 files changed, 2098 insertions(+), 2282 deletions(-)
 create mode 100644 libcli/ldap/config.mk
 create mode 100644 libcli/ldap/ldap_errors.h
 create mode 100644 libcli/ldap/ldap_message.c
 create mode 100644 libcli/ldap/ldap_message.h

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-1182-gdc0e46a

2009-02-24 Thread Stefan Metzmacher
The branch, master has been updated
   via  dc0e46afb7018a1da666729c6d61e8ea85dcf07d (commit)
  from  afc7e45a4ccf8505e4c598334e339e79ba036057 (commit)

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


- Log -
commit dc0e46afb7018a1da666729c6d61e8ea85dcf07d
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 25 08:42:33 2009 +0100

s4:build: add some comments to the SMB_EXT_LIB() definition

metze

---

Summary of changes:
 source4/build/m4/public.m4 |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4
index 1927e99..ffdf92f 100644
--- a/source4/build/m4/public.m4
+++ b/source4/build/m4/public.m4
@@ -157,6 +157,13 @@ mkinclude $1
 
 ])
 
+dnl
+dnl SMB_EXT_LIB() just specifies the details of the library.
+dnl Note: the library isn't enabled by default.
+dnl You need to enable it with SMB_ENABLE(name) if configure
+dnl find it should be used. E.g. it should not be enabled
+dnl if the library is present, but the header file is missing.
+dnl
 dnl SMB_EXT_LIB(name,libs,cflags,cppflags,ldflags)
 AC_DEFUN([SMB_EXT_LIB],
 [


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-1210-g13ac0dc

2009-02-25 Thread Stefan Metzmacher
The branch, master has been updated
   via  13ac0dc4565b1cbdb977b6959562f3f8f9ac5ff8 (commit)
  from  5bab95b58366ff001b4967bdb0674f42dc990a77 (commit)

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


- Log -
commit 13ac0dc4565b1cbdb977b6959562f3f8f9ac5ff8
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 25 13:53:19 2009 +0100

tevent: add tevent_req_poll() function

metze

---

Summary of changes:
 lib/tevent/tevent.h |3 +++
 lib/tevent/tevent_req.c |   15 +++
 2 files changed, 18 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index b3d1c6d..b361122 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -296,6 +296,9 @@ struct tevent_req *tevent_req_post(struct tevent_req *req,
 
 bool tevent_req_is_in_progress(struct tevent_req *req);
 
+bool tevent_req_poll(struct tevent_req *req,
+struct tevent_context *ev);
+
 bool tevent_req_is_error(struct tevent_req *req,
 enum tevent_req_state *state,
 uint64_t *error);
diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index 800e385..c17587b 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -235,6 +235,21 @@ bool tevent_req_is_in_progress(struct tevent_req *req)
return false;
 }
 
+bool tevent_req_poll(struct tevent_req *req,
+struct tevent_context *ev)
+{
+   while (tevent_req_is_in_progress(req)) {
+   int ret;
+
+   ret = tevent_loop_once(ev);
+   if (ret != 0) {
+   return false;
+   }
+   }
+
+   return true;
+}
+
 bool tevent_req_is_error(struct tevent_req *req, enum tevent_req_state *state,
uint64_t *error)
 {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-1215-ge2f37ec

2009-02-25 Thread Stefan Metzmacher
The branch, master has been updated
   via  e2f37ec106fb51ec894e0d6160949545e80dfe69 (commit)
  from  01d1aaf63e8170936139a01814211f6567c4b125 (commit)

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


- Log -
commit e2f37ec106fb51ec894e0d6160949545e80dfe69
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 25 14:29:31 2009 +0100

tevent: add private_print function feature to tevent_req

metze

---

Summary of changes:
 lib/tevent/tevent.h |   11 +++
 lib/tevent/tevent_req.c |   27 ---
 2 files changed, 35 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index b361122..185a8fa 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -212,6 +212,15 @@ struct tevent_req {
void *private_state;
 
/**
+* @brief A function to overwrite the default print function
+*
+* The implementation doing the work may want to imeplement a
+* custom function to print the text representation of the async
+* request.
+*/
+   char *(*private_print)(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+
+   /**
 * @brief Internal state of the request
 *
 * Callers should only access this via functions and never directly.
@@ -267,6 +276,8 @@ struct tevent_req {
} internal;
 };
 
+char *tevent_req_default_print(struct tevent_req *req, TALLOC_CTX *mem_ctx);
+
 char *tevent_req_print(TALLOC_CTX *mem_ctx, struct tevent_req *req);
 
 struct tevent_req *_tevent_req_create(TALLOC_CTX *mem_ctx,
diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index c17587b..e243c7d 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -28,14 +28,17 @@
 #include tevent_util.h
 
 /**
- * @brief Print an tevent_req structure in debug messages
- * @param[in] mem_ctx  The memory context for the result
+ * @brief The default print function for creating debug messages
  * @param[in] req  The request to be printed
+ * @param[in] mem_ctx  The memory context for the result
  * @retval Text representation of req
  *
+ * The function should not be used by users of the asynx API,
+ * but custom print function can use it and append custom text
+ * to the string.
  */
 
-char *tevent_req_print(TALLOC_CTX *mem_ctx, struct tevent_req *req)
+char *tevent_req_default_print(struct tevent_req *req, TALLOC_CTX *mem_ctx)
 {
return talloc_asprintf(mem_ctx,
   tevent_req[%p/%s]: state[%d] error[%lld 
(0x%llX)] 
@@ -51,6 +54,24 @@ char *tevent_req_print(TALLOC_CTX *mem_ctx, struct 
tevent_req *req)
 }
 
 /**
+ * @brief Print an tevent_req structure in debug messages
+ * @param[in] mem_ctx  The memory context for the result
+ * @param[in] req  The request to be printed
+ * @retval Text representation of req
+ *
+ * This function should be used by callers of the async API
+ */
+
+char *tevent_req_print(TALLOC_CTX *mem_ctx, struct tevent_req *req)
+{
+   if (!req-private_print) {
+   return tevent_req_default_print(req, mem_ctx);
+   }
+
+   return req-private_print(req, mem_ctx);
+}
+
+/**
  * @brief Create an async request
  * @param[in] mem_ctx  The memory context for the result
  * @param[in] ev   The event context this async request will be driven by


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha6-1217-g2bd8cac

2009-02-25 Thread Stefan Metzmacher
The branch, master has been updated
   via  2bd8cacf0e5ed6965f5791c4a86320d4978d9b15 (commit)
   via  543db0f94aa4cdeb6499f62aee8791cda7a670d7 (commit)
  from  e2f37ec106fb51ec894e0d6160949545e80dfe69 (commit)

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


- Log -
commit 2bd8cacf0e5ed6965f5791c4a86320d4978d9b15
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 25 15:05:24 2009 +0100

s4:lib/events: map TEVENT_DEBUG_TRACE to debug level 10

metze

commit 543db0f94aa4cdeb6499f62aee8791cda7a670d7
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 25 15:04:55 2009 +0100

s3:events: map TEVENT_DEBUG_TRACE to debug level 10

metze

---

Summary of changes:
 source3/lib/events.c   |2 +-
 source4/lib/events/tevent_s4.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/events.c b/source3/lib/events.c
index 44b4562..9e81a47 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -282,7 +282,7 @@ static void s3_event_debug(void *context, enum 
tevent_debug_level level,
samba_level = 2;
break;
case TEVENT_DEBUG_TRACE:
-   samba_level = 5;
+   samba_level = 10;
break;
 
};
diff --git a/source4/lib/events/tevent_s4.c b/source4/lib/events/tevent_s4.c
index a05ac07..89ca7bb 100644
--- a/source4/lib/events/tevent_s4.c
+++ b/source4/lib/events/tevent_s4.c
@@ -41,7 +41,7 @@ static void ev_wrap_debug(void *context, enum 
tevent_debug_level level,
samba_level = 2;
break;
case TEVENT_DEBUG_TRACE:
-   samba_level = 5;
+   samba_level = 10;
break;
 
};


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-1-gb679f6b

2009-02-26 Thread Stefan Metzmacher
The branch, master has been updated
   via  b679f6b25673969800f31cf0bd0f57799bb0598c (commit)
   via  c3632e4efc506a401a9d75c4d75b14a1a220caa2 (commit)
   via  76a0050e239b1fb9e2135f2e6cea80ed780a0ee0 (commit)
  from  59a28a22ab26bb7f2c12f9bccda9c7f585d992a7 (commit)

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


- Log -
commit b679f6b25673969800f31cf0bd0f57799bb0598c
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 26 09:10:23 2009 +0100

s4:VERSION: mark as 4.0.0-alpha8 gitsnapshot

metze

---

Summary of changes:
 source4/VERSION   |2 +-
 source4/rpc_server/netlogon/dcerpc_netlogon.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/VERSION b/source4/VERSION
index e7d05f6..58f8cc1 100644
--- a/source4/VERSION
+++ b/source4/VERSION
@@ -57,7 +57,7 @@ SAMBA_VERSION_TP_RELEASE=
 # e.g. SAMBA_VERSION_ALPHA_RELEASE=1   #
 #  -  4.0.0alpha1   #
 
-SAMBA_VERSION_ALPHA_RELEASE=7
+SAMBA_VERSION_ALPHA_RELEASE=8
 
 
 # For 'pre' releases the version will be   #
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c 
b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index f1c063e..2efddc7 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -1220,7 +1220,7 @@ static WERROR dcesrv_netr_DsRGetDCNameEx2(struct 
dcesrv_call_state *dce_call, TA
 
/* Win7-beta will send the domain name in the form the user typed, so 
we have to cope
   with both the short and long form here */
-   if (strcasecmp(r-in.domain_name, 
lp_workgroup(dce_call-conn-dce_ctx-lp_ctx)) == 0) {
+   if (r-in.domain_name == NULL || strcasecmp(r-in.domain_name, 
lp_workgroup(dce_call-conn-dce_ctx-lp_ctx)) == 0) {
r-in.domain_name = lp_realm(dce_call-conn-dce_ctx-lp_ctx);
}
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2-g64662cb

2009-02-26 Thread Stefan Metzmacher
The branch, master has been updated
   via  64662cb0c34425f7a0ccc66e43c21b7b69451ca9 (commit)
  from  b679f6b25673969800f31cf0bd0f57799bb0598c (commit)

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


- Log -
commit 64662cb0c34425f7a0ccc66e43c21b7b69451ca9
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 26 09:42:29 2009 +0100

s4:ldb_map: include ldb_includes.h first to get replace.h as first header

This should bring the build on AIX one step further.

metze

---

Summary of changes:
 source4/lib/ldb/ldb_map/ldb_map.c  |1 +
 source4/lib/ldb/ldb_map/ldb_map_inbound.c  |1 +
 source4/lib/ldb/ldb_map/ldb_map_outbound.c |1 +
 3 files changed, 3 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/ldb_map/ldb_map.c 
b/source4/lib/ldb/ldb_map/ldb_map.c
index 9595403..5b4ea79 100644
--- a/source4/lib/ldb/ldb_map/ldb_map.c
+++ b/source4/lib/ldb/ldb_map/ldb_map.c
@@ -35,6 +35,7 @@
  *  Author: Jelmer Vernooij, Martin Kuehl
  */
 
+#include ldb_includes.h
 #include ldb_map.h
 #include ldb_map_private.h
 
diff --git a/source4/lib/ldb/ldb_map/ldb_map_inbound.c 
b/source4/lib/ldb/ldb_map/ldb_map_inbound.c
index 822dea6..455740c 100644
--- a/source4/lib/ldb/ldb_map/ldb_map_inbound.c
+++ b/source4/lib/ldb/ldb_map/ldb_map_inbound.c
@@ -24,6 +24,7 @@
 
 */
 
+#include ldb_includes.h
 #include ldb_map.h
 #include ldb_map_private.h
 
diff --git a/source4/lib/ldb/ldb_map/ldb_map_outbound.c 
b/source4/lib/ldb/ldb_map/ldb_map_outbound.c
index eb7b459..ffcefad 100644
--- a/source4/lib/ldb/ldb_map/ldb_map_outbound.c
+++ b/source4/lib/ldb/ldb_map/ldb_map_outbound.c
@@ -25,6 +25,7 @@
 
 */
 
+#include ldb_includes.h
 #include ldb_map.h
 #include ldb_map_private.h
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-4-gb659742

2009-02-26 Thread Stefan Metzmacher
The branch, master has been updated
   via  b6597424dbacdbfcaa37d8860fc4343be1a4514a (commit)
   via  c21ae8d1bfd4423cf1c4a62c11ba228773548de2 (commit)
  from  64662cb0c34425f7a0ccc66e43c21b7b69451ca9 (commit)

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


- Log -
commit b6597424dbacdbfcaa37d8860fc4343be1a4514a
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 26 10:05:58 2009 +0100

s4:heimdal_build: don't always build setprogname.o

This hopefully fixes the build on Mac OS 10, where setprogname()
is available via libc.

asn1_compile and compile_et use only .ho files again
and don't use socket_wrapper anymore.

metze

commit c21ae8d1bfd4423cf1c4a62c11ba228773548de2
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 26 10:29:55 2009 +0100

libreplace: make it possible to disable socket_wrapper via 
-DSOCKET_WRAPPER_DISABLE=1

metze

---

Summary of changes:
 lib/replace/system/network.h  |6 +++-
 source4/heimdal_build/internal.m4 |1 +
 source4/heimdal_build/internal.mk |   50 
 3 files changed, 38 insertions(+), 19 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/system/network.h b/lib/replace/system/network.h
index 40d20db..f135d17 100644
--- a/lib/replace/system/network.h
+++ b/lib/replace/system/network.h
@@ -327,10 +327,12 @@ struct addrinfo {
 #endif
 
 #ifdef SOCKET_WRAPPER
+#ifndef SOCKET_WRAPPER_DISABLE
 #ifndef SOCKET_WRAPPER_NOT_REPLACE
 #define SOCKET_WRAPPER_REPLACE
-#endif
+#endif /* SOCKET_WRAPPER_NOT_REPLACE */
 #include ../socket_wrapper/socket_wrapper.h
-#endif
+#endif /* SOCKET_WRAPPER_DISABLE */
+#endif /* SOCKET_WRAPPER */
 
 #endif
diff --git a/source4/heimdal_build/internal.m4 
b/source4/heimdal_build/internal.m4
index a48777f..3039c8a 100644
--- a/source4/heimdal_build/internal.m4
+++ b/source4/heimdal_build/internal.m4
@@ -77,6 +77,7 @@ AC_CHECK_FUNCS([  \
atexit  \
cgetent \
getprogname \
+   setprogname \
inet_aton   \
gethostname \
getnameinfo \
diff --git a/source4/heimdal_build/internal.mk 
b/source4/heimdal_build/internal.mk
index 77dbf0f..ea8d473 100644
--- a/source4/heimdal_build/internal.mk
+++ b/source4/heimdal_build/internal.mk
@@ -568,27 +568,36 @@ $(heimdalsrcdir)/lib/wind/bidi_table.h 
$(heimdalsrcdir)/lib/wind/bidi_table.c: $
 clean::
@rm -f $(heimdalsrcdir)/lib/wind/bidi_table.h 
$(heimdalsrcdir)/lib/wind/bidi_table.c
 
-[SUBSYSTEM::HEIMDAL_ROKEN_GETPROGNAME]
+[SUBSYSTEM::HEIMDAL_ROKEN_PROGNAME]
 
-HEIMDAL_ROKEN_GETPROGNAME_OBJ_FILES = $(heimdalsrcdir)/lib/roken/getprogname.o
-$(HEIMDAL_ROKEN_GETPROGNAME_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) 
-I$(heimdalsrcdir)/lib/roken  -I$(socketwrappersrcdir)
+HEIMDAL_ROKEN_PROGNAME_OBJ_FILES = \
+   $(heimdalsrcdir)/lib/roken/getprogname.o \
+   $(heimdalsrcdir)/lib/roken/setprogname.o
+$(HEIMDAL_ROKEN_PROGNAME_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) 
-I$(heimdalsrcdir)/lib/roken  -I$(socketwrappersrcdir)
 
 [SUBSYSTEM::HEIMDAL_ROKEN_CLOSEFROM] 
 
 HEIMDAL_ROKEN_CLOSEFROM_OBJ_FILES = $(heimdalsrcdir)/lib/roken/closefrom.o
 $(HEIMDAL_ROKEN_CLOSEFROM_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) 
-I$(heimdalsrcdir)/lib/roken  -I$(socketwrappersrcdir)
 
-[SUBSYSTEM::HEIMDAL_ROKEN_GETPROGNAME_H] 
+[SUBSYSTEM::HEIMDAL_ROKEN_PROGNAME_H]
 
-HEIMDAL_ROKEN_GETPROGNAME_H_OBJ_FILES = 
$(heimdalsrcdir)/lib/roken/getprogname.ho
-$(HEIMDAL_ROKEN_GETPROGNAME_H_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) 
-I$(heimdalsrcdir)/lib/roken  -I$(socketwrappersrcdir)
+HEIMDAL_ROKEN_PROGNAME_H_OBJ_FILES = \
+   $(heimdalsrcdir)/lib/roken/getprogname.ho \
+   $(heimdalsrcdir)/lib/roken/setprogname.ho
+$(HEIMDAL_ROKEN_PROGNAME_H_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) 
-I$(heimdalsrcdir)/lib/roken -DSOCKET_WRAPPER_DISABLE=1
+
+[SUBSYSTEM::HEIMDAL_ROKEN_CLOSEFROM_H]
+
+HEIMDAL_ROKEN_CLOSEFROM_H_OBJ_FILES = $(heimdalsrcdir)/lib/roken/closefrom.ho
+$(HEIMDAL_ROKEN_CLOSEFROM_H_OBJ_FILES): CFLAGS+=-I$(heimdalbuildsrcdir) 
-I$(heimdalsrcdir)/lib/roken -DSOCKET_WRAPPER_DISABLE=1
 
 ###
 # Start SUBSYSTEM HEIMDAL_ROKEN
 [SUBSYSTEM::HEIMDAL_ROKEN]
 CFLAGS =  -I$(heimdalbuildsrcdir) -I$(heimdalsrcdir)/lib/roken 
-I$(socketwrappersrcdir)
 PRIVATE_DEPENDENCIES = \
-   HEIMDAL_ROKEN_GETPROGNAME \
+   HEIMDAL_ROKEN_PROGNAME \
HEIMDAL_ROKEN_CLOSEFROM \
RESOLV

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-5-g8e4816f

2009-02-26 Thread Stefan Metzmacher
The branch, master has been updated
   via  8e4816f0078fd94a1b83798f52a63dc679eed47e (commit)
  from  b6597424dbacdbfcaa37d8860fc4343be1a4514a (commit)

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


- Log -
commit 8e4816f0078fd94a1b83798f52a63dc679eed47e
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 26 10:55:00 2009 +0100

s4:Makefile: try to fix 'make installheaders' on *BSD systems

metze

---

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


Changeset truncated at 500 lines:

diff --git a/source4/Makefile b/source4/Makefile
index 508836f..15b1b8b 100644
--- a/source4/Makefile
+++ b/source4/Makefile
@@ -146,7 +146,7 @@ endif
 clean::
@find ../lib ../libcli ../librpc ../nsswitch -name '*.o' -o -name 
'*.ho' | xargs rm -f
 
-PUBLIC_HEADERS += $(srcdir)/version.h
+PUBLIC_HEADERS += ./version.h
 
 libraries:: $(STATIC_LIBS) $(SHARED_LIBS)
 modules:: $(PLUGINS)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-20-gd3ac11c

2009-02-26 Thread Stefan Metzmacher
The branch, master has been updated
   via  d3ac11c64a95c2041dc0002b8cc59d756736d3be (commit)
  from  a777b4d50136dc52b69756fdfd6d7024270fe040 (commit)

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


- Log -
commit d3ac11c64a95c2041dc0002b8cc59d756736d3be
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 26 13:12:54 2009 +0100

s4:heimdal_build: correrctly switch closefrom() and get/setprogname() 
replacements on and off

metze

---

Summary of changes:
 source4/heimdal_build/internal.m4 |   10 ++
 1 files changed, 6 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/heimdal_build/internal.m4 
b/source4/heimdal_build/internal.m4
index 3039c8a..4cd7521 100644
--- a/source4/heimdal_build/internal.m4
+++ b/source4/heimdal_build/internal.m4
@@ -269,16 +269,18 @@ SMB_ENABLE(compile_et, YES)
 
 # only add closefrom if needed
 SMB_ENABLE(HEIMDAL_ROKEN_CLOSEFROM, NO)
+SMB_ENABLE(HEIMDAL_ROKEN_CLOSEFROM_H, NO)
 if test t$ac_cv_func_closefrom != tyes; then
SMB_ENABLE(HEIMDAL_ROKEN_CLOSEFROM, YES)
+   SMB_ENABLE(HEIMDAL_ROKEN_CLOSEFROM_H, YES)
 fi
 
 # only add getprogname if needed
-SMB_ENABLE(HEIMDAL_ROKEN_GETPROGNAME, NO)
-SMB_ENABLE(HEIMDAL_ROKEN_GETPROGNAME_H, NO)
+SMB_ENABLE(HEIMDAL_ROKEN_PROGNAME, NO)
+SMB_ENABLE(HEIMDAL_ROKEN_PROGNAME_H, NO)
 if test t$ac_cv_func_getprogname != tyes; then
-   SMB_ENABLE(HEIMDAL_ROKEN_GETPROGNAME, YES)
-   SMB_ENABLE(HEIMDAL_ROKEN_GETPROGNAME_H, YES)
+   SMB_ENABLE(HEIMDAL_ROKEN_PROGNAME, YES)
+   SMB_ENABLE(HEIMDAL_ROKEN_PROGNAME_H, YES)
 fi
 
 VPATH=$VPATH:\$(HEIMDAL_VPATH)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-62-g3a1f24f

2009-02-26 Thread Stefan Metzmacher
The branch, master has been updated
   via  3a1f24f286d4dba836b750122f571f831a794e4a (commit)
  from  2f4b8213206aebd7b101b9623f7cd0786a65f310 (commit)

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


- Log -
commit 3a1f24f286d4dba836b750122f571f831a794e4a
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 17 11:42:01 2009 +0100

tevent: add tevent_queue infrastructure

metze

---

Summary of changes:
 lib/tevent/libtevent.m4   |2 +-
 lib/tevent/tevent.h   |   22 +
 lib/tevent/tevent_queue.c |  198 +
 3 files changed, 221 insertions(+), 1 deletions(-)
 create mode 100644 lib/tevent/tevent_queue.c


Changeset truncated at 500 lines:

diff --git a/lib/tevent/libtevent.m4 b/lib/tevent/libtevent.m4
index 29a64ae..c316823 100644
--- a/lib/tevent/libtevent.m4
+++ b/lib/tevent/libtevent.m4
@@ -27,7 +27,7 @@ AC_SUBST(TEVENT_LIBS)
 TEVENT_CFLAGS=-I$teventdir
 
 TEVENT_OBJ=tevent.o tevent_fd.o tevent_timed.o tevent_signal.o tevent_debug.o 
tevent_util.o
-TEVENT_OBJ=$TEVENT_OBJ tevent_req.o tevent_wakeup.o
+TEVENT_OBJ=$TEVENT_OBJ tevent_req.o tevent_wakeup.o tevent_queue.o
 TEVENT_OBJ=$TEVENT_OBJ tevent_standard.o tevent_select.o
 
 AC_CHECK_HEADERS(sys/epoll.h)
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index 185a8fa..8c119ff 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -338,6 +338,28 @@ struct timeval tevent_timeval_add(const struct timeval 
*tv, uint32_t secs,
 
 struct timeval tevent_timeval_current_ofs(uint32_t secs, uint32_t usecs);
 
+struct tevent_queue;
+
+struct tevent_queue *_tevent_queue_create(TALLOC_CTX *mem_ctx,
+ const char *name,
+ const char *location);
+
+#define tevent_queue_create(_mem_ctx, _name) \
+   _tevent_queue_create((_mem_ctx), (_name), __location__)
+
+typedef void (*tevent_queue_trigger_fn_t)(struct tevent_req *req,
+ void *private_data);
+bool tevent_queue_add(struct tevent_queue *queue,
+ struct tevent_context *ev,
+ struct tevent_req *req,
+ tevent_queue_trigger_fn_t trigger,
+ void *private_data);
+bool tevent_queue_start(struct tevent_queue *queue,
+   struct tevent_context *ev);
+void tevent_queue_stop(struct tevent_queue *queue);
+
+size_t tevent_queue_length(struct tevent_queue *queue);
+
 #ifdef TEVENT_COMPAT_DEFINES
 
 #define event_context  tevent_context
diff --git a/lib/tevent/tevent_queue.c b/lib/tevent/tevent_queue.c
new file mode 100644
index 000..6c8fbe4
--- /dev/null
+++ b/lib/tevent/tevent_queue.c
@@ -0,0 +1,198 @@
+/*
+   Unix SMB/CIFS implementation.
+   Infrastructure for async requests
+   Copyright (C) Volker Lendecke 2008
+   Copyright (C) Stefan Metzmacher 2009
+
+ ** NOTE! The following LGPL license applies to the tevent
+ ** library. This does NOT imply that all of Samba is released
+ ** under the LGPL
+
+   This library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 3 of the License, or (at your option) any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with this library; if not, see http://www.gnu.org/licenses/.
+*/
+
+#include replace.h
+#include tevent.h
+#include tevent_internal.h
+#include tevent_util.h
+
+struct tevent_queue_entry {
+   struct tevent_queue_entry *prev, *next;
+   struct tevent_queue *queue;
+
+   bool triggered;
+
+   struct tevent_req *req;
+
+   tevent_queue_trigger_fn_t trigger;
+   void *private_data;
+};
+
+struct tevent_queue {
+   const char *name;
+   const char *location;
+
+   bool running;
+   struct tevent_timer *timer;
+
+   size_t length;
+   struct tevent_queue_entry *list;
+};
+
+static int tevent_queue_entry_destructor(struct tevent_queue_entry *e)
+{
+   struct tevent_queue *q = e-queue;
+
+   if (!q) {
+   return 0;
+   }
+
+   DLIST_REMOVE(q-list, e);
+   q-length--;
+
+   if (e-triggered 
+   q-running 
+   q-list) {
+   q-list-triggered = true;
+   q-list-trigger(q-list-req,
+q-list-private_data);
+   }
+
+   return 0;
+}
+
+static int tevent_queue_destructor(struct tevent_queue *q)
+{
+   q-running = false

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-64-gb934f50

2009-02-26 Thread Stefan Metzmacher
The branch, master has been updated
   via  b934f509ed222eb49e8b24ca111361e563434646 (commit)
  from  c5e062ed74ec7e13e03ed24e9e4d2ced5351f141 (commit)

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


- Log -
commit b934f509ed222eb49e8b24ca111361e563434646
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 26 15:36:16 2009 +0100

lib/torture: fix depency to map_nt_error_from_unix()

This should fix the build on Mac OS 10

metze

---

Summary of changes:
 lib/torture/config.mk |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/torture/config.mk b/lib/torture/config.mk
index abd8926..b4ad9ae 100644
--- a/lib/torture/config.mk
+++ b/lib/torture/config.mk
@@ -3,7 +3,9 @@
 PUBLIC_DEPENDENCIES = \
LIBSAMBA-HOSTCONFIG \
LIBSAMBA-UTIL \
-   LIBTALLOC
+   LIBSAMBA-ERRORS \
+   LIBTALLOC \
+   LIBTEVENT
 CFLAGS = -I$(libtorturesrcdir) -I$(libtorturesrcdir)/../
 
 torture_VERSION = 0.0.1


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-117-gae1a69f

2009-03-01 Thread Stefan Metzmacher
The branch, master has been updated
   via  ae1a69f3ea42d778d5cb16523fd7bf4f7f36a3c9 (commit)
  from  cdbc00bb52f39472fe5f1380b15180205644c8e9 (commit)

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


- Log -
commit ae1a69f3ea42d778d5cb16523fd7bf4f7f36a3c9
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 2 08:55:00 2009 +0100

libcli/security: fix the source3 build

metze

---

Summary of changes:
 libcli/security/secace.c |2 +-
 libcli/security/secacl.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/security/secace.c b/libcli/security/secace.c
index 4e8eddc..7d87b1c 100644
--- a/libcli/security/secace.c
+++ b/libcli/security/secace.c
@@ -22,7 +22,7 @@
 
 #include includes.h
 #include librpc/gen_ndr/ndr_security.h
-#include libcli/security/security.h
+#include libcli/security/dom_sid.h
 
 #define  SEC_ACE_HEADER_SIZE (2 * sizeof(uint8_t) + sizeof(uint16_t) + 
sizeof(uint32_t))
 
diff --git a/libcli/security/secacl.c b/libcli/security/secacl.c
index 4564077..f10cc09 100644
--- a/libcli/security/secacl.c
+++ b/libcli/security/secacl.c
@@ -21,7 +21,7 @@
  */
 
 #include includes.h
-#include libcli/security/security.h
+#include librpc/gen_ndr/ndr_security.h
 
 #define  SEC_ACL_HEADER_SIZE (2 * sizeof(uint16_t) + sizeof(uint32_t))
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-118-g84b57a5

2009-03-02 Thread Stefan Metzmacher
The branch, master has been updated
   via  84b57a5dbad538e819591daa2c42a9b35206c409 (commit)
  from  ae1a69f3ea42d778d5cb16523fd7bf4f7f36a3c9 (commit)

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


- Log -
commit 84b57a5dbad538e819591daa2c42a9b35206c409
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 2 12:05:43 2009 +0100

libcli/security: fix the source4 build

metze

---

Summary of changes:
 libcli/security/secacl.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libcli/security/secacl.c b/libcli/security/secacl.c
index f10cc09..9373ef5 100644
--- a/libcli/security/secacl.c
+++ b/libcli/security/secacl.c
@@ -22,6 +22,7 @@
 
 #include includes.h
 #include librpc/gen_ndr/ndr_security.h
+#include libcli/security/secace.h
 
 #define  SEC_ACL_HEADER_SIZE (2 * sizeof(uint16_t) + sizeof(uint32_t))
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-136-gb00204a

2009-03-03 Thread Stefan Metzmacher
The branch, master has been updated
   via  b00204a46153a406a6c63792b1939bd3ad74ba71 (commit)
   via  b6f479d4413511fbd742e7c8464cec67501f539c (commit)
  from  4b2955aa7dbcf06629d24d3ea35c6dfa8c4156b9 (commit)

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


- Log -
commit b00204a46153a406a6c63792b1939bd3ad74ba71
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 3 18:03:57 2009 +0100

lib/util: remove samba specific talloc_get_type_abort()

metze

commit b6f479d4413511fbd742e7c8464cec67501f539c
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 3 18:01:01 2009 +0100

talloc: add talloc_get_type_abort()

metze

---

Summary of changes:
 lib/talloc/talloc.c|   24 
 lib/talloc/talloc.h|2 ++
 lib/util/util.c|   15 ---
 lib/util/util.h|7 ---
 source3/include/includes.h |4 
 source3/include/proto.h|1 -
 6 files changed, 26 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index 1f7e524..c472e9f 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -806,6 +806,30 @@ void *talloc_check_name(const void *ptr, const char *name)
return NULL;
 }
 
+static void talloc_abort_type_missmatch(const char *location,
+   const char *name,
+   const char *expected)
+{
+   TALLOC_ABORT(Type missmatch);
+}
+
+void *_talloc_get_type_abort(const void *ptr, const char *name, const char 
*location)
+{
+   const char *pname;
+
+   if (unlikely(ptr == NULL)) {
+   talloc_abort_type_missmatch(location, NULL, name);
+   return NULL;
+   }
+
+   pname = talloc_get_name(ptr);
+   if (likely(pname == name || strcmp(pname, name) == 0)) {
+   return discard_const_p(void, ptr);
+   }
+
+   talloc_abort_type_missmatch(location, pname, name);
+   return NULL;
+}
 
 /*
   this is for compatibility with older versions of talloc
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h
index 5431971..002e06e 100644
--- a/lib/talloc/talloc.h
+++ b/lib/talloc/talloc.h
@@ -102,6 +102,7 @@ typedef void TALLOC_CTX;
 
 #define talloc_set_type(ptr, type) talloc_set_name_const(ptr, #type)
 #define talloc_get_type(ptr, type) (type *)talloc_check_name(ptr, #type)
+#define talloc_get_type_abort(ptr, type) (type *)_talloc_get_type_abort(ptr, 
#type, __location__)
 
 #define talloc_find_parent_bytype(ptr, type) (type 
*)talloc_find_parent_byname(ptr, #type)
 
@@ -129,6 +130,7 @@ void *talloc_named(const void *context, size_t size,
 void *talloc_named_const(const void *context, size_t size, const char *name);
 const char *talloc_get_name(const void *ptr);
 void *talloc_check_name(const void *ptr, const char *name);
+void *_talloc_get_type_abort(const void *ptr, const char *name, const char 
*location);
 void *talloc_parent(const void *ptr);
 const char *talloc_parent_name(const void *ptr);
 void *talloc_init(const char *fmt, ...) PRINTF_ATTRIBUTE(1,2);
diff --git a/lib/util/util.c b/lib/util/util.c
index 1f31f55..0148bdb 100644
--- a/lib/util/util.c
+++ b/lib/util/util.c
@@ -541,21 +541,6 @@ void *malloc_array(size_t el_size, unsigned int count)
return realloc_array(NULL, el_size, count, false);
 }
 
-_PUBLIC_ void *talloc_check_name_abort(const void *ptr, const char *name)
-{
-void *result;
-
-result = talloc_check_name(ptr, name);
-if (result != NULL)
-return result;
-
-DEBUG(0, (Talloc type mismatch, expected %s, got %s\n,
-  name, talloc_get_name(ptr)));
-smb_panic(talloc type mismatch);
-/* Keep the compiler happy */
-return NULL;
-}
-
 /**
  Trim the specified elements off the front and back of a string.
 **/
diff --git a/lib/util/util.h b/lib/util/util.h
index 1f6e3b1..defef12 100644
--- a/lib/util/util.h
+++ b/lib/util/util.h
@@ -767,13 +767,6 @@ bool pm_process( const char *fileName,
  bool (*pfunc)(const char *, const char *, void *),
 void *userdata);
 
-/**
- * Add-on to talloc_get_type
- */
-_PUBLIC_ void *talloc_check_name_abort(const void *ptr, const char *name);
-#define talloc_get_type_abort(ptr, type) \
-   (type *)talloc_check_name_abort(ptr, #type)
-
 bool unmap_file(void *start, size_t size);
 
 void print_asc(int level, const uint8_t *buf,int len);
diff --git a/source3/include/includes.h b/source3/include/includes.h
index ca918b3..b48a755 100644
--- a/source3/include/includes.h
+++ b/source3/include/includes.h
@@ -584,10 +584,6 @@ struct smb_iconv_convenience *lp_iconv_convenience(void 
*lp_ctx);
 #include ../lib/util/time.h
 #include ../lib/util/asn1.h
 
-/* And a little

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-149-g27cf239

2009-03-03 Thread Stefan Metzmacher
The branch, master has been updated
   via  27cf23958b02b05becce6e7c68347f6fea5b7845 (commit)
   via  b99bb962aa70f8584212f18ba6368513e7485f5e (commit)
   via  8ae34cc9946e54297e800190980af32ef56c4ca1 (commit)
   via  40da086fe0e2f12d7e23ca75711ceceecbd61105 (commit)
   via  d52e81311733c7f119b5765eddb37eb2554ce281 (commit)
   via  c51e5a23fbeda9ece5697c3c5b60a813ec33010e (commit)
  from  8ee0cc24b8302097bccae7891cb6f9c0547a1815 (commit)

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


- Log -
commit 27cf23958b02b05becce6e7c68347f6fea5b7845
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 3 16:45:41 2009 +0100

socket_wrapper: add multiple interface support for ipv6

We use FD00::5357:5FXX in the same way we use 127.0.0.XX

metze

commit b99bb962aa70f8584212f18ba6368513e7485f5e
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 3 15:43:22 2009 +0100

socket_wrapper: add ipv6 pcap support

metze

commit 8ae34cc9946e54297e800190980af32ef56c4ca1
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 3 15:17:26 2009 +0100

socket_wrapper: pass down sockaddr instead of sockaddr_in to prepare pcap 
support for ipv6

metze

commit 40da086fe0e2f12d7e23ca75711ceceecbd61105
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 3 14:58:53 2009 +0100

socket_wrapper: prepare pcap support for ipv6 traffic

metze

commit d52e81311733c7f119b5765eddb37eb2554ce281
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 3 19:23:25 2009 +0100

s4:blackbox/test_ldb: make use of the $VALGRIND envvar

metze

commit c51e5a23fbeda9ece5697c3c5b60a813ec33010e
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 3 19:20:43 2009 +0100

socket_wrapper: don't crash if we get EAGAIN from real_recv()

This fixes a crash in the ldaps tests with socket wrapper pcap support.

metze

---

Summary of changes:
 lib/socket_wrapper/socket_wrapper.c |  569 ++-
 testprogs/blackbox/test_ldb.sh  |2 +-
 2 files changed, 364 insertions(+), 207 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/socket_wrapper/socket_wrapper.c 
b/lib/socket_wrapper/socket_wrapper.c
index 1e39277..f9ef48e 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -145,7 +145,16 @@
 
 #define MAX_WRAPPED_INTERFACES 16
 
-#define SW_IPV6_ADDRESS 1
+#ifdef HAVE_IPV6
+/*
+ * FD00::5357:5FXX
+ */
+static const struct in6_addr swrap_ipv6 =
+{ { {
+0xFD,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x53,0x57,0x5F,0x00
+} } };
+#endif
 
 static struct sockaddr *sockaddr_dup(const void *data, socklen_t len)
 {
@@ -295,7 +304,8 @@ static int convert_un_in(const struct sockaddr_un *un, 
struct sockaddr *in, sock
 
memset(in2, 0, sizeof(*in2));
in2-sin6_family = AF_INET6;
-   in2-sin6_addr.s6_addr[0] = SW_IPV6_ADDRESS;
+   in2-sin6_addr = swrap_ipv6;
+   in2-sin6_addr.s6_addr[15] = iface;
in2-sin6_port = htons(prt);
 
*len = sizeof(*in2);
@@ -367,6 +377,7 @@ static int convert_in_un_remote(struct socket_info *si, 
const struct sockaddr *i
case AF_INET6: {
const struct sockaddr_in6 *in = 
(const struct sockaddr_in6 *)inaddr;
+   struct in6_addr cmp;
 
switch (si-type) {
case SOCK_STREAM:
@@ -380,8 +391,16 @@ static int convert_in_un_remote(struct socket_info *si, 
const struct sockaddr *i
/* XXX no multicast/broadcast */
 
prt = ntohs(in-sin6_port);
-   iface = SW_IPV6_ADDRESS;
-   
+
+   cmp = in-sin6_addr;
+   cmp.s6_addr[15] = 0;
+   if (IN6_ARE_ADDR_EQUAL(swrap_ipv6, cmp)) {
+   iface = in-sin6_addr.s6_addr[15];
+   } else {
+   errno = ENETUNREACH;
+   return -1;
+   }
+
break;
}
 #endif
@@ -474,6 +493,7 @@ static int convert_in_un_alloc(struct socket_info *si, 
const struct sockaddr *in
case AF_INET6: {
const struct sockaddr_in6 *in = 
(const struct sockaddr_in6 *)inaddr;
+   struct in6_addr cmp;
 
switch (si-type) {
case SOCK_STREAM:
@@ -487,13 +507,21 @@ static int convert_in_un_alloc(struct socket_info *si, 
const struct sockaddr *in
/* XXX no multicast/broadcast */
 
prt = ntohs(in-sin6_port);
-   iface = SW_IPV6_ADDRESS;
-   
+
+   cmp = in-sin6_addr;
+   cmp.s6_addr[15] = 0;
+   if (IN6_ARE_ADDR_EQUAL(swrap_ipv6, cmp

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-175-gdf145c3

2009-03-05 Thread Stefan Metzmacher
The branch, master has been updated
   via  df145c33822f1fc77e2602709a75c2eac71abab3 (commit)
  from  67d12e9c6bc9e34ecc335ddfc85fc59ed9167b68 (commit)

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


- Log -
commit df145c33822f1fc77e2602709a75c2eac71abab3
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 6 07:15:13 2009 +0100

s4:errormap: map ECANCELED to NT_STATUS_CANCELLED

metze

---

Summary of changes:
 source4/libcli/util/errormap.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/libcli/util/errormap.c b/source4/libcli/util/errormap.c
index 0185e66..930e45b 100644
--- a/source4/libcli/util/errormap.c
+++ b/source4/libcli/util/errormap.c
@@ -1356,6 +1356,10 @@ const struct unix_error_map unix_nt_errmap[] = {
 #ifdef ENOSYS
{ ENOSYS,   NT_STATUS_INVALID_SYSTEM_SERVICE },
 #endif
+#ifdef ECANCELED
+   { ECANCELED,NT_STATUS_CANCELLED },
+#endif
+
{ 0, NT_STATUS_UNSUCCESSFUL }
 };
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-196-g918e628

2009-03-06 Thread Stefan Metzmacher
The branch, master has been updated
   via  918e6288fa775893a7e895334e05ce7780f89eaf (commit)
  from  5ce523bbed4196fda6716b71ef6080c3c5522838 (commit)

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


- Log -
commit 918e6288fa775893a7e895334e05ce7780f89eaf
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 6 16:18:50 2009 +0100

s3:libsmb: smb signing works the same for extented and non-extended security

This is only cosmetic, but it makes it easier to understand.

metze

---

Summary of changes:
 source3/libsmb/cliconnect.c |   23 ++-
 1 files changed, 18 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index ad11ee0..58e7dd1 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -379,6 +379,7 @@ static NTSTATUS cli_session_setup_nt1(struct cli_state 
*cli, const char *user,
DATA_BLOB session_key = data_blob_null;
NTSTATUS result;
char *p;
+   bool ok;
 
if (passlen == 0) {
/* do nothing - guest login */
@@ -436,11 +437,7 @@ static NTSTATUS cli_session_setup_nt1(struct cli_state 
*cli, const char *user,
SMBsesskeygen_ntv1(nt_hash, NULL, session_key.data);
 #endif
}
-#ifdef LANMAN_ONLY
-   cli_simple_set_signing(cli, session_key, lm_response); 
-#else
-   cli_simple_set_signing(cli, session_key, nt_response); 
-#endif
+   cli_temp_set_signing(cli);
} else {
/* pre-encrypted password supplied.  Only used for 
   security=server, can't do
@@ -492,6 +489,22 @@ static NTSTATUS cli_session_setup_nt1(struct cli_state 
*cli, const char *user,
goto end;
}
 
+#ifdef LANMAN_ONLY
+   ok = cli_simple_set_signing(cli, session_key, lm_response);
+#else
+   ok = cli_simple_set_signing(cli, session_key, nt_response);
+#endif
+   if (ok) {
+   /* 'resign' the last message, so we get the right sequence 
numbers
+  for checking the first reply from the server */
+   cli_calculate_sign_mac(cli, cli-outbuf);
+
+   if (!cli_check_sign_mac(cli, cli-inbuf)) {
+   result = NT_STATUS_ACCESS_DENIED;
+   goto end;
+   }
+   }
+
/* use the returned vuid from now on */
cli-vuid = SVAL(cli-inbuf,smb_uid);



-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-202-gbf85a14

2009-03-06 Thread Stefan Metzmacher
The branch, master has been updated
   via  bf85a14182f0dfe6d21cda2039c7ccb961419328 (commit)
   via  3f3e15ab91373597390320269f5cd701d3f07a3b (commit)
   via  6e572d40a913f788f06e4bc7a7047129bc22ad5a (commit)
   via  589eb81e3fe5262d544af2c5032c99b5a4d4ba85 (commit)
   via  196a5d038886bdea678ac9ae97bdf9dab825e23f (commit)
   via  4b6cbe80b28b7a99ba8f35190d809f5a439fdd22 (commit)
  from  918e6288fa775893a7e895334e05ce7780f89eaf (commit)

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


- Log -
commit bf85a14182f0dfe6d21cda2039c7ccb961419328
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 6 16:27:10 2009 +0100

s3:make_test: run CHAIN1 test

metze

commit 3f3e15ab91373597390320269f5cd701d3f07a3b
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 6 12:01:44 2009 +0100

s3:libsmb: merge cli_setup_signing_state() into cli_initialise_ex()

metze

commit 6e572d40a913f788f06e4bc7a7047129bc22ad5a
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 6 11:52:15 2009 +0100

s3:libsmb: remove cli_setup_signing_state() and add struct cli_state 
*cli_initialise_ex()

This prepares the next changes.

metze

commit 589eb81e3fe5262d544af2c5032c99b5a4d4ba85
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 6 11:40:21 2009 +0100

s3:winbindd_cm: remove useless cli_setup_signing_state(*cli, Undefined) call

cli_setup_signing_state() with Undefined is a noop.

metze

commit 196a5d038886bdea678ac9ae97bdf9dab825e23f
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 6 07:45:06 2009 +0100

s3:signing: the seqnum should only be decremented by 1 for ntcancel requests

[MS-SMB] 3.3.5.1 Receiving Any Message says that the seqnum
is incremented by only for ntcancel requests for any other
request it's by incremented by 2, even if it doesn't expect
a response.

metze

commit 4b6cbe80b28b7a99ba8f35190d809f5a439fdd22
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 6 07:38:41 2009 +0100

s3:errormap: add ECANCELED, ERRDOS/ERRbadfid, NT_STATUS_CANCELLED mapping

If someone knows a better dos error, please tell me...

metze

---

Summary of changes:
 source3/include/proto.h|4 +-
 source3/lib/errmap_unix.c  |3 +
 source3/libsmb/cliconnect.c|4 +-
 source3/libsmb/clidfs.c|3 +-
 source3/libsmb/clientgen.c |   58 +++-
 source3/libsmb/smb_signing.c   |6 ++-
 source3/script/tests/test_smbtorture_s3.sh |2 +-
 source3/smbd/aio.c |8 ++--
 source3/smbd/nttrans.c |2 +-
 source3/winbindd/winbindd_cm.c |2 -
 10 files changed, 48 insertions(+), 44 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/include/proto.h b/source3/include/proto.h
index ffdef43..c8dff53 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2430,8 +2430,8 @@ void cli_setup_packet_buf(struct cli_state *cli, char 
*buf);
 void cli_setup_packet(struct cli_state *cli);
 void cli_setup_bcc(struct cli_state *cli, void *p);
 void cli_init_creds(struct cli_state *cli, const char *username, const char 
*domain, const char *password);
-void cli_setup_signing_state(struct cli_state *cli, int signing_state);
 struct cli_state *cli_initialise(void);
+struct cli_state *cli_initialise_ex(int signing_state);
 void cli_nt_pipes_close(struct cli_state *cli);
 void cli_shutdown(struct cli_state *cli);
 void cli_sockopt(struct cli_state *cli, const char *options);
@@ -3209,7 +3209,7 @@ bool srv_oplock_set_signing(bool onoff);
 bool srv_check_sign_mac(const char *inbuf, bool must_be_ok);
 void srv_calculate_sign_mac(char *outbuf);
 void srv_defer_sign_response(uint16 mid);
-void srv_cancel_sign_response(uint16 mid);
+void srv_cancel_sign_response(uint16 mid, bool cancel);
 void srv_set_signing_negotiated(void);
 bool srv_is_signing_active(void);
 bool srv_is_signing_negotiated(void);
diff --git a/source3/lib/errmap_unix.c b/source3/lib/errmap_unix.c
index 9adb237..bb09726 100644
--- a/source3/lib/errmap_unix.c
+++ b/source3/lib/errmap_unix.c
@@ -95,6 +95,9 @@ const struct unix_error_map unix_dos_nt_errmap[] = {
 #ifdef ENOATTR
{ ENOATTR, ERRDOS, ERRbadfile, NT_STATUS_NOT_FOUND },
 #endif
+#ifdef ECANCELED
+   { ECANCELED, ERRDOS, ERRbadfid, NT_STATUS_CANCELLED},
+#endif
 
{ 0, 0, 0, NT_STATUS_OK }
 };
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 58e7dd1..e3d1b65 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -1949,7 +1949,7 @@ NTSTATUS cli_start_connection(struct cli_state 
**output_cli,
if (!my_name) 
my_name

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-230-gbe479b6

2009-03-06 Thread Stefan Metzmacher
The branch, master has been updated
   via  be479b6adf3e2041c3249baa24afb8029309e447 (commit)
  from  c9496ba18a52a4e80fd81c0dfa08129f95edeedb (commit)

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


- Log -
commit be479b6adf3e2041c3249baa24afb8029309e447
Author: Björn Jacke b...@sernet.de
Date:   Wed Mar 4 16:52:12 2009 +0100

don't rely on shebang's perl path, call our $PERL instead

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

---

Summary of changes:
 source4/selftest/tests.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/selftest/tests.sh b/source4/selftest/tests.sh
index 39e6cff..821db06 100755
--- a/source4/selftest/tests.sh
+++ b/source4/selftest/tests.sh
@@ -291,7 +291,7 @@ if test x${PIDL_TESTS_SKIP} = xyes; then
echo Skipping pidl tests - PIDL_TESTS_SKIP=yes
 elif $PERL -e 'eval require Test::More;'  /dev/null 21; then
   for f in $samba4srcdir/../pidl/tests/*.pl; do
- plantest pidl.`basename $f .pl` none $PERL $f | 
$samba4srcdir/../lib/subunit/harness2subunit.pl
+ plantest pidl.`basename $f .pl` none $PERL $f | $PERL 
$samba4srcdir/../lib/subunit/harness2subunit.pl
   done
 else 
echo Skipping pidl tests - Test::More not installed


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-249-g3679e82

2009-03-08 Thread Stefan Metzmacher
The branch, master has been updated
   via  3679e8243459f928b1a4d0998d47c6efdedd0301 (commit)
   via  f9156f6c77d9e87edc153b024a1d564b44eedd8f (commit)
   via  81e2633e41e9c8c1dddff7cc1122c7d6f28626bd (commit)
  from  dea9621680062b3726ad15cbec4a9d2cf7ce824e (commit)

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


- Log -
commit 3679e8243459f928b1a4d0998d47c6efdedd0301
Author: Stefan Metzmacher me...@samba.org
Date:   Sun Mar 8 17:20:18 2009 +0100

socket_wrapper: downgrade ipv6 sockets to ipv4 is in connect() if the dest 
is ipv4

We only do this if the socket isn't explicit bound yet.

metze

commit f9156f6c77d9e87edc153b024a1d564b44eedd8f
Author: Stefan Metzmacher me...@samba.org
Date:   Sun Mar 8 17:19:50 2009 +0100

socket_wrapper: correctly handle connected dgram sockets

metze

commit 81e2633e41e9c8c1dddff7cc1122c7d6f28626bd
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 3 19:40:57 2009 +0100

socket_wrapper: make it possible to bind to '::'

metze

---

Summary of changes:
 lib/socket_wrapper/socket_wrapper.c |   48 ++
 1 files changed, 42 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/socket_wrapper/socket_wrapper.c 
b/lib/socket_wrapper/socket_wrapper.c
index 8ad9e1d..733a332 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -202,6 +202,7 @@ struct socket_info
int bound;
int bcast;
int is_server;
+   int connected;
 
char *path;
char *tmp_path;
@@ -510,7 +511,9 @@ static int convert_in_un_alloc(struct socket_info *si, 
const struct sockaddr *in
 
cmp = in-sin6_addr;
cmp.s6_addr[15] = 0;
-   if (IN6_ARE_ADDR_EQUAL(swrap_ipv6, cmp)) {
+   if (IN6_IS_ADDR_UNSPECIFIED(in-sin6_addr)) {
+   iface = socket_wrapper_default_iface();
+   } else if (IN6_ARE_ADDR_EQUAL(swrap_ipv6, cmp)) {
iface = in-sin6_addr.s6_addr[15];
} else {
errno = EADDRNOTAVAIL;
@@ -1485,6 +1488,7 @@ _PUBLIC_ int swrap_accept(int s, struct sockaddr *addr, 
socklen_t *addrlen)
child_si-protocol = parent_si-protocol;
child_si-bound = 1;
child_si-is_server = 1;
+   child_si-connected = 1;
 
child_si-peername_len = len;
child_si-peername = sockaddr_dup(my_addr, len);
@@ -1532,8 +1536,10 @@ static int autobind_start;
 /* using sendto() or connect() on an unbound socket would give the
recipient no way to reply, as unlike UDP and TCP, a unix domain
socket can't auto-assign emphemeral port numbers, so we need to
-   assign it here */
-static int swrap_auto_bind(struct socket_info *si)
+   assign it here.
+   Note: this might change the family from ipv6 to ipv4
+*/
+static int swrap_auto_bind(struct socket_info *si, int family)
 {
struct sockaddr_un un_addr;
int i;
@@ -1551,7 +1557,7 @@ static int swrap_auto_bind(struct socket_info *si)
 
un_addr.sun_family = AF_UNIX;
 
-   switch (si-family) {
+   switch (family) {
case AF_INET: {
struct sockaddr_in in;
 
@@ -1580,6 +1586,11 @@ static int swrap_auto_bind(struct socket_info *si)
case AF_INET6: {
struct sockaddr_in6 in6;
 
+   if (si-family != family) {
+   errno = ENETUNREACH;
+   return -1;
+   }
+
switch (si-type) {
case SOCK_STREAM:
type = SOCKET_TYPE_CHAR_TCP_V6;
@@ -1630,6 +1641,7 @@ static int swrap_auto_bind(struct socket_info *si)
return -1;
}
 
+   si-family = family;
set_port(si-family, port, si-myname);
 
return 0;
@@ -1647,7 +1659,7 @@ _PUBLIC_ int swrap_connect(int s, const struct sockaddr 
*serv_addr, socklen_t ad
}
 
if (si-bound == 0) {
-   ret = swrap_auto_bind(si);
+   ret = swrap_auto_bind(si, serv_addr-sa_family);
if (ret == -1) return -1;
}
 
@@ -1672,7 +1684,14 @@ _PUBLIC_ int swrap_connect(int s, const struct sockaddr 
*serv_addr, socklen_t ad
if (ret == 0) {
si-peername_len = addrlen;
si-peername = sockaddr_dup(serv_addr, addrlen);
+   si-connected = 1;
+   }
 
+   if (si-type != SOCK_STREAM) {
+   return ret;
+   }
+
+   if (ret == 0) {
swrap_dump_packet(si, serv_addr, SWRAP_CONNECT_RECV, NULL, 0);
swrap_dump_packet(si, serv_addr, SWRAP_CONNECT_ACK, NULL, 0);
} else {
@@ -1801,11 +1820,18 @@ _PUBLIC_ ssize_t swrap_recvfrom(int s, void *buf, 
size_t len, int flags, struct

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-250-g5ff4cb5

2009-03-09 Thread Stefan Metzmacher
The branch, master has been updated
   via  5ff4cb580f5892754a208684dba6fef4834d6e7f (commit)
  from  3679e8243459f928b1a4d0998d47c6efdedd0301 (commit)

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


- Log -
commit 5ff4cb580f5892754a208684dba6fef4834d6e7f
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 9 09:24:45 2009 +0100

socket_wrapper: try to make ipv6 support more portable

The internal structure of in6_addr isn't always the same.

metze

---

Summary of changes:
 lib/socket_wrapper/socket_wrapper.c |   31 ++-
 1 files changed, 22 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/socket_wrapper/socket_wrapper.c 
b/lib/socket_wrapper/socket_wrapper.c
index 733a332..97e6046 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -149,11 +149,24 @@
 /*
  * FD00::5357:5FXX
  */
-static const struct in6_addr swrap_ipv6 =
-{ { {
-0xFD,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,0x53,0x57,0x5F,0x00
-} } };
+static const struct in6_addr *swrap_ipv6(void)
+{
+   static struct in6_addr v;
+   static int initialized;
+   int ret;
+
+   if (initialized) {
+   return v;
+   }
+   initialized = 1;
+
+   ret = inet_pton(AF_INET6, FD00::5357:5F00, v);
+   if (ret = 0) {
+   abort();
+   }
+
+   return v;
+}
 #endif
 
 static struct sockaddr *sockaddr_dup(const void *data, socklen_t len)
@@ -305,7 +318,7 @@ static int convert_un_in(const struct sockaddr_un *un, 
struct sockaddr *in, sock
 
memset(in2, 0, sizeof(*in2));
in2-sin6_family = AF_INET6;
-   in2-sin6_addr = swrap_ipv6;
+   in2-sin6_addr = *swrap_ipv6();
in2-sin6_addr.s6_addr[15] = iface;
in2-sin6_port = htons(prt);
 
@@ -395,7 +408,7 @@ static int convert_in_un_remote(struct socket_info *si, 
const struct sockaddr *i
 
cmp = in-sin6_addr;
cmp.s6_addr[15] = 0;
-   if (IN6_ARE_ADDR_EQUAL(swrap_ipv6, cmp)) {
+   if (IN6_ARE_ADDR_EQUAL(swrap_ipv6(), cmp)) {
iface = in-sin6_addr.s6_addr[15];
} else {
errno = ENETUNREACH;
@@ -513,7 +526,7 @@ static int convert_in_un_alloc(struct socket_info *si, 
const struct sockaddr *in
cmp.s6_addr[15] = 0;
if (IN6_IS_ADDR_UNSPECIFIED(in-sin6_addr)) {
iface = socket_wrapper_default_iface();
-   } else if (IN6_ARE_ADDR_EQUAL(swrap_ipv6, cmp)) {
+   } else if (IN6_ARE_ADDR_EQUAL(swrap_ipv6(), cmp)) {
iface = in-sin6_addr.s6_addr[15];
} else {
errno = EADDRNOTAVAIL;
@@ -1605,7 +1618,7 @@ static int swrap_auto_bind(struct socket_info *si, int 
family)
 
memset(in6, 0, sizeof(in6));
in6.sin6_family = AF_INET6;
-   in6.sin6_addr = swrap_ipv6;
+   in6.sin6_addr = *swrap_ipv6();
in6.sin6_addr.s6_addr[15] = socket_wrapper_default_iface();
si-myname_len = sizeof(in6);
si-myname = sockaddr_dup(in6, si-myname_len);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-252-g1410490

2009-03-09 Thread Stefan Metzmacher
The branch, master has been updated
   via  1410490fe769bc79f98b4ab364685c7aed253e09 (commit)
  from  c3691b839cf6404914ed91ee421692866b44ee85 (commit)

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


- Log -
commit 1410490fe769bc79f98b4ab364685c7aed253e09
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 9 12:35:21 2009 +0100

s3:lib: interfaces.c isn't used in the configure tests anymore

libreplace always provides the getifaddr() function.

This fixes the build on sles8.

metze

---

Summary of changes:
 source3/lib/interfaces.c |   74 +-
 1 files changed, 1 insertions(+), 73 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/interfaces.c b/source3/lib/interfaces.c
index 4567fe4..2535418 100644
--- a/source3/lib/interfaces.c
+++ b/source3/lib/interfaces.c
@@ -18,79 +18,7 @@
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
 
-
-/* working out the interfaces for a OS is an incredibly non-portable
-   thing. We have several possible implementations below, and autoconf
-   tries each of them to see what works
-
-   Note that this file does _not_ include includes.h. That is so this code
-   can be called directly from the autoconf tests. That also means
-   this code cannot use any of the normal Samba debug stuff or defines.
-   This is standalone code.
-
-*/
-
-#ifndef AUTOCONF_TEST
-#include config.h
-#endif
-
-#include unistd.h
-#include stdio.h
-#include sys/types.h
-#include netdb.h
-#include sys/ioctl.h
-#include netdb.h
-#include sys/ioctl.h
-#include sys/time.h
-#include sys/socket.h
-#include netinet/in.h
-#include arpa/inet.h
-
-#ifdef HAVE_IFADDRS_H
-#include ifaddrs.h
-#endif
-
-#ifdef HAVE_SYS_TIME_H
-#include sys/time.h
-#endif
-
-#ifndef SIOCGIFCONF
-#ifdef HAVE_SYS_SOCKIO_H
-#include sys/sockio.h
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
-#include stdlib.h
-#endif
-
-#ifdef HAVE_STRING_H
-#include string.h
-#endif
-
-#ifdef HAVE_STRINGS_H
-#include strings.h
-#endif
-
-#ifdef __COMPAR_FN_T
-#define QSORT_CAST (__compar_fn_t)
-#endif
-
-#ifndef QSORT_CAST
-#define QSORT_CAST (int (*)(const void *, const void *))
-#endif
-
-#ifdef HAVE_NET_IF_H
-#include net/if.h
-#endif
-
-#define SOCKET_WRAPPER_NOT_REPLACE
-#include interfaces.h
-#include ../replace/replace.h
-
-/
- Utility functions.
-/
+#include includes.h
 
 /
  Create a struct sockaddr_storage with the netmask bits set to 1.


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-5046-gbac96af

2009-03-09 Thread Stefan Metzmacher
The branch, v3-3-test has been updated
   via  bac96af2053996f28894458fce87e84c5c2356ff (commit)
  from  ca623a7aa45b93c76e4c03ef041fb518c330ca3f (commit)

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


- Log -
commit bac96af2053996f28894458fce87e84c5c2356ff
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 9 12:35:21 2009 +0100

s3:lib: interfaces.c isn't used in the configure tests anymore

libreplace always provides the getifaddr() function.

This fixes the build on sles8.

metze
(cherry picked from commit 1410490fe769bc79f98b4ab364685c7aed253e09)

---

Summary of changes:
 source/lib/interfaces.c |   74 +--
 1 files changed, 1 insertions(+), 73 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/interfaces.c b/source/lib/interfaces.c
index dd857ae..2535418 100644
--- a/source/lib/interfaces.c
+++ b/source/lib/interfaces.c
@@ -18,79 +18,7 @@
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
 
-
-/* working out the interfaces for a OS is an incredibly non-portable
-   thing. We have several possible implementations below, and autoconf
-   tries each of them to see what works
-
-   Note that this file does _not_ include includes.h. That is so this code
-   can be called directly from the autoconf tests. That also means
-   this code cannot use any of the normal Samba debug stuff or defines.
-   This is standalone code.
-
-*/
-
-#ifndef AUTOCONF_TEST
-#include config.h
-#endif
-
-#include unistd.h
-#include stdio.h
-#include sys/types.h
-#include netdb.h
-#include sys/ioctl.h
-#include netdb.h
-#include sys/ioctl.h
-#include sys/time.h
-#include sys/socket.h
-#include netinet/in.h
-#include arpa/inet.h
-
-#ifdef HAVE_IFADDRS_H
-#include ifaddrs.h
-#endif
-
-#ifdef HAVE_SYS_TIME_H
-#include sys/time.h
-#endif
-
-#ifndef SIOCGIFCONF
-#ifdef HAVE_SYS_SOCKIO_H
-#include sys/sockio.h
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
-#include stdlib.h
-#endif
-
-#ifdef HAVE_STRING_H
-#include string.h
-#endif
-
-#ifdef HAVE_STRINGS_H
-#include strings.h
-#endif
-
-#ifdef __COMPAR_FN_T
-#define QSORT_CAST (__compar_fn_t)
-#endif
-
-#ifndef QSORT_CAST
-#define QSORT_CAST (int (*)(const void *, const void *))
-#endif
-
-#ifdef HAVE_NET_IF_H
-#include net/if.h
-#endif
-
-#define SOCKET_WRAPPER_NOT_REPLACE
-#include interfaces.h
-#include lib/replace/replace.h
-
-/
- Utility functions.
-/
+#include includes.h
 
 /
  Create a struct sockaddr_storage with the netmask bits set to 1.


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3498-g8c50d89

2009-03-09 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  8c50d89743a8e9024d238c6613ceea35cf160aa0 (commit)
  from  b4d9e92dfaa84b1361cdd6e49ad88e252c8fed4d (commit)

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


- Log -
commit 8c50d89743a8e9024d238c6613ceea35cf160aa0
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 9 12:35:21 2009 +0100

s3:lib: interfaces.c isn't used in the configure tests anymore

libreplace always provides the getifaddr() function.

This fixes the build on sles8.

metze
(cherry picked from commit 1410490fe769bc79f98b4ab364685c7aed253e09)
(cherry picked from commit bac96af2053996f28894458fce87e84c5c2356ff)

---

Summary of changes:
 source/lib/interfaces.c |   74 +--
 1 files changed, 1 insertions(+), 73 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/lib/interfaces.c b/source/lib/interfaces.c
index dd857ae..2535418 100644
--- a/source/lib/interfaces.c
+++ b/source/lib/interfaces.c
@@ -18,79 +18,7 @@
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
 
-
-/* working out the interfaces for a OS is an incredibly non-portable
-   thing. We have several possible implementations below, and autoconf
-   tries each of them to see what works
-
-   Note that this file does _not_ include includes.h. That is so this code
-   can be called directly from the autoconf tests. That also means
-   this code cannot use any of the normal Samba debug stuff or defines.
-   This is standalone code.
-
-*/
-
-#ifndef AUTOCONF_TEST
-#include config.h
-#endif
-
-#include unistd.h
-#include stdio.h
-#include sys/types.h
-#include netdb.h
-#include sys/ioctl.h
-#include netdb.h
-#include sys/ioctl.h
-#include sys/time.h
-#include sys/socket.h
-#include netinet/in.h
-#include arpa/inet.h
-
-#ifdef HAVE_IFADDRS_H
-#include ifaddrs.h
-#endif
-
-#ifdef HAVE_SYS_TIME_H
-#include sys/time.h
-#endif
-
-#ifndef SIOCGIFCONF
-#ifdef HAVE_SYS_SOCKIO_H
-#include sys/sockio.h
-#endif
-#endif
-
-#ifdef HAVE_STDLIB_H
-#include stdlib.h
-#endif
-
-#ifdef HAVE_STRING_H
-#include string.h
-#endif
-
-#ifdef HAVE_STRINGS_H
-#include strings.h
-#endif
-
-#ifdef __COMPAR_FN_T
-#define QSORT_CAST (__compar_fn_t)
-#endif
-
-#ifndef QSORT_CAST
-#define QSORT_CAST (int (*)(const void *, const void *))
-#endif
-
-#ifdef HAVE_NET_IF_H
-#include net/if.h
-#endif
-
-#define SOCKET_WRAPPER_NOT_REPLACE
-#include interfaces.h
-#include lib/replace/replace.h
-
-/
- Utility functions.
-/
+#include includes.h
 
 /
  Create a struct sockaddr_storage with the netmask bits set to 1.


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-263-g143b222

2009-03-10 Thread Stefan Metzmacher
The branch, master has been updated
   via  143b222546f5b6bd6af000426465aa7466ae2ba3 (commit)
  from  6f1f9f6d8d3d25ab6ed5467b81f1eed70e962d27 (commit)

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


- Log -
commit 143b222546f5b6bd6af000426465aa7466ae2ba3
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 9 17:48:08 2009 +0100

socket_wrapper: wrap readv() and writev()

metze

---

Summary of changes:
 lib/socket_wrapper/socket_wrapper.c |  132 +--
 lib/socket_wrapper/socket_wrapper.h |   12 +++
 2 files changed, 137 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/socket_wrapper/socket_wrapper.c 
b/lib/socket_wrapper/socket_wrapper.c
index 97e6046..44082e7 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) Jelmer Vernooij 2005,2008 jel...@samba.org
- * Copyright (C) Stefan Metzmacher 2006 me...@samba.org
+ * Copyright (C) Stefan Metzmacher 2006-2009 me...@samba.org
  *
  * All rights reserved.
  * 
@@ -121,6 +121,8 @@
 #define real_ioctl ioctl
 #define real_recv recv
 #define real_send send
+#define real_readv readv
+#define real_writev writev
 #define real_socket socket
 #define real_close close
 #endif
@@ -1698,13 +1700,7 @@ _PUBLIC_ int swrap_connect(int s, const struct sockaddr 
*serv_addr, socklen_t ad
si-peername_len = addrlen;
si-peername = sockaddr_dup(serv_addr, addrlen);
si-connected = 1;
-   }
-
-   if (si-type != SOCK_STREAM) {
-   return ret;
-   }
 
-   if (ret == 0) {
swrap_dump_packet(si, serv_addr, SWRAP_CONNECT_RECV, NULL, 0);
swrap_dump_packet(si, serv_addr, SWRAP_CONNECT_ACK, NULL, 0);
} else {
@@ -2018,6 +2014,128 @@ _PUBLIC_ ssize_t swrap_send(int s, const void *buf, 
size_t len, int flags)
return ret;
 }
 
+int swrap_readv(int s, const struct iovec *vector, size_t count)
+{
+   int ret;
+   struct socket_info *si = find_socket_info(s);
+   struct iovec v;
+
+   if (!si) {
+   return real_readv(s, vector, count);
+   }
+
+   /* we read 1500 bytes as maximum */
+   if (count  0) {
+   size_t i, len = 0;
+
+   for (i=0; i  count; i++) {
+   size_t nlen;
+   nlen = len + vector[i].iov_len;
+   if (nlen  1500) {
+   break;
+   }
+   }
+   count = i;
+   if (count == 0) {
+   v = vector[0];
+   v.iov_len = MIN(v.iov_len, 1500);
+   vector = v;
+   count = 1;
+   }
+   }
+
+   ret = real_readv(s, vector, count);
+   if (ret == -1  errno != EAGAIN  errno != ENOBUFS) {
+   swrap_dump_packet(si, NULL, SWRAP_RECV_RST, NULL, 0);
+   } else if (ret == 0) { /* END OF FILE */
+   swrap_dump_packet(si, NULL, SWRAP_RECV_RST, NULL, 0);
+   } else if (ret  0) {
+   uint8_t *buf;
+   off_t ofs = 0;
+   size_t i;
+
+   /* we capture it as one single packet */
+   buf = (uint8_t *)malloc(ret);
+   if (!buf) {
+   /* we just not capture the packet */
+   errno = 0;
+   return ret;
+   }
+
+   for (i=0; i  count; i++) {
+   memcpy(buf + ofs,
+  vector[i].iov_base,
+  vector[i].iov_len);
+   ofs += vector[i].iov_len;
+   }
+
+   swrap_dump_packet(si, NULL, SWRAP_RECV, buf, ret);
+   free(buf);
+   }
+
+   return ret;
+}
+
+int swrap_writev(int s, const struct iovec *vector, size_t count)
+{
+   int ret;
+   struct socket_info *si = find_socket_info(s);
+   struct iovec v;
+
+   if (!si) {
+   return real_writev(s, vector, count);
+   }
+
+   /* we write 1500 bytes as maximum */
+   if (count  0) {
+   size_t i, len = 0;
+
+   for (i=0; i  count; i++) {
+   size_t nlen;
+   nlen = len + vector[i].iov_len;
+   if (nlen  1500) {
+   break;
+   }
+   }
+   count = i;
+   if (count == 0) {
+   v = vector[0];
+   v.iov_len = MIN(v.iov_len, 1500);
+   vector = v;
+   count = 1;
+   }
+   }
+
+   ret = real_writev(s, vector, count);
+   if (ret

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-264-g7fc8086

2009-03-10 Thread Stefan Metzmacher
The branch, master has been updated
   via  7fc8086e11497c96be72859a510f72cb3c4104d5 (commit)
  from  143b222546f5b6bd6af000426465aa7466ae2ba3 (commit)

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


- Log -
commit 7fc8086e11497c96be72859a510f72cb3c4104d5
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 10 10:56:33 2009 +0100

s3:libsmb: fix a lot of cli_push() bugs

There were the following problems:
1.) if window_size was a multiple of the chunk_size,
we silently dropped the last truncated chunk.
2.) if window_size was 0 pushed only the first chunk
to the server and silently dropped the rest.
3.) we had only transferred state-num_reqs writes,
even if there would be more data to send.

metze

---

Summary of changes:
 source3/libsmb/clireadwrite.c |  202 ++---
 1 files changed, 107 insertions(+), 95 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 9d17ff8..764ef63 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -915,9 +915,15 @@ static NTSTATUS cli_writeall_recv(struct async_req *req)
return async_req_simple_recv_ntstatus(req);
 }
 
-struct cli_push_state {
-   struct async_req *req;
+struct cli_push_write_state {
+   struct async_req *req;/* This is the main request! Not the subreq */
+   uint32_t idx;
+   off_t ofs;
+   uint8_t *buf;
+   size_t size;
+};
 
+struct cli_push_state {
struct event_context *ev;
struct cli_state *cli;
uint16_t fnum;
@@ -928,24 +934,72 @@ struct cli_push_state {
size_t (*source)(uint8_t *buf, size_t n, void *priv);
void *priv;
 
-   size_t chunk_size;
-
-   size_t sent;
bool eof;
 
+   size_t chunk_size;
+   off_t next_offset;
+
/*
 * Outstanding requests
 */
-   int num_reqs;
-   struct async_req **reqs;
-
-   int pending;
-
-   uint8_t *buf;
+   uint32_t pending;
+   uint32_t num_reqs;
+   struct cli_push_write_state **reqs;
 };
 
 static void cli_push_written(struct async_req *req);
 
+static bool cli_push_write_setup(struct async_req *req,
+struct cli_push_state *state,
+uint32_t idx)
+{
+   struct cli_push_write_state *substate;
+   struct async_req *subreq;
+
+   substate = talloc(state-reqs, struct cli_push_write_state);
+   if (!substate) {
+   return false;
+   }
+   substate-req = req;
+   substate-idx = idx;
+   substate-ofs = state-next_offset;
+   substate-buf = talloc_array(substate, uint8_t, state-chunk_size);
+   if (!substate-buf) {
+   talloc_free(substate);
+   return false;
+   }
+   substate-size = state-source(substate-buf,
+  state-chunk_size,
+  state-priv);
+   if (substate-size  state-chunk_size) {
+   state-eof = true;
+   }
+   if (substate-size == 0) {
+   /* nothing to send */
+   talloc_free(substate);
+   return true;
+   }
+
+   subreq = cli_writeall_send(substate,
+  state-ev, state-cli,
+  state-fnum, state-mode,
+  substate-buf,
+  substate-ofs,
+  substate-size);
+   if (!subreq) {
+   talloc_free(substate);
+   return false;
+   }
+   subreq-async.fn = cli_push_written;
+   subreq-async.priv = substate;
+
+   state-reqs[idx] = substate;
+   state-pending += 1;
+   state-next_offset += substate-size;
+
+   return true;
+}
+
 struct async_req *cli_push_send(TALLOC_CTX *mem_ctx, struct event_context *ev,
struct cli_state *cli,
uint16_t fnum, uint16_t mode,
@@ -954,16 +1008,14 @@ struct async_req *cli_push_send(TALLOC_CTX *mem_ctx, 
struct event_context *ev,
 void *priv),
void *priv)
 {
-   struct async_req *result;
+   struct async_req *req;
struct cli_push_state *state;
-   int i;
+   uint32_t i;
 
-   if (!async_req_setup(mem_ctx, result, state,
+   if (!async_req_setup(mem_ctx, req, state,
 struct cli_push_state)) {
return NULL;
}
-   state-req = result;
-
state-cli = cli;
state-ev = ev;
state-fnum = fnum;
@@ -972,124 +1024,84 @@ struct async_req *cli_push_send(TALLOC_CTX *mem_ctx

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-266-g9579a6f

2009-03-10 Thread Stefan Metzmacher
The branch, master has been updated
   via  9579a6f193f570e4ce2af80f4aac7c2f25ae5b22 (commit)
   via  c2993f74af4e17790f8afbf16ba1c6884afa4ad4 (commit)
  from  7fc8086e11497c96be72859a510f72cb3c4104d5 (commit)

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


- Log -
commit 9579a6f193f570e4ce2af80f4aac7c2f25ae5b22
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 10 12:34:20 2009 +0100

s3:libsmb: add an option to cli_push to let the caller provide the buffers

metze

commit c2993f74af4e17790f8afbf16ba1c6884afa4ad4
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 10 12:32:48 2009 +0100

s3:libsmb: only treat a return 0 as end of file

metze

---

Summary of changes:
 source3/client/client.c   |   10 ++
 source3/include/proto.h   |9 +++--
 source3/libsmb/clireadwrite.c |   38 ++
 source3/torture/torture.c |8 +---
 4 files changed, 44 insertions(+), 21 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/client.c b/source3/client/client.c
index aaa9e35..67a2458 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -220,7 +220,9 @@ struct push_state {
SMB_OFF_T nread;
 };
 
-static size_t push_source(uint8_t *buf, size_t n, void *priv)
+static size_t push_source(uint8_t *inbuf, size_t n,
+ const uint8_t **outbuf,
+ void *priv)
 {
struct push_state *state = (struct push_state *)priv;
int result;
@@ -229,7 +231,7 @@ static size_t push_source(uint8_t *buf, size_t n, void 
*priv)
return 0;
}
 
-   result = readfile(buf, n, state-f);
+   result = readfile(inbuf, n, state-f);
state-nread += result;
return result;
 }
@@ -1681,8 +1683,8 @@ static int do_put(const char *rname, const char *lname, 
bool reput)
state.f = f;
state.nread = 0;
 
-   status = cli_push(targetcli, fnum, 0, 0, io_bufsize, push_source,
- state);
+   status = cli_push(targetcli, fnum, 0, 0, io_bufsize,
+ false, push_source, state);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, cli_push returned %s\n, nt_errstr(status));
}
diff --git a/source3/include/proto.h b/source3/include/proto.h
index a1cafb6..794a006 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2790,13 +2790,18 @@ struct async_req *cli_push_send(TALLOC_CTX *mem_ctx, 
struct event_context *ev,
struct cli_state *cli,
uint16_t fnum, uint16_t mode,
off_t start_offset, size_t window_size,
-   size_t (*source)(uint8_t *buf, size_t n,
+   bool caller_buffers,
+   size_t (*source)(uint8_t *inbuf, size_t n,
+const uint8_t **outbuf,
 void *priv),
void *priv);
 NTSTATUS cli_push_recv(struct async_req *req);
 NTSTATUS cli_push(struct cli_state *cli, uint16_t fnum, uint16_t mode,
  off_t start_offset, size_t window_size,
- size_t (*source)(uint8_t *buf, size_t n, void *priv),
+ bool caller_buffers,
+ size_t (*source)(uint8_t *inbuf, size_t n,
+  const uint8_t **outbuf,
+  void *priv),
  void *priv);
 
 /* The following definitions come from libsmb/clisecdesc.c  */
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 764ef63..7e7cf0d 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -930,8 +930,11 @@ struct cli_push_state {
uint16_t mode;
off_t start_offset;
size_t window_size;
+   bool caller_buffers;
 
-   size_t (*source)(uint8_t *buf, size_t n, void *priv);
+   size_t (*source)(uint8_t *inbuf, size_t n,
+const uint8_t **outbuf,
+void *priv);
void *priv;
 
bool eof;
@@ -963,18 +966,24 @@ static bool cli_push_write_setup(struct async_req *req,
substate-req = req;
substate-idx = idx;
substate-ofs = state-next_offset;
-   substate-buf = talloc_array(substate, uint8_t, state-chunk_size);
-   if (!substate-buf) {
-   talloc_free(substate);
-   return false;
+   if (state-caller_buffers) {
+   substate-buf = NULL;
+   } else {
+   substate-buf = talloc_array(substate, uint8_t,
+state-chunk_size);
+   if (!substate

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-269-g825949b

2009-03-10 Thread Stefan Metzmacher
The branch, master has been updated
   via  825949b810c6e7b7b977283355e658e2edbb8932 (commit)
   via  09d1b2324cf02c20daa005e6f5d55dc107303af7 (commit)
  from  97cccb22194380ce84bf6188df90e2438f1176db (commit)

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


- Log -
commit 825949b810c6e7b7b977283355e658e2edbb8932
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 10 14:02:30 2009 +0100

tevent: add tevent_req_callback_data_void() macro

Callers can use it instead of tevent_req_callback_data()
if they use a non talloc private pointer.

metze

commit 09d1b2324cf02c20daa005e6f5d55dc107303af7
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 10 13:54:57 2009 +0100

tevent: add tevent_req_received() function

This function can be called as last action of a _recv()
function, it destroys the data attached to the tevent_req.

metze

---

Summary of changes:
 lib/tevent/tevent.h  |   10 +-
 lib/tevent/tevent_internal.h |2 +-
 lib/tevent/tevent_req.c  |   21 +
 3 files changed, 31 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index 5089d18..2dadfc1 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -165,7 +165,11 @@ enum tevent_req_state {
/**
 * No memory in between
 */
-   TEVENT_REQ_NO_MEMORY
+   TEVENT_REQ_NO_MEMORY,
+   /**
+* the request is already received by the caller
+*/
+   TEVENT_REQ_RECEIVED
 };
 
 /**
@@ -193,6 +197,8 @@ void *_tevent_req_data(struct tevent_req *req);
 
 #define tevent_req_callback_data(_req, _type) \
talloc_get_type_abort(_tevent_req_callback_data(_req), _type)
+#define tevent_req_callback_data_void(_req) \
+   _tevent_req_callback_data(_req)
 #define tevent_req_data(_req, _type) \
talloc_get_type_abort(_tevent_req_data(_req), _type)
 
@@ -238,6 +244,8 @@ bool tevent_req_is_error(struct tevent_req *req,
 enum tevent_req_state *state,
 uint64_t *error);
 
+void tevent_req_received(struct tevent_req *req);
+
 struct tevent_req *tevent_wakeup_send(TALLOC_CTX *mem_ctx,
  struct tevent_context *ev,
  struct timeval wakeup_time);
diff --git a/lib/tevent/tevent_internal.h b/lib/tevent/tevent_internal.h
index fa73b22..5a645ec 100644
--- a/lib/tevent/tevent_internal.h
+++ b/lib/tevent/tevent_internal.h
@@ -56,7 +56,7 @@ struct tevent_req {
/**
 * @brief A function to overwrite the default print function
 *
-* The implementation doing the work may want to imeplement a
+* The implementation doing the work may want to implement a
 * custom function to print the text representation of the async
 * request.
 */
diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index 9b3e00e..3832088 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -256,6 +256,27 @@ bool tevent_req_is_in_progress(struct tevent_req *req)
return false;
 }
 
+/**
+ * @brief This function destroys the attached private data
+ * @param[in] req  The finished request
+ *
+ * This function can be called as last action of a _recv()
+ * function, it destroys the data attached to the tevent_req.
+ */
+void tevent_req_received(struct tevent_req *req)
+{
+   talloc_free(req-data);
+   req-data = NULL;
+   req-private_print = NULL;
+
+   talloc_free(req-internal.trigger);
+   req-internal.trigger = NULL;
+   talloc_free(req-internal.timer);
+   req-internal.timer = NULL;
+
+   req-internal.state = TEVENT_REQ_RECEIVED;
+}
+
 bool tevent_req_poll(struct tevent_req *req,
 struct tevent_context *ev)
 {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-273-g082bea6

2009-03-11 Thread Stefan Metzmacher
The branch, master has been updated
   via  082bea67af9df2390a422a5b2e9d1a042dd95c10 (commit)
  from  3d280639c4652d6cd35577e333bcd46c2517754c (commit)

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


- Log -
commit 082bea67af9df2390a422a5b2e9d1a042dd95c10
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 11 08:05:11 2009 +0100

lib/replace: make sure we include sys/uio.h before socket_wrapper.h

This should fix the build on some hosts.

metze

---

Summary of changes:
 lib/replace/libreplace_network.m4 |1 +
 lib/replace/system/network.h  |4 
 2 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/libreplace_network.m4 
b/lib/replace/libreplace_network.m4
index 78fb1ab..1dc1c44 100644
--- a/lib/replace/libreplace_network.m4
+++ b/lib/replace/libreplace_network.m4
@@ -16,6 +16,7 @@ AC_CHECK_HEADERS([netinet/ip.h], [], [],[#ifdef 
HAVE_NETINET_IN_H
 #endif])
 AC_CHECK_HEADERS(netinet/tcp.h netinet/in_ip.h)
 AC_CHECK_HEADERS(sys/sockio.h sys/un.h)
+AC_CHECK_HEADERS(sys/uio.h)
 
 dnl we need to check that net/if.h really can be used, to cope with hpux
 dnl where including it always fails
diff --git a/lib/replace/system/network.h b/lib/replace/system/network.h
index f135d17..6add99c 100644
--- a/lib/replace/system/network.h
+++ b/lib/replace/system/network.h
@@ -83,6 +83,10 @@
 #include sys/ioctl.h
 #endif
 
+#ifdef HAVE_SYS_UIO_H
+#include sys/uio.h
+#endif
+
 #ifdef HAVE_STROPTS_H
 #include stropts.h
 #endif


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-277-g41c5d70

2009-03-11 Thread Stefan Metzmacher
The branch, master has been updated
   via  41c5d70c8d7b2af4fab50215f9bfea8e910cf99f (commit)
   via  b96aa69dffedc154de94d3f7684e952bfaff0a74 (commit)
  from  793247452e19794bcc6d52938411e5cf964dc46e (commit)

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


- Log -
commit 41c5d70c8d7b2af4fab50215f9bfea8e910cf99f
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Feb 23 16:10:42 2009 +0100

LDAP-BENCH-CLDAP: also test CLDAP rootdse searches.

metze

commit b96aa69dffedc154de94d3f7684e952bfaff0a74
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 11 14:28:35 2009 +0100

async_sock: fix truncating of the temporary iovec in writev_send/recv()

Volker: please check!

metze

---

Summary of changes:
 lib/async_req/async_sock.c|2 +-
 source4/torture/ldap/cldapbench.c |   85 ++---
 2 files changed, 80 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/async_req/async_sock.c b/lib/async_req/async_sock.c
index f803b9c..be24bae 100644
--- a/lib/async_req/async_sock.c
+++ b/lib/async_req/async_sock.c
@@ -485,7 +485,7 @@ static void writev_handler(struct tevent_context *ev, 
struct tevent_fd *fde,
state-iov[0].iov_len -= written;
break;
}
-   written = state-iov[0].iov_len;
+   written -= state-iov[0].iov_len;
state-iov += 1;
state-count -= 1;
}
diff --git a/source4/torture/ldap/cldapbench.c 
b/source4/torture/ldap/cldapbench.c
index 1fcfe5a..ae2cb80 100644
--- a/source4/torture/ldap/cldapbench.c
+++ b/source4/torture/ldap/cldapbench.c
@@ -30,7 +30,7 @@ struct bench_state {
int pass_count, fail_count;
 };
 
-static void request_handler(struct cldap_request *req)
+static void request_netlogon_handler(struct cldap_request *req)
 {
struct cldap_netlogon io;
struct bench_state *state = talloc_get_type(req-async.private_data, 
struct bench_state);
@@ -47,9 +47,9 @@ static void request_handler(struct cldap_request *req)
 }
 
 /*
-  benchmark cldap calls
+  benchmark cldap netlogon calls
 */
-static bool bench_cldap(struct torture_context *tctx, const char *address)
+static bool bench_cldap_netlogon(struct torture_context *tctx, const char 
*address)
 {
struct cldap_socket *cldap;
int num_sent=0;
@@ -69,14 +69,14 @@ static bool bench_cldap(struct torture_context *tctx, const 
char *address)
search.in.acct_control = -1;
search.in.version = 6;
 
-   printf(Running for %d seconds\n, timelimit);
+   printf(Running CLDAP/netlogon for %d seconds\n, timelimit);
while (timeval_elapsed(tv)  timelimit) {
while (num_sent - (state-pass_count+state-fail_count)  10) {
struct cldap_request *req;
req = cldap_netlogon_send(cldap, search);
 
req-async.private_data = state;
-   req-async.fn = request_handler;
+   req-async.fn = request_netlogon_handler;
num_sent++;
if (num_sent % 50 == 0) {
if (torture_setting_bool(tctx, progress, 
true)) {
@@ -103,6 +103,78 @@ static bool bench_cldap(struct torture_context *tctx, 
const char *address)
return ret;
 }
 
+static void request_rootdse_handler(struct cldap_request *req)
+{
+   struct cldap_search io;
+   struct bench_state *state = talloc_get_type(req-async.private_data, 
struct bench_state);
+   NTSTATUS status;
+   TALLOC_CTX *tmp_ctx = talloc_new(NULL);
+   status = cldap_search_recv(req, tmp_ctx, io);
+   if (NT_STATUS_IS_OK(status)) {
+   state-pass_count++;
+   } else {
+   state-fail_count++;
+   }
+   talloc_free(tmp_ctx);
+}
+
+/*
+  benchmark cldap netlogon calls
+*/
+static bool bench_cldap_rootdse(struct torture_context *tctx, const char 
*address)
+{
+   struct cldap_socket *cldap;
+   int num_sent=0;
+   struct timeval tv = timeval_current();
+   bool ret = true;
+   int timelimit = torture_setting_int(tctx, timelimit, 10);
+   struct cldap_search search;
+   struct bench_state *state;
+
+   cldap = cldap_socket_init(tctx, tctx-ev, 
lp_iconv_convenience(tctx-lp_ctx));
+
+   state = talloc_zero(tctx, struct bench_state);
+
+   ZERO_STRUCT(search);
+   search.in.dest_address  = address;
+   search.in.dest_port = lp_cldap_port(tctx-lp_ctx);
+   search.in.filter= (objectClass=*);
+   search.in.timeout   = 2;
+   search.in.retries   = 1;
+
+   printf(Running CLDAP/rootdse for %d seconds\n, timelimit);
+   while (timeval_elapsed(tv)  timelimit

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-286-g2fdbafb

2009-03-12 Thread Stefan Metzmacher
The branch, master has been updated
   via  2fdbafbf5475e8936fb5bc3e3bafc7ee19a9b705 (commit)
  from  a0a9c5d1709e81a1503c7326147b3d77ab4328c9 (commit)

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


- Log -
commit 2fdbafbf5475e8936fb5bc3e3bafc7ee19a9b705
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 09:02:02 2009 +0100

Revert s3:libsmb: add an option to cli_push to let the caller provide the 
buffers

This reverts commit 9579a6f193f570e4ce2af80f4aac7c2f25ae5b22.

It's confusing to have a boolean to alter the behavior of cli_push
and as the new feature isn't used yet I revert it.

We can readd a extra function later.

metze

---

Summary of changes:
 source3/client/client.c   |   10 --
 source3/include/proto.h   |9 ++---
 source3/libsmb/clireadwrite.c |   33 -
 source3/torture/torture.c |8 +++-
 4 files changed, 17 insertions(+), 43 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/client/client.c b/source3/client/client.c
index 67a2458..aaa9e35 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -220,9 +220,7 @@ struct push_state {
SMB_OFF_T nread;
 };
 
-static size_t push_source(uint8_t *inbuf, size_t n,
- const uint8_t **outbuf,
- void *priv)
+static size_t push_source(uint8_t *buf, size_t n, void *priv)
 {
struct push_state *state = (struct push_state *)priv;
int result;
@@ -231,7 +229,7 @@ static size_t push_source(uint8_t *inbuf, size_t n,
return 0;
}
 
-   result = readfile(inbuf, n, state-f);
+   result = readfile(buf, n, state-f);
state-nread += result;
return result;
 }
@@ -1683,8 +1681,8 @@ static int do_put(const char *rname, const char *lname, 
bool reput)
state.f = f;
state.nread = 0;
 
-   status = cli_push(targetcli, fnum, 0, 0, io_bufsize,
- false, push_source, state);
+   status = cli_push(targetcli, fnum, 0, 0, io_bufsize, push_source,
+ state);
if (!NT_STATUS_IS_OK(status)) {
d_fprintf(stderr, cli_push returned %s\n, nt_errstr(status));
}
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 794a006..a1cafb6 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -2790,18 +2790,13 @@ struct async_req *cli_push_send(TALLOC_CTX *mem_ctx, 
struct event_context *ev,
struct cli_state *cli,
uint16_t fnum, uint16_t mode,
off_t start_offset, size_t window_size,
-   bool caller_buffers,
-   size_t (*source)(uint8_t *inbuf, size_t n,
-const uint8_t **outbuf,
+   size_t (*source)(uint8_t *buf, size_t n,
 void *priv),
void *priv);
 NTSTATUS cli_push_recv(struct async_req *req);
 NTSTATUS cli_push(struct cli_state *cli, uint16_t fnum, uint16_t mode,
  off_t start_offset, size_t window_size,
- bool caller_buffers,
- size_t (*source)(uint8_t *inbuf, size_t n,
-  const uint8_t **outbuf,
-  void *priv),
+ size_t (*source)(uint8_t *buf, size_t n, void *priv),
  void *priv);
 
 /* The following definitions come from libsmb/clisecdesc.c  */
diff --git a/source3/libsmb/clireadwrite.c b/source3/libsmb/clireadwrite.c
index 7e7cf0d..f2f447b 100644
--- a/source3/libsmb/clireadwrite.c
+++ b/source3/libsmb/clireadwrite.c
@@ -930,11 +930,8 @@ struct cli_push_state {
uint16_t mode;
off_t start_offset;
size_t window_size;
-   bool caller_buffers;
 
-   size_t (*source)(uint8_t *inbuf, size_t n,
-const uint8_t **outbuf,
-void *priv);
+   size_t (*source)(uint8_t *buf, size_t n, void *priv);
void *priv;
 
bool eof;
@@ -966,21 +963,13 @@ static bool cli_push_write_setup(struct async_req *req,
substate-req = req;
substate-idx = idx;
substate-ofs = state-next_offset;
-   if (state-caller_buffers) {
-   substate-buf = NULL;
-   } else {
-   substate-buf = talloc_array(substate, uint8_t,
-state-chunk_size);
-   if (!substate-buf) {
-   talloc_free(substate);
-   return false;
-   }
+   substate-buf = talloc_array(substate, uint8_t, state-chunk_size

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-297-gcb38888

2009-03-12 Thread Stefan Metzmacher
The branch, master has been updated
   via  cb32cf20a8bc8f20f1230bc22d1caff283dd (commit)
   via  7142ef49bdc5fe731c9140641e8e938ee999327d (commit)
   via  a3d5d8378c8edb6baa9ab42b02cee4711a58840b (commit)
   via  6802394212f7fefc21d1e2ad257fbeee26238b2d (commit)
   via  06f88fe7a2f9ce93f8cdbec0910cc8471c12b1c3 (commit)
   via  bd0f14c1d782b6afe9455e61819caeb2d480af1e (commit)
   via  9932fd2d9af3c71262c5cca61c3b38809b952d95 (commit)
   via  880d9d6d8c209c770185b9b1c9a3019cb56be763 (commit)
   via  43a7d48d24b357872dc31c1088e468ad2b719b73 (commit)
   via  7a8b97ec2bcedb18b56b54fbf61eb0d6e9005193 (commit)
   via  1e4f78cc41d7d44703bea238fee86da618d1587b (commit)
  from  2fdbafbf5475e8936fb5bc3e3bafc7ee19a9b705 (commit)

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


- Log -
commit cb32cf20a8bc8f20f1230bc22d1caff283dd
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 10:35:23 2009 +0100

tevent: add tevent_loop_until()

This is only a hack for samba4 and should not be used
in new code.

metze

commit 7142ef49bdc5fe731c9140641e8e938ee999327d
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 10:23:30 2009 +0100

tevent: add tevent_loop_set_nesting_hook()

This is an ugly hack to let the s4 server work arround
some bugs related to nested events and uid changing.

metze

commit a3d5d8378c8edb6baa9ab42b02cee4711a58840b
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 10:05:47 2009 +0100

s4:events: allow nested events until we fixed all code to avoid them

metze

commit 6802394212f7fefc21d1e2ad257fbeee26238b2d
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 10:05:05 2009 +0100

s4:ldb: allow nested events until the code is fixed to avoid them

metze

commit 06f88fe7a2f9ce93f8cdbec0910cc8471c12b1c3
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 09:51:33 2009 +0100

tevent: don't allow nested tevent_loop_once() anymore

Incompatible caller should use tevent_loop_allow_nesting()
function.

metze

commit bd0f14c1d782b6afe9455e61819caeb2d480af1e
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 09:33:58 2009 +0100

s3:events: pass __location__ to event_loop_*()

metze

commit 9932fd2d9af3c71262c5cca61c3b38809b952d95
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 09:33:26 2009 +0100

tevent: pass __location__ to tevent_loop_once/wait()

metze

commit 880d9d6d8c209c770185b9b1c9a3019cb56be763
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 09:22:41 2009 +0100

tevent: add tevent_set_abort_fn()

metze

commit 43a7d48d24b357872dc31c1088e468ad2b719b73
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 08:48:59 2009 +0100

tevent: add tevent_signal_support()

Not every tevent backend supports signal events.

metze

commit 7a8b97ec2bcedb18b56b54fbf61eb0d6e9005193
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 08:19:50 2009 +0100

talloc: add talloc_set_abort_fn()

metze

commit 1e4f78cc41d7d44703bea238fee86da618d1587b
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 10:04:02 2009 +0100

s4:ldb: setup tevent debug functions on a selfcreated event context

metze

---

Summary of changes:
 lib/talloc/talloc.c|   35 +++-
 lib/talloc/talloc.h|2 +
 lib/tevent/tevent.c|  170 +++-
 lib/tevent/tevent.h|   39 +-
 lib/tevent/tevent_epoll.c  |6 +-
 lib/tevent/tevent_internal.h   |   12 +++-
 lib/tevent/tevent_select.c |6 +-
 lib/tevent/tevent_standard.c   |6 +-
 source3/lib/events.c   |6 +-
 source4/lib/events/tevent_s4.c |2 +
 source4/lib/ldb/common/ldb.c   |   37 +
 11 files changed, 297 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index c472e9f..60a48ad 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -138,14 +138,30 @@ struct talloc_chunk {
 #define TC_HDR_SIZE ((sizeof(struct talloc_chunk)+15)~15)
 #define TC_PTR_FROM_CHUNK(tc) ((void *)(TC_HDR_SIZE + (char*)tc))
 
+static void (*talloc_abort_fn)(const char *reason);
+
+void talloc_set_abort_fn(void (*abort_fn)(const char *reason))
+{
+   talloc_abort_fn = abort_fn;
+}
+
+static void talloc_abort(const char *reason)
+{
+   if (!talloc_abort_fn) {
+   TALLOC_ABORT(reason);
+   }
+
+   talloc_abort_fn(reason);
+}
+
 static void talloc_abort_double_free(void)
 {
-   TALLOC_ABORT(Bad talloc magic value - double free); 
+   talloc_abort(Bad talloc magic value - double free);
 }
 
 static void talloc_abort_unknown_value

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-298-g2f57920

2009-03-12 Thread Stefan Metzmacher
The branch, master has been updated
   via  2f579200fb439693540ada6e098959aa2d5f414e (commit)
  from  cb32cf20a8bc8f20f1230bc22d1caff283dd (commit)

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


- Log -
commit 2f579200fb439693540ada6e098959aa2d5f414e
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 12 14:28:22 2009 +0100

s4:build: try to fix the build with the ibm checker in the build-farm

The problem is that the shell eats the quotes in -DFOO=foo, bar, NULL

metze

---

Summary of changes:
 source4/build/smb_build/main.pl |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/build/smb_build/main.pl b/source4/build/smb_build/main.pl
index 3c84a91..0d19e41 100644
--- a/source4/build/smb_build/main.pl
+++ b/source4/build/smb_build/main.pl
@@ -73,7 +73,7 @@ foreach my $key (values %$OUTPUT) {
$shared_libs_used = 1;
}
if ($key-{TYPE} eq MODULE and @{$key-{OUTPUT_TYPE}}[0] eq 
MERGED_OBJ and defined($key-{INIT_FUNCTION})) {
-   $mkenv-output($key-{SUBSYSTEM}_INIT_FUNCTIONS += 
$key-{INIT_FUNCTION},\n);
+   $mkenv-output($key-{SUBSYSTEM}_INIT_FUNCTIONS 
+=$key-{INIT_FUNCTION},\n);
}
$mkenv-CFlags($key);
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-352-g1355dc2

2009-03-13 Thread Stefan Metzmacher
The branch, master has been updated
   via  1355dc2fd3a10c54fc3534409b78972d59d59b30 (commit)
   via  868f3f5f32eccdf68590cdfc5c42e1af970410d7 (commit)
  from  7a41f299fc079290b17e64a8702cea8da332c227 (commit)

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


- Log -
commit 1355dc2fd3a10c54fc3534409b78972d59d59b30
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 13 15:50:23 2009 +0100

s4:build: require tevent 0.9.4

metze

commit 868f3f5f32eccdf68590cdfc5c42e1af970410d7
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 13 15:49:35 2009 +0100

tevent: change version to 0.9.4 as the ABI has changed

metze

---

Summary of changes:
 lib/tevent/configure.ac |2 +-
 source3/samba4.m4   |2 +-
 source4/configure.ac|2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/configure.ac b/lib/tevent/configure.ac
index 4333461..69f65c6 100644
--- a/lib/tevent/configure.ac
+++ b/lib/tevent/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.50)
-AC_INIT(tevent, 0.9.3)
+AC_INIT(tevent, 0.9.4)
 AC_CONFIG_SRCDIR([tevent.c])
 AC_CONFIG_HEADER(config.h)
 
diff --git a/source3/samba4.m4 b/source3/samba4.m4
index d11d3be..97a1a3b 100644
--- a/source3/samba4.m4
+++ b/source3/samba4.m4
@@ -84,7 +84,7 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb = 1.1.3,
 
 SMB_INCLUDE_MK(../lib/tdb/python.mk) 
 
-SMB_EXT_LIB_FROM_PKGCONFIG(LIBTEVENT, tevent = 0.9.3,
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBTEVENT, tevent = 0.9.4,
[],[m4_include(../lib/tevent/samba.m4)]
 )
 
diff --git a/source4/configure.ac b/source4/configure.ac
index d33df08..87ed4d8 100644
--- a/source4/configure.ac
+++ b/source4/configure.ac
@@ -59,7 +59,7 @@ SMB_INCLUDED_LIB_PKGCONFIG(LIBTDB, tdb = 1.1.3,
 
 SMB_INCLUDE_MK(../lib/tdb/python.mk) 
 
-SMB_INCLUDED_LIB_PKGCONFIG(LIBTEVENT, tevent = 0.9.3,
+SMB_INCLUDED_LIB_PKGCONFIG(LIBTEVENT, tevent = 0.9.4,
[],[m4_include(../lib/tevent/samba.m4)]
 )
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-389-g752cf03

2009-03-16 Thread Stefan Metzmacher
The branch, master has been updated
   via  752cf03bf7854a4b32b0e1fedc1cb4ecd4474765 (commit)
   via  6d4a13241a096d30d37d69a8f7b888a395716316 (commit)
   via  a3998832dbdbeb9ba5f3576a242bd48a5a3b3b60 (commit)
   via  a73bd05eec608d29888286542e9c882039b02857 (commit)
   via  d0b9cc62f99a1feca68c473f3cd1e93e50ab2eab (commit)
   via  099d6f05cdb0800114d026786920a17ef649699f (commit)
  from  586a4da5dd30c371a33956db406bbb1dc08534b2 (commit)

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


- Log -
commit 752cf03bf7854a4b32b0e1fedc1cb4ecd4474765
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 10:19:09 2009 +0100

talloc: change version to 1.3.0

metze

commit 6d4a13241a096d30d37d69a8f7b888a395716316
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 10:16:40 2009 +0100

talloc: add useful talloc_array_length() macro

metze

commit a3998832dbdbeb9ba5f3576a242bd48a5a3b3b60
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 10:13:58 2009 +0100

talloc: add TALLOC_ZERO()

metze

commit a73bd05eec608d29888286542e9c882039b02857
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 10:13:34 2009 +0100

s3: only define TALLOC_ZERO if needed

metze

commit d0b9cc62f99a1feca68c473f3cd1e93e50ab2eab
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 10:13:08 2009 +0100

nsswitch: only define TALLOC_ZERO if needed

metze

commit 099d6f05cdb0800114d026786920a17ef649699f
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 13 10:20:29 2009 +0100

lib/replace: use AC_TRY_LINK() to verify that getifaddrs() and 
freeifaddrs() are available

metze

---

Summary of changes:
 lib/replace/libreplace_network.m4 |2 +-
 lib/talloc/configure.ac   |2 +-
 lib/talloc/talloc.h   |3 +++
 nsswitch/pam_winbind.h|2 ++
 source3/include/smb_macros.h  |2 ++
 source3/libaddns/dns.h|2 ++
 6 files changed, 11 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/libreplace_network.m4 
b/lib/replace/libreplace_network.m4
index 1dc1c44..9223d94 100644
--- a/lib/replace/libreplace_network.m4
+++ b/lib/replace/libreplace_network.m4
@@ -242,7 +242,7 @@ AC_CHECK_MEMBERS([struct sockaddr.sa_len],
 
 dnl test for getifaddrs and freeifaddrs
 AC_CACHE_CHECK([for getifaddrs and freeifaddrs],libreplace_cv_HAVE_GETIFADDRS,[
-AC_TRY_COMPILE([
+AC_TRY_LINK([
 #include sys/types.h
 #if STDC_HEADERS
 #include stdlib.h
diff --git a/lib/talloc/configure.ac b/lib/talloc/configure.ac
index 39cea39..00e8242 100644
--- a/lib/talloc/configure.ac
+++ b/lib/talloc/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.50)
-AC_INIT(talloc, 1.2.1)
+AC_INIT(talloc, 1.3.0)
 AC_CONFIG_SRCDIR([talloc.c])
 AC_SUBST(datarootdir)
 AC_CONFIG_HEADER(config.h)
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h
index b623934..5c8d5c5 100644
--- a/lib/talloc/talloc.h
+++ b/lib/talloc/talloc.h
@@ -94,6 +94,7 @@ typedef void TALLOC_CTX;
 #define talloc_array(ctx, type, count) (type *)_talloc_array(ctx, 
sizeof(type), count, #type)
 #define talloc_array_size(ctx, size, count) _talloc_array(ctx, size, count, 
__location__)
 #define talloc_array_ptrtype(ctx, ptr, count) 
(_TALLOC_TYPEOF(ptr))talloc_array_size(ctx, sizeof(*(ptr)), count)
+#define talloc_array_length(ctx) ((ctx) ? talloc_get_size(ctx)/sizeof(*ctx) : 
0)
 
 #define talloc_realloc(ctx, p, type, count) (type *)_talloc_realloc_array(ctx, 
p, sizeof(type), count, #type)
 #define talloc_realloc_size(ctx, ptr, size) _talloc_realloc(ctx, ptr, size, 
__location__)
@@ -115,6 +116,8 @@ typedef void TALLOC_CTX;
 #define talloc_append_string(c, s, a) 
(s?talloc_strdup_append(s,a):talloc_strdup(c, a))
 #endif
 
+#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
+
 /* The following definitions come from talloc.c  */
 void *_talloc(const void *context, size_t size);
 void *talloc_pool(const void *context, size_t size);
diff --git a/nsswitch/pam_winbind.h b/nsswitch/pam_winbind.h
index 0395a1f..25d673e 100644
--- a/nsswitch/pam_winbind.h
+++ b/nsswitch/pam_winbind.h
@@ -171,6 +171,8 @@ struct pwb_context {
uint32_t ctrl;
 };
 
+#ifndef TALLOC_FREE
 #define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
+#endif
 #define TALLOC_ZERO_P(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type)
 #define TALLOC_P(ctx, type) (type *)talloc_named_const(ctx, sizeof(type), 
#type)
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index fd1bba1..22cfaaf 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -256,7 +256,9 @@ NULL returns on zero request. JRA.
 #define TALLOC_REALLOC(ctx, ptr, count) _talloc_realloc(ctx, ptr, count, 
__location__)
 #define TALLOC_REALLOC_ARRAY

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-363-gae4bd41

2009-03-16 Thread Stefan Metzmacher
The branch, v3-4-test has been updated
   via  ae4bd4116c9c2e85d02f0475aa3a9a4b6d3afc18 (commit)
   via  759ee49cd9c82ed00ebb0907c7b97e557f032a9c (commit)
   via  c6206e35701a45c0db801593bce4423a0036c82d (commit)
   via  ba549acc2ee6531c91ae4d4dde9cc4553b2c1d09 (commit)
   via  28b48329864b642c117ba193d94e5cbe466be10c (commit)
   via  5587e0d17aa5fe56337fbede9e3db11fe2b24c88 (commit)
  from  68456130ff23cb8139c9710fc674ca5b52230197 (commit)

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


- Log -
commit ae4bd4116c9c2e85d02f0475aa3a9a4b6d3afc18
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 10:19:09 2009 +0100

talloc: change version to 1.3.0

metze
(cherry picked from commit 752cf03bf7854a4b32b0e1fedc1cb4ecd4474765)

commit 759ee49cd9c82ed00ebb0907c7b97e557f032a9c
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 10:16:40 2009 +0100

talloc: add useful talloc_array_length() macro

metze
(cherry picked from commit 6d4a13241a096d30d37d69a8f7b888a395716316)

commit c6206e35701a45c0db801593bce4423a0036c82d
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 10:13:58 2009 +0100

talloc: add TALLOC_FREE()

metze

commit ba549acc2ee6531c91ae4d4dde9cc4553b2c1d09
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 10:13:34 2009 +0100

s3: only define TALLOC_FREE if needed

metze
(cherry picked from commit a73bd05eec608d29888286542e9c882039b02857)

commit 28b48329864b642c117ba193d94e5cbe466be10c
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 10:13:08 2009 +0100

nsswitch: only define TALLOC_FREE if needed

metze
(cherry picked from commit d0b9cc62f99a1feca68c473f3cd1e93e50ab2eab)

commit 5587e0d17aa5fe56337fbede9e3db11fe2b24c88
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 13 10:20:29 2009 +0100

lib/replace: use AC_TRY_LINK() to verify that getifaddrs() and 
freeifaddrs() are available

metze
(cherry picked from commit 099d6f05cdb0800114d026786920a17ef649699f)

---

Summary of changes:
 lib/replace/libreplace_network.m4 |2 +-
 lib/talloc/configure.ac   |2 +-
 lib/talloc/talloc.h   |3 +++
 nsswitch/pam_winbind.h|2 ++
 source3/include/smb_macros.h  |2 ++
 source3/libaddns/dns.h|2 ++
 6 files changed, 11 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/libreplace_network.m4 
b/lib/replace/libreplace_network.m4
index 1dc1c44..9223d94 100644
--- a/lib/replace/libreplace_network.m4
+++ b/lib/replace/libreplace_network.m4
@@ -242,7 +242,7 @@ AC_CHECK_MEMBERS([struct sockaddr.sa_len],
 
 dnl test for getifaddrs and freeifaddrs
 AC_CACHE_CHECK([for getifaddrs and freeifaddrs],libreplace_cv_HAVE_GETIFADDRS,[
-AC_TRY_COMPILE([
+AC_TRY_LINK([
 #include sys/types.h
 #if STDC_HEADERS
 #include stdlib.h
diff --git a/lib/talloc/configure.ac b/lib/talloc/configure.ac
index 39cea39..00e8242 100644
--- a/lib/talloc/configure.ac
+++ b/lib/talloc/configure.ac
@@ -1,5 +1,5 @@
 AC_PREREQ(2.50)
-AC_INIT(talloc, 1.2.1)
+AC_INIT(talloc, 1.3.0)
 AC_CONFIG_SRCDIR([talloc.c])
 AC_SUBST(datarootdir)
 AC_CONFIG_HEADER(config.h)
diff --git a/lib/talloc/talloc.h b/lib/talloc/talloc.h
index b623934..5c8d5c5 100644
--- a/lib/talloc/talloc.h
+++ b/lib/talloc/talloc.h
@@ -94,6 +94,7 @@ typedef void TALLOC_CTX;
 #define talloc_array(ctx, type, count) (type *)_talloc_array(ctx, 
sizeof(type), count, #type)
 #define talloc_array_size(ctx, size, count) _talloc_array(ctx, size, count, 
__location__)
 #define talloc_array_ptrtype(ctx, ptr, count) 
(_TALLOC_TYPEOF(ptr))talloc_array_size(ctx, sizeof(*(ptr)), count)
+#define talloc_array_length(ctx) ((ctx) ? talloc_get_size(ctx)/sizeof(*ctx) : 
0)
 
 #define talloc_realloc(ctx, p, type, count) (type *)_talloc_realloc_array(ctx, 
p, sizeof(type), count, #type)
 #define talloc_realloc_size(ctx, ptr, size) _talloc_realloc(ctx, ptr, size, 
__location__)
@@ -115,6 +116,8 @@ typedef void TALLOC_CTX;
 #define talloc_append_string(c, s, a) 
(s?talloc_strdup_append(s,a):talloc_strdup(c, a))
 #endif
 
+#define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
+
 /* The following definitions come from talloc.c  */
 void *_talloc(const void *context, size_t size);
 void *talloc_pool(const void *context, size_t size);
diff --git a/nsswitch/pam_winbind.h b/nsswitch/pam_winbind.h
index 0395a1f..25d673e 100644
--- a/nsswitch/pam_winbind.h
+++ b/nsswitch/pam_winbind.h
@@ -171,6 +171,8 @@ struct pwb_context {
uint32_t ctrl;
 };
 
+#ifndef TALLOC_FREE
 #define TALLOC_FREE(ctx) do { talloc_free(ctx); ctx=NULL; } while(0)
+#endif
 #define TALLOC_ZERO_P(ctx, type) (type *)_talloc_zero(ctx, sizeof(type), #type)
 #define TALLOC_P(ctx, type) (type *)talloc_named_const(ctx

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-401-g937a058

2009-03-17 Thread Stefan Metzmacher
The branch, master has been updated
   via  937a058cf25672bc22bf07183b0fb485138f6593 (commit)
  from  467cc6927f57e36ce9b97131e72b79ef6e39a668 (commit)

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


- Log -
commit 937a058cf25672bc22bf07183b0fb485138f6593
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 17 08:58:04 2009 +0100

s4:build: use SAMBA_PKG_CONFIG_MIN_VERSION instead of PKG_CONFIG_MIN_VERSION

And also intialize the variable. This fixes ./autogen.sh
in the merged build for me.

metze

---

Summary of changes:
 source4/build/m4/public.m4 |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4
index 6860e56..bd98a40 100644
--- a/source4/build/m4/public.m4
+++ b/source4/build/m4/public.m4
@@ -82,7 +82,8 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
echo *** Or see http://pkg-config.freedesktop.org/ to get 
pkg-config.
ac_cv_$1_found=no
else
-   if $PKG_CONFIG --atleast-pkgconfig-version 0.9.0; then
+   SAMBA_PKG_CONFIG_MIN_VERSION=0.9.0
+   if $PKG_CONFIG --atleast-pkgconfig-version 
$SAMBA_PKG_CONFIG_MIN_VERSION; then
AC_MSG_CHECKING(for $2)
 
if $PKG_CONFIG --exists '$2' ; then
@@ -114,7 +115,7 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
ac_cv_$1_found=no
fi
else
-   echo *** Your version of pkg-config is too old. You 
need version $PKG_CONFIG_MIN_VERSION or newer.
+   echo *** Your version of pkg-config is too old. You 
need version $SAMBA_PKG_CONFIG_MIN_VERSION or newer.
echo *** See http://pkg-config.freedesktop.org/;
ac_cv_$1_found=no
fi


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-372-g0918711

2009-03-17 Thread Stefan Metzmacher
The branch, v3-4-test has been updated
   via  0918711c8cfd69d751ac7d0ab553575c34ea8ff4 (commit)
  from  da2cd75615f72b1e3d138e0d374fea0998800355 (commit)

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


- Log -
commit 0918711c8cfd69d751ac7d0ab553575c34ea8ff4
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 17 08:58:04 2009 +0100

s4:build: use SAMBA_PKG_CONFIG_MIN_VERSION instead of PKG_CONFIG_MIN_VERSION

And also intialize the variable. This fixes ./autogen.sh
in the merged build for me.

metze
(cherry picked from commit 937a058cf25672bc22bf07183b0fb485138f6593)

---

Summary of changes:
 source4/build/m4/public.m4 |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/build/m4/public.m4 b/source4/build/m4/public.m4
index ffdf92f..b0b8af3 100644
--- a/source4/build/m4/public.m4
+++ b/source4/build/m4/public.m4
@@ -82,7 +82,8 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
echo *** Or see http://pkg-config.freedesktop.org/ to get 
pkg-config.
ac_cv_$1_found=no
else
-   if $PKG_CONFIG --atleast-pkgconfig-version 0.9.0; then
+   SAMBA_PKG_CONFIG_MIN_VERSION=0.9.0
+   if $PKG_CONFIG --atleast-pkgconfig-version 
$SAMBA_PKG_CONFIG_MIN_VERSION; then
AC_MSG_CHECKING(for $2)
 
if $PKG_CONFIG --exists '$2' ; then
@@ -112,7 +113,7 @@ AC_DEFUN([SMB_EXT_LIB_FROM_PKGCONFIG],
ac_cv_$1_found=no
fi
else
-   echo *** Your version of pkg-config is too old. You 
need version $PKG_CONFIG_MIN_VERSION or newer.
+   echo *** Your version of pkg-config is too old. You 
need version $SAMBA_PKG_CONFIG_MIN_VERSION or newer.
echo *** See http://pkg-config.freedesktop.org/;
ac_cv_$1_found=no
fi


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-493-ge95d0b5

2009-03-17 Thread Stefan Metzmacher
The branch, master has been updated
   via  e95d0b548e344dbc8cb3dd0a0f29854711bd0cac (commit)
   via  7d07266ca26f7069269601043b713a91f1a4693c (commit)
   via  9eaf53d98eced9ea70f411b9936b475c42e4d490 (commit)
   via  3a831e46204979550dc6ee7652cea6b8296f10c1 (commit)
   via  4bdf299385220988a4fe16f82aab528283204c7f (commit)
   via  a78cd2a24b818bc7d843a8e56ffaafc9f6578662 (commit)
   via  6c290586e41b3f5f7748a5b8c782be67cafe6c57 (commit)
   via  66886f8966dff8a980a5b9d2daa3fbb20fe5ca8e (commit)
   via  d27be1d5fa3fdcaac07b527ad14b0d10ef27c0bb (commit)
   via  940e61846e97ba62153d5b977b0823f196607743 (commit)
   via  0139befb915006d6ec9fec2734057c5c50b3c383 (commit)
   via  3af7db3dce0e5529114f6969e9905c6d4c65dfe8 (commit)
  from  77d2cd1ff7dab3a7a76449bfb3fe1d6e80df292b (commit)

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


- Log -
commit e95d0b548e344dbc8cb3dd0a0f29854711bd0cac
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 17 20:18:31 2009 +0100

s4:build: require tevent 0.9.5

metze

commit 7d07266ca26f7069269601043b713a91f1a4693c
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 17 20:18:01 2009 +0100

tevent: change version to 0.9.5 after the ABI has changed

metze

commit 9eaf53d98eced9ea70f411b9936b475c42e4d490
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 17 20:13:34 2009 +0100

tevent: store the location where a request was finished

This is very useful to find bugs.
You can use 'p *req' in gdb to show where
tevent_req_done(), tevent_req_error() or tevent_req_nomem()
was called.

metze

commit 3a831e46204979550dc6ee7652cea6b8296f10c1
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 17 10:42:55 2009 +0100

tevent: use an immediate event as trigger for tevent_queue

metze

commit 4bdf299385220988a4fe16f82aab528283204c7f
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 17 10:18:34 2009 +0100

tevent: use an immediate event fot tevent_req_post()

Now tevent_req_post() never fails

metze

commit a78cd2a24b818bc7d843a8e56ffaafc9f6578662
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 17 10:17:50 2009 +0100

tevent: use TALLOC_FREE() in tevent_req.c

metze

commit 6c290586e41b3f5f7748a5b8c782be67cafe6c57
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 15:06:52 2009 +0100

s3:events: add support for immediate events

metze

commit 66886f8966dff8a980a5b9d2daa3fbb20fe5ca8e
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 13 15:47:33 2009 +0100

tevent: add support for immediate events

They're like directly triggered timed events,
but you can preallocated them and scheduling them
will not fail.

metze

commit d27be1d5fa3fdcaac07b527ad14b0d10ef27c0bb
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 14:45:42 2009 +0100

s3:events: make use of tevent_common_loop_wait()

metze

commit 940e61846e97ba62153d5b977b0823f196607743
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 14:15:07 2009 +0100

tevent: add tevent_common_loop_wait() helper function and use it

tevent_loop_wait should do the same for all backends.
It should loop as long as we have pending events.

metze

commit 0139befb915006d6ec9fec2734057c5c50b3c383
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 12:45:48 2009 +0100

tevent: check signal events first in event_loop_once

We also check for signal events directly before and after
the select/epoll calls.

metze

commit 3af7db3dce0e5529114f6969e9905c6d4c65dfe8
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 12:34:23 2009 +0100

tevent: let tevent_loop_once() just run one fd event

This makes the logic much simpler for the callers,
and matches the samba3 behavior.

If needed we can add performance tunning for tevent_loop_wait()
later.

metze

---

Summary of changes:
 lib/tevent/configure.ac   |2 +-
 lib/tevent/libtevent.m4   |3 +-
 lib/tevent/tevent.c   |   77 +++
 lib/tevent/tevent.h   |   41 ++--
 lib/tevent/tevent_epoll.c |   62 +++
 lib/tevent/tevent_immediate.c |  139 +
 lib/tevent/tevent_internal.h  |   53 +++-
 lib/tevent/tevent_queue.c |   99 +
 lib/tevent/tevent_req.c   |   74 +++---
 lib/tevent/tevent_select.c|   60 +++---
 lib/tevent/tevent_standard.c  |   69 +++--
 source3/lib/events.c  |   35 +--
 source4/min_versions.m4   |2 +-
 13 files changed, 482 insertions(+), 234 deletions(-)
 create mode

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-523-g93c2057

2009-03-18 Thread Stefan Metzmacher
The branch, master has been updated
   via  93c2057c8b5a3976cda65a9d27dc4dbb9c5c550a (commit)
   via  3b8dd79f2bc775ed94130565ec2c4383a4864348 (commit)
   via  0685031ccfc09feb0ad070df1c1a1d0cef5874f2 (commit)
   via  450252d2a1981fb04eb62eb095c1b762a96f7727 (commit)
   via  b659daf81f31678f7447545d015bd9d1db8811b9 (commit)
   via  339ea0503d5ce3bf85cf61528956345c73c668c6 (commit)
   via  445b37f4f35ff4256c46dbacc2d3b3a1e47e62b2 (commit)
  from  cd7f62ab70337ccee7ba652e7d9ed8d299938bff (commit)

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


- Log -
commit 93c2057c8b5a3976cda65a9d27dc4dbb9c5c550a
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 17:27:30 2009 +0100

s3:winbindd: accept new connections via fd events

metze

commit 3b8dd79f2bc775ed94130565ec2c4383a4864348
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 16:14:20 2009 +0100

s3:winbindd: move non event related code out of process_loop() in the the 
caller

metze

commit 0685031ccfc09feb0ad070df1c1a1d0cef5874f2
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 16:06:12 2009 +0100

s3:winbindd: remove unused close_winbindd_socket() function

metze

commit 450252d2a1981fb04eb62eb095c1b762a96f7727
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 15:55:39 2009 +0100

s3:smbd: use tevent_loop_once() in the parent event loop

metze

commit b659daf81f31678f7447545d015bd9d1db8811b9
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 15:47:57 2009 +0100

s3:printing: use tevent_loop_wait() instead of manual looping

metze

commit 339ea0503d5ce3bf85cf61528956345c73c668c6
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 14:56:11 2009 +0100

s3:printing: use a fd event to monitor the pipe to the parent

metze

commit 445b37f4f35ff4256c46dbacc2d3b3a1e47e62b2
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 14:48:40 2009 +0100

s3:smbd: don't exit the parent when we have no connections

This code path can't really happen anymore, because
launchd support was removed with commit 
e5a951325a6cac8567af3a66de6d2df577508ae4.
But it's confusing to have that code there...

metze

---

Summary of changes:
 source3/printing/printing.c   |   82 ++--
 source3/smbd/server.c |   46 +
 source3/winbindd/winbindd.c   |  195 +++--
 source3/winbindd/winbindd_proto.h |1 -
 source3/winbindd/winbindd_util.c  |   18 
 5 files changed, 155 insertions(+), 187 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 71c6344..8524cfb 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -1387,6 +1387,18 @@ static void print_queue_receive(struct messaging_context 
*msg,
return;
 }
 
+static void printing_pause_fd_handler(struct tevent_context *ev,
+ struct tevent_fd *fde,
+ uint16_t flags,
+ void *private_data)
+{
+   /*
+* If pause_pipe[1] is closed it means the parent smbd
+* and children exited or aborted.
+*/
+   exit_server_cleanly(NULL);
+}
+
 static pid_t background_lpq_updater_pid = -1;
 
 /
@@ -1415,6 +1427,9 @@ void start_background_queue(void)
}
 
if(background_lpq_updater_pid == 0) {
+   struct tevent_fd *fde;
+   int ret;
+
/* Child. */
DEBUG(5,(start_background_queue: background LPQ thread 
started\n));
 
@@ -1440,60 +1455,21 @@ void start_background_queue(void)
messaging_register(smbd_messaging_context(), NULL,
   MSG_PRINTER_UPDATE, print_queue_receive);
 
-   DEBUG(5,(start_background_queue: background LPQ thread waiting 
for messages\n));
-   while (1) {
-   fd_set r_fds, w_fds;
-   int ret;
-   struct timeval to;
-   int maxfd = 0;
-
-   /* Process a signal and timed events now... */
-   if (run_events(smbd_event_context(), 0, NULL, NULL)) {
-   continue;
-   }
-
-   to.tv_sec = SMBD_SELECT_TIMEOUT;
-   to.tv_usec = 0;
-
-   /*
-* Setup the select fd sets.
-*/
-
-   FD_ZERO(r_fds);
-   FD_ZERO(w_fds);
-
-   /*
-* Are there any timed

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-505-g00b65cc

2009-03-18 Thread Stefan Metzmacher
The branch, v3-4-test has been updated
   via  00b65cc6ebcb4c67259e7fa618f6d961f7117396 (commit)
   via  ca31920af281ba9ea8f466ed0264118737a1b055 (commit)
   via  e270b4f0f62699469cbaad024c893fe84142a256 (commit)
   via  3ccc0bd5ea15da6b4daa53d9dcfb6a283330493d (commit)
   via  c43ef1f1eeb9176cda0d69b5f17c2b4885a0772b (commit)
   via  c9eac30fbbd4af6d73b803b19f0dec8ce72baf59 (commit)
   via  a527e24b80abf5aeaafdd67db21b5b021d1effe0 (commit)
   via  a6a4acddbcfcb36d581c1c7d15ddb8405c0b2bb2 (commit)
   via  c0a0f504e1477648542aae27b8a58d4db4867d84 (commit)
   via  8053941b377d3fd2e58e67f68eecb2551be49c10 (commit)
   via  7fcb16a79681a24ca3b96ec73bc44b43e57c3c8f (commit)
   via  d88a254c5d2fbdda642d469924411d4d6d5f8422 (commit)
   via  54af7b9da45dcef881d9fee7c414d363ca6cdab4 (commit)
   via  ba8a0b59d6f486f09d73e0bcac5712584c9580cc (commit)
   via  de7125980d237e9a8aa126f155bbc84c96bad37e (commit)
   via  f18ff6728e97580ff980385137e8e7973ae1d785 (commit)
   via  c742112da583809f47e40f2e4b48713d2e81edda (commit)
   via  c0bc27fc57260191e35464b63e114163d291d4da (commit)
   via  1eb7ad106499865713c28847f491aae10f37beb7 (commit)
   via  606b55d220c354f11299d633b1387afd4bc47c55 (commit)
   via  646c93ee8f7e6f52b55900923b5db9d7a1571742 (commit)
   via  5c75c1406fd6bdd6319070cb4098929c28eeba94 (commit)
   via  f136ed96e46c1d4b6aec13daf468ada2fdf59715 (commit)
   via  868cc328b189144c49901692206534c9b2729fbd (commit)
   via  82f9d29c4b6cd5cc1c5901d801a28c2f649d4205 (commit)
   via  3106e9fac2316cbbb06261f54aa86a7a2e77e2b4 (commit)
  from  d001b199a1cf73b7c7f4574191698325871527d9 (commit)

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


- Log -
commit 00b65cc6ebcb4c67259e7fa618f6d961f7117396
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 17:27:30 2009 +0100

s3:winbindd: accept new connections via fd events

metze
(cherry picked from commit 93c2057c8b5a3976cda65a9d27dc4dbb9c5c550a)

commit ca31920af281ba9ea8f466ed0264118737a1b055
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 16:14:20 2009 +0100

s3:winbindd: move non event related code out of process_loop() in the the 
caller

metze
(cherry picked from commit 3b8dd79f2bc775ed94130565ec2c4383a4864348)

commit e270b4f0f62699469cbaad024c893fe84142a256
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 16:06:12 2009 +0100

s3:winbindd: remove unused close_winbindd_socket() function

metze
(cherry picked from commit 0685031ccfc09feb0ad070df1c1a1d0cef5874f2)

commit 3ccc0bd5ea15da6b4daa53d9dcfb6a283330493d
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 15:55:39 2009 +0100

s3:smbd: use tevent_loop_once() in the parent event loop

metze
(cherry picked from commit 450252d2a1981fb04eb62eb095c1b762a96f7727)

commit c43ef1f1eeb9176cda0d69b5f17c2b4885a0772b
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 15:47:57 2009 +0100

s3:printing: use tevent_loop_wait() instead of manual looping

metze
(cherry picked from commit b659daf81f31678f7447545d015bd9d1db8811b9)

commit c9eac30fbbd4af6d73b803b19f0dec8ce72baf59
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 14:56:11 2009 +0100

s3:printing: use a fd event to monitor the pipe to the parent

metze
(cherry picked from commit 339ea0503d5ce3bf85cf61528956345c73c668c6)

commit a527e24b80abf5aeaafdd67db21b5b021d1effe0
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 16 14:48:40 2009 +0100

s3:smbd: don't exit the parent when we have no connections

This code path can't really happen anymore, because
launchd support was removed with commit 
e5a951325a6cac8567af3a66de6d2df577508ae4.
But it's confusing to have that code there...

metze
(cherry picked from commit 445b37f4f35ff4256c46dbacc2d3b3a1e47e62b2)

commit a6a4acddbcfcb36d581c1c7d15ddb8405c0b2bb2
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 17 20:18:31 2009 +0100

s4:build: require tevent 0.9.5

metze
(cherry picked from commit e95d0b548e344dbc8cb3dd0a0f29854711bd0cac)

commit c0a0f504e1477648542aae27b8a58d4db4867d84
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 17 20:18:01 2009 +0100

tevent: change version to 0.9.5 after the ABI has changed

metze
(cherry picked from commit 7d07266ca26f7069269601043b713a91f1a4693c)

commit 8053941b377d3fd2e58e67f68eecb2551be49c10
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 17 20:13:34 2009 +0100

tevent: store the location where a request was finished

This is very useful to find bugs.
You can use 'p *req' in gdb to show where
tevent_req_done(), tevent_req_error() or tevent_req_nomem()
was called.

metze
(cherry picked from commit

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-565-g88dd6af

2009-03-19 Thread Stefan Metzmacher
The branch, master has been updated
   via  88dd6af605dc5754b7e146a068272d37651da710 (commit)
   via  880fbc4e8cd67de73c4bcda94489eb1e1422a04b (commit)
   via  0dfdb7b911ed4fe013fc4a22a8c3a28620277a67 (commit)
  from  2d1fcdc8072d53dfdb0f0a30911cdeac4aa06f35 (commit)

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


- Log -
commit 88dd6af605dc5754b7e146a068272d37651da710
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 18 08:46:38 2009 +0100

s3:libsmb: always create bytes array in cli_trans code

Otherwise we return NO_MEMORY without a reason for fragmented trans
requests, as talloc_append_blob() returns buf if we append a 0 length
blob. When we pass buf = NULL we'll get back NULL and then assume
NO_MEMORY...

metze

commit 880fbc4e8cd67de73c4bcda94489eb1e1422a04b
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 18 07:56:51 2009 +0100

s3:libsmb: fix smb signing for fragmented trans/trans2/nttrans requests

Before we send the secondary requests we need to remove the
old mid=seqnum mapping and reset cli-mid and make the new
mid=seqnum mapping persistent.

The bug we had in cli_send_trans was this:
The first cli_send_smb() incremented cli-mid
and the secondary requests used the incremented mid,
but as cli-outbuf still had the correct mid,
we send the correct mid to the server. The real problem
was that the cli_send_smb() function stored the seqnum
under the wrong mid.

cli_send_nttrans() was totally broken and now follows the
same logic as cli_send_trans().

The good thing is that in practice the problem is unlikely to happen,
because max_xmit is large enough to avoid secondary requests.

metze

commit 0dfdb7b911ed4fe013fc4a22a8c3a28620277a67
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 19 09:06:38 2009 +0100

s3:lib/util_sock: use sys_recv() instead of sys_read() on sockets

This ways the pcap support in socket wrapper sees the received data.

metze

---

Summary of changes:
 source3/lib/util_sock.c   |4 +-
 source3/libsmb/clitrans.c |   49 +++-
 2 files changed, 23 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index de5b232..a0dbca1 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -519,7 +519,7 @@ NTSTATUS read_socket_with_timeout(int fd, char *buf,
}
 
while (nread  mincnt) {
-   readret = sys_read(fd, buf + nread, maxcnt - nread);
+   readret = sys_recv(fd, buf + nread, maxcnt - nread, 0);
 
if (readret == 0) {
DEBUG(5,(read_socket_with_timeout: 
@@ -588,7 +588,7 @@ NTSTATUS read_socket_with_timeout(int fd, char *buf,
return NT_STATUS_IO_TIMEOUT;
}
 
-   readret = sys_read(fd, buf+nread, maxcnt-nread);
+   readret = sys_recv(fd, buf+nread, maxcnt-nread, 0);
 
if (readret == 0) {
/* we got EOF on the file descriptor */
diff --git a/source3/libsmb/clitrans.c b/source3/libsmb/clitrans.c
index 69e2be3..0266c03 100644
--- a/source3/libsmb/clitrans.c
+++ b/source3/libsmb/clitrans.c
@@ -112,9 +112,6 @@ bool cli_send_trans(struct cli_state *cli, int trans,
this_lparam = MIN(lparam-tot_param,cli-max_xmit - 
500); /* hack */
this_ldata = MIN(ldata-tot_data,cli-max_xmit - 
(500+this_lparam));
 
-   client_set_trans_sign_state_off(cli, mid);
-   client_set_trans_sign_state_on(cli, mid);
-
cli_set_message(cli-outbuf,trans==SMBtrans?8:9,0,True);
SCVAL(cli-outbuf,smb_com,(trans==SMBtrans ? SMBtranss 
: SMBtranss2));
 
@@ -138,20 +135,14 @@ bool cli_send_trans(struct cli_state *cli, int trans,
memcpy(outdata,data+tot_data,this_ldata);
cli_setup_bcc(cli, outdata+this_ldata);
 
-   /*
-* Save the mid we're using. We need this for finding
-* signing replies.
-*/
-   mid = cli-mid;
-
show_msg(cli-outbuf);
+
+   client_set_trans_sign_state_off(cli, mid);
+   cli-mid = mid;
if (!cli_send_smb(cli)) {
-   client_set_trans_sign_state_off(cli, mid);
return False;
}
-
-   /* Ensure we use the same mid for the secondaries

[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-534-g5bbf96d

2009-03-19 Thread Stefan Metzmacher
The branch, v3-4-test has been updated
   via  5bbf96dd63227a19fe1f95ff8d8f2b3c75a5a497 (commit)
   via  70466990b4b7c68ae95dbbcf741cd3f41f2dd0b3 (commit)
   via  6ec3d902e16edd6d911b6883f565ddf1938b47bf (commit)
  from  4ce43918e6e942c4e50d30283e5a542f5f8465ad (commit)

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


- Log -
commit 5bbf96dd63227a19fe1f95ff8d8f2b3c75a5a497
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 18 08:46:38 2009 +0100

s3:libsmb: always create bytes array in cli_trans code

Otherwise we return NO_MEMORY without a reason for fragmented trans
requests, as talloc_append_blob() returns buf if we append a 0 length
blob. When we pass buf = NULL we'll get back NULL and then assume
NO_MEMORY...

metze
(cherry picked from commit 88dd6af605dc5754b7e146a068272d37651da710)

commit 70466990b4b7c68ae95dbbcf741cd3f41f2dd0b3
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 18 07:56:51 2009 +0100

s3:libsmb: fix smb signing for fragmented trans/trans2/nttrans requests

Before we send the secondary requests we need to remove the
old mid=seqnum mapping and reset cli-mid and make the new
mid=seqnum mapping persistent.

The bug we had in cli_send_trans was this:
The first cli_send_smb() incremented cli-mid
and the secondary requests used the incremented mid,
but as cli-outbuf still had the correct mid,
we send the correct mid to the server. The real problem
was that the cli_send_smb() function stored the seqnum
under the wrong mid.

cli_send_nttrans() was totally broken and now follows the
same logic as cli_send_trans().

The good thing is that in practice the problem is unlikely to happen,
because max_xmit is large enough to avoid secondary requests.

metze
(cherry picked from commit 880fbc4e8cd67de73c4bcda94489eb1e1422a04b)

commit 6ec3d902e16edd6d911b6883f565ddf1938b47bf
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 19 09:06:38 2009 +0100

s3:lib/util_sock: use sys_recv() instead of sys_read() on sockets

This ways the pcap support in socket wrapper sees the received data.

metze
(cherry picked from commit 0dfdb7b911ed4fe013fc4a22a8c3a28620277a67)

---

Summary of changes:
 source3/lib/util_sock.c   |4 +-
 source3/libsmb/clitrans.c |   49 +++-
 2 files changed, 23 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index de5b232..a0dbca1 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -519,7 +519,7 @@ NTSTATUS read_socket_with_timeout(int fd, char *buf,
}
 
while (nread  mincnt) {
-   readret = sys_read(fd, buf + nread, maxcnt - nread);
+   readret = sys_recv(fd, buf + nread, maxcnt - nread, 0);
 
if (readret == 0) {
DEBUG(5,(read_socket_with_timeout: 
@@ -588,7 +588,7 @@ NTSTATUS read_socket_with_timeout(int fd, char *buf,
return NT_STATUS_IO_TIMEOUT;
}
 
-   readret = sys_read(fd, buf+nread, maxcnt-nread);
+   readret = sys_recv(fd, buf+nread, maxcnt-nread, 0);
 
if (readret == 0) {
/* we got EOF on the file descriptor */
diff --git a/source3/libsmb/clitrans.c b/source3/libsmb/clitrans.c
index 69e2be3..0266c03 100644
--- a/source3/libsmb/clitrans.c
+++ b/source3/libsmb/clitrans.c
@@ -112,9 +112,6 @@ bool cli_send_trans(struct cli_state *cli, int trans,
this_lparam = MIN(lparam-tot_param,cli-max_xmit - 
500); /* hack */
this_ldata = MIN(ldata-tot_data,cli-max_xmit - 
(500+this_lparam));
 
-   client_set_trans_sign_state_off(cli, mid);
-   client_set_trans_sign_state_on(cli, mid);
-
cli_set_message(cli-outbuf,trans==SMBtrans?8:9,0,True);
SCVAL(cli-outbuf,smb_com,(trans==SMBtrans ? SMBtranss 
: SMBtranss2));
 
@@ -138,20 +135,14 @@ bool cli_send_trans(struct cli_state *cli, int trans,
memcpy(outdata,data+tot_data,this_ldata);
cli_setup_bcc(cli, outdata+this_ldata);
 
-   /*
-* Save the mid we're using. We need this for finding
-* signing replies.
-*/
-   mid = cli-mid;
-
show_msg(cli-outbuf);
+
+   client_set_trans_sign_state_off(cli, mid);
+   cli-mid = mid;
if (!cli_send_smb(cli

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-566-g36e7045

2009-03-19 Thread Stefan Metzmacher
The branch, master has been updated
   via  36e7045340bbc7d6567008bdd87c4cdf717835bd (commit)
  from  88dd6af605dc5754b7e146a068272d37651da710 (commit)

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


- Log -
commit 36e7045340bbc7d6567008bdd87c4cdf717835bd
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Mar 19 14:31:43 2009 +0100

tevent: fix the nesting logic

Only tevent_loop_once and tevent_loop_until() should care
about the nesting level.

This fixes the samba3 printing code where we use tevent_loop_wait()
and don't allow nested events.

We still call the nesting hook for all levels, we need to decide
if we really want this...

metze

---

Summary of changes:
 lib/tevent/tevent.c |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent.c b/lib/tevent/tevent.c
index 56fd6ae..0c02e46 100644
--- a/lib/tevent/tevent.c
+++ b/lib/tevent/tevent.c
@@ -468,6 +468,8 @@ int _tevent_loop_once(struct tevent_context *ev, const char 
*location)
errno = ELOOP;
return -1;
}
+   }
+   if (ev-nesting.level  0) {
if (ev-nesting.hook_fn) {
int ret2;
ret2 = ev-nesting.hook_fn(ev,
@@ -485,7 +487,7 @@ int _tevent_loop_once(struct tevent_context *ev, const char 
*location)
 
ret = ev-ops-loop_once(ev, location);
 
-   if (ev-nesting.level  1) {
+   if (ev-nesting.level  0) {
if (ev-nesting.hook_fn) {
int ret2;
ret2 = ev-nesting.hook_fn(ev,
@@ -525,6 +527,8 @@ int _tevent_loop_until(struct tevent_context *ev,
errno = ELOOP;
return -1;
}
+   }
+   if (ev-nesting.level  0) {
if (ev-nesting.hook_fn) {
int ret2;
ret2 = ev-nesting.hook_fn(ev,
@@ -547,7 +551,7 @@ int _tevent_loop_until(struct tevent_context *ev,
}
}
 
-   if (ev-nesting.level  1) {
+   if (ev-nesting.level  0) {
if (ev-nesting.hook_fn) {
int ret2;
ret2 = ev-nesting.hook_fn(ev,
@@ -601,9 +605,5 @@ int tevent_common_loop_wait(struct tevent_context *ev,
 */
 int _tevent_loop_wait(struct tevent_context *ev, const char *location)
 {
-   int ret;
-   ev-nesting.level++;
-   ret = ev-ops-loop_wait(ev, location);
-   ev-nesting.level--;
-   return ret;
+   return ev-ops-loop_wait(ev, location);
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-3-test updated - release-3-2-0pre2-5147-gd01cca5

2009-03-19 Thread Stefan Metzmacher
The branch, v3-3-test has been updated
   via  d01cca5e3ddb925696d49a1ea728013ec1032372 (commit)
  from  fecb980bc90ba4be1fa95b4a6e2aa6967d036656 (commit)

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


- Log -
commit d01cca5e3ddb925696d49a1ea728013ec1032372
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 18 07:56:51 2009 +0100

s3:libsmb: fix smb signing for fragmented trans/trans2/nttrans requests

Before we send the secondary requests we need to remove the
old mid=seqnum mapping and reset cli-mid and make the new
mid=seqnum mapping persistent.

The bug we had in cli_send_trans was this:
The first cli_send_smb() incremented cli-mid
and the secondary requests used the incremented mid,
but as cli-outbuf still had the correct mid,
we send the correct mid to the server. The real problem
was that the cli_send_smb() function stored the seqnum
under the wrong mid.

cli_send_nttrans() was totally broken and now follows the
same logic as cli_send_trans().

The good thing is that in practice the problem is unlikely to happen,
because max_xmit is large enough to avoid secondary requests.

metze
(cherry picked from commit 880fbc4e8cd67de73c4bcda94489eb1e1422a04b)
(cherry picked from commit 70466990b4b7c68ae95dbbcf741cd3f41f2dd0b3)

---

Summary of changes:
 source/libsmb/clitrans.c |   30 +++---
 1 files changed, 7 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/clitrans.c b/source/libsmb/clitrans.c
index 4bb70f1..b42cde9 100644
--- a/source/libsmb/clitrans.c
+++ b/source/libsmb/clitrans.c
@@ -112,9 +112,6 @@ bool cli_send_trans(struct cli_state *cli, int trans,
this_lparam = MIN(lparam-tot_param,cli-max_xmit - 
500); /* hack */
this_ldata = MIN(ldata-tot_data,cli-max_xmit - 
(500+this_lparam));
 
-   client_set_trans_sign_state_off(cli, mid);
-   client_set_trans_sign_state_on(cli, mid);
-
cli_set_message(cli-outbuf,trans==SMBtrans?8:9,0,True);
SCVAL(cli-outbuf,smb_com,(trans==SMBtrans ? SMBtranss 
: SMBtranss2));
 
@@ -138,20 +135,14 @@ bool cli_send_trans(struct cli_state *cli, int trans,
memcpy(outdata,data+tot_data,this_ldata);
cli_setup_bcc(cli, outdata+this_ldata);
 
-   /*
-* Save the mid we're using. We need this for finding
-* signing replies.
-*/
-   mid = cli-mid;
-
show_msg(cli-outbuf);
+
+   client_set_trans_sign_state_off(cli, mid);
+   cli-mid = mid;
if (!cli_send_smb(cli)) {
-   client_set_trans_sign_state_off(cli, mid);
return False;
}
-
-   /* Ensure we use the same mid for the secondaries. */
-   cli-mid = mid;
+   client_set_trans_sign_state_on(cli, mid);
 
tot_data += this_ldata;
tot_param += this_lparam;
@@ -461,21 +452,14 @@ bool cli_send_nt_trans(struct cli_state *cli,
memcpy(outdata,data+tot_data,this_ldata);
cli_setup_bcc(cli, outdata+this_ldata);
 
-   /*
-* Save the mid we're using. We need this for finding
-* signing replies.
-*/
-   mid = cli-mid;
-
show_msg(cli-outbuf);
 
+   client_set_trans_sign_state_off(cli, mid);
+   cli-mid = mid;
if (!cli_send_smb(cli)) {
-   client_set_trans_sign_state_off(cli, mid);
return False;
}
-
-   /* Ensure we use the same mid for the secondaries. */
-   cli-mid = mid;
+   client_set_trans_sign_state_on(cli, mid);
 
tot_data += this_ldata;
tot_param += this_lparam;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-3512-g6c13360

2009-03-19 Thread Stefan Metzmacher
The branch, v3-2-test has been updated
   via  6c13360e195189f7afc70c5fda6ef27f46145b0b (commit)
  from  5eaa2541f19277bc00c47b944739c6732f90809b (commit)

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


- Log -
commit 6c13360e195189f7afc70c5fda6ef27f46145b0b
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 18 07:56:51 2009 +0100

s3:libsmb: fix smb signing for fragmented trans/trans2/nttrans requests

Before we send the secondary requests we need to remove the
old mid=seqnum mapping and reset cli-mid and make the new
mid=seqnum mapping persistent.

The bug we had in cli_send_trans was this:
The first cli_send_smb() incremented cli-mid
and the secondary requests used the incremented mid,
but as cli-outbuf still had the correct mid,
we send the correct mid to the server. The real problem
was that the cli_send_smb() function stored the seqnum
under the wrong mid.

cli_send_nttrans() was totally broken and now follows the
same logic as cli_send_trans().

The good thing is that in practice the problem is unlikely to happen,
because max_xmit is large enough to avoid secondary requests.

metze
(cherry picked from commit 880fbc4e8cd67de73c4bcda94489eb1e1422a04b)
(cherry picked from commit 70466990b4b7c68ae95dbbcf741cd3f41f2dd0b3)
(cherry picked from commit d01cca5e3ddb925696d49a1ea728013ec1032372)

---

Summary of changes:
 source/libsmb/clitrans.c |   30 +++---
 1 files changed, 7 insertions(+), 23 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/clitrans.c b/source/libsmb/clitrans.c
index 4bb70f1..b42cde9 100644
--- a/source/libsmb/clitrans.c
+++ b/source/libsmb/clitrans.c
@@ -112,9 +112,6 @@ bool cli_send_trans(struct cli_state *cli, int trans,
this_lparam = MIN(lparam-tot_param,cli-max_xmit - 
500); /* hack */
this_ldata = MIN(ldata-tot_data,cli-max_xmit - 
(500+this_lparam));
 
-   client_set_trans_sign_state_off(cli, mid);
-   client_set_trans_sign_state_on(cli, mid);
-
cli_set_message(cli-outbuf,trans==SMBtrans?8:9,0,True);
SCVAL(cli-outbuf,smb_com,(trans==SMBtrans ? SMBtranss 
: SMBtranss2));
 
@@ -138,20 +135,14 @@ bool cli_send_trans(struct cli_state *cli, int trans,
memcpy(outdata,data+tot_data,this_ldata);
cli_setup_bcc(cli, outdata+this_ldata);
 
-   /*
-* Save the mid we're using. We need this for finding
-* signing replies.
-*/
-   mid = cli-mid;
-
show_msg(cli-outbuf);
+
+   client_set_trans_sign_state_off(cli, mid);
+   cli-mid = mid;
if (!cli_send_smb(cli)) {
-   client_set_trans_sign_state_off(cli, mid);
return False;
}
-
-   /* Ensure we use the same mid for the secondaries. */
-   cli-mid = mid;
+   client_set_trans_sign_state_on(cli, mid);
 
tot_data += this_ldata;
tot_param += this_lparam;
@@ -461,21 +452,14 @@ bool cli_send_nt_trans(struct cli_state *cli,
memcpy(outdata,data+tot_data,this_ldata);
cli_setup_bcc(cli, outdata+this_ldata);
 
-   /*
-* Save the mid we're using. We need this for finding
-* signing replies.
-*/
-   mid = cli-mid;
-
show_msg(cli-outbuf);
 
+   client_set_trans_sign_state_off(cli, mid);
+   cli-mid = mid;
if (!cli_send_smb(cli)) {
-   client_set_trans_sign_state_off(cli, mid);
return False;
}
-
-   /* Ensure we use the same mid for the secondaries. */
-   cli-mid = mid;
+   client_set_trans_sign_state_on(cli, mid);
 
tot_data += this_ldata;
tot_param += this_lparam;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-587-g18b4925

2009-03-19 Thread Stefan Metzmacher
The branch, master has been updated
   via  18b4925031f7b378fdd3cde0cb90d48ff967cdc3 (commit)
   via  4508152282758bfa60b5ab55038359fc837a2609 (commit)
   via  84a140f18722518eb0f40737085dd3b3958a3a02 (commit)
   via  c600e8ef42c3cb71c03330782f96bfdf71870e0f (commit)
   via  b69e72dedac5792d8c191850ea3bd4b3ff976526 (commit)
   via  4e18c24e2e4cf567bf5c07978c9881e47cec95d0 (commit)
   via  f6efec5dd423b54f6b9b8cf8d47e644481b0aea2 (commit)
   via  b900e9242512e35f7f805ba4f4ce1624c2677d8b (commit)
   via  235a7a420b72068403d38b47b123faf4481bef08 (commit)
   via  a27c6eb8e23db924e0dc67aa71c832be54cda98f (commit)
   via  6c8bd1005d7440c929d5b70f9faba09e0838b12a (commit)
   via  2e44ceaea858a611bcb7018df80a6a00096449ab (commit)
   via  a140823cc9d7a47e2fc2ffdb80d63b402f7664c0 (commit)
   via  4002b7bdc132988b44aa83b3d0cd8af54a55fe08 (commit)
   via  9ed7a45c88d9daeedf818b56ecefd6ce58fcce36 (commit)
   via  ccfd6a6e39ab999df0eba0d9e94cc22f1aa6e000 (commit)
   via  6c88d61bdd7333c671f440ada23bca7169cd60fc (commit)
   via  c00126e60913f8777e5ba87db464a5b4b9b8b886 (commit)
   via  d848d517b54074ae6b0e2349383554302b85109c (commit)
   via  2e0e416676f5d67e716f272d3923386c3f0c9524 (commit)
  from  011ad7245d53a716c4c766f5ef8d317bb3a53d0f (commit)

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


- Log -
commit 18b4925031f7b378fdd3cde0cb90d48ff967cdc3
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 24 19:05:33 2009 +0100

s3:libads: use libcli/cldap code

metze

commit 4508152282758bfa60b5ab55038359fc837a2609
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Feb 24 18:27:45 2009 +0100

s3:build: compile lib/tsocket and libcli/cldap

metze

commit 84a140f18722518eb0f40737085dd3b3958a3a02
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 18 17:43:11 2009 +0100

move source4/libcli/cldap = libcli/cldap

metze

commit c600e8ef42c3cb71c03330782f96bfdf71870e0f
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Feb 13 13:13:54 2009 +0100

s4:cldap: rewrite the cldap library based on tsocket

metze

commit b69e72dedac5792d8c191850ea3bd4b3ff976526
Author: Stefan Metzmacher me...@samba.org
Date:   Thu Feb 26 14:33:52 2009 +0100

lib/util: build tevent_unix.o and tevent_ntstatus.o as UTIL_TEVENT subsystem

metze

commit 4e18c24e2e4cf567bf5c07978c9881e47cec95d0
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 18 15:59:36 2009 +0100

lib/tsocket: add tsocket_guide.txt section with specific details about bsd 
style sockets

metze

commit f6efec5dd423b54f6b9b8cf8d47e644481b0aea2
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 11 17:27:03 2009 +0100

lib/tsocket: add a fast path to tsocket_writev_send/recv()

This is similar to the tsocket_sendto_send/recv() fast path.

metze

commit b900e9242512e35f7f805ba4f4ce1624c2677d8b
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 11 17:11:22 2009 +0100

lib/tsocket: add a fast path to tsocket_sendto_send/recv()

By first trying to send data without waiting for the socket
to become writeable we gain about 10-20% performance in the
LDAP-BENCH-CLDAP test.

metze

commit 235a7a420b72068403d38b47b123faf4481bef08
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 18 11:14:38 2009 +0100

lib/tsocket: add tsocket_guide.txt section about the async _send/recv() 
helper functions

metze

commit a27c6eb8e23db924e0dc67aa71c832be54cda98f
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 11 15:51:07 2009 +0100

lib/tsocket: add tsocket_readv_send/recv()

metze

commit 6c8bd1005d7440c929d5b70f9faba09e0838b12a
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 11 14:26:15 2009 +0100

lib/tsocket: add tsocket_writev_queue_send/recv()

metze

commit 2e44ceaea858a611bcb7018df80a6a00096449ab
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 11 14:10:47 2009 +0100

lib/tsocket: add tsocket_writev_send/recv()

metze

commit a140823cc9d7a47e2fc2ffdb80d63b402f7664c0
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 18 09:19:09 2009 +0100

lib/tsocket: add tsocket_connect_send/recv()

metze

commit 4002b7bdc132988b44aa83b3d0cd8af54a55fe08
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 18 10:00:50 2009 +0100

lib/tsocket: add tsocket_sendto_queue_send/recv()

metze

commit 9ed7a45c88d9daeedf818b56ecefd6ce58fcce36
Author: Stefan Metzmacher me...@samba.org
Date:   Tue Mar 10 21:12:31 2009 +0100

lib/tsocket: add tsocket_sendto_send/recv()

metze

commit ccfd6a6e39ab999df0eba0d9e94cc22f1aa6e000
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Feb 18 09:23:32 2009 +0100

lib/tsocket: add tsocket_recvfrom_send/recv()

metze

commit

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-602-gda46c37

2009-03-20 Thread Stefan Metzmacher
The branch, master has been updated
   via  da46c371006d7cb5bceba790070d805b303ade98 (commit)
  from  808928c24ba409a3fad50cbadf1db5a9dac9ad91 (commit)

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


- Log -
commit da46c371006d7cb5bceba790070d805b303ade98
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 20 10:14:35 2009 +0100

s4:build: include ../libcli/cldap/config.mk

This fixes commit 84a140f18722518eb0f40737085dd3b3958a3a02,
sorry!

metze

---

Summary of changes:
 source4/main.mk |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/main.mk b/source4/main.mk
index a143604..d7db058 100644
--- a/source4/main.mk
+++ b/source4/main.mk
@@ -46,6 +46,7 @@ mkinclude torture/config.mk
 mkinclude librpc/config.mk
 mkinclude client/config.mk
 mkinclude libcli/config.mk
+mkinclude ../libcli/cldap/config.mk
 mkinclude scripting/python/config.mk
 mkinclude kdc/config.mk
 mkinclude ../lib/smbconf/config.mk


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-613-g1ef2065

2009-03-20 Thread Stefan Metzmacher
The branch, master has been updated
   via  1ef206524de589efeeef0544afbf7bfb37d99c15 (commit)
  from  3a6133d70202ef80ead4203740c000be5e93b288 (commit)

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


- Log -
commit 1ef206524de589efeeef0544afbf7bfb37d99c15
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 20 14:25:15 2009 +0100

selftest/Samba3: use the same sequence of signals to shutdown samba3 as 
with the shell scripts

When we kill the timelimit process with SIGKILL, it can't kill its
children...

metze

---

Summary of changes:
 selftest/target/Samba3.pm |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index e1bea16..2b96226 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -41,6 +41,9 @@ sub teardown_env($$)
$self-stop_sig_term($smbdpid);
$self-stop_sig_term($nmbdpid);
$self-stop_sig_term($winbinddpid);
+
+   sleep(2);
+
$self-stop_sig_kill($smbdpid);
$self-stop_sig_kill($nmbdpid);
$self-stop_sig_kill($winbinddpid);
@@ -187,7 +190,7 @@ sub stop_sig_term($$) {
 
 sub stop_sig_kill($$) {
my ($self, $pid) = @_;
-   kill(KILL, $pid) or warn(Unable to kill $pid: $!);
+   kill(ALRM, $pid) or warn(Unable to kill $pid: $!);
 }
 
 sub write_pid($$$)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-632-g3b73cdb

2009-03-21 Thread Stefan Metzmacher
The branch, master has been updated
   via  3b73cdb41201dd545e019e8e8313f6b8c51c7226 (commit)
   via  431fc718c13d259748ac20019997241981639c95 (commit)
   via  593ab6ac00c217f6d661b4babface40a0b0dd4ce (commit)
   via  6ef1442360a35284e498eea701fc2eab43c5 (commit)
   via  66dc53ee017d74a6f610bbe04337f064901fe2a1 (commit)
  from  62ab39dde37f5570b336b9db5b4e3c2e4640e877 (commit)

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


- Log -
commit 3b73cdb41201dd545e019e8e8313f6b8c51c7226
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Jan 28 10:10:12 2009 +0100

s3:nmbd: implement a MAILSLOT = CLDAP proxy for NETLOGON_SAMLOGON requests

This will be used as part a the franky setup, where nmbd will forward
the MAILSLOT requests to the local samba4 CLDAP server.

nmbd_proxy_logon:cldap_server = 127.0.0.1 would configure
and activate this feature.

metze

commit 431fc718c13d259748ac20019997241981639c95
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 20 16:18:47 2009 +0100

selftest/Samba3: always use the same timeout for all servers

metze

commit 593ab6ac00c217f6d661b4babface40a0b0dd4ce
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 20 16:11:14 2009 +0100

s4:selftest: rename SMBD_VALGRIND = SAMBA_VALGRIND

metze

commit 6ef1442360a35284e498eea701fc2eab43c5
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 20 15:13:39 2009 +0100

s4:smbd: the name of the binary is samba now

metze

commit 66dc53ee017d74a6f610bbe04337f064901fe2a1
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 20 16:27:17 2009 +0100

socket_wrapper: fix connect() for dgram sockets, if the destination isn't 
there yet

metze

---

Summary of changes:
 lib/socket_wrapper/socket_wrapper.c |   10 +-
 selftest/target/Samba3.pm   |   32 +++---
 selftest/target/Samba4.pm   |8 +-
 source3/include/proto.h |2 +
 source3/nmbd/nmbd.c |6 +
 source3/nmbd/nmbd_processlogon.c|  238 +++
 source3/samba4.mk   |   12 +-
 source4/selftest/config.mk  |   12 +-
 source4/smbd/server.c   |2 +-
 9 files changed, 285 insertions(+), 37 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/socket_wrapper/socket_wrapper.c 
b/lib/socket_wrapper/socket_wrapper.c
index 44082e7..1d35c8d 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -1686,10 +1686,14 @@ _PUBLIC_ int swrap_connect(int s, const struct sockaddr 
*serv_addr, socklen_t ad
ret = sockaddr_convert_to_un(si, (const struct sockaddr *)serv_addr, 
addrlen, un_addr, 0, NULL);
if (ret == -1) return -1;
 
-   swrap_dump_packet(si, serv_addr, SWRAP_CONNECT_SEND, NULL, 0);
+   if (si-type == SOCK_DGRAM) {
+   ret = 0;
+   } else {
+   swrap_dump_packet(si, serv_addr, SWRAP_CONNECT_SEND, NULL, 0);
 
-   ret = real_connect(s, (struct sockaddr *)un_addr, 
-  sizeof(struct sockaddr_un));
+   ret = real_connect(s, (struct sockaddr *)un_addr,
+  sizeof(struct sockaddr_un));
+   }
 
/* to give better errors */
if (ret == -1  errno == ENOENT) {
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 2b96226..78aafa7 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -126,9 +126,8 @@ sub setup_dc($$)
$dc_options);
 
$self-check_or_start($vars,
- ($ENV{NMBD_MAXTIME} or 2700),
- ($ENV{WINBINDD_MAXTIME} or 2700),
- ($ENV{SMBD_MAXTIME} or 2700));
+ ($ENV{SMBD_MAXTIME} or 2700),
+  yes, yes, yes);
 
$self-wait_for_start($vars);
 
@@ -163,9 +162,8 @@ sub setup_member($$$)
system($cmd) == 0 or die(Join failed\n$cmd);
 
$self-check_or_start($ret,
- ($ENV{NMBD_MAXTIME} or 2700),
- ($ENV{WINBINDD_MAXTIME} or 2700),
- ($ENV{SMBD_MAXTIME} or 2700));
+ ($ENV{SMBD_MAXTIME} or 2700),
+  yes, yes, yes);
 
$self-wait_for_start($ret);
 
@@ -212,8 +210,8 @@ sub read_pid($$)
return $pid;
 }
 
-sub check_or_start() {
-   my ($self, $env_vars, $nmbd_maxtime, $winbindd_maxtime, $smbd_maxtime) 
= @_;
+sub check_or_start($) {
+   my ($self, $env_vars, $maxtime, $nmbd, $winbindd, $smbd) = @_;
 
unlink($env_vars-{NMBD_TEST_LOG});
print STARTING NMBD...;
@@ -229,13 +227,13 @@ sub check_or_start

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-661-g1f72e4a

2009-03-22 Thread Stefan Metzmacher
The branch, master has been updated
   via  1f72e4abfdc85fbe624ec7910b68868d97f88ff2 (commit)
  from  8a6f91c910c5f26eef10e959ae8a36a02099cad0 (commit)

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


- Log -
commit 1f72e4abfdc85fbe624ec7910b68868d97f88ff2
Author: Stefan Metzmacher me...@samba.org
Date:   Sun Mar 22 12:36:38 2009 +0100

Revert socket_wrapper: fix connect() for dgram sockets, if the destination 
isn't there yet

This reverts commit 66dc53ee017d74a6f610bbe04337f064901fe2a1.

Somehow this leads to timeouts in some tests, samba4.ldb.ldapi
and samba4.rpc.schannel. I need to look at it more closely later...

metze

---

Summary of changes:
 lib/socket_wrapper/socket_wrapper.c |   10 +++---
 1 files changed, 3 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/socket_wrapper/socket_wrapper.c 
b/lib/socket_wrapper/socket_wrapper.c
index 1d35c8d..44082e7 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -1686,14 +1686,10 @@ _PUBLIC_ int swrap_connect(int s, const struct sockaddr 
*serv_addr, socklen_t ad
ret = sockaddr_convert_to_un(si, (const struct sockaddr *)serv_addr, 
addrlen, un_addr, 0, NULL);
if (ret == -1) return -1;
 
-   if (si-type == SOCK_DGRAM) {
-   ret = 0;
-   } else {
-   swrap_dump_packet(si, serv_addr, SWRAP_CONNECT_SEND, NULL, 0);
+   swrap_dump_packet(si, serv_addr, SWRAP_CONNECT_SEND, NULL, 0);
 
-   ret = real_connect(s, (struct sockaddr *)un_addr,
-  sizeof(struct sockaddr_un));
-   }
+   ret = real_connect(s, (struct sockaddr *)un_addr, 
+  sizeof(struct sockaddr_un));
 
/* to give better errors */
if (ret == -1  errno == ENOENT) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-665-g435a0a5

2009-03-23 Thread Stefan Metzmacher
The branch, master has been updated
   via  435a0a5a3bc8114991650a78e1f90049d2f3f343 (commit)
  from  298bff5019be5a40dc0023b5af1e980fba91abd9 (commit)

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


- Log -
commit 435a0a5a3bc8114991650a78e1f90049d2f3f343
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 23 09:16:18 2009 +0100

socket_wrapper: fix connect() for dgram sockets, if the destination isn't 
there yet

Now we defer the real_connect() for dgram sockets to the first 
send()/sendto() call,
as the destination might not be there at connect time.

Commit 66dc53ee017d74a6f610bbe04337f064901fe2a1 was an incomplete fix for 
this
problem.

metze

---

Summary of changes:
 lib/socket_wrapper/socket_wrapper.c |   56 --
 1 files changed, 52 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/socket_wrapper/socket_wrapper.c 
b/lib/socket_wrapper/socket_wrapper.c
index 44082e7..553827b 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -218,6 +218,7 @@ struct socket_info
int bcast;
int is_server;
int connected;
+   int defer_connect;
 
char *path;
char *tmp_path;
@@ -1686,10 +1687,15 @@ _PUBLIC_ int swrap_connect(int s, const struct sockaddr 
*serv_addr, socklen_t ad
ret = sockaddr_convert_to_un(si, (const struct sockaddr *)serv_addr, 
addrlen, un_addr, 0, NULL);
if (ret == -1) return -1;
 
-   swrap_dump_packet(si, serv_addr, SWRAP_CONNECT_SEND, NULL, 0);
+   if (si-type == SOCK_DGRAM) {
+   si-defer_connect = 1;
+   ret = 0;
+   } else {
+   swrap_dump_packet(si, serv_addr, SWRAP_CONNECT_SEND, NULL, 0);
 
-   ret = real_connect(s, (struct sockaddr *)un_addr, 
-  sizeof(struct sockaddr_un));
+   ret = real_connect(s, (struct sockaddr *)un_addr,
+  sizeof(struct sockaddr_un));
+   }
 
/* to give better errors */
if (ret == -1  errno == ENOENT) {
@@ -1917,7 +1923,22 @@ _PUBLIC_ ssize_t swrap_sendto(int s, const void *buf, 
size_t len, int flags, con

return len;
}
-   
+
+   if (si-defer_connect) {
+   ret = real_connect(s, (struct sockaddr *)un_addr,
+  sizeof(un_addr));
+
+   /* to give better errors */
+   if (ret == -1  errno == ENOENT) {
+   errno = EHOSTUNREACH;
+   }
+
+   if (ret == -1) {
+   return ret;
+   }
+   si-defer_connect = 0;
+   }
+
ret = real_sendto(s, buf, len, flags, (struct sockaddr 
*)un_addr, sizeof(un_addr));
break;
default:
@@ -2002,6 +2023,33 @@ _PUBLIC_ ssize_t swrap_send(int s, const void *buf, 
size_t len, int flags)
 
len = MIN(len, 1500);
 
+   if (si-defer_connect) {
+   struct sockaddr_un un_addr;
+   int bcast = 0;
+
+   if (si-bound == 0) {
+   ret = swrap_auto_bind(si, si-family);
+   if (ret == -1) return -1;
+   }
+
+   ret = sockaddr_convert_to_un(si, si-peername, si-peername_len,
+un_addr, 0, bcast);
+   if (ret == -1) return -1;
+
+   ret = real_connect(s, (struct sockaddr *)un_addr,
+  sizeof(un_addr));
+
+   /* to give better errors */
+   if (ret == -1  errno == ENOENT) {
+   errno = EHOSTUNREACH;
+   }
+
+   if (ret == -1) {
+   return ret;
+   }
+   si-defer_connect = 0;
+   }
+
ret = real_send(s, buf, len, flags);
 
if (ret == -1) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-666-g7716ad6

2009-03-23 Thread Stefan Metzmacher
The branch, master has been updated
   via  7716ad68a8d859ac3651c4eb559b6e45d98566db (commit)
  from  435a0a5a3bc8114991650a78e1f90049d2f3f343 (commit)

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


- Log -
commit 7716ad68a8d859ac3651c4eb559b6e45d98566db
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 23 11:44:00 2009 +0100

s3:smbd: if we allow trans2 on the IPC$ share, then we have to allow 
transs2 too.

Otherwise we'll confuse the client signing engine, when we reply an error 
to each transs2.

metze

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 18fbdd7..6d53bbe 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -913,7 +913,7 @@ static const struct smb_message_struct {
 /* 0x30 */ { NULL, NULL, 0 },
 /* 0x31 */ { NULL, NULL, 0 },
 /* 0x32 */ { SMBtrans2,reply_trans2, AS_USER | CAN_IPC },
-/* 0x33 */ { SMBtranss2,reply_transs2, AS_USER},
+/* 0x33 */ { SMBtranss2,reply_transs2, AS_USER | CAN_IPC },
 /* 0x34 */ { SMBfindclose,reply_findclose,AS_USER},
 /* 0x35 */ { SMBfindnclose,reply_findnclose,AS_USER},
 /* 0x36 */ { NULL, NULL, 0 },


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-671-g97a086d

2009-03-23 Thread Stefan Metzmacher
The branch, master has been updated
   via  97a086d5c4e84616065cbbc68d47d82de0fe0db5 (commit)
   via  6af15943c6f868d08945d0ca993506c17107fbd4 (commit)
   via  c16c90a1cb3b0e2ceadd3dea835a4e69acfc2fae (commit)
   via  2654653f55ed5744cc9fca6a79127386f55425e1 (commit)
   via  1a48d0793b9d3a76aff76580661626e5cd95f427 (commit)
  from  7716ad68a8d859ac3651c4eb559b6e45d98566db (commit)

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


- Log -
commit 97a086d5c4e84616065cbbc68d47d82de0fe0db5
Author: Stefan Metzmacher me...@samba.org
Date:   Fri Mar 6 16:35:34 2009 +0100

selftest/Samba3: Test smb signing against the member server

metze

commit 6af15943c6f868d08945d0ca993506c17107fbd4
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 9 09:50:36 2009 +0100

s3:libsmb: use new simplified smb_signing code for the client side

We store the seqnum/mid mapping in the cli_request structure
for async requests and in the cli_state structure for sync calls.

We skip the signing check for oplock requests while waiting
for async requests coming in.

metze

commit c16c90a1cb3b0e2ceadd3dea835a4e69acfc2fae
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 9 09:47:59 2009 +0100

s3:smbd: use new simplified snb_signing code in the server

We keep the seqnum/mid mapping in the smb_request structure.

This also moves one global variable into the
smbd_server_connection struct.

metze

commit 2654653f55ed5744cc9fca6a79127386f55425e1
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 9 08:42:05 2009 +0100

s3:libsmb: add a much simplified smb_siging infrastructure

It's the job of the caller to maintain the seqnum/mid mapping.

Hopefully we can use this code in s4 later too.

metze

commit 1a48d0793b9d3a76aff76580661626e5cd95f427
Author: Stefan Metzmacher me...@samba.org
Date:   Sun Mar 8 17:47:08 2009 +0100

s3:libsmb: rename smb_signing.c = clisigning.c

This prepares a large simplification of the smb_signing code

metze

---

Summary of changes:
 selftest/target/Samba3.pm |1 +
 source3/Makefile.in   |5 +-
 source3/include/async_smb.h   |2 +
 source3/include/client.h  |   10 +-
 source3/include/includes.h|1 +
 source3/include/proto.h   |   49 ++-
 source3/include/smb.h |   17 +-
 source3/include/smb_signing.h |   46 ++
 source3/libsmb/async_smb.c|   43 ++-
 source3/libsmb/cliconnect.c   |   39 +-
 source3/libsmb/clientgen.c|  104 -
 source3/libsmb/clisigning.c   |   87 
 source3/libsmb/clitrans.c |   54 ++-
 source3/libsmb/smb_signing.c  | 1020 -
 source3/param/loadparm.c  |   11 +-
 source3/selftest/tests.sh |4 +
 source3/smbd/aio.c|   13 +-
 source3/smbd/blocking.c   |5 +-
 source3/smbd/globals.h|1 +
 source3/smbd/ipc.c|4 +
 source3/smbd/negprot.c|2 +-
 source3/smbd/notify.c |7 +-
 source3/smbd/nttrans.c|3 +-
 source3/smbd/open.c   |9 -
 source3/smbd/oplock.c |   27 +-
 source3/smbd/password.c   |8 +-
 source3/smbd/pipes.c  |1 +
 source3/smbd/process.c|   50 ++-
 source3/smbd/reply.c  |   24 +-
 source3/smbd/service.c|2 +-
 source3/smbd/sesssetup.c  |   25 -
 source3/smbd/signing.c|  158 +++
 source3/smbd/trans2.c |5 +-
 33 files changed, 796 insertions(+), 1041 deletions(-)
 create mode 100644 source3/include/smb_signing.h
 create mode 100644 source3/libsmb/clisigning.c
 create mode 100644 source3/smbd/signing.c


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 78aafa7..0b176d6 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -144,6 +144,7 @@ sub setup_member($$$)
 
my $member_options = 
security = domain
+   server signing = on
 ;
my $ret = $self-provision($prefix,
   LOCALMEMBER3,
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 49cf840..46216c7 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -364,7 +364,8 @@ LIB_OBJ = $(LIBSAMBAUTIL_OBJ) $(UTIL_OBJ) $(CRYPTO_OBJ) \
  lib/util.o lib/util_sock.o lib/sock_exec.o lib/util_sec.o \
  lib/substitute.o lib/dbwrap_util.o \
  lib/ms_fnmatch.o lib/select.o lib/errmap_unix.o \
- lib/tallocmsg.o lib/dmallocmsg.o libsmb/smb_signing.o \
+ lib/tallocmsg.o lib/dmallocmsg.o \
+ libsmb/clisigning.o libsmb/smb_signing.o \
  lib/iconv.o lib/pam_errors.o intl/lang_tdb.o \
  lib/conn_tdb.o lib/adt_tree.o lib/gencache.o \
  lib/module.o lib/events.o

[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-739-g853f928

2009-03-26 Thread Stefan Metzmacher
The branch, master has been updated
   via  853f9283fb8fbcd2078e3cf8e99d6c8e24d77346 (commit)
   via  510e37155eab8b4bf29adcf10f242334bfedca46 (commit)
   via  9521801dc89a425a2d1e58d0cf7ca24e83b02a04 (commit)
   via  4d9641793124954e5994e64e9ce810f8f76e0449 (commit)
   via  8a264753a1f80defe5335c334f8242ad46d2af9f (commit)
  from  2d087a0c156dc95086a39e297b24ef6889e1a50d (commit)

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


- Log -
commit 853f9283fb8fbcd2078e3cf8e99d6c8e24d77346
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 25 11:22:01 2009 +0100

s4:heimdal_build: provide heimdal_version and heimdal_long_version symbols

metze

commit 510e37155eab8b4bf29adcf10f242334bfedca46
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 25 11:20:50 2009 +0100

s4:heimdal_build: define HAVE_STRLCPY, HAVE_STRLCAT, HAVE_STRCASECMP and 
HAVE_MKSTEMP

metze

commit 9521801dc89a425a2d1e58d0cf7ca24e83b02a04
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 25 12:21:59 2009 +0100

s4:kdc: use krb5_data_free()

metze

commit 4d9641793124954e5994e64e9ce810f8f76e0449
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 25 12:21:36 2009 +0100

s4:auth/credentials: use krb5_data_free()

metze

commit 8a264753a1f80defe5335c334f8242ad46d2af9f
Author: Stefan Metzmacher me...@samba.org
Date:   Wed Mar 25 11:17:17 2009 +0100

s4:auth/credentials: include gssapi/gssapi_krb5.h

metze

---

Summary of changes:
 source4/auth/credentials/credentials_krb5.h |1 +
 source4/auth/kerberos/clikrb5.c |6 +-
 source4/heimdal_build/replace.c |4 
 source4/heimdal_build/roken.h   |   19 +++
 source4/kdc/kdc.c   |2 +-
 5 files changed, 26 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/credentials/credentials_krb5.h 
b/source4/auth/credentials/credentials_krb5.h
index 0d0e9f3..5e56752 100644
--- a/source4/auth/credentials/credentials_krb5.h
+++ b/source4/auth/credentials/credentials_krb5.h
@@ -24,6 +24,7 @@
 #define __CREDENTIALS_KRB5_H__
 
 #include gssapi/gssapi.h
+#include gssapi/gssapi_krb5.h
 #include krb5.h
 
 struct gssapi_creds_container {
diff --git a/source4/auth/kerberos/clikrb5.c b/source4/auth/kerberos/clikrb5.c
index cf87d13..68e7eb9 100644
--- a/source4/auth/kerberos/clikrb5.c
+++ b/source4/auth/kerberos/clikrb5.c
@@ -74,13 +74,9 @@
 
  void kerberos_free_data_contents(krb5_context context, krb5_data *pdata)
 {
-#if defined(HAVE_KRB5_FREE_DATA_CONTENTS)
if (pdata-data) {
-   krb5_free_data_contents(context, pdata);
+   krb5_data_free(pdata);
}
-#else
-   SAFE_FREE(pdata-data);
-#endif
 }
 
  krb5_error_code smb_krb5_kt_free_entry(krb5_context context, 
krb5_keytab_entry *kt_entry)
diff --git a/source4/heimdal_build/replace.c b/source4/heimdal_build/replace.c
index 41309fe..ba43dd9 100644
--- a/source4/heimdal_build/replace.c
+++ b/source4/heimdal_build/replace.c
@@ -84,3 +84,7 @@
return -1;
 }
 #endif
+
+const char *heimdal_version = samba-internal-heimdal;
+const char *heimdal_long_version = samba-interal-heimdal;
+
diff --git a/source4/heimdal_build/roken.h b/source4/heimdal_build/roken.h
index 3edeb2f..e3edd53 100644
--- a/source4/heimdal_build/roken.h
+++ b/source4/heimdal_build/roken.h
@@ -41,6 +41,22 @@
 #define HAVE_STRNDUP
 #endif
 
+#ifndef HAVE_STRLCPY
+#define HAVE_STRLCPY
+#endif
+
+#ifndef HAVE_STRLCAT
+#define HAVE_STRLCAT
+#endif
+
+#ifndef HAVE_STRCASECMP
+#define HAVE_STRCASECMP
+#endif
+
+#ifndef HAVE_MKSTEMP
+#define HAVE_MKSTEMP
+#endif
+
 #ifndef HAVE_SETENV
 #define HAVE_SETENV
 #endif
@@ -84,4 +100,7 @@
 #undef SOCKET_WRAPPER_REPLACE
 #include heimdal/lib/roken/roken.h.in
 
+extern const char *heimdal_version;
+extern const char *heimdal_long_version;
+
 #endif
diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c
index 1cfe985..3d11441 100644
--- a/source4/kdc/kdc.c
+++ b/source4/kdc/kdc.c
@@ -345,7 +345,7 @@ static bool kdc_process(struct kdc_server *kdc,
}
if (k5_reply.length) {
*reply = data_blob_talloc(mem_ctx, k5_reply.data, 
k5_reply.length);
-   krb5_free_data_contents(kdc-smb_krb5_context-krb5_context, 
k5_reply);
+   krb5_data_free(k5_reply);
} else {
*reply = data_blob(NULL, 0);
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-587-g1d11417

2009-03-26 Thread Stefan Metzmacher
The branch, v3-4-test has been updated
   via  1d11417c71ebcb80851c8b77e9f3102ee9b592f8 (commit)
  from  c253e80ad21a24395a973b23993dd211b8e0d482 (commit)

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


- Log -
commit 1d11417c71ebcb80851c8b77e9f3102ee9b592f8
Author: Stefan Metzmacher me...@samba.org
Date:   Mon Mar 23 11:44:00 2009 +0100

s3:smbd: if we allow trans2 on the IPC$ share, then we have to allow 
transs2 too.

Otherwise we'll confuse the client signing engine, when we reply an error 
to each transs2.

metze
(cherry picked from commit 7716ad68a8d859ac3651c4eb559b6e45d98566db)

---

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


Changeset truncated at 500 lines:

diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 18fbdd7..6d53bbe 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -913,7 +913,7 @@ static const struct smb_message_struct {
 /* 0x30 */ { NULL, NULL, 0 },
 /* 0x31 */ { NULL, NULL, 0 },
 /* 0x32 */ { SMBtrans2,reply_trans2, AS_USER | CAN_IPC },
-/* 0x33 */ { SMBtranss2,reply_transs2, AS_USER},
+/* 0x33 */ { SMBtranss2,reply_transs2, AS_USER | CAN_IPC },
 /* 0x34 */ { SMBfindclose,reply_findclose,AS_USER},
 /* 0x35 */ { SMBfindnclose,reply_findnclose,AS_USER},
 /* 0x36 */ { NULL, NULL, 0 },


-- 
Samba Shared Repository


<    2   3   4   5   6   7   8   9   10   11   >