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

2010-01-27 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  06dfc7f... VERSION: Raise version number up to 3.5.0.
  from  048adb5... WHATSNEW: Update changes.

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


- Log -
commit 06dfc7f2d63491b80497813c70311fefcdf2ec49
Author: Karolin Seeger ksee...@samba.org
Date:   Tue Jan 26 19:37:12 2010 +0100

VERSION: Raise version number up to 3.5.0.

Karolin

---

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


Changeset truncated at 500 lines:

diff --git a/source3/VERSION b/source3/VERSION
index 325c814..dbf57df 100644
--- a/source3/VERSION
+++ b/source3/VERSION
@@ -56,7 +56,7 @@ SAMBA_VERSION_PRE_RELEASE=
 # e.g. SAMBA_VERSION_RC_RELEASE=1  #
 #  -  3.0.0rc1  #
 
-SAMBA_VERSION_RC_RELEASE=2
+SAMBA_VERSION_RC_RELEASE=
 
 
 # To mark SVN snapshots this should be set to 'yes'#


-- 
Samba Shared Repository


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

2010-01-27 Thread Karolin Seeger
The branch, v3-4-test has been updated
   via  135b67a... Do not segfault in pdb_search_destructor if no real 
search was started (cherry picked from commit 
d07464b21fe652e205f5eb2c74d12495bab100ce)
  from  69100db... s3-docs: Adapt version in man ldbrename.

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


- Log -
commit 135b67a627fd1e98b4211fe3ac738ae2fec10145
Author: Volker Lendecke v...@samba.org
Date:   Wed May 27 18:40:13 2009 +0200

Do not segfault in pdb_search_destructor if no real search was started
(cherry picked from commit d07464b21fe652e205f5eb2c74d12495bab100ce)

Fix bug #7068 (pdb_search api may crash as non-root user).

---

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


Changeset truncated at 500 lines:

diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index 8c00329..01815c6 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -1711,7 +1711,7 @@ static NTSTATUS pdb_default_lookup_names(struct 
pdb_methods *methods,
 
 static int pdb_search_destructor(struct pdb_search *search)
 {
-   if (!search-search_ended) {
+   if ((!search-search_ended)  (search-search_end != NULL)) {
search-search_end(search);
}
return 0;
@@ -1733,6 +1733,7 @@ struct pdb_search *pdb_search_init(TALLOC_CTX *mem_ctx,
result-num_entries = 0;
result-cache_size = 0;
result-search_ended = False;
+   result-search_end = NULL;
 
/* Segfault appropriately if not initialized */
result-next_entry = NULL;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Nadezhda Ivanova
The branch, master has been updated
   via  dffb5ad... Implemented net fsmo command for transferring fsmo roles
  from  0e2d1cf... s4-smbtorture: pick correct last packet while checking 
backchannel replies in RPC-SPOOLSS-NOTIFY.

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


- Log -
commit dffb5ad2bf75fc0bcb69dce5cde52c8a1ea9c4f9
Author: Nadezhda Ivanova nadezhda.ivan...@postpath.com
Date:   Wed Jan 27 17:57:37 2010 +0200

Implemented net fsmo command for transferring fsmo roles

The command allows the user to transfer a fsmo role to the server to which
the connection is established. Roles can be transferred or seized. By 
default a
transfer is attempted even if seize option is chosen, as it is dangerous to
seize a role if the current owner is still running.
example use:
net fsmo show --host=hostnameoraddress --username=username 
--password=password
net fsmo transfer --role=role --host=hostnameoraddress --username=username 
--password=password
net fsmo seize --role=role --host=hostnameoraddress --username=username 
--password=password [--force]

Tested against Win2008. Does not work for samba 4 yet as we are missing the 
GetNCChanges extensions.

---

Summary of changes:
 source4/scripting/python/samba/netcmd/__init__.py |2 +
 source4/scripting/python/samba/netcmd/fsmo.py |  202 +
 2 files changed, 204 insertions(+), 0 deletions(-)
 create mode 100644 source4/scripting/python/samba/netcmd/fsmo.py


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/netcmd/__init__.py 
b/source4/scripting/python/samba/netcmd/__init__.py
index d6a130c..09c8cc3 100644
--- a/source4/scripting/python/samba/netcmd/__init__.py
+++ b/source4/scripting/python/samba/netcmd/__init__.py
@@ -145,3 +145,5 @@ from samba.netcmd.newuser import cmd_newuser
 commands[newuser] = cmd_newuser()
 from samba.netcmd.ntacl import cmd_acl
 commands[acl] = cmd_acl()
+from samba.netcmd.fsmo import cmd_fsmo
+commands[fsmo] = cmd_fsmo()
diff --git a/source4/scripting/python/samba/netcmd/fsmo.py 
b/source4/scripting/python/samba/netcmd/fsmo.py
new file mode 100644
index 000..6bfc2ef
--- /dev/null
+++ b/source4/scripting/python/samba/netcmd/fsmo.py
@@ -0,0 +1,202 @@
+#!/usr/bin/python
+#
+# Changes a FSMO role owner
+#
+# Copyright Nadezhda Ivanova 2009
+# Copyright Jelmer Vernooij 2009
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see http://www.gnu.org/licenses/.
+#
+
+import samba.getopt as options
+import ldb
+from ldb import LdbError
+
+from samba.auth import system_session
+from samba.netcmd import (
+Command,
+CommandError,
+Option,
+)
+from samba.samdb import SamDB
+
+class cmd_fsmo(Command):
+Makes the targer DC transfer or seize a fsmo role
+
+synopsis = (show | transfer options | seize options)
+
+takes_optiongroups = {
+sambaopts: options.SambaOptions,
+credopts: options.CredentialsOptions,
+versionopts: options.VersionOptions,
+}
+
+takes_options = [
+Option(--host, help=LDB URL for database or target server, 
type=str),
+Option(--force, help=Force seizing of the role without attempting 
to transfer first., action=store_true),
+Option(--role, type=choice, choices=[rid, pdc, 
infrastructure,schema,naming,all],
+   help=The FSMO role to seize or transfer.\n
+rid=RidAllocationMasterRole\n
+schema=SchemaMasterRole\n
+pdc=PdcEmulationMasterRole\n
+naming=DomainNamingMasterRole\n
+infrastructure=InfrastructureMasterRole\n
+all=all of the above),
+]
+
+takes_args = [subcommand]
+
+def transfer_role(self, role, samdb):
+m = ldb.Message()
+m.dn = ldb.Dn(samdb, )
+if role == rid:
+m[becomeRidMaster]= ldb.MessageElement(
+1, ldb.FLAG_MOD_REPLACE,
+becomeRidMaster)
+elif role == pdc:
+domain_dn = SamDB.domain_dn(samdb)
+res = samdb.search(domain_dn,
+   scope=ldb.SCOPE_BASE, attrs=[objectSid])
+assert(len(res) == 1)
+sid = res[0][objectSid][0]
+m[becomePdc]= ldb.MessageElement(
+sid, ldb.FLAG_MOD_REPLACE,
+becomePdc)
+elif 

[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Simo Sorce
The branch, master has been updated
   via  b63b9bc... s4:windc move windc plugin in its own file
   via  1f2e9e9... s4:PAC make common functions public
   via  82a80b7... s4:PAC Streamline pac-glue step 2
   via  85e3561... s4:PAC Streamline pac-glue
  from  6bade10... s3: get pthread detection also on HP-UX right

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


- Log -
commit b63b9bcd42e864d4b7024944c9d0b467487348f0
Author: Simo Sorce i...@samba.org
Date:   Tue Jan 26 11:56:16 2010 -0500

s4:windc move windc plugin in its own file

Keep all heimdal related plugin code within wdc-samba4.c
Leave only interfaces common to multiple plugins in pac-glue.c

commit 1f2e9e90bdbd609dc6316c6dd71faa25a0138915
Author: Simo Sorce i...@samba.org
Date:   Tue Jan 26 11:43:54 2010 -0500

s4:PAC make common functions public

commit 82a80b7f71d549e93995603a20ba119003c923fa
Author: Simo Sorce i...@samba.org
Date:   Tue Jan 26 11:09:32 2010 -0500

s4:PAC Streamline pac-glue step 2

Split functions so that no assumption is made about which plugin
is using them

commit 85e3561dc9883aa957de85ad2ff82e0cc13c81b4
Author: Simo Sorce i...@samba.org
Date:   Tue Jan 26 11:06:00 2010 -0500

s4:PAC Streamline pac-glue

First step, preparing to share the code between multiple plugins.

---

Summary of changes:
 source4/kdc/config.mk|   18 +++-
 source4/kdc/kdc.c|1 +
 source4/kdc/kdc.h|2 -
 source4/kdc/pac-glue.c   |  274 ++
 source4/kdc/pac-glue.h   |   46 
 source4/kdc/wdc-samba4.c |  212 +++
 6 files changed, 357 insertions(+), 196 deletions(-)
 create mode 100644 source4/kdc/pac-glue.h
 create mode 100644 source4/kdc/wdc-samba4.c


Changeset truncated at 500 lines:

diff --git a/source4/kdc/config.mk b/source4/kdc/config.mk
index 1659941..c3fc550 100644
--- a/source4/kdc/config.mk
+++ b/source4/kdc/config.mk
@@ -6,7 +6,7 @@
 INIT_FUNCTION = server_service_kdc_init
 SUBSYSTEM = service
 PRIVATE_DEPENDENCIES = \
-   HEIMDAL_KDC HDB_SAMBA4 PAC_GLUE LIBSAMBA-HOSTCONFIG \
+   HEIMDAL_KDC HDB_SAMBA4 WDC_SAMBA4 LIBSAMBA-HOSTCONFIG \
LIBTSOCKET LIBSAMBA_TSOCKET
 # End SUBSYSTEM KDC
 ###
@@ -14,18 +14,30 @@ PRIVATE_DEPENDENCIES = \
 KDC_OBJ_FILES = $(addprefix $(kdcsrcdir)/, kdc.o kpasswdd.o)
 
 ###
-# Start SUBSYSTEM KDC
+# Start SUBSYSTEM HDB
 [SUBSYSTEM::HDB_SAMBA4]
 CFLAGS = -Iheimdal/kdc -Iheimdal/lib/hdb
 PRIVATE_DEPENDENCIES = \
LIBLDB auth_sam auth_sam_reply CREDENTIALS \
HEIMDAL_HDB LIBSAMBA-HOSTCONFIG
-# End SUBSYSTEM KDC
+# End SUBSYSTEM HDB
 ###
 
 HDB_SAMBA4_OBJ_FILES = $(addprefix $(kdcsrcdir)/, hdb-samba4.o)
 
 ###
+# Start SUBSYSTEM WDC
+[SUBSYSTEM::WDC_SAMBA4]
+CFLAGS = -Iheimdal/kdc -Iheimdal/lib/hdb
+PRIVATE_DEPENDENCIES = \
+   LIBLDB auth_sam auth_sam_reply CREDENTIALS \
+   HEIMDAL_HDB PAC_GLUE LIBSAMBA-HOSTCONFIG
+# End SUBSYSTEM WDC
+###
+
+WDC_SAMBA4_OBJ_FILES = $(addprefix $(kdcsrcdir)/, wdc-samba4.o)
+
+###
 # Start SUBSYSTEM KDC
 [SUBSYSTEM::PAC_GLUE]
 CFLAGS = -Iheimdal/kdc -Iheimdal/lib/hdb
diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c
index 026eaf4..86d0382 100644
--- a/source4/kdc/kdc.c
+++ b/source4/kdc/kdc.c
@@ -48,6 +48,7 @@
 TALLOC_CTX *hdb_samba4_mem_ctx;
 struct tevent_context *hdb_samba4_ev_ctx;
 struct loadparm_context *hdb_samba4_lp_ctx;
+extern struct krb5plugin_windc_ftable windc_plugin_table;
 
 typedef bool (*kdc_process_fn_t)(struct kdc_server *kdc,
 TALLOC_CTX *mem_ctx,
diff --git a/source4/kdc/kdc.h b/source4/kdc/kdc.h
index becef93..57f05e8 100644
--- a/source4/kdc/kdc.h
+++ b/source4/kdc/kdc.h
@@ -30,8 +30,6 @@
 struct kdc_server;
 struct tsocket_address;
 
-extern struct krb5plugin_windc_ftable windc_plugin_table;
-
 bool kpasswdd_process(struct kdc_server *kdc,
  TALLOC_CTX *mem_ctx,
  DATA_BLOB *input,
diff --git a/source4/kdc/pac-glue.c b/source4/kdc/pac-glue.c
index d921899..3c6b10e 100644
--- a/source4/kdc/pac-glue.c
+++ b/source4/kdc/pac-glue.c
@@ -4,6 +4,7 @@
PAC Glue between Samba and the KDC
 
Copyright (C) Andrew Bartlett abart...@samba.org 2005-2009
+   Copyright (C) Simo Sorce i...@samba.org 2010
 
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
@@ -31,59 +32,53 @@
 #include kdc/kdc.h
 #include param/param.h
 
-struct krb5_dh_moduli;
-struct _krb5_krb_auth_data;
-
-static krb5_error_code samba_kdc_plugin_init(krb5_context context, void **ptr)
-{
-   *ptr = NULL;
-   

[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Jeremy Allison
The branch, master has been updated
   via  627fb85... Fix bug #7072 - Accounts can't be unlocked from ldap.
  from  8e26aa3... testsuite/libsmbclient use source3 in the path of the C 
and LFLAGS

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


- Log -
commit 627fb85092f728065b6d772c41aeb75018154e86
Author: Jeremy Allison j...@samba.org
Date:   Wed Jan 27 16:42:06 2010 -0800

Fix bug #7072 - Accounts can't be unlocked from ldap.

Fix suggested by Andy Hanton andyhan...@gmail.com. The LOGIN_CACHE
struct contains two time_t entries, but was being written to and
read from via tdb_pack/tdb_unpack functions using explicit 32-bit int 
specifiers.
This would break on machines with a 64-bit time_t. Use correct int
sizes for tdb_pack/tdb_unpack.

We have to fix this properly before 2037 :-).

Jeremy.

---

Summary of changes:
 source3/passdb/login_cache.c |   22 +++---
 1 files changed, 15 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/passdb/login_cache.c b/source3/passdb/login_cache.c
index 2a63500..5e1c977 100644
--- a/source3/passdb/login_cache.c
+++ b/source3/passdb/login_cache.c
@@ -68,6 +68,7 @@ LOGIN_CACHE * login_cache_read(struct samu *sampass)
char *keystr;
TDB_DATA databuf;
LOGIN_CACHE *entry;
+   uint32_t entry_timestamp = 0, bad_password_time = 0;
 
if (!login_cache_init())
return NULL;
@@ -92,17 +93,22 @@ LOGIN_CACHE * login_cache_read(struct samu *sampass)
SAFE_FREE(databuf.dptr);
return NULL;
}
+   ZERO_STRUCTP(entry);
 
if (tdb_unpack (databuf.dptr, databuf.dsize, SAM_CACHE_FORMAT,
entry-entry_timestamp, entry-acct_ctrl, 
-   entry-bad_password_count, 
-   entry-bad_password_time) == -1) {
+   entry-bad_password_count,
+   bad_password_time) == -1) {
DEBUG(7, (No cache entry found\n));
SAFE_FREE(entry);
SAFE_FREE(databuf.dptr);
return NULL;
}
 
+   /* Deal with possible 64-bit time_t. */
+   entry-entry_timestamp = (time_t)entry_timestamp;
+   entry-bad_password_time = (time_t)bad_password_time;
+
SAFE_FREE(databuf.dptr);
 
DEBUG(5, (Found login cache entry: timestamp %12u, flags 0x%x, count 
%d, time %12u\n,
@@ -116,6 +122,8 @@ bool login_cache_write(const struct samu *sampass, 
LOGIN_CACHE entry)
char *keystr;
TDB_DATA databuf;
bool ret;
+   uint32_t entry_timestamp;
+   uint32_t bad_password_time = (uint32_t)entry.bad_password_time;
 
if (!login_cache_init())
return False;
@@ -130,14 +138,14 @@ bool login_cache_write(const struct samu *sampass, 
LOGIN_CACHE entry)
return False;
}
 
-   entry.entry_timestamp = time(NULL);
+   entry_timestamp = (uint32_t)time(NULL);
 
databuf.dsize = 
tdb_pack(NULL, 0, SAM_CACHE_FORMAT,
-entry.entry_timestamp,
+entry_timestamp,
 entry.acct_ctrl,
 entry.bad_password_count,
-entry.bad_password_time);
+bad_password_time);
databuf.dptr = SMB_MALLOC_ARRAY(uint8, databuf.dsize);
if (!databuf.dptr) {
SAFE_FREE(keystr);
@@ -145,10 +153,10 @@ bool login_cache_write(const struct samu *sampass, 
LOGIN_CACHE entry)
}
 
if (tdb_pack(databuf.dptr, databuf.dsize, SAM_CACHE_FORMAT,
-entry.entry_timestamp,
+entry_timestamp,
 entry.acct_ctrl,
 entry.bad_password_count,
-entry.bad_password_time)
+bad_password_time)
!= databuf.dsize) {
SAFE_FREE(keystr);
SAFE_FREE(databuf.dptr);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Jeremy Allison
The branch, master has been updated
   via  69fd846... Second part of fix for bug #7072 - Accounts can't be 
unlocked from ldap.
  from  627fb85... Fix bug #7072 - Accounts can't be unlocked from ldap.

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


- Log -
commit 69fd8461b8792f4fee1b61db03953044565492c6
Author: Jeremy Allison j...@samba.org
Date:   Wed Jan 27 16:52:40 2010 -0800

Second part of fix for bug #7072 - Accounts can't be unlocked from ldap.

Missed read of entry_timestamp (was entry-entry_timestamp).

Jeremy.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/passdb/login_cache.c b/source3/passdb/login_cache.c
index 5e1c977..5630372 100644
--- a/source3/passdb/login_cache.c
+++ b/source3/passdb/login_cache.c
@@ -96,7 +96,8 @@ LOGIN_CACHE * login_cache_read(struct samu *sampass)
ZERO_STRUCTP(entry);
 
if (tdb_unpack (databuf.dptr, databuf.dsize, SAM_CACHE_FORMAT,
-   entry-entry_timestamp, entry-acct_ctrl, 
+   entry_timestamp,
+   entry-acct_ctrl,
entry-bad_password_count,
bad_password_time) == -1) {
DEBUG(7, (No cache entry found\n));


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Lars Müller
The branch, master has been updated
   via  8e26aa3... testsuite/libsmbclient use source3 in the path of the C 
and LFLAGS
   via  97c4c63... Link testsuite/libsmbclient against required libtdb and 
libwbclient
  from  1f7e97a... s3: syntax fix

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


- Log -
commit 8e26aa3d7cec968584283634fe3dce5553387c8c
Author: Lars Müller l...@samba.org
Date:   Thu Jan 28 00:40:39 2010 +0100

testsuite/libsmbclient use source3 in the path of the C and LFLAGS

commit 97c4c63990fceb01fd1110d4fcc97b70f623b201
Author: Lars Müller l...@samba.org
Date:   Thu Jan 28 00:38:04 2010 +0100

Link testsuite/libsmbclient against required libtdb and libwbclient

---

Summary of changes:
 testsuite/libsmbclient/src/Makefile |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/testsuite/libsmbclient/src/Makefile 
b/testsuite/libsmbclient/src/Makefile
index c8c0b67..1f640ca 100644
--- a/testsuite/libsmbclient/src/Makefile
+++ b/testsuite/libsmbclient/src/Makefile
@@ -1,8 +1,8 @@
 CC =   gcc
-CFLAGS =   -Wall -W -O2 -g -I../../../source/include
-LFLAGS =   -L../../../source/bin
+CFLAGS =   -Wall -W -O2 -g -I../../../source3/include
+LFLAGS =   -L../../../source3/bin
 
-LIBS=  -L/usr/lib -lsmbclient -ltalloc
+LIBS=  -L/usr/lib -lsmbclient -ltalloc -ltdb -lwbclient
 INCPATH= -I. -I/usr/include -I./include
 BIN_DIR=bin
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Günther Deschner
The branch, master has been updated
   via  0e2d1cf... s4-smbtorture: pick correct last packet while checking 
backchannel replies in RPC-SPOOLSS-NOTIFY.
  from  1ead839... s3-selftest: try to get RPC-SPOOLSS-NOTIFY running 
during make test on the buildfarm.

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


- Log -
commit 0e2d1cf9c4067dfce80a21ebf735d7d6a823d55e
Author: Günther Deschner g...@samba.org
Date:   Wed Jan 27 15:04:00 2010 +0100

s4-smbtorture: pick correct last packet while checking backchannel replies 
in RPC-SPOOLSS-NOTIFY.

Guenther

---

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


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/spoolss_notify.c 
b/source4/torture/rpc/spoolss_notify.c
index e5e52d6..dac8950 100644
--- a/source4/torture/rpc/spoolss_notify.c
+++ b/source4/torture/rpc/spoolss_notify.c
@@ -354,12 +354,20 @@ static bool test_start_dcerpc_server(struct 
torture_context *tctx,
return true;
 }
 
+static struct received_packet *last_packet(struct received_packet *p)
+{
+   struct received_packet *tmp;
+   for (tmp = p; tmp-next; tmp = tmp-next) ;;
+   return tmp;
+}
+
 static bool test_RFFPCNEx(struct torture_context *tctx,
  struct dcerpc_pipe *p)
 {
struct dcesrv_context *dce_ctx;
struct policy_handle handle;
const char *address;
+   struct received_packet *tmp;
 
received_packets = NULL;
 
@@ -372,8 +380,8 @@ static bool test_RFFPCNEx(struct torture_context *tctx,
torture_assert_int_equal(tctx, received_packets-opnum, 
NDR_SPOOLSS_REPLYOPENPRINTER,
no ReplyOpenPrinter packet after 
RemoteFindFirstPrinterChangeNotifyEx);
torture_assert(tctx, test_ClosePrinter(tctx, p, handle), );
-   torture_assert(tctx, received_packets, no packets received);
-   torture_assert_int_equal(tctx, received_packets-opnum, 
NDR_SPOOLSS_REPLYCLOSEPRINTER,
+   tmp = last_packet(received_packets);
+   torture_assert_int_equal(tctx, tmp-opnum, 
NDR_SPOOLSS_REPLYCLOSEPRINTER,
no ReplyClosePrinter packet after ClosePrinter);
 
/* Shut down DCE/RPC server */


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Björn Jacke
The branch, master has been updated
   via  5439e1a... s3: fix detection and flags for using pthread
   via  60a3086... s3: remove unused variable
   via  38be40f... s3:async_smb: remove unused variable
   via  b6839e1... libreplace: fix unused varibale warning on IRIX
   via  9536d94... s3: remove unused Variable
   via  55d4482... s3:netapi: remove unused variable
  from  463aa06... lib/popt: Fix typo in README.

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


- Log -
commit 5439e1a03f66ff9722987f908babfd71ebd698f1
Author: Björn Jacke b...@sernet.de
Date:   Tue Jan 26 00:17:10 2010 +0100

s3: fix detection and flags for using pthread

I hope this fixes the build on Tru64, IRIX and maybe bug #6983

commit 60a3086d78d9cf445034172f594325cb7b929d24
Author: Björn Jacke b...@sernet.de
Date:   Mon Jan 25 23:24:35 2010 +0100

s3: remove unused variable

commit 38be40f63c9fd2eecb840badaff23b915bc20fee
Author: Björn Jacke b...@sernet.de
Date:   Mon Jan 25 23:23:49 2010 +0100

s3:async_smb: remove unused variable

commit b6839e1bfd10d28046f75f9f9c25f8af2665eda3
Author: Björn Jacke b...@sernet.de
Date:   Mon Jan 25 23:07:24 2010 +0100

libreplace: fix unused varibale warning on IRIX

commit 9536d94d5478b63fc05047964b40d8786a7246c4
Author: Björn Jacke b...@sernet.de
Date:   Mon Jan 25 23:00:14 2010 +0100

s3: remove unused Variable

Jeremy, please check!

commit 55d448254a9994ecace63c077dc7768675ea3c98
Author: Björn Jacke b...@sernet.de
Date:   Mon Jan 25 22:57:36 2010 +0100

s3:netapi: remove unused variable

---

Summary of changes:
 lib/replace/strptime.c   |4 +-
 source3/Makefile.in  |4 +-
 source3/configure.in |   64 --
 source3/lib/netapi/group.c   |2 -
 source3/libsmb/async_smb.c   |2 -
 source3/libsmb/clireadwrite.c|2 -
 source3/libsmb/libsmb_thread_posix.c |4 ++
 source3/smbd/dosmode.c   |4 --
 8 files changed, 61 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/strptime.c b/lib/replace/strptime.c
index 0e40f75..568823f 100644
--- a/lib/replace/strptime.c
+++ b/lib/replace/strptime.c
@@ -251,7 +251,6 @@ strptime_internal (rp, fmt, tm, decided, era_cnt)
  enum locale_status *decided;
  int era_cnt;
 {
-  const char *rp_backup;
   int cnt;
   size_t val;
   int have_I, is_pm;
@@ -261,6 +260,7 @@ strptime_internal (rp, fmt, tm, decided, era_cnt)
   int have_yday;
   int have_mon, have_mday;
 #ifdef _NL_CURRENT
+  const char *rp_backup;
   size_t num_eras;
 #endif
   struct era_entry *era;
@@ -297,10 +297,10 @@ strptime_internal (rp, fmt, tm, decided, era_cnt)
 #ifndef _NL_CURRENT
   /* We need this for handling the `E' modifier.  */
 start_over:
-#endif
 
   /* Make back up of current processing pointer.  */
   rp_backup = rp;
+#endif
 
   switch (*fmt++)
{
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 9d67b44..d75420e 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -72,7 +72,7 @@ nscd_li...@nscd_libs@
 uuid_li...@uuid_libs@
 libwbclie...@libwbclient_static@ @LIBWBCLIENT_SHARED@
 libwbclient_li...@libwbclient_libs@
-winbind_nss_pthre...@winbind_nss_pthread@
+winbind_nss_pthread_ldfla...@pthread_ldflags@
 dnssd_li...@dnssd_libs@
 avahi_li...@avahi_libs@
 popt_li...@poptlibs@
@@ -2527,7 +2527,7 @@ bin/v...@exeext@: $(BINARY_PREREQS) $(VLP_OBJ) $(LIBTDB)
 @WINBIND_NSS@: $(BINARY_PREREQS) $(WINBIND_NSS_OBJ)
@echo Linking $@
@$(SHLD) $(WINBIND_NSS_LDSHFLAGS) -o $@ $(WINBIND_NSS_OBJ) \
-   $(LIBREPLACE_LIBS) $(WINBIND_NSS_PTHREAD) \
+   $(LIBREPLACE_LIBS) $(WINBIND_NSS_PTHREAD_LDFLAGS) \
@sonamef...@`basename $...@`@NSSSONAMEVERSIONSUFFIX@
 
 @WINBIND_WINS_NSS@: $(BINARY_PREREQS) $(WINBIND_WINS_NSS_OBJ) $(LIBTALLOC) 
$(LIBTDB)
diff --git a/source3/configure.in b/source3/configure.in
index 82664d6..a5d0b06 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -709,7 +709,7 @@ AUTH_LIBS=${AUTH_LIBS} ${CRYPT_LIBS}
 
 AC_CHECK_HEADERS(aio.h sys/fcntl.h sys/select.h fcntl.h sys/time.h 
sys/unistd.h rpc/nettype.h)
 AC_CHECK_HEADERS(unistd.h grp.h sys/id.h memory.h alloca.h)
-AC_CHECK_HEADERS(limits.h float.h pthread.h libintl.h)
+AC_CHECK_HEADERS(limits.h float.h libintl.h)
 AC_CHECK_HEADERS(rpc/rpc.h rpcsvc/nis.h rpcsvc/ypclnt.h)
 AC_CHECK_HEADERS(sys/param.h ctype.h sys/wait.h sys/resource.h sys/ioctl.h 
sys/ipc.h sys/prctl.h sys/sysctl.h)
 AC_CHECK_HEADERS(sys/mman.h sys/filio.h sys/priv.h sys/shm.h string.h 
strings.h stdlib.h)
@@ -6032,7 +6032,6 @@ WINBIND_NSS=../nsswitch/libnss_winbind.$SHLIBEXT
 WINBIND_WINS_NSS=../nsswitch/libnss_wins.$SHLIBEXT
 WINBIND_NSS_LDSHFLAGS=$LDSHFLAGS
 

[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Günther Deschner
The branch, master has been updated
   via  098fc8c... s4:torture: refactor querying of domain info out into 
test_QueryDomainInfo2_level()
   via  0a33b20... s4:torture: create new test_SetDomainInfo_ntstatus()
   via  c1d157a... s4:torture: refactor setting of domain inf out into 
test_SetDomainInfo()
   via  50a46cf... s4:torture: refactor setting account flags out into 
test_SetUserInfo_acct_flags()
  from  899bd00... Fix bug #7067 - Linux asynchronous IO (aio) can cause 
smbd to fail to respond to a read or write.

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


- Log -
commit 098fc8c09c64c9fa37ae70638e3b30340a7ae183
Author: Michael Adam ob...@samba.org
Date:   Fri Jan 22 00:47:42 2010 +0100

s4:torture: refactor querying of domain info out into 
test_QueryDomainInfo2_level()

Used in several places.

(Note: The _level suffix in the function name is just because
test_QueryDomainInfo2() already exists as an overall test for all levels.)

Michael

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

commit 0a33b20f70506d0a01b4c543ab57ca2488187ee9
Author: Michael Adam ob...@samba.org
Date:   Fri Jan 22 00:46:19 2010 +0100

s4:torture: create new test_SetDomainInfo_ntstatus()

for checking for SetDomainInfo giving a desired return code.

Michael

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

commit c1d157a48102c50c72a85b60fba5237436377ffd
Author: Michael Adam ob...@samba.org
Date:   Fri Jan 22 00:21:29 2010 +0100

s4:torture: refactor setting of domain inf out into test_SetDomainInfo()

and use it in several places.

Michael

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

commit 50a46cff76e33dc8828c49bf0665afeeb2b7c1eb
Author: Michael Adam ob...@samba.org
Date:   Thu Jan 21 23:55:51 2010 +0100

s4:torture: refactor setting account flags out into 
test_SetUserInfo_acct_flags()

and use this in four places (enabling/disabling accounts).

Michael

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

---

Summary of changes:
 source4/torture/rpc/samr.c |  383 +++-
 1 files changed, 168 insertions(+), 215 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index c2b973e..4ab4a2c 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -3403,33 +3403,106 @@ static bool test_QueryUserInfo_badpwdcount(struct 
dcerpc_pipe *p,
return true;
 }
 
-static bool test_reset_badpwdcount(struct dcerpc_pipe *p,
-  struct torture_context *tctx,
-  struct policy_handle *user_handle,
-  uint32_t acct_flags,
-  char **password)
+static bool test_SetUserInfo_acct_flags(struct dcerpc_pipe *p,
+   struct torture_context *tctx,
+   struct policy_handle *user_handle,
+   uint32_t acct_flags)
 {
struct samr_SetUserInfo r;
union samr_UserInfo user_info;
 
-   torture_assert(tctx, test_SetUserPass(p, tctx, user_handle, password),
-   failed to set password);
-
-   torture_comment(tctx, Testing SetUserInfo level 16 (enable 
account)\n);
+   torture_comment(tctx, Testing SetUserInfo level 16\n);
 
user_info.info16.acct_flags = acct_flags;
-   user_info.info16.acct_flags = ~ACB_DISABLED;
 
r.in.user_handle = user_handle;
r.in.level = 16;
r.in.info = user_info;
 
torture_assert_ntstatus_ok(tctx, dcerpc_samr_SetUserInfo(p, tctx, r),
-   failed to enable user);
+   failed to set account flags);
 
+   return true;
+}
+
+static bool test_reset_badpwdcount(struct dcerpc_pipe *p,
+  struct torture_context *tctx,
+  struct policy_handle *user_handle,
+  uint32_t acct_flags,
+  char **password)
+{
torture_assert(tctx, test_SetUserPass(p, tctx, user_handle, password),
failed to set password);
 
+   torture_comment(tctx, Testing SetUserInfo level 16 (enable 
account)\n);
+
+   torture_assert(tctx,
+  test_SetUserInfo_acct_flags(p, tctx, user_handle,
+  acct_flags  ~ACB_DISABLED),
+  failed to enable user);
+
+   torture_assert(tctx, test_SetUserPass(p, tctx, user_handle, password),
+   failed to set password);
+
+   return true;
+}
+
+static bool test_SetDomainInfo(struct dcerpc_pipe *p,
+  struct 

[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Lars Müller
The branch, master has been updated
   via  2f9eb6b... s3: Install and uninstall the static version of 
libwbclient
  from  b63b9bc... s4:windc move windc plugin in its own file

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


- Log -
commit 2f9eb6bff5faa2c00c901fdf7b7c3489b473a1d3
Author: Lars Müller l...@samba.org
Date:   Wed Jan 27 22:40:19 2010 +0100

s3: Install and uninstall the static version of libwbclient

This requires to call configure with --enable-static which isn't the case
by default.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index 2b315c7..873b46a 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -2052,12 +2052,14 @@ installlibwbclient:: installdirs libwbclient
ln -f -s `basename $(LIBWBCLIENT_SHARED_TARGET_SONAME)` \
$(DESTDIR)$(LIBDIR)/`basename 
$(LIBWBCLIENT_SHARED_TARGET)` ; \
fi
+   -$(INSTALLLIBCMD_A) bin/libwbclient.a $(DESTDIR)$(LIBDIR)
@$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) 
$(DESTDIR) ${prefix}/include
-$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(LIBWBCLIENT_HEADERS) 
$(DESTDIR)${prefix}/include
 
 uninstalllibwbclient::
-rm -f $(DESTDIR)$(LIBDIR)/`basename $(LIBWBCLIENT_SHARED_TARGET)`
-$(UNINSTALLLIBCMD_SH) $(DESTDIR)$(LIBDIR)/`basename 
$(LIBWBCLIENT_SHARED_TARGET_SONAME)`
+   -$(UNINSTALLLIBCMD_A) $(DESTDIR)$(LIBDIR)/`basename 
$(LIBWBCLIENT_STATIC_TARGET)`
-rm -f $(DESTDIR)${prefix}/include/wbclient.h
 
 libs:: libwbclient


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Günther Deschner
The branch, master has been updated
   via  7148eff... s4-smbtorture: also test smbc_getOptionUseCCache
  from  08fa573... s3: Enable use of ccache by default for libsmbclient

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


- Log -
commit 7148eff0b7f3a58be2d2c47516a8b9e3bc3d3c64
Author: Günther Deschner g...@samba.org
Date:   Tue Jan 26 12:10:17 2010 +0100

s4-smbtorture: also test smbc_getOptionUseCCache

---

Summary of changes:
 source4/torture/libsmbclient/config.m4  |3 ++-
 source4/torture/libsmbclient/libsmbclient.c |1 +
 2 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/libsmbclient/config.m4 
b/source4/torture/libsmbclient/config.m4
index 39b3360..481e2fa 100644
--- a/source4/torture/libsmbclient/config.m4
+++ b/source4/torture/libsmbclient/config.m4
@@ -22,7 +22,8 @@ if test x$use_libsmbclient != xno; then
AC_CHECK_LIB_EXT(smbclient, SMBCLIENT_LIBS, smbc_new_context)
AC_CHECK_LIB_EXT(smbclient, SMBCLIENT_LIBS, 
smbc_getOptionNoAutoAnonymousLogin)
AC_CHECK_LIB_EXT(smbclient, SMBCLIENT_LIBS, smbc_setOptionCaseSensitive)
-   if test x$ac_cv_header_libsmbclient_h = xyes -a 
x$ac_cv_lib_ext_smbclient_smbc_new_context = xyes -a 
x$ac_cv_lib_ext_smbclient_smbc_getOptionNoAutoAnonymousLogin = xyes -a 
x$ac_cv_lib_ext_smbclient_smbc_setOptionCaseSensitive = xyes; then
+   AC_CHECK_LIB_EXT(smbclient, SMBCLIENT_LIBS, smbc_setOptionUseCCache)
+   if test x$ac_cv_header_libsmbclient_h = xyes -a 
x$ac_cv_lib_ext_smbclient_smbc_new_context = xyes -a 
x$ac_cv_lib_ext_smbclient_smbc_getOptionNoAutoAnonymousLogin = xyes -a 
x$ac_cv_lib_ext_smbclient_smbc_setOptionCaseSensitive = xyes -a 
x$ac_cv_lib_ext_smbclient_smbc_setOptionUseCCache = xyes; then
AC_DEFINE(ENABLE_LIBSMBCLIENT,1,[Whether we have libsmbclient 
on the host system])
SMB_ENABLE(SMBCLIENT,YES)
SMB_ENABLE(TORTURE_LIBSMBCLIENT,YES)
diff --git a/source4/torture/libsmbclient/libsmbclient.c 
b/source4/torture/libsmbclient/libsmbclient.c
index 2f146c9..9822539 100644
--- a/source4/torture/libsmbclient/libsmbclient.c
+++ b/source4/torture/libsmbclient/libsmbclient.c
@@ -194,6 +194,7 @@ bool torture_libsmbclient_options(struct torture_context 
*tctx)
TEST_OPTION_INT(OptionUseKerberos, false);
TEST_OPTION_INT(OptionFallbackAfterKerberos, false);
TEST_OPTION_INT(OptionNoAutoAnonymousLogin, true);
+   TEST_OPTION_INT(OptionUseCCache, true);
 
smbc_free_context(ctx, 1);
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Björn Jacke
The branch, master has been updated
   via  6bade10... s3: get pthread detection also on HP-UX right
  from  dffb5ad... Implemented net fsmo command for transferring fsmo roles

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


- Log -
commit 6bade10a1eb21689613770f9a54e0a080663029c
Author: Björn Jacke b...@sernet.de
Date:   Wed Jan 27 18:54:55 2010 +0100

s3: get pthread detection also on HP-UX right

---

Summary of changes:
 source3/configure.in |   13 -
 1 files changed, 12 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index a5d0b06..2766d07 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6361,17 +6361,28 @@ if test x$PTHREAD_LDFLAGS = xerror; then
 PTHREAD_LDFLAGS=-lpthread ])
 fi
 
+# especially for HP-UX, where the AC_CHECK_FUNC macro fails to test for
+# pthread_attr_init. On pthread_mutex_lock it works there...
+if test x$PTHREAD_LDFLAGS = xerror; then
+   AC_CHECK_LIB(pthread, pthread_mutex_lock, [
+   PTHREAD_CFLAGS==-D_REENTRANT
+   PTHREAD_LDFLAGS=-lpthread ])
+fi
+
 AC_SUBST(PTHREAD_CFLAGS)
 AC_SUBST(PTHREAD_LDFLAGS)
 
 samba_cv_HAVE_PTHREAD=no
 if test x$PTHREAD_CFLAGS != xerror -a x$PTHREAD_LDFLAGS != xerror; then
samba_cv_HAVE_PTHREAD=yes
-   # now check for pthread.h with pthread-correct CFLAGS:
+   # now check for pthread.h with pthread-correct CFLAGS and LDFLAGS:
ac_save_CFLAGS=$CFLAGS
CFLAGS=$CFLAGS $PTHREAD_CFLAGS
+   ac_save_LDFLAGS=$LDFLAGS
+   LDFLAGS=$LDFLAGS $PTHREAD_LDFLAGS
AC_CHECK_HEADERS(pthread.h)
CFLAGS=$ac_save_CFLAGS
+   LDFLAGS=$ac_save_LDFLAGS
 fi
 
 #


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Günther Deschner
The branch, master has been updated
   via  1ead839... s3-selftest: try to get RPC-SPOOLSS-NOTIFY running 
during make test on the buildfarm.
  from  098fc8c... s4:torture: refactor querying of domain info out into 
test_QueryDomainInfo2_level()

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


- Log -
commit 1ead83947fce60a74ca88460c2453d8e7e0f58c4
Author: Günther Deschner g...@samba.org
Date:   Wed Jan 27 13:39:24 2010 +0100

s3-selftest: try to get RPC-SPOOLSS-NOTIFY running during make test on the 
buildfarm.

Guenther

---

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


Changeset truncated at 500 lines:

diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh
index 8565185..b9c11b8 100755
--- a/source3/script/tests/selftest.sh
+++ b/source3/script/tests/selftest.sh
@@ -80,6 +80,7 @@ SAMBA4CONFFILE=$LIBDIR/samba4client.conf
 SERVERCONFFILE=$LIBDIR/server.conf
 COMMONCONFFILE=$LIBDIR/common.conf
 PRIVATEDIR=$PREFIX_ABS/private
+NCALRPCDIR=$PREFIX_ABS/ncalrpc
 LOCKDIR=$PREFIX_ABS/lockdir
 LOGDIR=$PREFIX_ABS/logs
 SOCKET_WRAPPER_DIR=$PREFIX_ABS/sw
@@ -149,7 +150,7 @@ fi
 ##
 printf %s CREATE TEST ENVIRONMENT IN '$PREFIX'...
 /bin/rm -rf $PREFIX/*
-mkdir -p $PRIVATEDIR $LIBDIR $PIDDIR $LOCKDIR $LOGDIR
+mkdir -p $PRIVATEDIR $NCALRPCDIR $LIBDIR $PIDDIR $LOCKDIR $LOGDIR
 mkdir -p $SOCKET_WRAPPER_DIR
 mkdir -p $WINBINDD_SOCKET_DIR
 chmod 755 $WINBINDD_SOCKET_DIR
@@ -206,6 +207,7 @@ cat $SAMBA4CONFFILEEOF
panic action = $SCRIPTDIR/gdb_backtrace %PID% %PROG%
include = $COMMONCONFFILE
modules dir = $SRCDIR/bin/modules
+   ncalrpc dir = $NCALRPCDIR
 EOF
 
 cat $SERVERCONFFILEEOF


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Lars Müller
The branch, master has been updated
   via  2dd301e... Add dependency of bin/smbfilter to libwbclient.
  from  dee1b41... s4-libcli: Fixed a talloc_reference error.

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


- Log -
commit 2dd301e5cd6ff97943c4bf9c7cd9b820d6193b45
Author: Lars Müller l...@samba.org
Date:   Tue Jan 26 22:54:15 2010 +0100

Add dependency of bin/smbfilter to libwbclient.

---

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


Changeset truncated at 500 lines:

diff --git a/source3/Makefile.in b/source3/Makefile.in
index d75420e..2b315c7 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -1771,7 +1771,7 @@ bin/debug2h...@exeext@: $(BINARY_PREREQS) 
$(DEBUG2HTML_OBJ) @BUILD_POPT@ $(LIBTA
@$(CC) -o $@ $(DEBUG2HTML_OBJ) $(LDFLAGS) $(DYNEXP) \
$(LIBS) $(LIBTALLOC_LIBS)
 
-bin/smbfil...@exeext@: $(BINARY_PREREQS) $(SMBFILTER_OBJ) @BUILD_POPT@ 
$(LIBTALLOC) $(LIBTDB)
+bin/smbfil...@exeext@: $(BINARY_PREREQS) $(SMBFILTER_OBJ) @BUILD_POPT@ 
$(LIBTALLOC) $(LIBTDB) $(LIBWBCLIENT)
@echo Linking $@
@$(CC) -o $@ $(SMBFILTER_OBJ) $(LDFLAGS) $(LIBS) \
$(KRB5LIBS) $(LDAP_LIBS) $(POPT_LIBS) \


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Björn Jacke
The branch, master has been updated
   via  e87adf5... Revert libreplace: fix unused varibale warning on IRIX
  from  5439e1a... s3: fix detection and flags for using pthread

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


- Log -
commit e87adf523bcf7521e643bc99003d5d35242b7abf
Author: Björn Jacke b...@sernet.de
Date:   Tue Jan 26 01:16:37 2010 +0100

Revert libreplace: fix unused varibale warning on IRIX

this one was broken

---

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


Changeset truncated at 500 lines:

diff --git a/lib/replace/strptime.c b/lib/replace/strptime.c
index 568823f..0e40f75 100644
--- a/lib/replace/strptime.c
+++ b/lib/replace/strptime.c
@@ -251,6 +251,7 @@ strptime_internal (rp, fmt, tm, decided, era_cnt)
  enum locale_status *decided;
  int era_cnt;
 {
+  const char *rp_backup;
   int cnt;
   size_t val;
   int have_I, is_pm;
@@ -260,7 +261,6 @@ strptime_internal (rp, fmt, tm, decided, era_cnt)
   int have_yday;
   int have_mon, have_mday;
 #ifdef _NL_CURRENT
-  const char *rp_backup;
   size_t num_eras;
 #endif
   struct era_entry *era;
@@ -297,10 +297,10 @@ strptime_internal (rp, fmt, tm, decided, era_cnt)
 #ifndef _NL_CURRENT
   /* We need this for handling the `E' modifier.  */
 start_over:
+#endif
 
   /* Make back up of current processing pointer.  */
   rp_backup = rp;
-#endif
 
   switch (*fmt++)
{


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Björn Jacke
The branch, master has been updated
   via  1f7e97a... s3: syntax fix
  from  2f9eb6b... s3: Install and uninstall the static version of 
libwbclient

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


- Log -
commit 1f7e97a8a257b3280ca14168adf2d59ca9e1074c
Author: Björn Jacke b...@sernet.de
Date:   Wed Jan 27 23:43:23 2010 +0100

s3: syntax fix

---

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


Changeset truncated at 500 lines:

diff --git a/source3/configure.in b/source3/configure.in
index 2766d07..3c21bd6 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -6365,7 +6365,7 @@ fi
 # pthread_attr_init. On pthread_mutex_lock it works there...
 if test x$PTHREAD_LDFLAGS = xerror; then
AC_CHECK_LIB(pthread, pthread_mutex_lock, [
-   PTHREAD_CFLAGS==-D_REENTRANT
+   PTHREAD_CFLAGS=-D_REENTRANT
PTHREAD_LDFLAGS=-lpthread ])
 fi
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  dee1b41... s4-libcli: Fixed a talloc_reference error.
  from  137fd79... s4:winsrepl.idl: add random interface uuid

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


- Log -
commit dee1b41ae7e3531f508a7a79adb3118a3af78da5
Author: Andreas Schneider a...@redhat.com
Date:   Tue Jan 26 14:57:15 2010 +0100

s4-libcli: Fixed a talloc_reference error.

Signed-off-by: Andreas Schneider a...@redhat.com
Signed-off-by: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de

---

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


Changeset truncated at 500 lines:

diff --git a/source4/libcli/raw/rawnotify.c b/source4/libcli/raw/rawnotify.c
index 28ab3eb..b277a2c 100644
--- a/source4/libcli/raw/rawnotify.c
+++ b/source4/libcli/raw/rawnotify.c
@@ -159,6 +159,7 @@ NTSTATUS smb_raw_ntcancel(struct smbcli_request *oldreq)
talloc_free(req);
return NT_STATUS_NO_MEMORY;
}
+   req-do_not_free = true;
 
smbcli_request_send(req);
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Günther Deschner
The branch, master has been updated
   via  b5d4726... s4-smbtorture: test 
wbcResolveWinsByName/wbcResolveWinsByIP in WINBIND-WBCLIENT testsuite.
   via  e16e75a... s4-smbtorture: add test for wbcPingDc to 
WINBIND-WBCLIENT testsuite.
   via  5dfec4f... s4-smbtorture: split 
spoolss_RemoteFindFirstPrinterChangeNotifyEx test into smaller parts.
   via  818fb00... testprogs: print all driver info levels in spoolss 
testsuite.
  from  4eb1523... s3-libsmbclient: Add smbc_setOptionUseCCache()

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


- Log -
commit b5d47263162856c423f484df44914271b76b1e53
Author: Günther Deschner g...@samba.org
Date:   Fri Jan 22 16:27:39 2010 +0100

s4-smbtorture: test wbcResolveWinsByName/wbcResolveWinsByIP in 
WINBIND-WBCLIENT testsuite.

Guenther

commit e16e75a4f0e8887b1cce35384d1157743270439e
Author: Günther Deschner g...@samba.org
Date:   Fri Jan 22 15:06:50 2010 +0100

s4-smbtorture: add test for wbcPingDc to WINBIND-WBCLIENT testsuite.

Volker, please check, you know best how this interface is designed :-)

Guenther

commit 5dfec4f36b90f0343e6ef4d457f67dccbfee8480
Author: Günther Deschner g...@samba.org
Date:   Tue Jan 19 22:18:24 2010 +0100

s4-smbtorture: split spoolss_RemoteFindFirstPrinterChangeNotifyEx test into 
smaller parts.

Guenther

commit 818fb00381c4f89d4375f2f41f6fcbb42999d871
Author: Günther Deschner g...@samba.org
Date:   Wed Jan 20 00:44:16 2010 +0100

testprogs: print all driver info levels in spoolss testsuite.

Guenther

---

Summary of changes:
 nsswitch/libwbclient/tests/wbclient.c|   48 -
 source4/torture/rpc/spoolss_notify.c |  181 ++
 testprogs/win32/spoolss/printlib.c   |  161 ++
 testprogs/win32/spoolss/printlib_proto.h |3 +
 testprogs/win32/spoolss/spoolss.c|8 ++
 5 files changed, 327 insertions(+), 74 deletions(-)


Changeset truncated at 500 lines:

diff --git a/nsswitch/libwbclient/tests/wbclient.c 
b/nsswitch/libwbclient/tests/wbclient.c
index 23fad63..9e4c348 100644
--- a/nsswitch/libwbclient/tests/wbclient.c
+++ b/nsswitch/libwbclient/tests/wbclient.c
@@ -1,7 +1,7 @@
 /*
Unix SMB/CIFS implementation.
SMB torture tester
-   Copyright (C) Guenther Deschner 2009
+   Copyright (C) Guenther Deschner 2009-2010
 
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
@@ -43,6 +43,16 @@ static bool test_wbc_ping(struct torture_context *tctx)
return true;
 }
 
+static bool test_wbc_pingdc(struct torture_context *tctx)
+{
+   torture_assert_wbc_equal(tctx, wbcPingDc(random_string, NULL), 
WBC_ERR_NOT_IMPLEMENTED,
+   wbcPingDc failed);
+   torture_assert_wbc_ok(tctx, wbcPingDc(NULL, NULL),
+   wbcPingDc failed);
+
+   return true;
+}
+
 static bool test_wbc_library_details(struct torture_context *tctx)
 {
struct wbcLibraryDetails *details;
@@ -304,12 +314,46 @@ static bool test_wbc_lookupdcex(struct torture_context 
*tctx)
return true;
 }
 
+static bool test_wbc_resolve_winsbyname(struct torture_context *tctx)
+{
+   const char *name;
+   char *ip;
+   wbcErr ret;
+
+   name = torture_setting_string(tctx, host, NULL);
+
+   ret = wbcResolveWinsByName(name, ip);
+
+   if (is_ipaddress(name)) {
+   torture_assert_wbc_equal(tctx, ret, WBC_ERR_DOMAIN_NOT_FOUND, 
wbcResolveWinsByName failed);
+   } else {
+   torture_assert_wbc_ok(tctx, ret, wbcResolveWinsByName failed);
+   }
+
+   return true;
+}
+
+static bool test_wbc_resolve_winsbyip(struct torture_context *tctx)
+{
+   const char *ip;
+   char *name;
+   wbcErr ret;
+
+   ip = torture_setting_string(tctx, host, NULL);
+
+   ret = wbcResolveWinsByIP(ip, name);
+
+   torture_assert_wbc_ok(tctx, ret, wbcResolveWinsByIP failed);
+
+   return true;
+}
 
 struct torture_suite *torture_wbclient(void)
 {
struct torture_suite *suite = 
torture_suite_create(talloc_autofree_context(), WBCLIENT);
 
torture_suite_add_simple_test(suite, wbcPing, test_wbc_ping);
+   torture_suite_add_simple_test(suite, wbcPingDc, test_wbc_pingdc);
torture_suite_add_simple_test(suite, wbcLibraryDetails, 
test_wbc_library_details);
torture_suite_add_simple_test(suite, wbcInterfaceDetails, 
test_wbc_interface_details);
torture_suite_add_simple_test(suite, wbcSidTypeString, 
test_wbc_sidtypestring);
@@ -321,6 +365,8 @@ struct torture_suite *torture_wbclient(void)
torture_suite_add_simple_test(suite, wbcListTrusts, test_wbc_trusts);
torture_suite_add_simple_test(suite, wbcLookupDomainController, 
test_wbc_lookupdc);

[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  d69d07c... s4-provision: Added msDS-NcType into samba4Top object 
class
   via  5cdd300... s4-provision: Fixed typos and redundant code
   via  ce70938... s4-provision: Disable populating FDS during instance 
creation.
  from  7564445... nsswitch: Move nss_err_str to its only caller

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


- Log -
commit d69d07ce62f2cb9468caf8d1a1dddc8082e0d492
Author: Endi S. Dewata edew...@redhat.com
Date:   Mon Jan 18 21:47:24 2010 -0600

s4-provision: Added msDS-NcType into samba4Top object class

Signed-off-by: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de

commit 5cdd30011c5b09fd9aac669047e0c2f60f558feb
Author: Endi S. Dewata edew...@redhat.com
Date:   Mon Jan 18 21:01:08 2010 -0600

s4-provision: Fixed typos and redundant code

Signed-off-by: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de

commit ce709389e61cdc538f9c071ece37ce97abad9292
Author: Endi S. Dewata edew...@redhat.com
Date:   Tue Jan 19 23:10:19 2010 -0600

s4-provision: Disable populating FDS during instance creation.

Signed-off-by: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de

---

Summary of changes:
 source4/scripting/python/samba/provisionbackend.py |   20 ++--
 source4/setup/fedorads.inf |1 +
 source4/setup/schema_samba4.ldif   |1 +
 3 files changed, 12 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/provisionbackend.py 
b/source4/scripting/python/samba/provisionbackend.py
index ae58a16..8241ed6 100644
--- a/source4/scripting/python/samba/provisionbackend.py
+++ b/source4/scripting/python/samba/provisionbackend.py
@@ -704,7 +704,7 @@ class FDSBackend(LDAPBackend):
 os.path.join(self.paths.ldapdir, slapd-samba4, ldif2db), -s, 
self.sambadn, -i, self.samba_ldif],
 close_fds=True, shell=False)
 if retcode != 0:
-raise(ldif2db failed)
+raise ProvisioningError(ldif2db failed)
 
 def post_setup(self):
 ldapi_db = Ldb(self.ldapi_uri, credentials=self.credentials)
@@ -717,16 +717,16 @@ class FDSBackend(LDAPBackend):
 dn = str(res[i][dn])
 ldapi_db.delete(dn)
 
-aci = (targetattr = *) (version 3.0;acl full access to all 
by samba-admin;allow (all)(userdn = ldap:///CN=samba-admin,%s;);) % 
self.sambadn
+aci = (targetattr = *) (version 3.0;acl full access to all by 
samba-admin;allow (all)(userdn = ldap:///CN=samba-admin,%s;);) % 
self.sambadn
 
-m = ldb.Message()
-m[aci] = ldb.MessageElement([aci], ldb.FLAG_MOD_REPLACE, aci)
+m = ldb.Message()
+m[aci] = ldb.MessageElement([aci], ldb.FLAG_MOD_REPLACE, aci)
 
-m.dn = ldb.Dn(1, self.names.domaindn)
-ldapi_db.modify(m)
+m.dn = ldb.Dn(ldapi_db, self.names.domaindn)
+ldapi_db.modify(m)
 
-m.dn = ldb.Dn(1, self.names.configdn)
-ldapi_db.modify(m)
+m.dn = ldb.Dn(ldapi_db, self.names.configdn)
+ldapi_db.modify(m)
 
-m.dn = ldb.Dn(1, self.names.schemadn)
-ldapi_db.modify(m)
+m.dn = ldb.Dn(ldapi_db, self.names.schemadn)
+ldapi_db.modify(m)
diff --git a/source4/setup/fedorads.inf b/source4/setup/fedorads.inf
index 2dda1bc..f4f92a0 100644
--- a/source4/setup/fedorads.inf
+++ b/source4/setup/fedorads.inf
@@ -25,6 +25,7 @@ cert_dir= ${LDAPDIR}/slapd-samba4
 
 start_server= 0
 install_full_schema= 0
+InstallLdifFile= none
 SchemaFile=${LDAPDIR}/99_ad.ldif
 ConfigFile = ${LDAPDIR}/fedorads-partitions.ldif
 ConfigFile = ${LDAPDIR}/fedorads-sasl.ldif
diff --git a/source4/setup/schema_samba4.ldif b/source4/setup/schema_samba4.ldif
index e28aa0e..401af16 100644
--- a/source4/setup/schema_samba4.ldif
+++ b/source4/setup/schema_samba4.ldif
@@ -277,6 +277,7 @@ systemMayContain: netbootSCPBL
 systemMayContain: ownerBL
 systemMayContain: msDS-ReplValueMetaData
 systemMayContain: msDS-ReplAttributeMetaData
+systemMayContain: msDS-NcType
 systemMayContain: msDS-NonMembersBL
 systemMayContain: msDS-NCReplOutboundNeighbors
 systemMayContain: msDS-NCReplInboundNeighbors


-- 
Samba Shared Repository


Build status as of Thu Jan 28 07:00:04 2010

2010-01-27 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2010-01-27 
00:00:05.0 -0700
+++ /home/build/master/cache/broken_results.txt 2010-01-28 00:00:06.0 
-0700
@@ -1,22 +1,21 @@
-Build status as of Wed Jan 27 07:00:05 2010
+Build status as of Thu Jan 28 07:00:04 2010
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   19 13 0 
-distcc   0  0  0 
-ldb  28 28 0 
+ccache   29 5  0 
+ldb  29 29 0 
 libreplace   29 12 0 
 lorikeet 0  0  0 
 pidl 0  0  0 
-ppp  1  0  0 
+ppp  13 0  0 
 rsync0  0  0 
 samba-docs   0  0  0 
 samba-web0  0  0 
-samba_3_current 27 26 0 
+samba_3_current 27 27 0 
 samba_3_master 27 26 3 
-samba_3_next 27 25 3 
-samba_4_0_test 28 27 0 
+samba_3_next 27 26 3 
+samba_4_0_test 29 28 0 
 talloc   29 10 0 
-tdb  26 17 0 
+tdb  27 17 0 
 


[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Andrew Tridgell
The branch, master has been updated
   via  28420fe... s4-drs: Reads uSNUrgent and sets Urgent Replication Bit 
for DS_ReplicaSync when necessary
  from  69fd846... Second part of fix for bug #7072 - Accounts can't be 
unlocked from ldap.

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


- Log -
commit 28420fe68aee1e7b70192573ff88a03e44ded563
Author: Fernando J V da Silva fernandojvsi...@yahoo.com.br
Date:   Thu Jan 21 09:20:44 2010 -0200

s4-drs: Reads uSNUrgent and sets Urgent Replication Bit for DS_ReplicaSync 
when necessary

If an urgent replication is necessary, so the uSNUrgent stored is equal to 
the
uSNHighest stored, then when sending the DS_ReplicaSync message it sets the
DRSUAPI_DRS_SYNC_URGENT bit on DRS_OPTIONS.

Signed-off-by: Fernando J V da Silva fernandojvsi...@yahoo.com.br
Signed-off-by: Andrew Tridgell tri...@samba.org

---

Summary of changes:
 source4/dsdb/repl/drepl_notify.c  |   30 +++---
 source4/dsdb/repl/drepl_service.h |1 +
 2 files changed, 24 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/repl/drepl_notify.c b/source4/dsdb/repl/drepl_notify.c
index 4681d5a..dd4c554 100644
--- a/source4/dsdb/repl/drepl_notify.c
+++ b/source4/dsdb/repl/drepl_notify.c
@@ -114,6 +114,10 @@ static void dreplsrv_op_notify_replica_sync_trigger(struct 
tevent_req *req)
DRSUAPI_DRS_UPDATE_NOTIFICATION |
DRSUAPI_DRS_WRIT_REP;
 
+   if (state-op-is_urgent) {
+   r-in.req.req1.options |= DRSUAPI_DRS_SYNC_URGENT;
+   }
+
rreq = dcerpc_drsuapi_DsReplicaSync_send(drsuapi-pipe, r, r);
if (tevent_req_nomem(rreq, req)) {
return;
@@ -269,7 +273,8 @@ static WERROR dreplsrv_schedule_notify_sync(struct 
dreplsrv_service *service,
struct dreplsrv_partition *p,
struct repsFromToBlob *reps,
TALLOC_CTX *mem_ctx,
-   uint64_t uSN)
+   uint64_t uSN,
+   bool is_urgent)
 {
struct dreplsrv_notify_operation *op;
struct dreplsrv_partition_source_dsa *s;
@@ -287,6 +292,7 @@ static WERROR dreplsrv_schedule_notify_sync(struct 
dreplsrv_service *service,
op-service = service;
op-source_dsa  = s;
op-uSN = uSN;
+   op-is_urgent   = is_urgent;
 
DLIST_ADD_END(service-ops.notifies, op, struct 
dreplsrv_notify_operation *);
talloc_steal(service, op);
@@ -304,7 +310,8 @@ static WERROR dreplsrv_notify_check(struct dreplsrv_service 
*s,
uint32_t count=0;
struct repsFromToBlob *reps;
WERROR werr;
-   uint64_t uSN;
+   uint64_t uSNHighest;
+   uint64_t uSNUrgent;
int ret, i;
 
werr = dsdb_loadreps(s-samdb, mem_ctx, p-dn, repsTo, reps, count);
@@ -317,9 +324,9 @@ static WERROR dreplsrv_notify_check(struct dreplsrv_service 
*s,
return werr;
}
 
-   /* loads the partition uSNHighest */
-   ret = dsdb_load_partition_usn(s-samdb, p-dn, uSN, NULL);
-   if (ret != LDB_SUCCESS || uSN == 0) {
+   /* loads the partition uSNHighest and uSNUrgent */
+   ret = dsdb_load_partition_usn(s-samdb, p-dn, uSNHighest, uSNUrgent);
+   if (ret != LDB_SUCCESS || uSNHighest == 0) {
/* nothing to do */
return WERR_OK;
}
@@ -329,10 +336,19 @@ static WERROR dreplsrv_notify_check(struct 
dreplsrv_service *s,
struct dreplsrv_partition_source_dsa *sdsa;
sdsa = dreplsrv_find_source_dsa(p, 
reps[i].ctr.ctr1.source_dsa_obj_guid);
if (sdsa == NULL) continue;
-   if (sdsa-notify_uSN  uSN) {
+   if (sdsa-notify_uSN  uSNHighest) {
/* we need to tell this partner to replicate
   with us */
-   werr = dreplsrv_schedule_notify_sync(s, p, reps[i], 
mem_ctx, uSN);
+
+   /* check if urgent replication is needed */
+   if (sdsa-notify_uSN  uSNUrgent) {
+   werr = dreplsrv_schedule_notify_sync(s, p, 
reps[i], mem_ctx,
+   
uSNHighest, true);
+   } else {
+   werr = dreplsrv_schedule_notify_sync(s, p, 
reps[i], mem_ctx,
+   
uSNHighest, false);
+   }
+
if (!W_ERROR_IS_OK(werr)) {
DEBUG(0,(__location__ : Failed to setup notify 
to %s for 

[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Simo Sorce
The branch, master has been updated
   via  61a4ab3... cleanup: remove trailing spaces and tabs
  from  28420fe... s4-drs: Reads uSNUrgent and sets Urgent Replication Bit 
for DS_ReplicaSync when necessary

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


- Log -
commit 61a4ab36d9b453f597ed61117c63491e676f3d16
Author: Simo Sorce i...@samba.org
Date:   Thu Jan 28 02:05:05 2010 -0500

cleanup: remove trailing spaces and tabs

---

Summary of changes:
 source4/auth/kerberos/krb5_init_context.c |   74 ++--
 1 files changed, 37 insertions(+), 37 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/kerberos/krb5_init_context.c 
b/source4/auth/kerberos/krb5_init_context.c
index 2ca3640..7e75029 100644
--- a/source4/auth/kerberos/krb5_init_context.c
+++ b/source4/auth/kerberos/krb5_init_context.c
@@ -1,4 +1,4 @@
-/* 
+/*
Unix SMB/CIFS implementation.
Wrapper for krb5_init_context
 
@@ -10,12 +10,12 @@
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
-   
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
-   
+
You should have received a copy of the GNU General Public License
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
@@ -41,7 +41,7 @@ struct smb_krb5_socket {
 
NTSTATUS status;
DATA_BLOB request, reply;
-   
+
struct packet_context *packet;
 
size_t partial_read;
@@ -51,7 +51,7 @@ struct smb_krb5_socket {
 
 static krb5_error_code smb_krb5_context_destroy_1(struct smb_krb5_context *ctx)
 {
-   krb5_free_context(ctx-krb5_context); 
+   krb5_free_context(ctx-krb5_context);
return 0;
 }
 
@@ -88,30 +88,30 @@ static void smb_krb5_socket_recv(struct smb_krb5_socket 
*smb_krb5)
talloc_free(tmp_ctx);
return;
}
-   
+
blob = data_blob_talloc(tmp_ctx, NULL, dsize);
if (blob.data == NULL  dsize != 0) {
smb_krb5-status = NT_STATUS_NO_MEMORY;
talloc_free(tmp_ctx);
return;
}
-   
+
smb_krb5-status = socket_recv(smb_krb5-sock, blob.data, blob.length, 
nread);
if (!NT_STATUS_IS_OK(smb_krb5-status)) {
talloc_free(tmp_ctx);
return;
}
blob.length = nread;
-   
+
if (nread == 0) {
smb_krb5-status = NT_STATUS_UNEXPECTED_NETWORK_ERROR;
talloc_free(tmp_ctx);
return;
}
-   
-   DEBUG(2,(Received smb_krb5 packet of length %d\n, 
+
+   DEBUG(2,(Received smb_krb5 packet of length %d\n,
 (int)blob.length));
-   
+
talloc_steal(smb_krb5, blob.data);
smb_krb5-reply = blob;
talloc_free(tmp_ctx);
@@ -130,7 +130,7 @@ static NTSTATUS smb_krb5_full_packet(void *private_data, 
DATA_BLOB data)
 /*
   handle request timeouts
 */
-static void smb_krb5_request_timeout(struct tevent_context *event_ctx, 
+static void smb_krb5_request_timeout(struct tevent_context *event_ctx,
  struct tevent_timer *te, struct timeval t,
  void *private_data)
 {
@@ -153,12 +153,12 @@ static void smb_krb5_socket_send(struct smb_krb5_socket 
*smb_krb5)
NTSTATUS status;
 
size_t len;
-   
+
len = smb_krb5-request.length;
status = socket_send(smb_krb5-sock, smb_krb5-request, len);
 
if (!NT_STATUS_IS_OK(status)) return;
-   
+
TEVENT_FD_READABLE(smb_krb5-fde);
 
TEVENT_FD_NOT_WRITEABLE(smb_krb5-fde);
@@ -232,7 +232,7 @@ krb5_error_code smb_krb5_send_and_recv_func(krb5_context 
context,
return ENOMEM;
}
smb_krb5-hi = hi;
-   
+
switch (a-ai_family) {
case PF_INET:
name = ipv4;
@@ -246,7 +246,7 @@ krb5_error_code smb_krb5_send_and_recv_func(krb5_context 
context,
talloc_free(smb_krb5);
return EINVAL;
}
-   
+
status = NT_STATUS_INVALID_PARAMETER;
switch (hi-proto) {
case KRB5_KRBHST_UDP:
@@ -265,8 +265,8 @@ krb5_error_code smb_krb5_send_and_recv_func(krb5_context 
context,
}
 
talloc_steal(smb_krb5, smb_krb5-sock);
-   
-   remote_addr = socket_address_from_sockaddr(smb_krb5, 
a-ai_addr, a-ai_addrlen); 
+
+   

[SCM] Samba Shared Repository - branch master updated

2010-01-27 Thread Andrew Tridgell
The branch, master has been updated
   via  2fdff7f... s4-ldbtest: fixed python import
   via  882feb3... s4-drs: implementation of some delete test cases
  from  61a4ab3... cleanup: remove trailing spaces and tabs

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


- Log -
commit 2fdff7f596268b53084f3fc15102c9e000966f02
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Jan 28 18:02:39 2010 +1100

s4-ldbtest: fixed python import

commit 882feb39a28c1a130a38c5406bdebd3eaff0d06c
Author: Eduardo Lima eduard...@gmail.com
Date:   Mon Jan 18 15:03:48 2010 -0200

s4-drs: implementation of some delete test cases

Signed-off-by: Andrew Tridgell tri...@samba.org

---

Summary of changes:
 source4/lib/ldb/tests/python/deletetest.py |  200 
 source4/selftest/tests.sh  |1 +
 2 files changed, 201 insertions(+), 0 deletions(-)
 create mode 100755 source4/lib/ldb/tests/python/deletetest.py


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/tests/python/deletetest.py 
b/source4/lib/ldb/tests/python/deletetest.py
new file mode 100755
index 000..3fe28a3
--- /dev/null
+++ b/source4/lib/ldb/tests/python/deletetest.py
@@ -0,0 +1,200 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+
+import getopt
+import optparse
+import sys
+import os
+
+sys.path.append(bin/python)
+sys.path.append(../lib/subunit/python)
+
+import samba.getopt as options
+
+from samba.auth import system_session
+from ldb import SCOPE_BASE, LdbError
+from ldb import ERR_NO_SUCH_OBJECT
+from samba import Ldb
+
+from subunit.run import SubunitTestRunner
+import unittest
+
+parser = optparse.OptionParser(deletetest.py [options] host|file)
+sambaopts = options.SambaOptions(parser)
+parser.add_option_group(sambaopts)
+parser.add_option_group(options.VersionOptions(parser))
+# use command line creds if available
+credopts = options.CredentialsOptions(parser)
+parser.add_option_group(credopts)
+opts, args = parser.parse_args()
+
+if len(args)  1:
+parser.print_usage()
+sys.exit(1)
+
+host = args[0]
+
+lp = sambaopts.get_loadparm()
+creds = credopts.get_credentials(lp)
+
+class BasicDeleteTests(unittest.TestCase):
+
+def delete_force(self, ldb, dn):
+try:
+ldb.delete(dn)
+except LdbError, (num, _):
+self.assertEquals(num, ERR_NO_SUCH_OBJECT)
+
+def GUID_string(self, guid):
+return self.ldb.schema_format_value(objectGUID, guid)
+
+def find_basedn(self, ldb):
+res = ldb.search(base=, expression=, scope=SCOPE_BASE,
+ attrs=[defaultNamingContext])
+self.assertEquals(len(res), 1)
+return res[0][defaultNamingContext][0]
+
+def setUp(self):
+self.ldb = ldb
+self.base_dn = self.find_basedn(ldb)
+
+def search_guid(self,guid):
+print SEARCH by GUID %s % self.GUID_string(guid)
+
+expression = (objectGUID=%s) % self.GUID_string(guid)
+res = ldb.search(expression=expression,
+ controls=[show_deleted:1])
+self.assertEquals(len(res), 1)
+return res[0]
+
+def search_dn(self,dn):
+print SEARCH by DN %s % dn
+
+res = ldb.search(expression=(objectClass=*),
+ base=dn,
+ scope=SCOPE_BASE,
+ controls=[show_deleted:1])
+self.assertEquals(len(res), 1)
+return res[0]
+
+def del_attr_values(self, delObj):
+print Checking attributes for %s % delObj[dn]
+
+self.assertEquals(delObj[isDeleted][0],TRUE)
+self.assertTrue(not(objectCategory in delObj))
+self.assertTrue(not(sAMAccountType in delObj))
+
+def preserved_attributes_list(self, liveObj, delObj):
+print Checking for preserved attributes list
+
+preserved_list = [nTSecurityDescriptor, attributeID, 
attributeSyntax, dNReferenceUpdate, dNSHostName,
+flatName, governsID, groupType, instanceType, 
lDAPDisplayName, legacyExchangeDN,
+isDeleted, isRecycled, lastKnownParent, msDS-LastKnownRDN, 
mS-DS-CreatorSID,
+mSMQOwnerID, nCName, objectClass, distinguishedName, 
objectGUID, objectSid,
+oMSyntax, proxiedObjectName, name, replPropertyMetaData, 
sAMAccountName,
+securityIdentifier, sIDHistory, subClassOf, systemFlags, 
trustPartner, trustDirection,
+trustType, trustAttributes, userAccountControl, uSNChanged, 
uSNCreated, whenCreated]
+
+for a in liveObj:
+if a in preserved_list:
+self.assertTrue(a in delObj)
+
+def check_rdn(self, liveObj, delObj, rdnName):
+print Checking for correct rDN
+rdn=liveObj[rdnName][0]
+rdn2=delObj[rdnName][0]
+name2=delObj[rdnName][0]
+guid=liveObj[objectGUID][0]
+self.assertEquals(rdn2, rdn +