[SCM] Samba Shared Repository - branch master updated

2012-11-01 Thread Andrew Tridgell
The branch, master has been updated
   via  dd60dcf test-chgdcpass: test the ldap case for server password 
change
   via  0e6c5c0 s4-ldapclient: cope with logon failure retry in LDAP
   via  b0cc0d5 s4-librpc: set error code to LOGON_FAILURE on RPC fault 
with access denied
   via  538dd04 samba-tool: drs options does not need a samdb connection
   via  5d6ae34 s4-librpc: try a 2nd logon for more error cases
   via  30ffdda ldb: fixed callers for ldb_pack_data() and ldb_unpack_data()
   via  fc47b0d ldb: move ldb_pack.c into common
   via  e480995 test_chgdpass: use drs bind to test password change on RPC
   via  ed2e69f s4-librpc: use cli_credentials_failed_kerberos_login to 
cope with stale tickets
   via  fce66b2 test_chgdpass: added test for kerberos retry
   via  d4ea637 libcli: use cli_credentials_failed_kerberos_login() to cope 
with server changes
   via  994696c auth: added cli_credentials_failed_kerberos_login()
  from  ffb608b util: remove accidently committed hunk

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


- Log -
commit dd60dcf343bfb8286951d3109055693634574d8b
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Nov 1 14:11:02 2012 +1100

test-chgdcpass: test the ldap case for server password change

use samba-tool drs options which does both RPC and LDAP connections

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User(master): Andrew Tridgell tri...@samba.org
Autobuild-Date(master): Thu Nov  1 07:21:17 CET 2012 on sn-devel-104

commit 0e6c5c036f8faddcc6ca65c26453ffaf248ed2b5
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Nov 1 14:10:14 2012 +1100

s4-ldapclient: cope with logon failure retry in LDAP

similar to what was done for rpc and cifs, we now retry once on logon
failure for ldap, allowing for a new ticket to be fetched when a
server password changes while we have a valid ticket for the old
password

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit b0cc0d5698d34aa7956b22faa8b79bd9b338286d
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Nov 1 13:42:52 2012 +1100

s4-librpc: set error code to LOGON_FAILURE on RPC fault with access denied

this allows the client code to trigger a retry with a new password
callback for NTLM connections

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 538dd046f1efefbeb8660ef1ff5afd594a003341
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Nov 1 13:31:47 2012 +1100

samba-tool: drs options does not need a samdb connection

this gives us a handy pure RPC client test for use in blackbox testing

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 5d6ae3498ad77ccdb7a8b3a316d7aa86c2f0c56a
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Nov 1 13:30:47 2012 +1100

s4-librpc: try a 2nd logon for more error cases

not all servers give LOGON_FAILURE on authentication failures, so we
need to do the retry with a new ticket on a wider range of error types

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 30ffdda45bd3ae602b453c9c1bbdb77ea3de8a8d
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Oct 31 16:06:03 2012 +1100

ldb: fixed callers for ldb_pack_data() and ldb_unpack_data()

with ltdb_pack_data() and ltdb_unpack_data() now moved into common, we
need to increase the minor version and fixup callers of the API

Note that this relies on struct ldb_val being the same shape as
TDB_DATA, in much the same way as we rely on ldb_val and DATA_BLOB
being the same shape.

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit fc47b0d03c577730ce0ef9e09092f80c0712d5d0
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Oct 31 15:39:09 2012 +1100

ldb: move ldb_pack.c into common

this code should not be tied to the ldb_tdb backend, both because it
could be used for any record oriented backend, and because it should
be exposed for use by diagnosis/repair tools such as the recently
added ldbdump tool

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit e48099516e4975cb69c7e2850d3b13b25bab7c44
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Oct 31 18:45:25 2012 +1100

test_chgdpass: use drs bind to test password change on RPC

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit ed2e69fe91fee642392803a17d42d64adc36e41d
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Oct 31 18:44:23 2012 +1100

s4-librpc: use cli_credentials_failed_kerberos_login to cope with stale 
tickets

This allows our RPC client code to cope with a kerberos server
changing password while we have a valid service ticket

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit

[SCM] Samba Shared Repository - branch master updated

2012-08-02 Thread Andrew Tridgell
The branch, master has been updated
   via  02dcf05 heimdal: fixed -Werror=format error in com_err
  from  b93e6ef s3:smbd: add a optional_support helper variable to 
reply_tcon_and_X()

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


- Log -
commit 02dcf059149174beab3528d201fd36e313ba5ee5
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Aug 2 14:59:37 2012 +1000

heimdal: fixed -Werror=format error in com_err

This needs to be merged upstream

Autobuild-User(master): Andrew Tridgell tri...@samba.org
Autobuild-Date(master): Thu Aug  2 08:59:24 CEST 2012 on sn-devel-104

---

Summary of changes:
 source4/heimdal/lib/com_err/error.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/heimdal/lib/com_err/error.c 
b/source4/heimdal/lib/com_err/error.c
index 6864e87..bf046da 100644
--- a/source4/heimdal/lib/com_err/error.c
+++ b/source4/heimdal/lib/com_err/error.c
@@ -65,7 +65,7 @@ com_right_r(struct et_list *list, long code, char *str, 
size_t len)
const char *msg = p-table-msgs[code - p-table-base];
 #ifdef LIBINTL
char domain[12 + 20];
-   snprintf(domain, sizeof(domain), heim_com_err%d, p-table-base);
+   snprintf(domain, sizeof(domain), heim_com_err%ld, p-table-base);
 #endif
strlcpy(str, dgettext(domain, msg), len);
return str;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - annotated tag ldb-1.1.9 created

2012-08-01 Thread Andrew Tridgell
The annotated tag, ldb-1.1.9 has been created
at  51af311500e58096f406c89dd4b9b366295506e4 (tag)
   tagging  b93e6ef5e70bd90a06ae80b209a10456ca461a62 (commit)
  replaces  samba-4.0.0beta5
 tagged by  Andrew Tridgell
on  Thu Aug 2 11:08:43 2012 +1000

- Log -
ldb: tag release ldb-1.1.9
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUAUBnTG0eTkWETCEAlAQLdOgf/WZ/IUt+TZcdrj7uIq66OwKQ3hHaWGb71
c8WzsGGeemNS2BOpO3pvBTlf/wf09LLPvamnl9yIYQ6feQKixcPS7B/M2qW1nj/8
oaT3PAJH+4gZ9S93oLLYoHBm+ru/mlWqZnjZKVzYYhBPiiE6nFek1gxvgnneLstX
+72dGAVzbqe4T/kczDMXNILTPUw+eyDXXMMK6tbjzwLUc9i/D+EcPdljsjwAl/0T
T1zGJptjcwdKh8VCM6xOF50IGoRp2WbDk7O7y24xS3ZC7KT4CuPPcDv0BfbXc/k5
Zmb6eAt8RhUmrenIdXAg8gaQ0IFyvvZY1AFYp1FiTZifDGV+ZoDbZg==
=yz6v
-END PGP SIGNATURE-

Andrew Bartlett (1):
  VERSION: Move on to beta6!

Michael Adam (1):
  s3:ctdbd_conn: use unitX_t types consistently throughout the module

Richard Sharpe (2):
  Make it possible to build under Solaris make as well as FreeBSD and 
Linux. Also add comments on changes that might be needed
  Add two flags to allow for handling of Extended Signatures (Session Key 
Protection) on a TCON_AND_X request and response.

Stefan Metzmacher (22):
  libcli/smb: add smb1cli_session_set_session_key()
  libcli/smb: let smb1cli_session_set_id() reset the application_key
  libcli/smb: allow resetting of the smb1 application_key
  s3:libsmb: make use of smb1cli_session_set_session_key()
  s4:libcli/smb_composite: always use set_user_session_key() helper
  s4:libcli/smb_composite: make use of smb1cli_session_set_session_key()
  libcli/smb: add smbXcli_session_application_key()
  s4:librpc/dcerpc_smb2: make use of smbXcli_session_application_key()
  libcli/smb: remove unused smb2cli_session_application_key()
  s4:librpc/dcerpc_smb: make use of smbXcli_session_application_key()
  s4:librpc/dcerpc_smb2: sync smb2_session_key() with smb_session_key()
  s4:libcli/raw: remove unused smbcli_session-user_session_key
  s3:rpc_client: make use of smbXcli_session_application_key()
  s3:libnet_join: make use of cli_get_session_key() in 
libnet_join_joindomain_rpc()
  s3:utils/net_rpc*: make use of cli_get_session_key()
  s3:libsmb: remove unused cli_state-user_session_key
  s3:rpc_client: rename pipe_auth_data-user_session_key to 
transport_session_key
  libcli/smb: move some TCON related defines to smb_constants.h
  s3:libsmb: add a tcon_flags helper variable
  s3:libsmb: add a optional_support helper variable
  s3:smbd: make use of TCONX_FLAG_DISCONNECT_TID define
  s3:smbd: add a optional_support helper variable to reply_tcon_and_X()

---


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - annotated tag ldb-1.1.8 created

2012-07-09 Thread Andrew Tridgell
The annotated tag, ldb-1.1.8 has been created
at  f70ae07402319317e0bc221cee95f3f150920bdc (tag)
   tagging  7b1fb36ad0df810b8629a4f5d5f069de4466d080 (commit)
  replaces  samba-4.0.0beta3
 tagged by  Andrew Tridgell
on  Mon Jul 9 16:52:54 2012 +1000

- Log -
ldb: tag release ldb-1.1.8
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)

iQEVAwUAT/p/xkeTkWETCEAlAQIkaQgAhZfRtxph+z0w/7n+TxSguopZHg40G0G1
o2uk1HFvzIbZosJLv5s84gpyBgYDsWYOzcANCvO3bjJJln+uAUsqEZ17+/WoqbpH
HVVSbvrr2TuxkrZ5oUnAQgMj+ikpittKzibMIbTs1XdRn1MAp7Dgs8gdbEFor/uT
QwZPuhznZ4NkfawCo1N5rzSoFealDCnFlsdIxoEYGf0mnkfAg6JQLCQJ9ACU2cgP
9/0rLVTmjZlVOQF3Zgre4m+lF4i1FxpaoqKo5RxLeycU9dPehEJMJHygAns/gBlu
Y/apvU7NfKmEAwZRSHmZpT/wBcWUea5pK8khrZNUh56kspPqxJNuwA==
=w7iw
-END PGP SIGNATURE-

Amitay Isaacs (12):
  samba-tool: gpo: Fix policy DN
  samba-tool: gpo: Correct the attribute name from gPlink to gPLink
  samba-tool: gpo: Use gpo (id) instead of gpo_dn (DN)
  samba-tool: Fix indentation
  s4-pysmb: Add deltree() method to remove directory and its contents
  samba-tool: gpo: Add utility functions get_gpo_containers and del_gpo_link
  samba-tool: gpo: Refactor code using utility functions
  samba-tool: gpo: Use utility function dc_url() to set the connection url
  samba-tool: gpo: Add listcontainers subcommand to list containers using 
given GPO
  samba-tool: gpo: Add del subcommand to delete GPO
  samba-tool: gpo: Improve error messages
  samba-tool: gpo: Update copyright

Andreas Schneider (40):
  s3-winbind: Remove obsolte idmap_adex.
  doc: Remove documentation about idmap_adex.
  s3-printing: Remove deprecated lp_printer_admin().
  doc: Remove all references to 'printer admin' option.
  s3-passdb: Remove obsolte ldapsam_compat support.
  doc: Remove documentation for obsolete ldapsam_compat.
  s3-smbd: Remove deprecated 'share modes' option.
  doc: Remove references to deprecated 'share modes' parameter.
  s4-torture: Fix build warnings in lsa test.
  s4-torture: Use test_LookupSids3 function.
  s4-torture: Test LookupSids3 and LookupNames4 only over tcpip.
  s4-torture: Make sure ncacn_np tests are only called over the a pipe.
  s4-torture: Make sure lsa_OpenPolicy fails over TCP/IP.
  s4-torture: Make sure lsa_OpenPolicy2 fails over TCP/IP.
  s4-torture: Test LookupSids3/LookupNames4 over np and tcpip.
  s3-selftest: Run lsa tests over np and tcpip.
  s3-rpc_server: Make it possible to use more rpc exceptions.
  s3-rpc: Return the correct ntstatus depending on the transport.
  s3-lsarpc: Restrict the transport for ncacn_np functions.
  s3-lsarpc: Restrict lsa_LookupSids3 to ncacn_ip_tcp connections.
  s3-lsarpc: Restrict lsa_LookupNames4 to ncacn_ip_tcp connections.
  s3-lsarpc: Enforce a secure connection for LookupSids3 and LookupNames4.
  s4-torture: Add a lsarpc test_LookupSids3_fail function.
  s4-torture: Add a lsarpc test_LookupNames4_fail function.
  s4-torture: Add a lsarpc test_OpenPolicy_fail function.
  s4-torture: Add a lsarpc test_OpenPolicy2_fail function.
  s4-torture: Add a lsarpc test_GetUserName_fail function.
  s4-torture: Don't consider NONE_MAPPED an error in LookupNames4.
  s4-torture: Don't consider NONE_MAPPED an error in LookupSids3.
  s4-torture: Call lsarpc tests over the correct pipe.
  s4-libnet: Skip calling lsarpc functions over a wrong pipe.
  s4-selftest: Don't plan lsa.secrets tests over tcpip.
  s4-selftest: Don't run lsarpc requiring a named pipe over tcpip.
  selftest: Update knownfail list for samba4.rpc.lsalookup.
  s4-lsaprc: Don't call lsa_OpenPolicy2 in lsa_LookupNames4.
  s4-lsarpc: Don't call lsa_OpenPolicy2 in lsa_LookupSids3.
  s4-lsarpc: Restrict LookupNames4 to crypto connections only.
  s4-lsarpc: Restrict LookupSids3 to crypto connections only.
  s4-lsarpc: DCERPC_FAULT_ACCESS_DENIED for np
  s4-lsarpc: DCERPC_FAULT_ACCESS_DENIED for tcp

Andrew Bartlett (18):
  VERSION: Move on to beta4!
  build: Run distcheck in the correct directory
  WHATSNEW: Spell out version, avoid samba4 except to refer to the past
  ldb: bump version due to header and internal implementation changes
  s4-dsdb: Use parent_object_guid to find the correct parent for new objects
  s4-dsdb: Give a much better error message when parentGUID generation fails
  s4-samba-tool: Provide a samba-tool domain dcpromo that upgrades a member 
to a DC
  s4-selftest: Test samba-tool domain dcpromo
  s4-classicupgrade: Demote any other 'BDC' accounts back to a member 
server during upgrade
  pyldb: Fix dn concat operation to be the other way around
  s4-pydsdb: Improve PyErr_LDB_{DN,}_OR_RAISE to use py_check_dcerpc_type
  s4-pydsdb: Add bindings for dsdb_find_nc_root()
  pyldb: Add

[SCM] Samba Shared Repository - branch master updated

2012-04-18 Thread Andrew Tridgell
The branch, master has been updated
   via  c69c07e dbcheck: added fix for incorrect RMD_FLAGS
   via  997a22e dsdb: added SHOW_DELETED to samldb_member_check()
   via  2eb899d replace: added ENOATTR define if undefined
   via  8c9c6f8 s4:dbchecker.py - integrate the objectClass fixing code
   via  a2a9c33 s4:dsdb/pydsdb.c - call the objectClass normalisation 
code from Python
   via  27bcf7a LDB:ldb_tdb/ldb_tdb.c - allow LDB modify replaces with 
different value ordering
   via  9deb650 ldb: added ldb_msg_element_equal_ordered()
  from  010f2b8 Add docs for aio_linux vfs module.

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


- Log -
commit c69c07efeccffec9848e6040b7934ee866b91e7e
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Apr 18 15:46:14 2012 +1000

dbcheck: added fix for incorrect RMD_FLAGS

this fixes the case where a DN link has RMD_FLAGS=0 for a link inside
a deleted object

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Apr 18 09:19:41 CEST 2012 on sn-devel-104

commit 997a22e7bf0711ce209885c408c6dd26391d7e16
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Apr 18 15:45:31 2012 +1000

dsdb: added SHOW_DELETED to samldb_member_check()

when dbcheck is fixing DNs, it will sometimes operated on a deleted DN
link

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 2eb899de6a2bdf1aac1c1f010a6d2b5b02f9de39
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Apr 18 14:35:17 2012 +1000

replace: added ENOATTR define if undefined

this fixes the build of the tdb xattr wrapper code on systems without
xattr headers

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 8c9c6f869d7f6e991806be344f582191d701b77c
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Apr 11 17:18:37 2012 +0200

s4:dbchecker.py - integrate the objectClass fixing code

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

commit a2a9c334c10b259d070a984a61656ae76a95a643
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Apr 11 16:06:03 2012 +0200

s4:dsdb/pydsdb.c - call the objectClass normalisation code from Python

This allows the dbchecker to fix ordering/inconsistency problems with
the mentioned attribute.

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

commit 27bcf7a0b6ab3a4c74129e3952c1bf14b8017b86
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Apr 11 21:09:38 2012 +0200

LDB:ldb_tdb/ldb_tdb.c - allow LDB modify replaces with different value 
ordering

This is essential for fixing up wrong ordered objectClass attributes.

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

commit 9deb650fa2b93338ca91ccc96a940d670d29cbee
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Apr 17 14:01:08 2012 +1000

ldb: added ldb_msg_element_equal_ordered()

this gives us a order sensitive msg element comparison. We need this
to allow dbcheck to fix the order of objectClass attributes.

---

Summary of changes:
 lib/ldb/ABI/{ldb-1.1.5.sigs = ldb-1.1.6.sigs} |1 +
 ...pyldb-util-1.1.2.sigs = pyldb-util-1.1.6.sigs} |0
 lib/ldb/common/ldb_msg.c   |   20 ++
 lib/ldb/include/ldb_module.h   |5 ++
 lib/ldb/ldb_tdb/ldb_tdb.c  |   13 +++-
 lib/ldb/wscript|2 +-
 lib/replace/system/filesys.h   |8 +++
 source4/dsdb/pydsdb.c  |   14 +
 source4/dsdb/samdb/ldb_modules/samldb.c|2 +-
 source4/scripting/python/samba/dbchecker.py|   62 
 10 files changed, 122 insertions(+), 5 deletions(-)
 copy lib/ldb/ABI/{ldb-1.1.5.sigs = ldb-1.1.6.sigs} (99%)
 copy lib/ldb/ABI/{pyldb-util-1.1.2.sigs = pyldb-util-1.1.6.sigs} (100%)


Changeset truncated at 500 lines:

diff --git a/lib/ldb/ABI/ldb-1.1.5.sigs b/lib/ldb/ABI/ldb-1.1.6.sigs
similarity index 99%
copy from lib/ldb/ABI/ldb-1.1.5.sigs
copy to lib/ldb/ABI/ldb-1.1.6.sigs
index cc0f859..f90fa13 100644
--- a/lib/ldb/ABI/ldb-1.1.5.sigs
+++ b/lib/ldb/ABI/ldb-1.1.6.sigs
@@ -157,6 +157,7 @@ ldb_msg_diff: struct ldb_message *(struct ldb_context *, 
struct ldb_message *, s
 ldb_msg_difference: int (struct ldb_context *, TALLOC_CTX *, struct 
ldb_message *, struct ldb_message *, struct ldb_message **)
 ldb_msg_element_compare: int (struct ldb_message_element *, struct 
ldb_message_element *)
 ldb_msg_element_compare_name: int (struct ldb_message_element *, struct 
ldb_message_element *)
+ldb_msg_element_equal_ordered: bool (const struct ldb_message_element *, const 
struct ldb_message_element *)
 ldb_msg_find_attr_as_bool: int (const

[SCM] Samba Shared Repository - branch master updated

2012-02-22 Thread Andrew Tridgell
The branch, master has been updated
   via  0c73322 s3:wscript_build - fix TDB dependency for source3/lib/util.c
   via  ed405df examples/testsmbc.c - substitute deprecated function 
bzero with memset
   via  b2ff4b0 examples/testsmbc.c - quiet implicit cast warnings on 
OpenSolaris
   via  a191852 examples/testsmbc.c - remove unused function print_list_fn
   via  2522712 examples/testsmbc.c - remove unused variables
  from  e673afa s3-vfstest: Return an error code if cmd failed

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


- Log -
commit 0c733221cf122d1bf304d74904b1329b2a6b7fb5
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Feb 20 10:27:45 2012 +0100

s3:wscript_build - fix TDB dependency for source3/lib/util.c

https://bugzilla.samba.org/show_bug.cgi?id=8708

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

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Feb 23 01:43:04 CET 2012 on sn-devel-104

commit ed405df823b9238baf49e3f9b84146eef6ce64ec
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Feb 20 09:27:13 2012 +0100

examples/testsmbc.c - substitute deprecated function bzero with memset

Here we do not make any use of libreplace and hence it would be overkill
to include the right headers for Solaris.

This fixes bug: https://bugzilla.samba.org/show_bug.cgi?id=8767

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

commit b2ff4b06d65f26eed913eb472a6660e7e26f8389
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Feb 20 09:23:30 2012 +0100

examples/testsmbc.c - quiet implicit cast warnings on OpenSolaris

https://bugzilla.samba.org/show_bug.cgi?id=8767

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

commit a19185249a69597c870cd1e366128400c5ebeeb9
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Feb 20 09:18:42 2012 +0100

examples/testsmbc.c - remove unused function print_list_fn

It does not get referenced from anywhere.

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

commit 25227129943420558476799a71a0e27647cf8d86
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Mon Feb 20 09:37:39 2012 +0100

examples/testsmbc.c - remove unused variables

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

---

Summary of changes:
 examples/libsmbclient/testsmbc.c |   26 +-
 source3/wscript_build|4 +---
 2 files changed, 6 insertions(+), 24 deletions(-)


Changeset truncated at 500 lines:

diff --git a/examples/libsmbclient/testsmbc.c b/examples/libsmbclient/testsmbc.c
index de42428..1f98c3a 100644
--- a/examples/libsmbclient/testsmbc.c
+++ b/examples/libsmbclient/testsmbc.c
@@ -29,25 +29,9 @@
 #include libsmbclient.h
 #include get_auth_data_fn.h
 
-int global_id = 0;
-
-void print_list_fn(struct print_job_info *pji)
-{
-
-  fprintf(stdout, Print job: ID: %u, Prio: %u, Size: %lu, User: %s, Name: 
%s\n,
- pji-id,
-  pji-priority,
-  (unsigned long) pji-size,
-  pji-user,
-  pji-name);
-
-  global_id = pji-id;
-
-}
-
 int main(int argc, char *argv[])
 {
-  int err, fd, dh1, dh2, dh3, dsize, dirc;
+  int err, fd, dh1, dsize, dirc;
   const char *file = smb://samba/public/testfile.txt;
   const char *file2 = smb://samba/public/testfile2.txt;
   char buff[256];
@@ -74,7 +58,7 @@ int main(int argc, char *argv[])
 
 }
 
-fprintf(stdout, Directory handles: %u, %u, %u\n, dh1, dh2, dh3);
+fprintf(stdout, Directory handle: %u\n, dh1);
 
 /* Now, list those directories, but in funny ways ... */
 
@@ -130,7 +114,7 @@ int main(int argc, char *argv[])
 
   /* Now, write some date to the file ... */
 
-  bzero(buff, sizeof(buff));
+  memset(buff, '\0', sizeof(buff));
   strcpy(buff, Some test data for the moment ...);
 
   err = smbc_write(fd, buff, sizeof(buff));
@@ -256,10 +240,10 @@ int main(int argc, char *argv[])
   }
 
   fprintf(stdout, Stat'ed file:   %s. Size = %d, mode = %04X\n, file2, 
- (int)st2.st_size, st2.st_mode);
+ (int)st2.st_size, (unsigned int)st2.st_mode);
   fprintf(stdout, time: %s\n, ctime(st2.st_atime));
   fprintf(stdout, Earlier stat:   %s, Size = %d, mode = %04X\n, file, 
- (int)st1.st_size, st1.st_mode);
+ (int)st1.st_size, (unsigned int)st1.st_mode);
   fprintf(stdout, time: %s\n, ctime(st1.st_atime));
 
   /* Now, make a directory ... */
diff --git a/source3/wscript_build b/source3/wscript_build
index 67b686b..b24090e 100755
--- a/source3/wscript_build
+++ b/source3/wscript_build
@@ -811,7 +811,7 @@ bld.SAMBA3_SUBSYSTEM('KRBCLIENT',
 
 bld.SAMBA3_SUBSYSTEM('samba3util',
source=LIB_UTIL_SRC,
-   deps='ndr security NDR_SECURITY samba-util',
+   deps='ndr security

[SCM] Samba Shared Repository - branch master updated

2012-02-07 Thread Andrew Tridgell
The branch, master has been updated
   via  75628e6 pidl: add more mapped types
   via  a9e2b62 idl: wmi and dcom don't need python bindings
  from  f8ef240 samba-tool sites: Re-add support for option groups

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


- Log -
commit 75628e693aa6fad6d247d6ac774de03c52c33d90
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Feb 8 13:01:32 2012 +1100

pidl: add more mapped types

when we #define one type to another, we need special handling in the
python generator

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Feb  8 04:50:06 CET 2012 on sn-devel-104

commit a9e2b620ca5f00c1cb1d4274ed57a5f6c93b7102
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Feb 8 13:00:29 2012 +1100

idl: wmi and dcom don't need python bindings

the python generation for these IDL files is currently broken

---

Summary of changes:
 librpc/idl/wscript_build |2 +-
 pidl/lib/Parse/Pidl/Samba4/Python.pm |8 +++-
 2 files changed, 8 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/wscript_build b/librpc/idl/wscript_build
index d2112b4..c90edf1 100644
--- a/librpc/idl/wscript_build
+++ b/librpc/idl/wscript_build
@@ -18,7 +18,7 @@ bld.SAMBA_PIDL_LIST('PIDL',
 
 bld.SAMBA_PIDL_LIST('PIDL',
 'wmi.idl dcom.idl',
-options='--header --ndr-parser --server --client --python 
--dcom-proxy --com-header',
+options='--header --ndr-parser --server --client 
--dcom-proxy --com-header',
 output_dir='../gen_ndr')
 
 bld.SAMBA_PIDL_LIST('PIDL',
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm 
b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 63f41a1..39884ab 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -826,9 +826,15 @@ sub use_type_variable($$)
my ($self, $orig_ctype) = @_;
# FIXME: Have a global lookup table for types that look different on 
the 
# wire than they are named in C?
-   if ($orig_ctype-{NAME} eq dom_sid2 or $orig_ctype-{NAME} eq 
dom_sid28) {
+   if ($orig_ctype-{NAME} eq dom_sid2 or
+   $orig_ctype-{NAME} eq dom_sid28 or
+   $orig_ctype-{NAME} eq dom_sid0) {
$orig_ctype-{NAME} = dom_sid;
}
+   if ($orig_ctype-{NAME} eq spoolss_security_descriptor) {
+   $orig_ctype-{NAME} = security_descriptor;
+   }
+
my $ctype = resolveType($orig_ctype);
unless (defined($ctype-{BASEFILE})) {
return undef;


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-02-01 Thread Andrew Tridgell
The branch, master has been updated
   via  0fdd6c7 build: fixed a link order problem
  from  e3dac4b replace: Only add bsd dependency when bsd library was found.

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


- Log -
commit 0fdd6c7632a070fc3f6251f44c520fa324155a7d
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Feb 2 12:36:44 2012 +1100

build: fixed a link order problem

this fixes a problem found by obnox where the -L path for CUPS was put
before the path to internal libraries. The install path for CUPS
happened to be the same as for a old system libtevent, which meant we
linked against the old tevent instead of the correct one from our
private library paths.

The problem was that we were adding the -L paths directly to the
ldflags. The waf core code (in ccroot.py) only adds more paths if they
are not there already. So by adding it in ldflags it was not added at
the end of the list. The fix is just to not do the -L processing in
wafsamba and let the waf core do it in the right order

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Feb  2 06:54:42 CET 2012 on sn-devel-104

---

Summary of changes:
 buildtools/wafsamba/samba_autoconf.py |4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_autoconf.py 
b/buildtools/wafsamba/samba_autoconf.py
index 1ea818e..6ed719a 100644
--- a/buildtools/wafsamba/samba_autoconf.py
+++ b/buildtools/wafsamba/samba_autoconf.py
@@ -471,7 +471,9 @@ def library_flags(self, libs):
 inc_path = getattr(self.env, 'CPPPATH_%s' % lib.upper(), [])
 lib_path = getattr(self.env, 'LIBPATH_%s' % lib.upper(), [])
 ccflags.extend(['-I%s' % i for i in inc_path])
-ldflags.extend(['-L%s' % l for l in lib_path])
+# note that we do not add the -L in here, as that is added by the waf
+# core. Adding it here would just change the order that it is put on 
the link line
+# which can cause system paths to be added before internal libraries
 extra_ccflags = TO_LIST(getattr(self.env, 'CCFLAGS_%s' % lib.upper(), 
[]))
 extra_ldflags = TO_LIST(getattr(self.env, 'LDFLAGS_%s' % lib.upper(), 
[]))
 ccflags.extend(extra_ccflags)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-01-31 Thread Andrew Tridgell
The branch, master has been updated
   via  42d4152 s4-heimdal: the ASN1 compiler now depends on libreplace
  from  9336658 s3-auth Remove unused nt_status_squash from auth_context

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


- Log -
commit 42d4152ed4255f22ff0718d450f181468d7fb827
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Feb 1 12:54:31 2012 +1100

s4-heimdal: the ASN1 compiler now depends on libreplace

it uses strlcat(), which we now get from libbsd if available

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Feb  1 05:51:56 CET 2012 on sn-devel-104

---

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


Changeset truncated at 500 lines:

diff --git a/source4/heimdal_build/wscript_build 
b/source4/heimdal_build/wscript_build
index 948191f..8d62f21 100644
--- a/source4/heimdal_build/wscript_build
+++ b/source4/heimdal_build/wscript_build
@@ -921,7 +921,7 @@ if not bld.CONFIG_SET('USING_SYSTEM_ASN1_COMPILE'):
 cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1 
-D_SAMBA_HOSTCC_',
 includes='../heimdal/lib/asn1',
 group='build_compilers',
-deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC',
+deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC replace',
 install=False
 )
 bld.env['ASN1_COMPILE'] = os.path.join(bld.env['BUILD_DIRECTORY'], 
'asn1_compile')
@@ -935,7 +935,7 @@ if not bld.CONFIG_SET('USING_SYSTEM_COMPILE_ET'):
 includes='../heimdal/lib/com_err',
 group='build_compilers',
 cflags='-DSOCKET_WRAPPER_DISABLE=1 -DNSS_WRAPPER_DISABLE=1 
-D_SAMBA_HOSTCC_',
-deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC',
+deps='ROKEN_HOSTCC LIBREPLACE_HOSTCC HEIMDAL_VERS_HOSTCC replace',
 install=False
 )
 bld.env['COMPILE_ET'] = os.path.join(bld.env['BUILD_DIRECTORY'], 
'compile_et')


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-01-31 Thread Andrew Tridgell
The branch, master has been updated
   via  204c075 Revert s4-drs: do not try to contact for replication 
servers that are not anymore in reps*
  from  42d4152 s4-heimdal: the ASN1 compiler now depends on libreplace

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


- Log -
commit 204c07501d05f3d7e4657ce4422709ad64e087e2
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Feb 1 16:14:08 2012 +1100

Revert s4-drs: do not try to contact for replication servers that are not 
anymore in reps*

This reverts commit 5bfd6251eb22ff701184a95649822a73cf4d157b.

This change has been causing regular segfaults in the build farm since
it was applied. I also think it may be unnecessary as
dreplsrv_refresh_partitions() should already be achieving the same
thing (removing stale replication targets).

I think the segfaults were caused by freeing an in-flight DSA, but I
have been unable to reproduce it outside of the build farm

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Feb  1 07:49:42 CET 2012 on sn-devel-104

---

Summary of changes:
 source4/dsdb/repl/drepl_partitions.c |   42 +++--
 1 files changed, 4 insertions(+), 38 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/repl/drepl_partitions.c 
b/source4/dsdb/repl/drepl_partitions.c
index de5d007..07f3339 100644
--- a/source4/dsdb/repl/drepl_partitions.c
+++ b/source4/dsdb/repl/drepl_partitions.c
@@ -376,7 +376,6 @@ static WERROR dreplsrv_partition_add_source_dsa(struct 
dreplsrv_service *s,
struct dreplsrv_partition *p,
struct 
dreplsrv_partition_source_dsa **listp,
struct 
dreplsrv_partition_source_dsa *check_list,
-   struct 
dreplsrv_partition_source_dsa **oldlist,
const struct ldb_val *val)
 {
WERROR status;
@@ -414,16 +413,14 @@ static WERROR dreplsrv_partition_add_source_dsa(struct 
dreplsrv_service *s,
}
 
/* re-use an existing source if found */
-   for (s2=*oldlist; s2; s2=s2-next) {
+   for (s2=*listp; s2; s2=s2-next) {
if (GUID_compare(s2-repsFrom1-source_dsa_obj_guid, 
 source-repsFrom1-source_dsa_obj_guid) == 0) 
{
talloc_free(s2-repsFrom1-other_info);
*s2-repsFrom1 = *source-repsFrom1;
talloc_steal(s2, s2-repsFrom1-other_info);
talloc_free(source);
-   source = s2;
-   DLIST_REMOVE(*oldlist, s2);
-   break;
+   return WERR_OK;
}
}
 
@@ -569,7 +566,6 @@ static WERROR dreplsrv_refresh_partition(struct 
dreplsrv_service *s,
NULL
};
struct ldb_dn *dn;
-   struct dreplsrv_partition_source_dsa *src, *oldsources, *oldnotifies;
 
DEBUG(4, (dreplsrv_refresh_partition(%s)\n,
ldb_dn_get_linearized(p-dn)));
@@ -611,52 +607,22 @@ static WERROR dreplsrv_refresh_partition(struct 
dreplsrv_service *s,
 
status = WERR_OK;
 
-   oldsources = p-sources;
-   p-sources = NULL;
if (r != NULL  (orf_el = ldb_msg_find_element(r-msgs[0], 
repsFrom))) {
for (i=0; i  orf_el-num_values; i++) {
status = dreplsrv_partition_add_source_dsa(s, p, 
p-sources,
-  NULL, 
oldsources,
-  
orf_el-values[i]);
+  NULL, 
orf_el-values[i]);
W_ERROR_NOT_OK_GOTO_DONE(status);
}
-   } else {
-   if (r != NULL  p-sources) {
-   DEBUG(0, (repsFrom do not exists or is empty\n));
-   }
}
 
-   oldnotifies = p-notifies;
-   p-notifies = NULL;
if (r != NULL  (orf_el = ldb_msg_find_element(r-msgs[0], repsTo))) 
{
for (i=0; i  orf_el-num_values; i++) {
status = dreplsrv_partition_add_source_dsa(s, p, 
p-notifies,
-  p-sources,
-  oldnotifies,
-  
orf_el-values[i]);
+  p-sources, 
orf_el-values[i]);
W_ERROR_NOT_OK_GOTO_DONE(status);
}
}
 
-   if (oldsources

[SCM] Samba Shared Repository - branch master updated

2012-01-24 Thread Andrew Tridgell
The branch, master has been updated
   via  34e7d96 ldbedit: prevent a transaction warning on failure
  from  ab5cdb3 Revert s3:build: for now do not require 
gsskrb5_extract_authz_data_from_sec_context

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


- Log -
commit 34e7d960d0065a51b5524630a6699834c9b362b1
Author: Kelly Yeoh ky...@au1.ibm.com
Date:   Wed Jan 25 14:58:44 2012 +1100

ldbedit: prevent a transaction warning on failure

if a modify fails then cancel the transaction to prevent a dangling
transaction error

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

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Jan 25 07:06:40 CET 2012 on sn-devel-104

---

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


Changeset truncated at 500 lines:

diff --git a/lib/ldb/tools/ldbedit.c b/lib/ldb/tools/ldbedit.c
index aaf6d80..cf4ab3f 100644
--- a/lib/ldb/tools/ldbedit.c
+++ b/lib/ldb/tools/ldbedit.c
@@ -152,6 +152,7 @@ static int merge_edits(struct ldb_context *ldb,
if (ret != -1) {
modifies += (unsigned int) ret;
} else {
+   ldb_transaction_cancel(ldb);
return -1;
}
}


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-01-13 Thread Andrew Tridgell
The branch, master has been updated
   via  ab1f896 KCC importldif/exportldif and intersite topology
   via  aff8dad Intersite KCC flags for python
   via  11e2c84 Intersite KCC flags
  from  b8a8870 idl: add to_null property

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


- Log -
commit ab1f896c5152dfd10609ac146eaaecd1bd2d5b70
Author: Dave Craft wimber...@gmail.com
Date:   Wed Jan 11 08:11:35 2012 -0600

KCC importldif/exportldif and intersite topology

Add options for extracting an LDIF file from a database
and reimporting the LDIF into a schema-less database for
subsequent topology test/debug.  Add intersite topology
generation with computation of ISTG and bridgehead servers

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

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Sat Jan 14 07:45:11 CET 2012 on sn-devel-104

commit aff8dad076f803e6deb2c5b59fa3bc5cb7ca7bd7
Author: Dave Craft wimber...@gmail.com
Date:   Wed Jan 11 08:10:27 2012 -0600

Intersite KCC flags for python

Add NTDSSITELINK options to dsdb class for use
in python samba_kcc

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

commit 11e2c8493f08214c290fec87dac18ad23de234bf
Author: Dave Craft wimber...@gmail.com
Date:   Wed Jan 11 08:08:52 2012 -0600

Intersite KCC flags

NTDSSITELINK option flags added

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

---

Summary of changes:
 libds/common/flags.h|5 +
 source4/dsdb/pydsdb.c   |5 +
 source4/scripting/bin/samba_kcc | 1629 ---
 source4/scripting/python/samba/kcc_utils.py | 1176 
 4 files changed, 2439 insertions(+), 376 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libds/common/flags.h b/libds/common/flags.h
index c25a9e9..96709af 100644
--- a/libds/common/flags.h
+++ b/libds/common/flags.h
@@ -268,3 +268,8 @@
 #define NTDSCONN_OPT_DISABLE_INTERSITE_COMPRESSION 0x0010
 #define NTDSCONN_OPT_USER_OWNED_SCHEDULE   0x0020
 #define NTDSCONN_OPT_RODC_TOPOLOGY 0x0040
+
+/* 7.1.1.2.2.3.3  Site Link Object options flags */
+#define NTDSSITELINK_OPT_USE_NOTIFY 0x0001
+#define NTDSSITELINK_OPT_TWOWAY_SYNC0x0002
+#define NTDSSITELINK_OPT_DISABLE_COMPRESSION0x0004
diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c
index f9896c0..616e169 100644
--- a/source4/dsdb/pydsdb.c
+++ b/source4/dsdb/pydsdb.c
@@ -1186,6 +1186,11 @@ void initdsdb(void)
 ADD_DSDB_FLAG(NTDSCONN_OPT_USER_OWNED_SCHEDULE);
 ADD_DSDB_FLAG(NTDSCONN_OPT_RODC_TOPOLOGY);
 
+/* Site Link Object options */
+ADD_DSDB_FLAG(NTDSSITELINK_OPT_USE_NOTIFY);
+ADD_DSDB_FLAG(NTDSSITELINK_OPT_TWOWAY_SYNC);
+ADD_DSDB_FLAG(NTDSSITELINK_OPT_DISABLE_COMPRESSION);
+
/* GPO policy flags */
ADD_DSDB_FLAG(GPLINK_OPT_DISABLE);
ADD_DSDB_FLAG(GPLINK_OPT_ENFORCE);
diff --git a/source4/scripting/bin/samba_kcc b/source4/scripting/bin/samba_kcc
index c17439e..583d88f 100755
--- a/source4/scripting/bin/samba_kcc
+++ b/source4/scripting/bin/samba_kcc
@@ -18,6 +18,7 @@
 # along with this program.  If not, see http://www.gnu.org/licenses/.
 
 import os
+import tempfile
 import sys
 import random
 import copy
@@ -35,11 +36,15 @@ os.environ[TZ] = GMT
 # Find right directory when running from source tree
 sys.path.insert(0, bin/python)
 
-import samba, ldb
 import optparse
 import logging
 
-from samba   import getopt as options
+from samba   import (getopt as options,   \
+ Ldb, \
+ ldb, \
+ dsdb,\
+ param,   \
+ read_and_sub_file)
 from samba.auth  import system_session
 from samba.samdb import SamDB
 from samba.dcerpcimport drsuapi
@@ -47,19 +52,25 @@ from samba.kcc_utils import *
 
 class KCC:
 The Knowledge Consistency Checker class.  A container for
-   objects and methods allowing a run of the KCC.  Produces
-   a set of connections in the samdb for which the Distributed
-   Replication Service can then utilize to replicate naming
-   contexts
+objects and methods allowing a run of the KCC.  Produces
+a set of connections in the samdb for which the Distributed
+Replication Service can then utilize to replicate naming
+contexts
 
-def __init__(self, samdb):
+def __init__(self):
 Initializes the partitions class which can hold
-   our local DCs partitions or all the partitions in
-   the forest

[SCM] Samba Shared Repository - branch master updated

2011-12-07 Thread Andrew Tridgell
The branch, master has been updated
   via  86338ab dbcheck: cope with objects disappearing during checking
   via  819f112 samba_kcc NTDSConnection translation
   via  0a4746a Invocation of samba_kcc from KCC task
   via  0a18121 Add subreq and status to kcc_service struct
   via  b58cb7e Add DRSUAPI_DRS_UPDATE_(x) flags
   via  bc03cba Add NTDSConnection schedule attr blob
   via  a3613b0 Add samba_kcc load parameter
  from  fbfd155 Add version attribute for pytevent.

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


- Log -
commit 86338ab551baf7c5dc4f63a1a103880e886acf69
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Dec 8 11:47:59 2011 +1100

dbcheck: cope with objects disappearing during checking

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Dec  8 03:23:49 CET 2011 on sn-devel-104

commit 819f11285d12041f2a22a6c92ebabb8a559886c5
Author: Dave Craft wimber...@gmail.com
Date:   Sun Dec 4 11:08:56 2011 -0600

samba_kcc NTDSConnection translation

This is an advancement of samba_kcc to compute and
commit the modification of a repsFrom on an NC Replica.
The repsFrom is computed according to the MS tech spec
for implied replicas of NTDSConnections.  Proper maintenance
of (DRS options, schedules, etc) from a NTDSConnection are now
all present.  New classes for inter-site transports, sites,
and repsFrom) are now present in kcc_utils.py.  Substantively
this gets intra-site topology generation functional by committing
the repsFrom that were computed from the DSA graph implemented in
prior drops of samba_kcc

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

commit 0a4746a20085a21bd8f28faf13bc5168f3ad5afb
Author: Dave Craft wimber...@gmail.com
Date:   Sun Dec 4 11:06:47 2011 -0600

Invocation of samba_kcc from KCC task

Modification to periodic and explicit invocation
paths of the KCC topology generation code.  Managed
via samba_runcmd_send() API.  The samba_kcc script
is invoked if (kccsrv:samba_kcc = true) appears in smb.conf

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

commit 0a181217bdf7e59a7e1f5506c8e050f67537f7f1
Author: Dave Craft wimber...@gmail.com
Date:   Sun Dec 4 11:04:49 2011 -0600

Add subreq and status to kcc_service struct

The subreq and status fields in the kcc_service struct
are added for execution management of the external samba_kcc
python script.

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

commit b58cb7ea932068982233e49c6e03be6a631f80da
Author: Dave Craft wimber...@gmail.com
Date:   Sun Dec 4 11:01:54 2011 -0600

Add DRSUAPI_DRS_UPDATE_(x) flags

DRSUAPI_DRS_UPDATE flags are used in
DRS_MSG_REPMOD_V1 message structure when repsFrom
is modified via RPC.  The RPCs are currently uncoded but
samba_kcc maintains the flags (and uses them to identify
what repsFrom changes are to be executed).  These are currently
helpful to samba_kcc and are intended to ultimately be used in
RPCs.

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

commit bc03cba552b512ef436ff7da3bd0820c6341d783
Author: Dave Craft wimber...@gmail.com
Date:   Sun Dec 4 11:00:31 2011 -0600

Add NTDSConnection schedule attr blob

Add schedule blob to drsblobs to allow
NDR unpacking into a python class.

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

commit a3613b05339ea305edfdc54a02ca65506f48c356
Author: Dave Craft wimber...@gmail.com
Date:   Sun Dec 4 10:58:16 2011 -0600

Add samba_kcc load parameter

Configures parameter to enumerate name of python KCC
topology generator for subsequent use by samba_runcmd_send()
invocation from kcc task

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

---

Summary of changes:
 lib/param/loadparm.c |   11 +
 librpc/idl/drsblobs.idl  |   20 +
 librpc/idl/drsuapi.idl   |7 +
 source4/dsdb/kcc/kcc_periodic.c  |   72 ++-
 source4/dsdb/kcc/kcc_service.c   |   36 +-
 source4/dsdb/kcc/kcc_service.h   |   11 +-
 source4/dsdb/wscript_build   |2 +-
 source4/scripting/bin/samba_kcc  |  720 +---
 source4/scripting/python/samba/dbchecker.py  |   20 +-
 source4/scripting/python/samba/kcc_utils.py  |  790 +++---
 source4/scripting/python/samba/netcmd/dbcheck.py |2 +-
 11 files changed, 1444 insertions(+), 247 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index 9abd11f..48b5221 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -1208,6 +1208,14 @@ static struct parm_struct parm_table

[SCM] Samba Shared Repository - branch master updated

2011-11-30 Thread Andrew Tridgell
The branch, master has been updated
   via  3c4af39 s4-ntvfs: added allow_override check based on use of NT ACL
   via  d1274f7 s4-ntvfs: fixed a unix ACL mapping bug
  from  503aeab selftest: Fix typo in socket wrapper test.

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


- Log -
commit 3c4af39aa506a25fc6d6753dbe34e4e1c0dd0b43
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Dec 1 13:40:49 2011 +1100

s4-ntvfs: added allow_override check based on use of NT ACL

This disables the posix permission override if the calculated
permissions did not come from a NT ACL.

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Dec  1 05:14:49 CET 2011 on sn-devel-104

commit d1274f7f6236b47a1c6aa1737b054ed521d31b67
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Dec 1 12:59:23 2011 +1100

s4-ntvfs: fixed a unix ACL mapping bug

the ACL mapping code was incorrectly allowing creation of directories
in some situations where it should be denied by the unix permissions

---

Summary of changes:
 source4/ntvfs/posix/pvfs_acl.c |   60 
 source4/ntvfs/posix/pvfs_mkdir.c   |   12 +++---
 source4/ntvfs/posix/pvfs_open.c|   16 
 source4/ntvfs/posix/pvfs_rename.c  |5 ++-
 source4/ntvfs/posix/pvfs_resolve.c |3 ++
 source4/ntvfs/posix/pvfs_setfileinfo.c |4 +-
 source4/ntvfs/posix/pvfs_sys.c |   28 +++---
 source4/ntvfs/posix/pvfs_unlink.c  |2 +-
 source4/ntvfs/posix/pvfs_util.c|   15 
 source4/ntvfs/posix/vfs_posix.h|1 +
 10 files changed, 84 insertions(+), 62 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/ntvfs/posix/pvfs_acl.c b/source4/ntvfs/posix/pvfs_acl.c
index d040537..810dcdd 100644
--- a/source4/ntvfs/posix/pvfs_acl.c
+++ b/source4/ntvfs/posix/pvfs_acl.c
@@ -508,32 +508,36 @@ static NTSTATUS pvfs_access_check_unix(struct pvfs_state 
*pvfs,
   uint32_t *access_mask)
 {
uid_t uid = geteuid();
-   uint32_t max_bits = SEC_RIGHTS_FILE_READ | SEC_FILE_ALL;
+   uint32_t max_bits = 0;
struct security_token *token = req-session_info-security_token;
 
if (pvfs_read_only(pvfs, *access_mask)) {
return NT_STATUS_ACCESS_DENIED;
}
 
-   if (name == NULL || uid == name-st.st_uid) {
-   max_bits |= SEC_STD_ALL;
-   } else if (security_token_has_privilege(token, SEC_PRIV_RESTORE)) {
-   max_bits |= SEC_STD_DELETE;
-   }
-
-   if (name == NULL ||
-   (name-st.st_mode  S_IWOTH) ||
-   ((name-st.st_mode  S_IWGRP)  
-pvfs_group_member(pvfs, name-st.st_gid))) {
-   max_bits |= SEC_STD_ALL;
-   }
-
-   if (uwrap_enabled()) {
-   /* when running with the uid wrapper, files will be created
-  owned by the ruid, but we may have a different simulated 
-  euid. We need to force the permission bits as though the 
-  files owner matches the euid */
-   max_bits |= SEC_STD_ALL;
+   if (name == NULL) {
+   max_bits |= SEC_RIGHTS_FILE_ALL | SEC_STD_ALL;
+   } else if (uid == name-st.st_uid || uwrap_enabled()) {
+   /* use the IxUSR bits */
+   if ((name-st.st_mode  S_IWUSR)) {
+   max_bits |= SEC_RIGHTS_FILE_ALL | SEC_STD_ALL;
+   } else if ((name-st.st_mode  (S_IRUSR | S_IXUSR))) {
+   max_bits |= SEC_RIGHTS_FILE_READ | 
SEC_RIGHTS_FILE_EXECUTE | SEC_STD_ALL;
+   }
+   } else if (pvfs_group_member(pvfs, name-st.st_gid)) {
+   /* use the IxGRP bits */
+   if ((name-st.st_mode  S_IWGRP)) {
+   max_bits |= SEC_RIGHTS_FILE_ALL | SEC_STD_ALL;
+   } else if ((name-st.st_mode  (S_IRGRP | S_IXGRP))) {
+   max_bits |= SEC_RIGHTS_FILE_READ | 
SEC_RIGHTS_FILE_EXECUTE | SEC_STD_ALL;
+   }
+   } else {
+   /* use the IxOTH bits */
+   if ((name-st.st_mode  S_IWOTH)) {
+   max_bits |= SEC_RIGHTS_FILE_ALL | SEC_STD_ALL;
+   } else if ((name-st.st_mode  (S_IROTH | S_IXOTH))) {
+   max_bits |= SEC_RIGHTS_FILE_READ | 
SEC_RIGHTS_FILE_EXECUTE | SEC_STD_ALL;
+   }
}
 
if (*access_mask  SEC_FLAG_MAXIMUM_ALLOWED) {
@@ -556,7 +560,7 @@ static NTSTATUS pvfs_access_check_unix(struct pvfs_state 
*pvfs,
}
 
if (*access_mask  ~max_bits) {
-   DEBUG(0,(__location__  denied access to '%s' - wanted 0x%08x 
but got 0x%08x (missing 0x%08x)\n,
+   DEBUG(5,(__location__  denied access to '%s' - wanted 0x%08x 
but got 0x%08x

[SCM] Samba Shared Repository - branch master updated

2011-11-21 Thread Andrew Tridgell
The branch, master has been updated
   via  b16f539 s4-dns: added --no-credentials option to samba_dnsupdate
  from  3e6e1ae Fix a bunch of warning: variable ‘’ set but not used 
[-Wunused-but-set-variable] warnings from the new gcc.

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


- Log -
commit b16f539e0eb014591a3cf8f5e9a330999e53d96a
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Nov 22 14:58:29 2011 +1100

s4-dns: added --no-credentials option to samba_dnsupdate

this is for a user who is doing DNS updates via key files rather than
GSSAPI. This allows the update to go through without a kerberos error

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Tue Nov 22 06:34:59 CET 2011 on sn-devel-104

---

Summary of changes:
 source4/scripting/bin/samba_dnsupdate |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/bin/samba_dnsupdate 
b/source4/scripting/bin/samba_dnsupdate
index d6751b0..aa307ee 100755
--- a/source4/scripting/bin/samba_dnsupdate
+++ b/source4/scripting/bin/samba_dnsupdate
@@ -63,6 +63,7 @@ parser.add_option(--all-interfaces, action=store_true)
 parser.add_option(--use-file, type=string, help=Use a file, rather than 
real DNS calls)
 parser.add_option(--update-list, type=string, help=Add DNS names from the 
given file)
 parser.add_option(--fail-immediately, action='store_true', help=Exit on 
first failure)
+parser.add_option(--no-credentials, dest='nocreds', action='store_true', 
help=don't try and get credentials)
 
 creds = None
 ccachename = None
@@ -308,11 +309,16 @@ def call_nsupdate(d):
 f.close()
 
 global error_count
-os.environ[KRB5CCNAME] = ccachename
+if ccachename:
+os.environ[KRB5CCNAME] = ccachename
 try:
 cmd = nsupdate_cmd[:]
 cmd.append(tmpfile)
-ret = subprocess.call(cmd, shell=False, env={KRB5CCNAME: ccachename})
+if ccachename:
+env = {KRB5CCNAME: ccachename}
+else:
+env = {}
+ret = subprocess.call(cmd, shell=False, env=env)
 if ret != 0:
 if opts.fail_immediately:
 if opts.verbose:
@@ -471,7 +477,8 @@ if len(update_list) == 0:
 sys.exit(0)
 
 # get our krb5 creds
-get_credentials(lp)
+if not opts.nocreds:
+get_credentials(lp)
 
 # ask nsupdate to add entries as needed
 for d in update_list:


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-11-09 Thread Andrew Tridgell
The branch, master has been updated
   via  7d84805 s4: samba-tool time --help documentation improvements
   via  4ea6225 s4: samba-tool group --help documentation improvements
   via  ba41389 test: fixed several tests to use samba.tests
   via  862823a samba-tool: print samaccountname in samba-tool user list
   via  3935676 test: use planpythontestsuite() for ldb.python test
   via  b0be72d test: added directory option to planpythontestsuite()
   via  ac0bba2 test: added -D option to subunitrun
   via  333248f pyldb: fixed ldb API test
   via  a04eac7 build: only run symbol checking if running all tests
   via  58457e6 pyldb: enhanced get() method on msg object
   via  1cef321 samba-tool: Added new user disable command
   via  34ff5d2 samba-tool: Added user list command
   via  da21ff8 samba-tool: Change internal argument name in domain 
machinepassword
   via  53fc437 samba-tool: Fix domain machinepassword secret db search
   via  ec5afae samba-tool: Fix domain machinepassword name search
   via  46723aa s4-test: improved error checking in samba-tool time test
   via  a7c1add s4-socket: detect NULL server in socket connection code
   via  e118d91 test: enable time and user samba-tool tests
   via  a818253 test: add samba-tool user tests
   via  a66eae9 test: Add samba-tool time tests
   via  559835d test: add directory and base class for samba-tool tests
  from  ca52871 s4-setup Remove servicePrincipalName: DNS/${DNSDOMAIN} from 
new installations

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


- Log -
commit 7d84805ac06522dabeb4f8d5b69dab2918a508ba
Author: Theresa Halloran thall...@linux.vnet.ibm.com
Date:   Wed Nov 9 20:16:33 2011 -0500

s4: samba-tool time --help documentation improvements

Signed-off-by: Theresa Halloran thall...@linux.vnet.ibm.com

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

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Nov 10 06:04:22 CET 2011 on sn-devel-104

commit 4ea6225c58108c4f4d45a30857b1cc1e3423c298
Author: Theresa Halloran thall...@linux.vnet.ibm.com
Date:   Wed Nov 9 16:33:37 2011 -0500

s4: samba-tool group --help documentation improvements

Signed-off-by: Theresa Halloran thall...@linux.vnet.ibm.com

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

commit ba41389d3d0860079b1276fb32f1d0d989f2471f
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Nov 9 13:28:02 2011 +1100

test: fixed several tests to use samba.tests

this fixes error checking. Test failures were not being detected
otherwise

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit 862823a7764c692282dec7a93e7d37feeb924eef
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Nov 9 13:27:20 2011 +1100

samba-tool: print samaccountname in samba-tool user list

this is the attribute the admin needs for other commands

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit 39356761e5b7090851de2e909f471265f94d34be
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Nov 9 13:10:49 2011 +1100

test: use planpythontestsuite() for ldb.python test

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit b0be72d5080aed3da3f33a45b72f88e90fbe3d13
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Nov 9 13:10:24 2011 +1100

test: added directory option to planpythontestsuite()

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit ac0bba2ea18e2e9ac578a333a3b260951e4c976e
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Nov 9 13:10:00 2011 +1100

test: added -D option to subunitrun

this allows for:

 subunitrun -D lib/ldb/tests/python api

which makes this easier for developers

commit 333248f08c83cc5b18f8e7e84cb19d79a8309d6e
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Nov 9 13:09:08 2011 +1100

pyldb: fixed ldb API test

it was failing previously, but the failure wasn't being noticed

commit a04eac7aa2f5f9388cf92a8a79e0bd6938f8fd22
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Nov 9 13:08:37 2011 +1100

build: only run symbol checking if running all tests

this makes it much faster to run 1 test

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit 58457e6cd23fc2661c464a2ab5b136ee6611b242
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Nov 9 13:07:53 2011 +1100

pyldb: enhanced get() method on msg object

get() now takes a default value and an idx, allowing for much easier
usage

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit 1cef3212a1099b87769c473ee99c0c0f2a4d2b04
Author: Giampaolo Lauria laur...@yahoo.com
Date:   Tue Nov 8 14:59:19 2011 -0500

samba-tool: Added new user disable command

commit 34ff5d29e66eac3041204b9cd481a2e7887b1fc9
Author

[SCM] Samba Shared Repository - branch master updated

2011-11-06 Thread Andrew Tridgell
The branch, master has been updated
   via  384eaba s4: samba-tool user --help documenation improvements 
Signed-off-by: Theresa Halloran thall...@linux.vnet.ibm.com
   via  f0ae7e1 kcc: fixed program name
   via  eb9c35c kcc: fixed tabs/spaces in kcc python implementation
   via  d85b6ed samba_kcc addtion
   via  c78dac4 add python KCC utility classes and methods
   via  a5d6e42 python dsdb flag addtions (NTDSSETTINGS, NTDSCONN)
  from  0c1669e s3:smb2cli: ignore the NBT/Length header in 
smb2cli_inbuf_parse_compound()

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


- Log -
commit 384eaba38e4da2a2e72e1ec5bfea7d7776d16a11
Author: Theresa Halloran thall...@linux.vnet.ibm.com
Date:   Wed Nov 2 10:33:12 2011 -0400

s4: samba-tool user --help documenation improvements
Signed-off-by: Theresa Halloran thall...@linux.vnet.ibm.com

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Mon Nov  7 01:39:25 CET 2011 on sn-devel-104

commit f0ae7e191682de1e56ca1ed2a9e9aa67e9d22b14
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Nov 7 09:55:01 2011 +1100

kcc: fixed program name

kcccompute - samba_kcc

commit eb9c35cbb77fa16f8301428ce163359008d1687f
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Nov 7 09:53:06 2011 +1100

kcc: fixed tabs/spaces in kcc python implementation

as spotted by autobuild

commit d85b6edf8cdfd953ce96a50466595384db4c698b
Author: Dave Craft wimber...@gmail.com
Date:   Thu Nov 3 12:39:53 2011 -0500

samba_kcc addtion

Scaffolding and initial implementations of
portions of the KCC in python.  This code currently
properly computes the graph nodes for the intrasite
topology as well as enumerating all steps for a full
run of the KCC.

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

commit c78dac4fde0fdcdfe44a4bc98da30f43cf32ff6c
Author: Dave Craft wimber...@gmail.com
Date:   Thu Nov 3 12:37:24 2011 -0500

add python KCC utility classes and methods

New file source4/scripting/python/samba/kcc_utils.py
contains classes and methods for:
   DirectoryServiceAgent
   NTDSConnection
   GraphNode
   NamingContext
   NCReplica
These are consumed by a new samba_kcc python script
for KCC topology computation

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

commit a5d6e427c5a60a0638d952c56e26cca421d3af9c
Author: Dave Craft wimber...@gmail.com
Date:   Thu Nov 3 12:33:38 2011 -0500

python dsdb flag addtions (NTDSSETTINGS, NTDSCONN)

Add missing flags present in C code base to python
code base dsdb/pydsdb.c
   INSTANCE_TYPE...
   DS_NTDSSETTINGS_OPT...
   NTDSCONN_OPT...
These are consumed by the python KCC scripts

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

---

Summary of changes:
 source4/dsdb/pydsdb.c |   27 +
 source4/scripting/bin/samba_kcc   |  703 
 source4/scripting/bin/wscript_build   |1 +
 source4/scripting/python/samba/kcc_utils.py   |  890 +
 source4/scripting/python/samba/netcmd/__init__.py |   17 +-
 source4/scripting/python/samba/netcmd/user.py |  136 +++-
 source4/scripting/wscript_build   |2 +-
 7 files changed, 1768 insertions(+), 8 deletions(-)
 create mode 100755 source4/scripting/bin/samba_kcc
 create mode 100644 source4/scripting/python/samba/kcc_utils.py


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c
index 2ff6b82..57e08cc 100644
--- a/source4/dsdb/pydsdb.c
+++ b/source4/dsdb/pydsdb.c
@@ -1084,6 +1084,14 @@ void initdsdb(void)
ADD_DSDB_FLAG(DS_DOMAIN_FUNCTION_2008);
ADD_DSDB_FLAG(DS_DOMAIN_FUNCTION_2008_R2);
 
+/* nc replica flags */
+   ADD_DSDB_FLAG(INSTANCE_TYPE_IS_NC_HEAD);
+   ADD_DSDB_FLAG(INSTANCE_TYPE_UNINSTANT);
+   ADD_DSDB_FLAG(INSTANCE_TYPE_WRITE);
+   ADD_DSDB_FLAG(INSTANCE_TYPE_NC_ABOVE);
+   ADD_DSDB_FLAG(INSTANCE_TYPE_NC_COMING);
+   ADD_DSDB_FLAG(INSTANCE_TYPE_NC_GOING);
+
/* systemFlags */
ADD_DSDB_FLAG(SYSTEM_FLAG_CR_NTDS_NC);
ADD_DSDB_FLAG(SYSTEM_FLAG_CR_NTDS_DOMAIN);
@@ -1121,6 +1129,17 @@ void initdsdb(void)
ADD_DSDB_FLAG(DS_FLAG_ATTR_REQ_PARTIAL_SET_MEMBER);
ADD_DSDB_FLAG(DS_FLAG_ATTR_IS_CONSTRUCTED);
 
+   ADD_DSDB_FLAG(DS_NTDSSETTINGS_OPT_IS_AUTO_TOPOLOGY_DISABLED);
+   ADD_DSDB_FLAG(DS_NTDSSETTINGS_OPT_IS_TOPL_CLEANUP_DISABLED);
+   ADD_DSDB_FLAG(DS_NTDSSETTINGS_OPT_IS_TOPL_MIN_HOPS_DISABLED);
+   ADD_DSDB_FLAG(DS_NTDSSETTINGS_OPT_IS_TOPL_DETECT_STALE_DISABLED);
+   ADD_DSDB_FLAG(DS_NTDSSETTINGS_OPT_IS_INTER_SITE_AUTO_TOPOLOGY_DISABLED);
+   ADD_DSDB_FLAG(DS_NTDSSETTINGS_OPT_IS_GROUP_CACHING_ENABLED

[SCM] Samba Shared Repository - branch master updated

2011-11-02 Thread Andrew Tridgell
The branch, master has been updated
   via  a6ed907 dsdb: Handle the case when extended rights string is NULL
   via  c8ac367 s4-drepl: Search for application partitions in addition to 
main ones
   via  4a6410d s4-dnsserver: Check the raised exception with assertRaises
   via  8dca18a s4-dnsserver: Handle the case when the dns name is NULL
   via  6e800bf s4-dnsserver: Build a dns name tree for correct enumeration
   via  0d3aff7 s4-dnsserver: List dns zones matching the search filter
   via  c1b45af s4-dnsserver: Compare two dns names using last uncommon 
name components
   via  c651b4e s4-dnsserver: Set DNS_DP_AUTOCREATED flag for the zone 
information
   via  9abfaa3 samba-tool: Improve the description of dns subcommands.
   via  66121dc samba-tool: Enable comparison of DNS naming contexts in 
ldapcmp
  from  cde73e2 Remove opendir() VFS code from ACL modules.

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


- Log -
commit a6ed9071b9aa75ff6f3ca2c3b24e6060c4d3f389
Author: Amitay Isaacs ami...@gmail.com
Date:   Wed Nov 2 14:34:41 2011 +1100

dsdb: Handle the case when extended rights string is NULL

Pair-Programmed-With: Andrew Tridgell tri...@samba.org

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

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Nov  2 07:03:40 CET 2011 on sn-devel-104

commit c8ac3678ad98bc27cf08f3d14bae2aa52318c48d
Author: Amitay Isaacs ami...@gmail.com
Date:   Tue Oct 25 15:06:07 2011 +1100

s4-drepl: Search for application partitions in addition to main ones

To replicate application partitions (e.g. DNS partitions) consult
msDs-hasMasterNCs attribute as well. Also, make sure we don't add
same partition twice in the list. hasMasterNCs and msDs-hasMasterNCs
have domain, configuration and schema partitions common.

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

commit 4a6410df54fdbc8fb08b104c47010db507443def
Author: Amitay Isaacs ami...@gmail.com
Date:   Mon Oct 24 17:37:24 2011 +1100

s4-dnsserver: Check the raised exception with assertRaises

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

commit 8dca18a71a813719e1c20b1ff909ed3aae32cf40
Author: Amitay Isaacs ami...@gmail.com
Date:   Mon Oct 24 17:22:21 2011 +1100

s4-dnsserver: Handle the case when the dns name is NULL

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

commit 6e800bfba708124077defab3c9379db201f4c43c
Author: Amitay Isaacs ami...@gmail.com
Date:   Mon Oct 24 17:20:46 2011 +1100

s4-dnsserver: Build a dns name tree for correct enumeration

The result of EnumRecords/EnumRecords2 RPC calls, is a list of
dns records that are one level below in the name hierarchy starting
from the search name. This patch builds a tree of names to get
the list of records one level below the search names and correctly
count the number of child records for each of those.

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

commit 0d3aff732483cf1a48cb9ea6af16537fc11be547
Author: Amitay Isaacs ami...@gmail.com
Date:   Mon Oct 24 17:15:27 2011 +1100

s4-dnsserver: List dns zones matching the search filter

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

commit c1b45afcf254ed0bbb36b125e440a2731c253e63
Author: Amitay Isaacs ami...@gmail.com
Date:   Mon Oct 24 17:07:45 2011 +1100

s4-dnsserver: Compare two dns names using last uncommon name components

When search_name is not NULL, use the second last component of name
instead of the last name.

e.g. To compare following two names,
   _ldap._tcp.gc, and
   _ldap._tcp.Default-First-Site-Name._sites.gc

with search_name=NULL, it is gc and gc
with search_name=gc, it is _tcp and _sites

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

commit c651b4e99b8bd70eb3be7b3d416c329b4d506f76
Author: Amitay Isaacs ami...@gmail.com
Date:   Mon Oct 24 16:54:16 2011 +1100

s4-dnsserver: Set DNS_DP_AUTOCREATED flag for the zone information

This make the zone information similar to windows (W2K8r2).

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

commit 9abfaa3bbb45f5217b326d41aca1b68a49ca12ea
Author: Amitay Isaacs ami...@gmail.com
Date:   Fri Oct 21 11:27:28 2011 +1100

samba-tool: Improve the description of dns subcommands.

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

commit 66121dc89677b4b6e91f8b4cac893d709ab63544
Author: Amitay Isaacs ami...@gmail.com
Date:   Tue Sep 20 17:31:24 2011 +1000

samba-tool: Enable comparison of DNS naming contexts in ldapcmp

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

---

Summary of changes:
 source4/dsdb/common/dsdb_access.c  |   11 +-
 source4/dsdb/repl/drepl_partitions.c   |   19 +-
 source4/rpc_server

[SCM] Samba Shared Repository - branch master updated

2011-10-19 Thread Andrew Tridgell
The branch, master has been updated
   via  5c5fc5d build: added deletion of stale .so and .o files
  from  416bf1c samba.getopt: Add some basic tests.

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


- Log -
commit 5c5fc5dde45618b9ec9f41fbb4aa090b161ebf35
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Oct 19 16:34:32 2011 +1100

build: added deletion of stale .so and .o files

when we change our build rules to move a C file, we need to remove the
old ('stale') .so and .o files from the build directory, or they may
be used as part of the new build, which means that old code will be
linked in.

This expands the list of stale files that we remove on rule changes to
include .so and .o files

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Oct 19 09:02:23 CEST 2011 on sn-devel-104

---

Summary of changes:
 buildtools/wafsamba/stale_files.py |   18 --
 1 files changed, 16 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/stale_files.py 
b/buildtools/wafsamba/stale_files.py
index 2b94f08..1ee1ff9 100644
--- a/buildtools/wafsamba/stale_files.py
+++ b/buildtools/wafsamba/stale_files.py
@@ -58,7 +58,20 @@ def replace_refill_task_list(self):
 try:
 if getattr(x, 'target'):
 tlist = samba_utils.TO_LIST(getattr(x, 'target'))
+ttype = getattr(x, 'samba_type', None)
+task_list = getattr(x, 'compiled_tasks', [])
+if task_list:
+# this gets all of the .o files, including the task
+# ids, so foo.c maps to foo_3.o for idx=3
+for tsk in task_list:
+for output in tsk.outputs:
+objpath = 
os.path.normpath(output.abspath(bld.env))
+expected.append(objpath)
 for t in tlist:
+if ttype in ['LIBRARY','MODULE']:
+t = samba_utils.apply_pattern(t, 
bld.env.shlib_PATTERN)
+if ttype == 'PYTHON':
+t = samba_utils.apply_pattern(t, 
bld.env.pyext_PATTERN)
 p = os.path.join(x.path.abspath(bld.env), t)
 p = os.path.normpath(p)
 expected.append(p)
@@ -78,13 +91,14 @@ def replace_refill_task_list(self):
 p = link
 if f in ['config.h']:
 continue
-if f[-2:] not in [ '.c', '.h' ]:
+(froot, fext) = os.path.splitext(f)
+if fext not in [ '.c', '.h', '.so', '.o' ]:
 continue
 if f[-7:] == '.inst.h':
 continue
 if p.find(/.conf) != -1:
 continue
-if not p in expected:
+if not p in expected and os.path.exists(p):
 Logs.warn(Removing stale file: %s % p)
 os.unlink(p)
 return iit


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-10-19 Thread Andrew Tridgell
The branch, master has been updated
   via  3712006 dsdb: improve debug message
  from  ce45ae1 s3-waf: make sure we always compile (not install) our 
libsmbclient testcode.

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


- Log -
commit 3712006faacbc468d7df3d577c796508e533617c
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 20 08:02:40 2011 +1100

dsdb: improve debug message

show the reply type in Invalid reply type messages

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Oct 20 00:57:05 CEST 2011 on sn-devel-104

---

Summary of changes:
 lib/ldb/common/ldb.c|6 +++---
 lib/ldb/ldb_map/ldb_map_inbound.c   |6 +++---
 source4/dsdb/samdb/ldb_modules/new_partition.c  |2 +-
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c |2 +-
 source4/dsdb/samdb/ldb_modules/samldb.c |3 +--
 source4/dsdb/samdb/ldb_modules/subtree_rename.c |2 +-
 6 files changed, 10 insertions(+), 11 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ldb/common/ldb.c b/lib/ldb/common/ldb.c
index cd6172a..a223b87 100644
--- a/lib/ldb/common/ldb.c
+++ b/lib/ldb/common/ldb.c
@@ -1069,7 +1069,7 @@ int ldb_modify_default_callback(struct ldb_request *req, 
struct ldb_reply *ares)
return ldb_request_done(req, LDB_SUCCESS);
default:
talloc_free(ares);
-   ldb_set_errstring(req-handle-ldb, Invalid reply type!);
+   ldb_asprintf_errstring(req-handle-ldb, Invalid LDB reply 
type %d, ares-type);
return ldb_request_done(req, LDB_ERR_OPERATIONS_ERROR);
}
 
@@ -1093,7 +1093,7 @@ int ldb_op_default_callback(struct ldb_request *req, 
struct ldb_reply *ares)
 
if (ares-type != LDB_REPLY_DONE) {
talloc_free(ares);
-   ldb_set_errstring(req-handle-ldb, Invalid reply type!);
+   ldb_asprintf_errstring(req-handle-ldb, Invalid LDB reply 
type %d, ares-type);
return ldb_request_done(req, LDB_ERR_OPERATIONS_ERROR);
}
 
@@ -1399,7 +1399,7 @@ int ldb_extended_default_callback(struct ldb_request *req,
}
 
talloc_free(ares);
-   ldb_set_errstring(req-handle-ldb, Invalid reply type!);
+   ldb_asprintf_errstring(req-handle-ldb, Invalid LDB reply type %d, 
ares-type);
return ldb_request_done(req, LDB_ERR_OPERATIONS_ERROR);
 }
 
diff --git a/lib/ldb/ldb_map/ldb_map_inbound.c 
b/lib/ldb/ldb_map/ldb_map_inbound.c
index b610372..38dd5ac 100644
--- a/lib/ldb/ldb_map/ldb_map_inbound.c
+++ b/lib/ldb/ldb_map/ldb_map_inbound.c
@@ -309,7 +309,7 @@ static int map_op_local_callback(struct ldb_request *req,
}
 
if (ares-type != LDB_REPLY_DONE) {
-   ldb_set_errstring(ldb, Invalid reply type!);
+   ldb_asprintf_errstring(ldb, Invalid LDB reply type %d, 
ares-type);
return ldb_module_done(ac-req, NULL, NULL,
LDB_ERR_OPERATIONS_ERROR);
}
@@ -343,7 +343,7 @@ static int map_op_remote_callback(struct ldb_request *req,
}
 
if (ares-type != LDB_REPLY_DONE) {
-   ldb_set_errstring(ldb, Invalid reply type!);
+   ldb_asprintf_errstring(ldb, Invalid LDB reply type %d, 
ares-type);
return ldb_module_done(ac-req, NULL, NULL,
LDB_ERR_OPERATIONS_ERROR);
}
@@ -802,7 +802,7 @@ static int map_rename_local_callback(struct ldb_request 
*req,
}
 
if (ares-type != LDB_REPLY_DONE) {
-   ldb_set_errstring(ldb, Invalid reply type!);
+   ldb_asprintf_errstring(ldb, Invalid LDB reply type %d, 
ares-type);
return ldb_module_done(ac-req, NULL, NULL,
LDB_ERR_OPERATIONS_ERROR);
}
diff --git a/source4/dsdb/samdb/ldb_modules/new_partition.c 
b/source4/dsdb/samdb/ldb_modules/new_partition.c
index 3f730f9..eaf7d43 100644
--- a/source4/dsdb/samdb/ldb_modules/new_partition.c
+++ b/source4/dsdb/samdb/ldb_modules/new_partition.c
@@ -65,7 +65,7 @@ static int np_part_mod_callback(struct ldb_request *req, 
struct ldb_reply *ares)
}
 
if (ares-type != LDB_REPLY_DONE) {
-   ldb_set_errstring(ldb, Invalid reply type!);
+   ldb_asprintf_errstring(ldb, Invalid LDB reply type %d, 
ares-type);
return ldb_module_done(ac-req, NULL, NULL,
LDB_ERR_OPERATIONS_ERROR);
}
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c 
b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 2be0760..b3126c3 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -3983,7 +3983,7 @@ static int

[SCM] Samba Shared Repository - branch master updated

2011-10-19 Thread Andrew Tridgell
The branch, master has been updated
   via  8890f70 s4-test: added test suite for common.py code
   via  4f08a29 s4-dsdb: moved dsdb_Dn() into common.py
   via  43e5592 subunitrun: give more useful help
  from  019f643 Fix a boatload of warnings in the examples.

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


- Log -
commit 8890f709d9c19b515b1bd0b0232b7eddc8ebd7c4
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 20 13:25:22 2011 +1100

s4-test: added test suite for common.py code

this tests the dsdb_Dn() class

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Oct 20 05:51:28 CEST 2011 on sn-devel-104

commit 4f08a2951a04ba75fdf7b784dcf84059537d7b4c
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 20 13:24:45 2011 +1100

s4-dsdb: moved dsdb_Dn() into common.py

this gives a method for dealing with binary DNs from python

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit 43e5592e9af95f2f2522cf8b015a76b14475729d
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 20 13:24:04 2011 +1100

subunitrun: give more useful help

give some examples and more useful description for subunitrun command

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

---

Summary of changes:
 source4/scripting/bin/subunitrun   |   27 ++-
 source4/scripting/python/samba/common.py   |   40 ++
 source4/scripting/python/samba/dbchecker.py|   29 ++---
 source4/scripting/python/samba/tests/common.py |   42 
 4 files changed, 110 insertions(+), 28 deletions(-)
 create mode 100644 source4/scripting/python/samba/tests/common.py


Changeset truncated at 500 lines:

diff --git a/source4/scripting/bin/subunitrun b/source4/scripting/bin/subunitrun
index bc7b42c..9c87d2e 100755
--- a/source4/scripting/bin/subunitrun
+++ b/source4/scripting/bin/subunitrun
@@ -31,9 +31,31 @@ import samba.getopt as options
 import samba.tests
 
 
-parser = optparse.OptionParser(subunitrun [options] tests)
+usage = 'subunitrun [options] tests'
+description = '''
+This runs a Samba python test suite. The tests are typically located in
+source4/scripting/python/samba/tests/*.py
+
+To run the tests from one of those modules, specify the test as
+samba.tests.MODULE. For example, to run the tests in common.py:
+
+   subunitrun samba.tests.common
+
+To list the tests in that module, use:
+
+   subunitrun -l samba.tests.common
+'''
+
+def format_description(formatter):
+'''hack to prevent textwrap of the description'''
+return description
+
+parser = optparse.OptionParser(usage=usage, description=description)
+parser.format_description = format_description
 credopts = options.CredentialsOptions(parser)
+sambaopts = options.SambaOptions(parser)
 parser.add_option_group(credopts)
+parser.add_option_group(sambaopts)
 try:
 from subunit.run import TestProgram
 except ImportError:
@@ -45,7 +67,8 @@ else:
 
 opts, args = parser.parse_args()
 
-samba.tests.cmdline_credentials = 
credopts.get_credentials(samba.tests.env_loadparm())
+lp = sambaopts.get_loadparm()
+samba.tests.cmdline_credentials = credopts.get_credentials(lp)
 if getattr(opts, listtests, False):
 args.insert(0, --list)
 
diff --git a/source4/scripting/python/samba/common.py 
b/source4/scripting/python/samba/common.py
index 5a9fae1..9738966 100644
--- a/source4/scripting/python/samba/common.py
+++ b/source4/scripting/python/samba/common.py
@@ -18,6 +18,8 @@
 # along with this program.  If not, see http://www.gnu.org/licenses/.
 #
 
+import ldb, dsdb
+
 def confirm(msg, forced = False, allow_all=False):
 confirm an action with the user
 :param msg: A string to print to the user
@@ -55,3 +57,41 @@ def normalise_int32(ivalue):
 if int(ivalue)  0x8000 and int(ivalue)  0:
 return str(int(ivalue) - 0x1)
 return str(ivalue)
+
+
+class dsdb_Dn(object):
+'''a class for binary DN'''
+
+def __init__(self, samdb, dnstring, syntax_oid=None):
+'''create a dsdb_Dn'''
+if syntax_oid is None:
+# auto-detect based on string
+if dnstring.startswith(B:):
+syntax_oid = dsdb.DSDB_SYNTAX_BINARY_DN
+elif dnstring.startswith(S:):
+syntax_oid = dsdb.DSDB_SYNTAX_STRING_DN
+else:
+syntax_oid = dsdb.DSDB_SYNTAX_OR_NAME
+if syntax_oid in [ dsdb.DSDB_SYNTAX_BINARY_DN, 
dsdb.DSDB_SYNTAX_STRING_DN ]:
+# it is a binary DN
+colons = dnstring.split(':')
+if len(colons)  4:
+raise RuntimeError(Invalid DN %s % dnstring)
+prefix_len = 4 + len(colons[1]) + int(colons[1

[SCM] Samba Shared Repository - branch master updated

2011-10-19 Thread Andrew Tridgell
The branch, master has been updated
   via  dd64f99 build: explain the passing of make options to waf
   via  ab50165 ldb: ldb_errstring() takes ldb_contxt as an argument
   via  2feb81f s4-dns: Update serial number for zone on dns updates
   via  7ca0bed s4-selftest: Add tests for RPC dnsserver
   via  b619705 samba-tool: Added dns command for DNS management
   via  8df2ed4 s4-dns: Added DCERPC dns server for DNS management
   via  a8c7b28 s4-provision: Provision DNS records with correct rank
   via  51855de werror: Added missing DNS error codes
   via  65f9a13 s4-dns: Added support for multiple DNS_RPC_RECORDS 
structures
   via  0f84c63 s4-dns: Added more data types for dnsserver implementation
   via  7ba004d ldb-samba: Added handler to decode dnsProperty attribute
   via  3193e14 dnsp: Added typedefs to interpret dnsProperty attribute for 
dnsZone objectclass
  from  8890f70 s4-test: added test suite for common.py code

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


- Log -
commit dd64f99fd17c1cb5aeefda91618111c6702832a7
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 20 14:57:13 2011 +1100

build: explain the passing of make options to waf

add a comment explaining how we pass make command line options into
waf

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Oct 20 07:24:02 CEST 2011 on sn-devel-104

commit ab50165a0235401d7920e67503c211028f55012d
Author: Amitay Isaacs ami...@gmail.com
Date:   Wed Oct 19 10:45:28 2011 +1100

ldb: ldb_errstring() takes ldb_contxt as an argument

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

commit 2feb81f659801444be090b8f90b85a78a59da796
Author: Amitay Isaacs ami...@gmail.com
Date:   Tue Oct 18 15:20:14 2011 +1100

s4-dns: Update serial number for zone on dns updates

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

commit 7ca0bed38d35948f05e30f52d2bf4c391bfc1711
Author: Amitay Isaacs ami...@gmail.com
Date:   Tue Oct 18 12:44:02 2011 +1100

s4-selftest: Add tests for RPC dnsserver

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

commit b619705c22f62a763a83fe57508b16af24a22ef0
Author: Amitay Isaacs ami...@gmail.com
Date:   Mon Oct 17 13:15:40 2011 +1100

samba-tool: Added dns command for DNS management

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

commit 8df2ed42cc4662bd385ea34169ebd3bcd4d8bc17
Author: Amitay Isaacs ami...@gmail.com
Date:   Tue Sep 27 16:53:45 2011 +1000

s4-dns: Added DCERPC dns server for DNS management

dnsserver.h - typedefs and prototypes
dnsserver.c - RPC API and implementation methods
dnsdb.c - samdb operations
dnsdata.c   - functions to manipulate dns structures
dnsutils.c  - function for serverinfo and zoneinfo structures

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

commit a8c7b2843553a3ea6b19c8f9a065b1f54c1ff0d7
Author: Amitay Isaacs ami...@gmail.com
Date:   Fri Oct 7 15:39:58 2011 +1100

s4-provision: Provision DNS records with correct rank

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

commit 51855de6338607b0dcca7b81b7fd4577481af40c
Author: Amitay Isaacs ami...@gmail.com
Date:   Wed Sep 28 13:15:02 2011 +1000

werror: Added missing DNS error codes

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

commit 65f9a13dc3f3e26aa3f7a9d90abe94a7b2e6bc77
Author: Amitay Isaacs ami...@gmail.com
Date:   Tue Sep 27 17:10:14 2011 +1000

s4-dns: Added support for multiple DNS_RPC_RECORDS structures

Windows returns multiple DNS_RPC_RECORDS structures, but there is
no well defined structure in [MS-DNSP] doc. Added hand-written
code to parse ndr.

Pair-Programmed-With: Andrew Tridgell tri...@samba.org

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

commit 0f84c634fc035f31e284b95b93e66be1a541c680
Author: Amitay Isaacs ami...@gmail.com
Date:   Tue Sep 27 17:07:04 2011 +1000

s4-dns: Added more data types for dnsserver implementation

Windows uses WERROR on dnsserver pipe.

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

commit 7ba004da246ea2a6c4738c6d3ea5dfafdbdbf1d6
Author: Amitay Isaacs ami...@gmail.com
Date:   Wed Sep 21 14:56:19 2011 +1000

ldb-samba: Added handler to decode dnsProperty attribute

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

commit 3193e142d40b9dcdbf7cb55f708dae7bba398c3c
Author: Amitay Isaacs ami...@gmail.com
Date:   Wed Sep 21 14:55:06 2011 +1000

dnsp: Added typedefs to interpret dnsProperty attribute for dnsZone 
objectclass

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

---

Summary of changes:
 buildtools/wafsamba/samba_utils.py |7 +
 lib/ldb-samba/ldif_handlers.c  |   21 +
 lib/ldb-samba/ldif_handlers.h

[SCM] Samba Shared Repository - branch master updated

2011-10-17 Thread Andrew Tridgell
The branch, master has been updated
   via  75953f1 ldb: fixed a race in ldb initialisation
   via  3a4fa65 libsmbclient: initial ABI signatures
   via  d226acd libsmbclient: add ABI checking and pc file
  from  c52b571 Fix uninitialized memory problem in group_sids_to_info3 
(fixes bug #8455).

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


- Log -
commit 75953f18469fa8746d9d8ad203bcbd0df9dd
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Oct 18 11:21:34 2011 +1100

ldb: fixed a race in ldb initialisation

This fixes a race when two processes initialise the same ldb database
at the same time. One of them could fail due to the other creating the
@BASEINFO record first.

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Tue Oct 18 03:54:42 CEST 2011 on sn-devel-104

commit 3a4fa654d5ba42ae78a132f54a7edfa722b367f0
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 13 10:03:55 2011 +1100

libsmbclient: initial ABI signatures

commit d226acd97a2aa79cd1710c2b07d00a2ed3c93d6e
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 13 10:02:17 2011 +1100

libsmbclient: add ABI checking and pc file

this gives us ABI checking for libsmbclient so that the waf build will
prevent ABI breakage, and a public version number. The addition of the
pc file makes this library available via pkgconfig, including querying
of the version number

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

---

Summary of changes:
 lib/ldb/ldb_tdb/ldb_cache.c |   10 ++-
 source3/libsmb/ABI/smbclient-0.1.0.sigs |  170 +++
 source3/libsmb/smbclient.pc.in  |   11 ++
 source3/wscript_build   |6 +-
 4 files changed, 194 insertions(+), 3 deletions(-)
 create mode 100644 source3/libsmb/ABI/smbclient-0.1.0.sigs
 create mode 100644 source3/libsmb/smbclient.pc.in


Changeset truncated at 500 lines:

diff --git a/lib/ldb/ldb_tdb/ldb_cache.c b/lib/ldb/ldb_tdb/ldb_cache.c
index e54ceaa..0b93021 100644
--- a/lib/ldb/ldb_tdb/ldb_cache.c
+++ b/lib/ldb/ldb_tdb/ldb_cache.c
@@ -308,9 +308,17 @@ int ltdb_cache_load(struct ldb_module *module)

/* possibly initialise the baseinfo */
if (r == LDB_ERR_NO_SUCH_OBJECT) {
-   if (ltdb_baseinfo_init(module) != LDB_SUCCESS) {
+
+   if (tdb_transaction_start(ltdb-tdb) != 0) {
goto failed;
}
+
+   /* error handling for ltdb_baseinfo_init() is by
+  looking for the record again. */
+   ltdb_baseinfo_init(module);
+
+   tdb_transaction_commit(ltdb-tdb);
+
if (ltdb_search_dn1(module, baseinfo_dn, baseinfo) != 
LDB_SUCCESS) {
goto failed;
}
diff --git a/source3/libsmb/ABI/smbclient-0.1.0.sigs 
b/source3/libsmb/ABI/smbclient-0.1.0.sigs
new file mode 100644
index 000..bbd7700
--- /dev/null
+++ b/source3/libsmb/ABI/smbclient-0.1.0.sigs
@@ -0,0 +1,170 @@
+smbc_chmod: int (const char *, mode_t)
+smbc_close: int (int)
+smbc_closedir: int (int)
+smbc_creat: int (const char *, mode_t)
+smbc_fgetxattr: int (int, const char *, const void *, size_t)
+smbc_flistxattr: int (int, char *, size_t)
+smbc_free_context: int (SMBCCTX *, int)
+smbc_fremovexattr: int (int, const char *)
+smbc_fsetxattr: int (int, const char *, const void *, size_t, int)
+smbc_fstat: int (int, struct stat *)
+smbc_fstatvfs: int (int, struct statvfs *)
+smbc_ftruncate: int (int, off_t)
+smbc_getDebug: int (SMBCCTX *)
+smbc_getFunctionAddCachedServer: smbc_add_cached_srv_fn (SMBCCTX *)
+smbc_getFunctionAuthData: smbc_get_auth_data_fn (SMBCCTX *)
+smbc_getFunctionAuthDataWithContext: smbc_get_auth_data_with_context_fn 
(SMBCCTX *)
+smbc_getFunctionCheckServer: smbc_check_server_fn (SMBCCTX *)
+smbc_getFunctionChmod: smbc_chmod_fn (SMBCCTX *)
+smbc_getFunctionClose: smbc_close_fn (SMBCCTX *)
+smbc_getFunctionClosedir: smbc_closedir_fn (SMBCCTX *)
+smbc_getFunctionCreat: smbc_creat_fn (SMBCCTX *)
+smbc_getFunctionFstat: smbc_fstat_fn (SMBCCTX *)
+smbc_getFunctionFstatVFS: smbc_fstatvfs_fn (SMBCCTX *)
+smbc_getFunctionFstatdir: smbc_fstatdir_fn (SMBCCTX *)
+smbc_getFunctionFtruncate: smbc_ftruncate_fn (SMBCCTX *)
+smbc_getFunctionGetCachedServer: smbc_get_cached_srv_fn (SMBCCTX *)
+smbc_getFunctionGetdents: smbc_getdents_fn (SMBCCTX *)
+smbc_getFunctionGetxattr: smbc_getxattr_fn (SMBCCTX *)
+smbc_getFunctionListPrintJobs: smbc_list_print_jobs_fn (SMBCCTX *)
+smbc_getFunctionListxattr: smbc_listxattr_fn (SMBCCTX *)
+smbc_getFunctionLseek: smbc_lseek_fn (SMBCCTX *)
+smbc_getFunctionLseekdir: smbc_lseekdir_fn (SMBCCTX *)
+smbc_getFunctionMkdir: smbc_mkdir_fn (SMBCCTX

[SCM] Samba Shared Repository - branch master updated

2011-10-11 Thread Andrew Tridgell
The branch, master has been updated
   via  fea02ce ldb:ldb_autotransaction_request - error string shouldn't be 
set here
   via  21d053d ldb:pyldb.c - py_ldb_* modification calls - error string 
shouldn't be set here
   via  96a9f82 s4:ldap_backend.c/map_ldb_error - handle errors similar 
to PyErr_SetLdbError
   via  7599d59 ldb:ldb.c/ldb_wait - make ldb_wait always return an 
error string
   via  500d1ba ldb:ldb.c/ldb_wait - change ldb_wait slightly in order 
to introduce error messages
   via  8cab94e ldb:ldb.c/ldb_request - make ldb_request always return 
an error string
   via  f2a3125 ldb:ldb.c - ldb_set_errstring can be implemented by using 
ldb_asprintf_errstring
   via  0f41868 ldb:ldb_autotransaction_request - fix a typo in a comment
  from  4549862 gensec: trim header includes back to what is actually 
required

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


- Log -
commit fea02ce1771ddb2ee09a442a86def72a01b9582e
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Sep 21 11:45:32 2011 +0200

ldb:ldb_autotransaction_request - error string shouldn't be set here

A generic error string should be set independently of the access
mechanism to an LDB operation. Hence it should be handled in ldb_wait
and ldb_request

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

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Tue Oct 11 10:15:18 CEST 2011 on sn-devel-104

commit 21d053d120cbc665ed8c0afe82598220a608f2af
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Sep 20 17:41:10 2011 +0200

ldb:pyldb.c - py_ldb_* modification calls - error string shouldn't be set 
here

As discussed with Jelmer, we shouldn't be setting a generic LDB error string
only for the Python bindings alone. This should be done in ldb_request
and ldb_wait - the common place for all possible LDB access mechanisms.

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

commit 96a9f823edd9c9387d6708fa8c3a4dc5de75127d
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Sep 21 11:59:06 2011 +0200

s4:ldap_backend.c/map_ldb_error - handle errors similar to 
PyErr_SetLdbError

If the call was done using an error string (add_err_string), then use 
that one
without an additional ldb_strerror() for the definitive LDAP output.
Otherwise generate one using ldb_strerror().
This omits redundancies in the error string generation (twice the same
information by ldb_strerror()).

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

commit 7599d59d1afd0814c14953a830ba4a618187e95e
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Sep 21 12:54:08 2011 +0200

ldb:ldb.c/ldb_wait - make ldb_wait always return an error string

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

commit 500d1ba546ff3a677f0a48edc233daeed4d1fe41
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Sep 21 12:38:46 2011 +0200

ldb:ldb.c/ldb_wait - change ldb_wait slightly in order to introduce 
error messages

In this occasion remove a redundant check for LDB_ASYNC_DONE:

if (handle-state == LDB_ASYNC_DONE ||if (handle-state == 
LDB_ASYNC_DONE)
handle-status != LDB_SUCCESS) {  return handle-status;
return handle-status; == if (handle-status != LDB_SUCCESS)
} return handle-status;
...   ...
return LDB_SUCCESS;   return LDB_SUCCESS;

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

commit 8cab94e827df1ecbb03cd91467be41feece8c6e5
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Sep 21 12:35:20 2011 +0200

ldb:ldb.c/ldb_request - make ldb_request always return an error string

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

commit f2a3125dcb081d8771bbcd09607592fa9cbef028
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Sep 21 13:43:29 2011 +0200

ldb:ldb.c - ldb_set_errstring can be implemented by using 
ldb_asprintf_errstring

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

commit 0f41868691ebee9c996bb4dcd44a95833349848b
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Wed Sep 21 11:38:59 2011 +0200

ldb:ldb_autotransaction_request - fix a typo in a comment

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

---

Summary of changes:
 lib/ldb/common/ldb.c   |   91 ++-
 lib/ldb/pyldb.c|   18 +---
 source4/ldap_server/ldap_backend.c |8 +--
 3 files changed, 70 insertions(+), 47 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ldb/common/ldb.c b/lib/ldb/common/ldb.c
index a4c04ce..cd6172a 100644
--- a/lib/ldb

[SCM] Samba Shared Repository - branch master updated

2011-10-07 Thread Andrew Tridgell
The branch, master has been updated
   via  83f0dc4 s4-dsdb: special case for deleted objects one way link
   via  9b981ff s4-dsdb: don't display links to deleted objects
   via  a729dbb s4-dsdb: fixed one_way_link calculation
   via  a5f311d s4-dsdb: fixed behaviour of show_deleted and show_recycled 
control
   via  365f705 s4-dsdb: fixed the check_optional_feature() call
  from  ceb831c s3:lib: remove unused/empty modules.c

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


- Log -
commit 83f0dc44a70ed7e49bcee3718ff17b2063b2a01e
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Oct 7 15:25:59 2011 +1100

s4-dsdb: special case for deleted objects one way link

we show wellknown links to the deleted objects container

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Fri Oct  7 07:58:08 CEST 2011 on sn-devel-104

commit 9b981ff1e82e06c9365b6ae46ddc911a4a84f560
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Oct 7 13:20:35 2011 +1100

s4-dsdb: don't display links to deleted objects

unless the user asks for the display of deactivated links, we should
not display DNs that link to deleted objects

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit a729dbb269d4a368f79dcadaa5e74adb91bfd6e2
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Oct 7 13:19:48 2011 +1100

s4-dsdb: fixed one_way_link calculation

we need to check for the other end of the link, not the current linkID

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit a5f311d4690f6b76e6bd304b1fad98811488ed1f
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Oct 7 11:46:59 2011 +1100

s4-dsdb: fixed behaviour of show_deleted and show_recycled control

to correctly implement the show_deleted and show_recycled control we
need to know if the recyclebin is enabled. When not enabled, the
isRecycled attribute is ignored, and only isDeleted is used.

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 365f705345be02915fafedc83ec3c610285f6f81
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Oct 7 11:46:05 2011 +1100

s4-dsdb: fixed the check_optional_feature() call

the dsdb_check_optional_feature() call should look on our own NTDS DN
for the enabled feature. This should work for all features, not just
for forest wide fetaures.

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/extended_dn_out.c |   66 +++--
 source4/dsdb/samdb/ldb_modules/show_deleted.c|  109 ++
 source4/dsdb/samdb/ldb_modules/util.c|   43 +
 source4/dsdb/schema/schema_set.c |3 +-
 4 files changed, 153 insertions(+), 68 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c 
b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
index 9e1bec9..8e28ec7 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c
@@ -353,30 +353,51 @@ struct extended_search_context {
fix one-way links to have the right string DN, to cope with
renames of the target
 */
-static int fix_one_way_link(struct extended_search_context *ac, struct ldb_dn 
*dn)
+static int fix_one_way_link(struct extended_search_context *ac, struct ldb_dn 
*dn,
+   bool is_deleted_objects, bool *remove_value)
 {
struct GUID guid;
NTSTATUS status;
int ret;
struct ldb_dn *real_dn;
+   uint32_t search_flags;
+   TALLOC_CTX *tmp_ctx = talloc_new(ac);
+   const char *attrs[] = { NULL };
+   struct ldb_result *res;
+
+   (*remove_value) = false;
 
status = dsdb_get_extended_dn_guid(dn, guid, GUID);
if (!NT_STATUS_IS_OK(status)) {
/* this is a strange DN that doesn't have a GUID! just
   return the current DN string?? */
+   talloc_free(tmp_ctx);
return LDB_SUCCESS;
}
 
-   ret = dsdb_module_dn_by_guid(ac-module, dn, guid, real_dn, ac-req);
-   if (ret != LDB_SUCCESS) {
-   /* it could be on another server, we need to leave the
-  string DN alone */
+   search_flags = DSDB_FLAG_NEXT_MODULE | 
DSDB_SEARCH_SEARCH_ALL_PARTITIONS | DSDB_SEARCH_ONE_ONLY;
+
+   if (ldb_request_get_control(ac-req, 
LDB_CONTROL_SHOW_DEACTIVATED_LINK_OID) ||
+   is_deleted_objects) {
+   search_flags |= DSDB_SEARCH_SHOW_DELETED;
+   }
+
+   ret = dsdb_module_search(ac-module, tmp_ctx, res, NULL, 
LDB_SCOPE_SUBTREE, attrs,
+search_flags, ac

[SCM] Samba Shared Repository - branch master updated

2011-10-05 Thread Andrew Tridgell
The branch, master has been updated
   via  63319c1 s4-auth: fixed formatting of some DEBUG() lines
  from  f93fd12 Fix bug #8507 - smbd doesn't correctly honor the force 
create mode bits from a cifsfs create.

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


- Log -
commit 63319c169fdc599ffb5ade023b371815159d0fdd
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Oct 5 17:07:51 2011 +1100

s4-auth: fixed formatting of some DEBUG() lines

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Oct  5 09:45:15 CEST 2011 on sn-devel-104

---

Summary of changes:
 source4/auth/credentials/credentials_secrets.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/credentials/credentials_secrets.c 
b/source4/auth/credentials/credentials_secrets.c
index 86e31f4..d86032a 100644
--- a/source4/auth/credentials/credentials_secrets.c
+++ b/source4/auth/credentials/credentials_secrets.c
@@ -209,7 +209,7 @@ _PUBLIC_ NTSTATUS 
cli_credentials_set_machine_account(struct cli_credentials *cr
 SECRETS_PRIMARY_DOMAIN_DN,
 filter, error_string);
if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(1, (Could not find machine account in secrets database: 
%s: %s, nt_errstr(status), error_string));
+   DEBUG(1, (Could not find machine account in secrets database: 
%s: %s\n, nt_errstr(status), error_string));
talloc_free(error_string);
}
return status;
@@ -238,7 +238,7 @@ NTSTATUS cli_credentials_set_krbtgt(struct cli_credentials 
*cred,
 SECRETS_PRINCIPALS_DN,
 filter, error_string);
if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(1, (Could not find krbtgt (master Kerberos) account in 
secrets database: %s: %s, nt_errstr(status), error_string));
+   DEBUG(1, (Could not find krbtgt (master Kerberos) account in 
secrets database: %s: %s\n, nt_errstr(status), error_string));
talloc_free(error_string);
}
return status;
@@ -269,7 +269,7 @@ _PUBLIC_ NTSTATUS 
cli_credentials_set_stored_principal(struct cli_credentials *c
 SECRETS_PRINCIPALS_DN, filter,
 error_string);
if (!NT_STATUS_IS_OK(status)) {
-   DEBUG(1, (Could not find %s principal in secrets database: %s: 
%s, serviceprincipal, nt_errstr(status), error_string));
+   DEBUG(1, (Could not find %s principal in secrets database: %s: 
%s\n, serviceprincipal, nt_errstr(status), error_string));
}
return status;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-10-05 Thread Andrew Tridgell
The branch, master has been updated
   via  3fca66e samba-tool: add support for fixing broken backlinks in 
dbcheck
   via  d7f617e s4-dsdb: allow deletion of backlinks if 
DSDB_CONTROL_DBCHECK given
   via  c2d70af s4-dsdb: added DSDB_CONTROL_DBCHECK
   via  ea41860 ldb: support raw OIDs in control string parsing
   via  b3476f0 ldb: fixed memory leak in control string parsing
   via  2d63789 s4-dsdb: allow groupType update on deleted objects
   via  8976e1d s4-rodc: use the rodc_replica flag on the partition
   via  2a2deeb s4-rodc: ensure we load replicated partitions for RODCs
  from  e717af0 s4-dsdb: Do not assume that all deleted objects have an 
objectCategory and sAMAccountType

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


- Log -
commit 3fca66e2b343c6386476a52832591ae4e435d6b2
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 6 14:21:41 2011 +1100

samba-tool: add support for fixing broken backlinks in dbcheck

this allows dangling backlinks to be removed

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Oct  6 07:08:35 CEST 2011 on sn-devel-104

commit d7f617e2e180eab6decb18e697f1e1294194a2cb
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 6 14:21:02 2011 +1100

s4-dsdb: allow deletion of backlinks if DSDB_CONTROL_DBCHECK given

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit c2d70af1a7b0a67283837a9f823158fd7f8db574
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 6 14:20:25 2011 +1100

s4-dsdb: added DSDB_CONTROL_DBCHECK

this will be used for overrides by the dbcheck validator

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit ea41860d32d38448e08cefd79d30ee1150317a9e
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 6 14:19:24 2011 +1100

ldb: support raw OIDs in control string parsing

this makes it possible to use a raw OID string on the command line or
in python scripts

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit b3476f00a621cf2d5d547ed479acf91b5cc0679c
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 6 14:18:49 2011 +1100

ldb: fixed memory leak in control string parsing

if parsing fails, free ctrl

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 2d63789e4869c147364d4e58c678a0c08b2e6859
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 6 12:31:21 2011 +1100

s4-dsdb: allow groupType update on deleted objects

this allows dbcheck to fix groupType on objects that have been deleted

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 8976e1d50d6dc6633af82e05afe51ef41b61c66c
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 6 11:24:28 2011 +1100

s4-rodc: use the rodc_replica flag on the partition

this sets DSDB_REPL_FLAG_PARTIAL_REPLICA when replicating a RODC
partition, which tells the replication code to map instanceType to
remove the INSTANCE_TYPE_WRITE bit

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 2a2deeb3b43dcb11f2b604bdd20c1183e87522bb
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Oct 6 11:14:13 2011 +1100

s4-rodc: ensure we load replicated partitions for RODCs

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

---

Summary of changes:
 lib/ldb/common/ldb_controls.c  |   42 +
 lib/ldb/include/ldb_private.h  |1 +
 source4/dsdb/pydsdb.c  |1 +
 source4/dsdb/repl/drepl_out_helpers.c  |4 +-
 source4/dsdb/repl/drepl_partitions.c   |   89 +---
 source4/dsdb/repl/drepl_service.h  |2 +-
 source4/dsdb/samdb/ldb_modules/objectclass_attrs.c |3 +-
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c|3 +
 source4/dsdb/samdb/ldb_modules/samldb.c|3 +-
 source4/dsdb/samdb/samdb.h |3 +
 source4/scripting/python/samba/dbchecker.py|   52 +++-
 source4/setup/schema_samba4.ldif   |1 +
 12 files changed, 129 insertions(+), 75 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ldb/common/ldb_controls.c b/lib/ldb/common/ldb_controls.c
index 3856167..42fabfc 100644
--- a/lib/ldb/common/ldb_controls.c
+++ b/lib/ldb/common/ldb_controls.c
@@ -428,6 +428,7 @@ struct ldb_control *ldb_parse_control_from_string(struct 
ldb_context *ldb, TALLO
error_string = talloc_asprintf_append(error_string,
note: b = boolean, n = number, s = string, o = b64 binary blob);
ldb_set_errstring(ldb, error_string

[SCM] build.samba.org - branch master updated

2011-10-04 Thread Andrew Tridgell
The branch, master has been updated
   via  0c5ef6c update location of upstream waf tree
  from  434956b use --enabled-shared in python install script

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


- Log -
commit 0c5ef6c5542f5573180078503abd70a1cef57184
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Oct 5 13:30:35 2011 +1100

update location of upstream waf tree

---

Summary of changes:
 common.fns|3 +--
 import-and-analyse.py |3 +--
 web/trees.conf|4 ++--
 3 files changed, 4 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/common.fns b/common.fns
index 0768d87..87fe12d 100644
--- a/common.fns
+++ b/common.fns
@@ -11,5 +11,4 @@ test_tree ccache-maint . $compiler
 test_tree talloc . $compiler
 test_tree tdb . $compiler
 test_tree ldb . $compiler
-test_tree waf-svn demos $compiler
-
+test_tree waf demos $compiler
diff --git a/import-and-analyse.py b/import-and-analyse.py
index c7ef5cb..2318cc1 100755
--- a/import-and-analyse.py
+++ b/import-and-analyse.py
@@ -38,9 +38,8 @@ smtp.connect()
 
 def check_and_send_mails(cur, old):
 
-if cur.tree is waf-svn:
+if cur.tree is waf:
 # no point sending emails, as the email addresses are invalid
-# from git svn
 return
 
 if cur.tree is samba_3_waf:
diff --git a/web/trees.conf b/web/trees.conf
index 9ab398a..3b497d1 100644
--- a/web/trees.conf
+++ b/web/trees.conf
@@ -83,7 +83,7 @@ scm = git
 repo = rsync.git
 branch = master
 
-[waf-svn]
+[waf]
 scm = git
-repo = waf-svn.git
+repo = waf.git
 branch = master


-- 
build.samba.org


[SCM] Samba Shared Repository - branch master updated

2011-10-03 Thread Andrew Tridgell
The branch, master has been updated
   via  6b5d8e0 s4-subdomain: create trust record with forest root DC
   via  8905344 s4-dsdb: fixed re-join of subdomain
   via  28a6881 s4-lsa: fixed set of trust password with old password
   via  e9758ef s4-dns: add all forest DCs to named.conf.update
   via  7244e25 s4-ldap: added DSDB_CONTROL_NO_GLOBAL_CATALOG to ldap 
encoding list
   via  0ef8dca s4-kdc: fixed handling of previous vs current trust password
   via  71f3a25 s4-auth: rework map_user_info() to use cracknames
   via  0c944d0 s4-sam: don't look in GC NCs for user accounts
   via  aee896a s4-kdc: don't look at global catalog NCs in the kdc
   via  5717da3 s4-kdc: treat a kvno of 255 as unspecified
   via  6356f4c s4-kcc: if we are a GC, auto-add partial replicas
   via  278e44c s4-dsdb: simplify samdb_is_gc()
   via  f469369 s4-dsdb: add the DSDB_CONTROL_PARTIAL_REPLICA when needed
   via  6b69ecd heimdal: handle referrals for 3 part DRSUAPI SPNs
   via  b930b1e s4-repl: try harder to find the right SPN in replication 
server
   via  60cbc98 s4-dsdb: added new control DSDB_MODIFY_PARTIAL_REPLICA
   via  fb937af s4-join: enable cleanup on failed join
   via  efb3f45 s4-drs: added DSDB_REPL_FLAG_ADD_NCNAME to DsAddEntry call
   via  1870fc4 s4-dsdb: added DSDB_REPL_FLAG_ADD_NCNAME flag
   via  50d6a76 s4-dsdb: fixed formatting of a debug message
   via  d12309d s4-partition: allow creation of uninstantiated partitions
   via  f52d8ca s4-dsdb: allow uninstantiated NC heads
   via  faf8581 s4-repl: support creation of new NCs via DsAddEntry
   via  df3cc35 s4-repl: fixed formatting of some debug messages
   via  004f8c6 drsuapi: added ncName attid in enum
   via  7d18241 dns: added example python script for dnsserver protocol
   via  57e30bc0 dns: build python bindings for dnsserver RPC protocol
   via  ff482bc dns: filled in dnsserver.idl
   via  2fbdaab samba-tool: cope with GC compares in ldapcmp
   via  aed0d2e samba-tool: added --full-sync and --sync-all options to 
samba-tool drs replicate
   via  5d4f474 s4-dbchecker: fixed handling of DSDB DNs in dbcheck
   via  ac581b3 s4-dsdb: update callers to dsdb_convert_object_ex()
   via  761fd4a s4-repl: update instanceType in partial_replica replication
   via  f37e81b s4-repl: add FULL_SYNC and PARTIAL_REPLICA flags
   via  bdc9319 s4-dsdb: implement DSDB_REPL_FLAG_PRIORITISE_INCOMING
   via  f45147b s4-dsdb: disallow changes based on instanceType
   via  d3fa496 s4-dsdb: added DSDB_REPL_FLAG* to replication
   via  0d2d6c9 s4-ldap-server: disallow all modifies on global catalog port
   via  1df1003 s4-ldb: enable display of partialAttributeSet with 
--show-binary
  from  d6c949b testtools: Import new upstream snapshot.

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


- Log -
commit 6b5d8e02f78ed2039ea25edeb372d5b86089e3df
Author: Andrew Tridgell tri...@samba.org
Date:   Sat Oct 1 10:58:52 2011 +1000

s4-subdomain: create trust record with forest root DC

when we create a sub-subdomain we need to use the forest naming master
to setup the partition changes for the new subdomain. We also need to
setup the trust with the forest root, as that allows us to create the
needed _msdcs DNS entries in the forest

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Tue Oct  4 07:40:59 CEST 2011 on sn-devel-104

commit 8905344bad2a22c6271340f04093c7bd0e10f348
Author: Andrew Tridgell tri...@samba.org
Date:   Sat Oct 1 10:57:14 2011 +1000

s4-dsdb: fixed re-join of subdomain

if we repeat the join of a subdomain then we try to re-create the NC
for the subdomain during a DsAddEntry(). This allows that re-creation
to succeed if the NC already exists

commit 28a6881d4f4aac814cb01ca87e113caf4b1c8026
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Sep 30 09:03:39 2011 +1000

s4-lsa: fixed set of trust password with old password

the calculation of add_incoming and add_outgoing was not correct when
a trust was already in place

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit e9758ef94de98dd253a79547d2109bcd714f8517
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Sep 30 07:43:54 2011 +1000

s4-dns: add all forest DCs to named.conf.update

this allows all DCs to update DNS entries

commit 7244e254cc28fc3f4273731a53a21ab81c330baa
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Sep 30 07:08:15 2011 +1000

s4-ldap: added DSDB_CONTROL_NO_GLOBAL_CATALOG to ldap encoding list

also remove all the duplicated comments

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 0ef8dca9fb69154f50807d0a56aeb24614d73399
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Sep 30 06:47:08 2011 +1000

[SCM] Samba Shared Repository - branch master updated

2011-09-21 Thread Andrew Tridgell
The branch, master has been updated
   via  0921e75 s4-dbcheck: fixed transaction nesting in dbcheck
   via  4dbc604 samba-tool: use show_recycled in dbchecker
   via  b92e0a2 s4-kdc: set NO_GLOBAL_CATALOG control in kdc
   via  3e685f5 s4-rpc: show binding string in failed rpc binds
   via  0287221 s4-ldap-server: set the NO_GLOBAL_CATALOG control on non-GC 
operations
   via  516f326 s4-repl: remove unused principal_name element
   via  aba856c s4-dsdb: load the partialReplica attribute in the 
@PARTITION object
   via  8c3d77d s4-repl: fill in GUID and SID from partition information
   via  783ff68 s4-kcc: return partial replica NCs in drs showrepl
   via  00ef18f s4-dsdb: added NO_GLOBAL_CATALOG control
   via  73f2df6 s4-dns: started adding support for auto-creation of NS glue 
record
   via  7da636f s4-dsdb: get GUID and SID for DSA from extended DN
   via  2b929b0 s4-dsdb: enable initial replication of partitions via 
DsReplicaSync
   via  86f5ecd s4-repl: get NCs to replicate from our NTDS object
   via  4efb4eb s4-dsdb: added support for replicating with GC partial 
attribute set
   via  677600f s4-dsdb: failing to find the object is not an error in 
dsdb_loadreps()
  from  585294e s3: Fix Coverity ID 2619: UNINIT

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


- Log -
commit 0921e750018a53c02e9984006a48cb08cd370b92
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Sep 22 09:58:39 2011 +1000

s4-dbcheck: fixed transaction nesting in dbcheck

ensure we don't cancel a transaction we didn't start

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Sep 22 03:39:59 CEST 2011 on sn-devel-104

commit 4dbc604d9c055530f4f4440aae704ed9f9b81c6d
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Sep 22 09:58:09 2011 +1000

samba-tool: use show_recycled in dbchecker

we need to use show_recycled instead of show_deleted in dbchecker to
allow us to see recycled objects

commit b92e0a232eabc8e759ae18909d6f0d59d4e05736
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Sep 22 09:57:26 2011 +1000

s4-kdc: set NO_GLOBAL_CATALOG control in kdc

the kdc doesn't want to find users who are in partialReplica
partitions, as they won't have the needed secret info for the kdc to
operate. We need to generate referrals instead

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 3e685f599580d5fe006a07511fa78c23f30dd5fb
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Sep 22 09:56:27 2011 +1000

s4-rpc: show binding string in failed rpc binds

this makes debugging some RPC auth issues easier

commit 02872212ebd18f150d3e7cff5722698b770c9f90
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Sep 22 09:55:55 2011 +1000

s4-ldap-server: set the NO_GLOBAL_CATALOG control on non-GC operations

this makes us honor GC semantics on the two ldap ports

commit 516f32654ae2897acd1d7095f18ac6eb0db09230
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Sep 22 09:54:56 2011 +1000

s4-repl: remove unused principal_name element

commit aba856c6668bbe56e2d84057bead31de1e08e2bd
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Sep 22 09:52:29 2011 +1000

s4-dsdb: load the partialReplica attribute in the @PARTITION object

this modifies the partition module to honor a partialReplica attribute
on the @PARTITION module, marking partiations as partial replicas so
the NO_GLOBAL_CATALOG control can be honoured

commit 8c3d77d84c9627c9ed4e1164d4844f83345fdbd6
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Sep 22 09:50:57 2011 +1000

s4-repl: fill in GUID and SID from partition information

when we find a NC via a DN string, fill in the GUID and SID so the
caller can properly report them

commit 783ff68628fee6d5681b3a9abd80b74a78588926
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Sep 22 09:49:54 2011 +1000

s4-kcc: return partial replica NCs in drs showrepl

the showrepl operation should return all our replicated NCs, including
partial replicas

commit 00ef18f19c39bf5083939ac79854bcd1ccc7cef7
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Sep 22 09:48:17 2011 +1000

s4-dsdb: added NO_GLOBAL_CATALOG control

this control is used to ask samdb to not return searches with a basedn
in partial repica partitions, which is needed to support the
difference between a search on the 3268 GC ldap port and the non-GC
389 port

commit 73f2df6a378034455f44bb5ed94a7eba97e04448
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 21 08:59:30 2011 +1000

s4-dns: started adding support for auto-creation of NS glue record

when we create a new subdomain we need to create a NS glue record in
the parent domain

[SCM] Samba Shared Repository - branch master updated

2011-09-20 Thread Andrew Tridgell
The branch, master has been updated
   via  0167b04 s4-drs: allow replication of the GC partial attribute set
  from  92c022f tdb2: allow readonly changes even while holding locks.

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


- Log -
commit 0167b0447fa679ceaf322633e3170f43fde4b740
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Sep 20 15:15:36 2011 +1000

s4-drs: allow replication of the GC partial attribute set

when a DC has the GUID_DRS_GET_FILTERED_ATTRIBUTES right on a NC, we
need to allow it to replicate if all the attributes it is asking for
are in the GC partial attribute set

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Tue Sep 20 13:47:38 CEST 2011 on sn-devel-104

---

Summary of changes:
 source4/rpc_server/drsuapi/getncchanges.c |  100 +++--
 1 files changed, 95 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/rpc_server/drsuapi/getncchanges.c 
b/source4/rpc_server/drsuapi/getncchanges.c
index ca24b3d..61a6002 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -1162,20 +1162,90 @@ static WERROR 
dcesrv_drsuapi_is_reveal_secrets_request(struct drsuapi_bind_state
}
}
 
+   if (req10-partial_attribute_set_ex) {
+   /* check the extended attributes they asked for */
+   for (i=0; ireq10-partial_attribute_set_ex-num_attids; i++) {
+   const struct dsdb_attribute *sa;
+   sa = dsdb_attribute_by_attributeID_id(schema, 
req10-partial_attribute_set_ex-attids[i]);
+   if (sa == NULL) {
+   return WERR_DS_DRA_SCHEMA_MISMATCH;
+   }
+   if (!dsdb_attr_in_rodc_fas(sa)) {
+   *is_secret_request = true;
+   return WERR_OK;
+   }
+   }
+   }
+
+   *is_secret_request = false;
+   return WERR_OK;
+}
+
+/*
+  see if this getncchanges request is only for attributes in the GC
+  partial attribute set
+ */
+static WERROR dcesrv_drsuapi_is_gc_pas_request(struct drsuapi_bind_state 
*b_state,
+  struct 
drsuapi_DsGetNCChangesRequest10 *req10,
+  bool *is_gc_pas_request)
+{
+   enum drsuapi_DsExtendedOperation exop;
+   uint32_t i;
+   struct dsdb_schema *schema;
+
+   exop = req10-extended_op;
+
+   switch (exop) {
+   case DRSUAPI_EXOP_FSMO_REQ_ROLE:
+   case DRSUAPI_EXOP_FSMO_RID_ALLOC:
+   case DRSUAPI_EXOP_FSMO_RID_REQ_ROLE:
+   case DRSUAPI_EXOP_FSMO_REQ_PDC:
+   case DRSUAPI_EXOP_FSMO_ABANDON_ROLE:
+   case DRSUAPI_EXOP_REPL_SECRET:
+   *is_gc_pas_request = false;
+   return WERR_OK;
+   case DRSUAPI_EXOP_REPL_OBJ:
+   case DRSUAPI_EXOP_NONE:
+   break;
+   }
+
+   if (req10-partial_attribute_set == NULL) {
+   /* they want it all */
+   *is_gc_pas_request = false;
+   return WERR_OK;
+   }
+
+   schema = dsdb_get_schema(b_state-sam_ctx, NULL);
+
/* check the attributes they asked for */
-   for (i=0; ireq10-partial_attribute_set_ex-num_attids; i++) {
+   for (i=0; ireq10-partial_attribute_set-num_attids; i++) {
const struct dsdb_attribute *sa;
-   sa = dsdb_attribute_by_attributeID_id(schema, 
req10-partial_attribute_set_ex-attids[i]);
+   sa = dsdb_attribute_by_attributeID_id(schema, 
req10-partial_attribute_set-attids[i]);
if (sa == NULL) {
return WERR_DS_DRA_SCHEMA_MISMATCH;
}
-   if (!dsdb_attr_in_rodc_fas(sa)) {
-   *is_secret_request = true;
+   if (!sa-isMemberOfPartialAttributeSet) {
+   *is_gc_pas_request = false;
return WERR_OK;
}
}
 
-   *is_secret_request = false;
+   if (req10-partial_attribute_set_ex) {
+   /* check the extended attributes they asked for */
+   for (i=0; ireq10-partial_attribute_set_ex-num_attids; i++) {
+   const struct dsdb_attribute *sa;
+   sa = dsdb_attribute_by_attributeID_id(schema, 
req10-partial_attribute_set_ex-attids[i]);
+   if (sa == NULL) {
+   return WERR_DS_DRA_SCHEMA_MISMATCH;
+   }
+   if (!sa-isMemberOfPartialAttributeSet) {
+   *is_gc_pas_request = false;
+   return WERR_OK

[SCM] Samba Shared Repository - branch master updated

2011-09-19 Thread Andrew Tridgell
The branch, master has been updated
   via  be4f188 s4-client: added close command in smbclient
  from  fcfde9a s4:ntvfs/common/brlock.c - remove unnecessary include 
tdb_compat.h

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


- Log -
commit be4f188128d631abe014a8182c22a03f4c09264a
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Sep 20 06:06:26 2011 +1000

s4-client: added close command in smbclient

this matches the existing open command, and also gives you error codes
on both open and close

useful for testing share mode locking

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Mon Sep 19 23:59:28 CEST 2011 on sn-devel-104

---

Summary of changes:
 source4/client/client.c |   66 ---
 1 files changed, 62 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/client/client.c b/source4/client/client.c
index 2f353ae..c30d17d 100644
--- a/source4/client/client.c
+++ b/source4/client/client.c
@@ -2131,18 +2131,75 @@ static int cmd_delprivileges(struct smbclient_context 
*ctx, const char **args)
 
 
 /
+open a file
 /
 static int cmd_open(struct smbclient_context *ctx, const char **args)
 {
-   char *mask;
-   
+   char *filename;
+   union smb_open io;
+   NTSTATUS status;
+   TALLOC_CTX *tmp_ctx;
+
if (!args[1]) {
d_printf(open filename\n);
return 1;
}
-   mask = talloc_asprintf(ctx, %s%s, ctx-remote_cur_dir, args[1]);
+   tmp_ctx = talloc_new(ctx);
+
+   filename = talloc_asprintf(tmp_ctx, %s%s, ctx-remote_cur_dir, 
args[1]);
+
+   io.generic.level = RAW_OPEN_NTCREATEX;
+   io.ntcreatex.in.root_fid.fnum = 0;
+   io.ntcreatex.in.flags = 0;
+   io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
+   io.ntcreatex.in.create_options = 0;
+   io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
+   io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_READ;
+   io.ntcreatex.in.alloc_size = 0;
+   io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN_IF;
+   io.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
+   io.ntcreatex.in.security_flags = 0;
+   io.ntcreatex.in.fname = filename;
+
+   status = smb_raw_open(ctx-cli-tree, tmp_ctx, io);
+   talloc_free(tmp_ctx);
+
+   if (NT_STATUS_IS_OK(status)) {
+   d_printf(Opened file with fnum %u\n, 
(unsigned)io.ntcreatex.out.file.fnum);
+   } else {
+   d_printf(Opened failed: %s\n, nt_errstr(status));
+   }
+
+   return 0;
+}
 
-   smbcli_open(ctx-cli-tree, mask, O_RDWR, DENY_ALL);
+/
+close a file
+/
+static int cmd_close(struct smbclient_context *ctx, const char **args)
+{
+   union smb_close io;
+   NTSTATUS status;
+   uint16_t fnum;
+
+   if (!args[1]) {
+   d_printf(close fnum\n);
+   return 1;
+   }
+
+   fnum = atoi(args[1]);
+
+   ZERO_STRUCT(io);
+   io.generic.level = RAW_CLOSE_CLOSE;
+   io.close.in.file.fnum = fnum;
+
+   status = smb_raw_close(ctx-cli-tree, io);
+
+   if (NT_STATUS_IS_OK(status)) {
+   d_printf(Closed file OK\n);
+   } else {
+   d_printf(Close failed: %s\n, nt_errstr(status));
+   }
 
return 0;
 }
@@ -2694,6 +2751,7 @@ static struct
   {mput,cmd_mput,mask put all matching files,{COMPL_REMOTE,COMPL_NONE}},
   {newer,cmd_newer,file only mget files newer than the specified local 
file,{COMPL_LOCAL,COMPL_NONE}},
   {open,cmd_open,mask open a file,{COMPL_REMOTE,COMPL_NONE}},
+  {close,cmd_close,fnum close a file,{COMPL_NONE,COMPL_NONE}},
   {privileges,cmd_privileges,user show privileges for a 
user,{COMPL_NONE,COMPL_NONE}},
   {print,cmd_print,file name print a file,{COMPL_NONE,COMPL_NONE}},
   {printmode,cmd_printmode,graphics or text set the print 
mode,{COMPL_NONE,COMPL_NONE}},


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-09-18 Thread Andrew Tridgell
The branch, master has been updated
   via  9d98461 s4-dsdb: cope with out of sync replication attributes in 
partition module
   via  2e76b79 ldb:ldb_extended -make the call more similar to 
ldb_search
   via  966b5d5 pyldb: fixed places where we try to concatenate a Dn with a 
string
   via  f79d6ee s4-provision: use get_config_basedn() in DNS setup
   via  579fd43 samba-tool: use get_config_basedn() to get configuration NC 
DN
   via  ee7cfca s4-kdc: default kvno for inter-domain trusts to zero
   via  4577ee1 s4-dsdb: use get_config_basedn() in python tests
   via  cea37b0 s4-drs: cope with REPL_OBJ getncchanges call for new object
   via  aa960d8 s4-provision Add initial support for joining as a new 
subdomain
  from  4e05847 Fix a typo. This is not an electromagnet pulse daemon I 
guess :-)

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


- Log -
commit 9d9846115068cfb328a18a0a2eddb5698a21edb8
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Sep 19 10:55:17 2011 +1000

s4-dsdb: cope with out of sync replication attributes in partition module

if the @ATTRIBUTES or other objects which are replicated between
partions become out of sync, then the ldb would fail to open. This
changes ensures that we can always fix those records, by running the
operation in the top level partition, and replicating the result to
the other partitions

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Mon Sep 19 04:31:48 CEST 2011 on sn-devel-104

commit 2e76b798fe9732284a50b43cf10a0f3802ea6e4f
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Tue Jun 21 22:25:22 2011 +0200

ldb:ldb_extended -make the call more similar to ldb_search

For example NULL out the LDB result pointer on failures.

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

commit 966b5d5de2fc40ff77e2b947c61a2419795a2282
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Sep 16 15:15:35 2011 +1000

pyldb: fixed places where we try to concatenate a Dn with a string

you need to either use str(dn) or use %s in a format string

commit f79d6ee929884ad76f2a88fc67c660fec31b8ed7
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Sep 16 11:18:26 2011 +1000

s4-provision: use get_config_basedn() in DNS setup

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 579fd43057e5d838ef24a72af20203eda8199204
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Sep 16 11:18:05 2011 +1000

samba-tool: use get_config_basedn() to get configuration NC DN

this allows these commands to work for subdomains

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit ee7cfcadc60eac34bf646f765798ca5a01d311ed
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Sep 16 11:15:27 2011 +1000

s4-kdc: default kvno for inter-domain trusts to zero

the exact value doesn't matter, as both Samba and windows check
against the latest password, but the old default of -1 caused ASN.1
parsing errors on windows, which prevented it answering TGS requests

thanks to Hongwei Sun for finding this from a ttt trace

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 4577ee1f957e08d19b2c849b9b698b31474040ff
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Sep 16 11:14:12 2011 +1000

s4-dsdb: use get_config_basedn() in python tests

we can't just append CN=Configuration to the basedn, as that won't
give the right configuration DN for a subdomain of a forest

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit cea37b0d6d0f5f32fdfafd160dfbcf2c5dccdb12
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Sep 16 11:13:05 2011 +1000

s4-drs: cope with REPL_OBJ getncchanges call for new object

when we do a subdomain join we create a new object using a REPL_OBJ
getncchanges call for the partitions DN. This has a side effect of
creating that object. We need to skip the UDV update in that case

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit aa960d8fa70ab243e97eed5d7bb7a47f4386487c
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Aug 24 15:39:51 2011 +1000

s4-provision Add initial support for joining as a new subdomain

To do this we need to reorganise a lot of the provision code, so that
we can create the framework for the inbound replicaton of the config
and schema partitions and then add in the new subdomain locally.

Andrew Bartlett

---

Summary of changes:
 lib/ldb/common/ldb.c   |8 +-
 source4/dsdb/samdb/ldb_modules/partition.c |   69 +-
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c|   15

[SCM] Samba Shared Repository - branch master updated

2011-09-07 Thread Andrew Tridgell
The branch, master has been updated
   via  e0c5f1c s4-cracknames: use consistent search for crossRef objects
   via  dd80fc6 pidl: adjust expected output for new flag checking
   via  de318e5 s4-dsdb: prevent crash on bad DN in construct_parent_guid()
   via  ad4ce31 torture-drs: fixed NDR tests for DRS blobs
   via  bf8dd20 torture-ndr: fixed NDR tests for NTLMSSP blobs
   via  7416da6 torture-ndr: fixed NDR tests for NBT blobs
   via  d49f067 torture-ndr: fixed NDR tests for DFS blobs
   via  430123e torture-ndr: added support for testing push functions
   via  3d5dd91 pidl: added checking of NDR flags in generated code
   via  a19fd96 libndr: add checking to all pull/push functions of base 
types
   via  1c25f5e libndr: moved the NDR_* flags to have less overlap
   via  6e25723 lib: added base64_decode_data_blob_talloc()
   via  1e9573f s4-dsdb: fixed compiler warning
  from  0aa6751 Tidy up previous patch for bug #8442 - NFSv4 DENY ACLs 
always include SYNCHRONIZE flag - blocking renames.

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


- Log -
commit e0c5f1c1ab2db6042112ee445941b04ae162e778
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 7 17:18:24 2011 +1000

s4-cracknames: use consistent search for crossRef objects

This matches the search in other places

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Sep  8 05:02:54 CEST 2011 on sn-devel-104

commit dd80fc60fd954a3bee86831e887135c4be7ea3fd
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 7 17:12:37 2011 +1000

pidl: adjust expected output for new flag checking

commit de318e58b01696e7aea39d14da099dbb4173c055
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 7 16:25:48 2011 +1000

s4-dsdb: prevent crash on bad DN in construct_parent_guid()

this was found by a flakey test in autobuild

commit ad4ce31e86fecf27297c40c80404f85a150ab799
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 7 15:37:22 2011 +1000

torture-drs: fixed NDR tests for DRS blobs

this also adds new tests for trustAuthInOutBlob blobs

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit bf8dd20bddd1fca3e4caf59bf3253c70530850b7
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 7 15:36:57 2011 +1000

torture-ndr: fixed NDR tests for NTLMSSP blobs

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 7416da636d91f0c8ae559dc02e5b6cbcabc8779d
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 7 15:36:38 2011 +1000

torture-ndr: fixed NDR tests for NBT blobs

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit d49f0676d07a5e27c6a1a7441f91f9b474222529
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 7 15:36:22 2011 +1000

torture-ndr: fixed NDR tests for DFS blobs

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 430123e84e099f78ba794fdbf7de30d1169cd0cb
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 7 15:35:55 2011 +1000

torture-ndr: added support for testing push functions

this allows us to check the symmetry of pull/push functions in NDR
tests

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 3d5dd91f598b8661d090ae147ae7c3a8fcea29e0
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 7 15:34:43 2011 +1000

pidl: added checking of NDR flags in generated code

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit a19fd96ab87290cd6ed1c93cd8f83e8697592b21
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 7 15:34:20 2011 +1000

libndr: add checking to all pull/push functions of base types

this checks that the passed in ndr_flags are valid

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 1c25f5ebca7eb4e8a6ce95b1adf6088d67aecb94
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Sep 7 15:29:32 2011 +1000

libndr: moved the NDR_* flags to have less overlap

We have 3 different types of flags values in our NDR layer. We've
recently found bugs where these types of flags have been mixed up,
especially by people adding hand written ndr code for tricky
structures. We previously got away with this because (for example)
NDR_SCALARS and NDR_IN had the same value, so mixing up the two
concepts sometimes worked. Unfortunately it also led to bugs where we
didn't do what was expected, such as in our smbtorture ndr test suite,
where passing a ndr_flags value of zero led to only checking that two
empty structures were equal.

This changes the values of the NDR_IN|NDR_OUT and
NDR_SCALARS|NDR_BUFFERS values to be in different bit ranges, and adds
macros for checking the validity of passed in flags. A followup

[SCM] build.samba.org - branch master updated

2011-09-07 Thread Andrew Tridgell
The branch, master has been updated
   via  434956b use --enabled-shared in python install script
  from  584a1fe the ppc64 box 'tridge' needs the python devel headers 
installed

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


- Log -
commit 434956b37afb55a418d488233a6afaf907d4e8d2
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Sep 8 13:51:17 2011 +1000

use --enabled-shared in python install script

this makes the build much smaller, and fixes a problem on 'tridge' in
the build farm

---

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


Changeset truncated at 500 lines:

diff --git a/install_python.fns b/install_python.fns
index d44b999..d3c4d64 100644
--- a/install_python.fns
+++ b/install_python.fns
@@ -14,7 +14,7 @@ do_install_python() {
rm -rf $VERSION || exit 1
tar -xf $VERSION.tar || exit 1
cd $VERSION || exit 1
-   ./configure --prefix=$HOME/python --disable-ipv6 || exit 1
+   ./configure --prefix=$HOME/python --disable-ipv6 --enable-shared || 
exit 1
make || exit 1
make install || exit 1
cd ../.. || exit 1


-- 
build.samba.org


[SCM] Samba Shared Repository - branch master updated

2011-09-01 Thread Andrew Tridgell
The branch, master has been updated
   via  ccaab14 ldb: make the 'spy' code more paranoid
   via  8d9665d s4-services: disable the web server by default
   via  4d6c120 ldb: fixed ldbsearch when no baseDN specified and cross-ncs 
is used
   via  8ab3c84 pyldb: added OID_COMPARATOR constants
   via  7dba93a wintest: update snapshots
  from  786fe9f Fix bug 8429 - Compound SMB2 requests on an IPC connection 
can corrupt the reply stream.

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


- Log -
commit ccaab14ac423025d1c3188c429832533f19479f1
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Sep 1 14:28:10 2011 +1000

ldb: make the 'spy' code more paranoid

the spy code in ldb_tdb was added a while ago to overcome a memory
hierarchy problem with async ldb errors. Recently we started to get
valgrind errors related to the order of free in the spy code. This
patch ensures that we don't try to use a freed spy pointer. This
prevents the valgrind errors, although I suspect that the memory
hierarchy we have here is more complex than it needs to be

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Sep  1 08:54:23 CEST 2011 on sn-devel-104

commit 8d9665d5d15954cd36d1c385384520ce15ab4857
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Sep 1 13:50:17 2011 +1000

s4-services: disable the web server by default

the web server is not being actively maintained, and is causing
problems with memory errors (as shown by valgrind). It is better to
disable this until it can get some TLC

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 4d6c120fb7a9aef80e83f00b155ff93e96034897
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Aug 31 16:17:54 2011 +1000

ldb: fixed ldbsearch when no baseDN specified and cross-ncs is used

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 8ab3c843b1bf0f60a7d6b68411931d204b6f882b
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Aug 31 15:55:27 2011 +1000

pyldb: added OID_COMPARATOR constants

This also changes the other constants to remove the LDB_ prefix, which
is redundent

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 7dba93ac4170bfb17bbd579fa9578391e07667f0
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Aug 30 09:02:01 2011 +1000

wintest: update snapshots

---

Summary of changes:
 lib/ldb/ldb_tdb/ldb_tdb.c   |   14 +++-
 lib/ldb/ldb_tdb/ldb_tdb.h   |8 ---
 lib/ldb/pyldb.c |   20 ++
 lib/ldb/tools/ldbsearch.c   |   28 +++---
 source4/param/loadparm.c|2 +-
 source4/scripting/python/samba/dbchecker.py |2 +-
 wintest/conf/abartlet.conf  |   10 
 7 files changed, 54 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ldb/ldb_tdb/ldb_tdb.c b/lib/ldb/ldb_tdb/ldb_tdb.c
index f07a9d2..3630a18 100644
--- a/lib/ldb/ldb_tdb/ldb_tdb.c
+++ b/lib/ldb/ldb_tdb/ldb_tdb.c
@@ -52,6 +52,12 @@
 #include ldb_tdb.h
 #include lib/tdb_compat/tdb_compat.h
 
+/*
+  prevent memory errors on callbacks
+*/
+struct ltdb_req_spy {
+   struct ltdb_context *ctx;
+};
 
 /*
   map a tdb error code to a ldb error code
@@ -1221,9 +1227,10 @@ static void ltdb_timeout(struct tevent_context *ev,
ltdb_request_done(ctx, LDB_ERR_TIME_LIMIT_EXCEEDED);
}
 
-   if (!ctx-request_terminated) {
+   if (ctx-spy) {
/* neutralize the spy */
ctx-spy-ctx = NULL;
+   ctx-spy = NULL;
}
talloc_free(ctx);
 }
@@ -1318,9 +1325,10 @@ static void ltdb_callback(struct tevent_context *ev,
}
 
 done:
-   if (!ctx-request_terminated) {
+   if (ctx-spy) {
/* neutralize the spy */
ctx-spy-ctx = NULL;
+   ctx-spy = NULL;
}
talloc_free(ctx);
 }
@@ -1330,7 +1338,9 @@ static int ltdb_request_destructor(void *ptr)
struct ltdb_req_spy *spy = talloc_get_type(ptr, struct ltdb_req_spy);
 
if (spy-ctx != NULL) {
+   spy-ctx-spy = NULL;
spy-ctx-request_terminated = true;
+   spy-ctx = NULL;
}
 
return 0;
diff --git a/lib/ldb/ldb_tdb/ldb_tdb.h b/lib/ldb/ldb_tdb/ldb_tdb.h
index 96ad43f..29856bf 100644
--- a/lib/ldb/ldb_tdb/ldb_tdb.h
+++ b/lib/ldb/ldb_tdb/ldb_tdb.h
@@ -33,14 +33,6 @@ struct ltdb_private {
bool warn_unindexed;
 };
 
-/*
-  the async local context
-  holds also internal search state during a full db search
-*/
-struct ltdb_req_spy {
-   struct ltdb_context *ctx

[SCM] build.samba.org - branch master updated

2011-08-31 Thread Andrew Tridgell
The branch, master has been updated
   via  584a1fe the ppc64 box 'tridge' needs the python devel headers 
installed
  from  f36e05d use www.samba.org as server for the css

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


- Log -
commit 584a1fe97bf0488f4ee1e02d79d089e939524f88
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Sep 1 08:28:19 2011 +1000

the ppc64 box 'tridge' needs the python devel headers installed

---

Summary of changes:
 gwen.fns = tridge.fns |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
 copy gwen.fns = tridge.fns (94%)


Changeset truncated at 500 lines:

diff --git a/gwen.fns b/tridge.fns
similarity index 94%
copy from gwen.fns
copy to tridge.fns
index a9ee75a..03f5d9d 100644
--- a/gwen.fns
+++ b/tridge.fns
@@ -3,7 +3,7 @@ per_run_hook
 global_lock
 
 . install_python.fns
-compilers=gcc cc
+compilers=gcc
 
 for compiler in $compilers; do
. common.fns


-- 
build.samba.org


[SCM] Samba Shared Repository - branch master updated

2011-08-24 Thread Andrew Tridgell
The branch, master has been updated
   via  68a42bd s4-dsdb: fixed use of RMD flags in ldb search in dirsync 
module
   via  b2c6b01 s4-dns: fixed dns_update_list for multi-domain forests
   via  08b2aa0 s4-dns: cope with duplicate entries in dns_update_list
   via  345220b s4-dsdb: fixed newlines in DEBUG() calls in cracknames
   via  32c5e3b s4-join: fixed DNS hostname
   via  dea4f39 s4-drs: fixed msdcs DNS name in getncchanges
   via  0859369 s4-libnet: fixed forest DNS name
   via  4f421d0 s4-acl: use dnsforest not dnsdomain for GC names
   via  68100e5 s4-join: setup DNS forest name on join context
   via  717706c s4-dns/spn: fixed DNS and SPN scripts to setup forest DNS 
name
   via  219271b s4-samdb: added host_dns_name(), domain_dns_name() and 
forest_dns_name()
   via  5a9dc1d s4-repl: fixed _msdcs DNS name
   via  484fb30 s4-kcc: fixed _msdcs DNS name
   via  9784fbc s4-dsdb: added samdb_ntds_msdcs_dns_name()
   via  42ae193 s4-dns: fixed DNS and SPN update lists for multi-domain 
support
   via  53b08bf s4-provision: pass the rootDN into guess_names()
   via  27656e9 s4-dsdb: fixed calls to ldb_val_string_cmp()
   via  9f404b3 s4-dsdb: added samdb_dn_to_dns_domain()
   via  bcbb35b s4-dsdb: assert that base DNs are used correctly
   via  1216649 s4-dsdb: enforce NULL DN validity in partition module
   via  171c3cd s4-dsdb: fixed basedn in extended_dn_in module
   via  2c47f0a samba-tool: fixed use of base DNs in ldapcmp
   via  33fb1f8 s4-spnupdate: fixed searches on domain NC
   via  b6e1887 s4-dns: fixed base search on domain NC
   via  6765190 s4-samr: fixed subtree search
   via  8510e40 s4-kdc: fixed subtree search in KDC
   via  68ff9ec s4-dsdb: cleanup use of NULL vs base DN in samldb
   via  4744c12 s4-dsdb: removed unused function in ACL module
   via  559d92a s4-dsdb: fixed all partitions search in cracknames
   via  9f2a41e s4-dns: when searching all partitions the NULL basedn is OK
   via  fb612af pdb-samba4: use ldb_get_default_basedn() instead of NULL
   via  4655a5b pyldb: fixed a warning
  from  fac75f0 s3:winbindd fix a return code check

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


- Log -
commit 68a42bd76274fbee37270b2eaa34ffb1c96068a9
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Aug 24 15:53:58 2011 +1000

s4-dsdb: fixed use of RMD flags in ldb search in dirsync module

I'm pretty sure a SHOW_DELETED was wanted here

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Aug 25 01:10:13 CEST 2011 on sn-devel-104

commit b2c6b0122f88767abd6685117066c793e8191b6f
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Aug 24 15:48:02 2011 +1000

s4-dns: fixed dns_update_list for multi-domain forests

this should now match the DNS entries of w2k8r2c

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit 08b2aa08433d4e4be9764f926fdbec455df3a8ea
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Aug 24 15:47:27 2011 +1000

s4-dns: cope with duplicate entries in dns_update_list

this is needed for when DNSFOREST and DNSDOMAIN are the same

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit 345220b762af62b071faf9d9b352e928dfe1c375
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Aug 24 15:46:53 2011 +1000

s4-dsdb: fixed newlines in DEBUG() calls in cracknames

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit 32c5e3b2040ddb10c45ab8e3a326f0d3d7a4c75c
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Aug 24 13:52:09 2011 +1000

s4-join: fixed DNS hostname

we need the local hostname, not the remote name

commit dea4f3941b9c4006cc16b949ef5b6657eb009e14
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Aug 24 13:51:49 2011 +1000

s4-drs: fixed msdcs DNS name in getncchanges

commit 085936926a446a289b88dfafcfe425c5dfe615b1
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Aug 24 13:51:01 2011 +1000

s4-libnet: fixed forest DNS name

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 4f421d04064c7f1a3a4052a37c2908a8e5dbeb89
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 22 17:43:56 2011 +1000

s4-acl: use dnsforest not dnsdomain for GC names

commit 68100e5a21adab26dee367b0742a76b485edc16e
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 22 17:43:37 2011 +1000

s4-join: setup DNS forest name on join context

commit 717706cb9691d435071c9883b3da649fcada2ea6
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 22 17:41:08 2011 +1000

s4-dns/spn: fixed DNS and SPN scripts to setup forest DNS name

commit 219271bd154817ccf0cb4706769e07eb5dfa11ee
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 22 17:40

[SCM] Samba Shared Repository - branch master updated

2011-08-17 Thread Andrew Tridgell
The branch, master has been updated
   via  5f33017 s4-test: use dbcheck on more of our selftest databases
   via  97b2f30 s4-test: only check one database in quickcheck
   via  46a76bc s4-dsdb: fixed deletion of backlinks for fl2000 DCs
   via  c5dc26b s4-dsdb: added comments and fixed backlink check in 
repl_meta_data
   via  16fa0f6 s4-dirsync: use dsdb_module_dn_by_guid() not 
dsdb_find_dn_by_guid() in modules
   via  23b1d09 samba-tool: changed samba-tool user delete to use samdb 
instead of Net()
   via  75a90a9 s4-samdb: added deleteuser() to samdb
   via  8c52caa s4-test: prevent the utable test from crashing
  from  fe66abd Adapt del_sid_from_array to Samba coding style

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


- Log -
commit 5f3301759e33a498803748f30e57712ac67a9965
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 15 15:58:27 2011 +1000

s4-test: use dbcheck on more of our selftest databases

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Aug 18 02:58:55 CEST 2011 on sn-devel-104

commit 97b2f30b9e8b8440d12dedf4fdf0309edf6f2036
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 15 16:20:21 2011 +1000

s4-test: only check one database in quickcheck

commit 46a76bc2298db0434ff9e75796c8aaad9f0b2970
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 15 16:03:11 2011 +1000

s4-dsdb: fixed deletion of backlinks for fl2000 DCs

when in FL 2000 we were not correctly deleting backlinks as we uses
dsdb_find_dn_by_guid() which doesn't find deleted objects. Modules
should use dsdb_module_dn_by_guid() which prevents going to the top
level, and finds deleted objects

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit c5dc26b9769bbaf2883a8cc8fc6fbe3168ff1c9b
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 15 16:01:39 2011 +1000

s4-dsdb: added comments and fixed backlink check in repl_meta_data

added comments explaining the backlink deletion code, plus fix a use
of a bitwise operation in a boolean expression, and avoid calling
dsdb_functional_level() inside a loop

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 16fa0f68bdce39eb19f0fa5486ff231467662b12
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 15 15:59:23 2011 +1000

s4-dirsync: use dsdb_module_dn_by_guid() not dsdb_find_dn_by_guid() in 
modules

this prevents us going to the top level of the module stack

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 23b1d09a5fd9825786343a98f9aab756dd749f95
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 15 12:07:50 2011 +1000

samba-tool: changed samba-tool user delete to use samdb instead of Net()

this makes it possible to use with -H, so you can delete users on
remote DCs or against local databases

commit 75a90a952b8d65329c7f8cb055b5bb685d4e0b7d
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 15 12:06:59 2011 +1000

s4-samdb: added deleteuser() to samdb

This is similar to deletegroup()

commit 8c52caa83c3487463e3457e96bd4f600c0ef87fc
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 15 09:53:45 2011 +1000

s4-test: prevent the utable test from crashing

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/dirsync.c   |2 +-
 source4/dsdb/samdb/ldb_modules/linked_attributes.c |   31 ---
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c|   19 +++-
 source4/scripting/python/samba/netcmd/user.py  |   26 +++--
 source4/scripting/python/samba/samdb.py|   23 ++
 source4/selftest/quick |2 +-
 source4/selftest/tests.py  |5 ++-
 source4/torture/basic/utable.c |8 +++--
 8 files changed, 80 insertions(+), 36 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/dirsync.c 
b/source4/dsdb/samdb/ldb_modules/dirsync.c
index 7ed1ed3..6a5703a 100644
--- a/source4/dsdb/samdb/ldb_modules/dirsync.c
+++ b/source4/dsdb/samdb/ldb_modules/dirsync.c
@@ -522,7 +522,7 @@ skip:

el-name, ldb_dn_get_linearized(copydn)));
return 
ldb_operr(ldb);
}
-   ret = 
dsdb_find_dn_by_guid(ldb, newmsg, guid, tdn);
+   ret = 
dsdb_module_dn_by_guid(dsc-module, newmsg, guid, tdn, req);
if (ret

[SCM] Samba Shared Repository - branch master updated

2011-08-12 Thread Andrew Tridgell
The branch, master has been updated
   via  6b3a12b s4-test: use standard process model for 'dc' server
   via  63e5b39 socket-wrapped: added wrappers for dup() and dup2()
  from  b4a730d s3:selftest: run smbtorture3 CHAIN1/CHAIN2 tests

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


- Log -
commit 6b3a12b0f4c38c87a1f1ff4227ab78ac7624289d
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Aug 12 14:37:04 2011 +1000

s4-test: use standard process model for 'dc' server

this provides us with both 'standard' and 'single' process models in
selftest, ensuring that we test the standard process model in the
build farm

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Fri Aug 12 11:06:50 CEST 2011 on sn-devel-104

commit 63e5b395d00535c88274bafb9d5e4b0e9d753b36
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Aug 12 14:28:03 2011 +1000

socket-wrapped: added wrappers for dup() and dup2()

The Samba4 standard process model uses dup() on incoming sockets as an
optimisation (it makes select() a tiny bit faster when used).

Adding dup() to socket wrapper allows us to use the standard process
model in selftest

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

---

Summary of changes:
 lib/socket_wrapper/socket_wrapper.c |  122 ++-
 lib/socket_wrapper/socket_wrapper.h |   11 +++
 selftest/target/Samba4.pm   |   32 --
 3 files changed, 143 insertions(+), 22 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/socket_wrapper/socket_wrapper.c 
b/lib/socket_wrapper/socket_wrapper.c
index 2b52626..9469809 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -127,6 +127,8 @@
 #define real_writev writev
 #define real_socket socket
 #define real_close close
+#define real_dup dup
+#define real_dup2 dup2
 #endif
 
 #ifdef HAVE_GETTIMEOFDAY_TZ
@@ -225,7 +227,6 @@ struct socket_info
int connected;
int defer_connect;
 
-   char *path;
char *tmp_path;
 
struct sockaddr *myname;
@@ -2523,7 +2524,6 @@ _PUBLIC_ int swrap_close(int fd)
swrap_dump_packet(si, NULL, SWRAP_CLOSE_ACK, NULL, 0);
}
 
-   if (si-path) free(si-path);
if (si-myname) free(si-myname);
if (si-peername) free(si-peername);
if (si-tmp_path) {
@@ -2534,3 +2534,121 @@ _PUBLIC_ int swrap_close(int fd)
 
return ret;
 }
+
+_PUBLIC_ int swrap_dup(int fd)
+{
+   struct socket_info *si, *si2;
+   int fd2;
+
+   si = find_socket_info(fd);
+
+   if (!si) {
+   return real_dup(fd);
+   }
+
+   if (si-tmp_path) {
+   /* we would need reference counting to handle this */
+   errno = EINVAL;
+   return -1;
+   }
+
+   fd2 = real_dup(fd);
+   if (fd2 == -1) {
+   return -1;
+   }
+
+   si2 = (struct socket_info *)malloc(sizeof(struct socket_info));
+   if (si2 == NULL) {
+   real_close(fd2);
+   errno = ENOMEM;
+   return -1;
+   }
+
+   /* copy the whole structure, then duplicate pointer elements */
+   *si2 = *si;
+
+   si2-fd = fd2;
+
+   if (si2-myname) {
+   si2-myname = sockaddr_dup(si2-myname, si2-myname_len);
+   if (si2-myname == NULL) {
+   real_close(fd2);
+   errno = ENOMEM;
+   return -1;
+   }
+   }
+
+   if (si2-peername) {
+   si2-peername = sockaddr_dup(si2-peername, si2-peername_len);
+   if (si2-peername == NULL) {
+   real_close(fd2);
+   errno = ENOMEM;
+   return -1;
+   }
+   }
+
+   SWRAP_DLIST_ADD(sockets, si2);
+   return fd2;
+}
+
+_PUBLIC_ int swrap_dup2(int fd, int newfd)
+{
+   struct socket_info *si, *si2;
+   int fd2;
+
+   si = find_socket_info(fd);
+
+   if (!si) {
+   return real_dup2(fd, newfd);
+   }
+
+   if (si-tmp_path) {
+   /* we would need reference counting to handle this */
+   errno = EINVAL;
+   return -1;
+   }
+
+   if (find_socket_info(newfd)) {
+   /* dup2() does an implicit close of newfd, which we
+* need to emulate */
+   swrap_close(newfd);
+   }
+
+   fd2 = real_dup2(fd, newfd);
+   if (fd2 == -1) {
+   return -1;
+   }
+
+   si2 = (struct socket_info *)malloc(sizeof(struct socket_info));
+   if (si2 == NULL) {
+   real_close(fd2);
+   errno = ENOMEM;
+   return

[SCM] Samba Shared Repository - branch master updated

2011-08-11 Thread Andrew Tridgell
The branch, master has been updated
   via  4aba775 tevent: don't force the nesting flag to false in the 
destructor
   via  f444eeb s4-dbcheck: offer to fix dsServiceName to be in GUID form
   via  fb490d8 s4-dsdb: don't cache the NTDS settings DN
   via  bb6214d s4-join: make dsServiceName a GUID in @ROOTDSE on join
   via  d79ee18 s4-provision: create dsServiceName in @ROOTDSE in GUID form
   via  ccba16c s4-dsdb: expand dsServiceName from GUID form at runtime
   via  f7902d7 s4-dsdb: remove the naming_fsmo and pdc_fsmo modules
   via  f9d10a3 s4-dsdb: calculate validFSMOs at runtime instead of 
pre-computing
  from  ce93b4f tevent: fix documentation for tevent_context_init_byname()

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


- Log -
commit 4aba7752195ffda980abf4a98b870d113615f662
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Aug 12 11:56:28 2011 +1000

tevent: don't force the nesting flag to false in the destructor

the tevent destructor is called in tevent_re_initialise(), to reset
the event context back to its original state for creating child
processes. We need the nesting flag to stay the same

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Fri Aug 12 05:18:25 CEST 2011 on sn-devel-104

commit f444eeb51c358a8062ba6e00101f88b753d69fc7
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Aug 11 16:59:11 2011 +1000

s4-dbcheck: offer to fix dsServiceName to be in GUID form

this fixes the dsServiceName so it can handle server renames

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit fb490d88c1b43ae95ef8be7c32be4f3562eba4e2
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Aug 11 16:29:24 2011 +1000

s4-dsdb: don't cache the NTDS settings DN

this DN can change due to a server rename, so we cannot cache it. It
is set by provision, but not anywhere else.

This seems to not have a large performance impact

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit bb6214d63440d52227ea94d1788b6875b4d4742c
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Aug 11 16:05:11 2011 +1000

s4-join: make dsServiceName a GUID in @ROOTDSE on join

when joining another domain as a DC we should setup our dsServiceName
in @ROOTDSE to be a GUID so we can cope with later server renames

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit d79ee18f988d1f43eb1f76752e749385b9b9c251
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Aug 11 15:45:43 2011 +1000

s4-provision: create dsServiceName in @ROOTDSE in GUID form

this allows for handling of server renames as the GUID doesn't change

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit ccba16c4b8de285f55683011c1527af3f6f48460
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Aug 11 15:44:32 2011 +1000

s4-dsdb: expand dsServiceName from GUID form at runtime

this allows dsServiceName to be stored as an extended DN or GUID form
in @ROOTDSE, and its string form will be found at runtime.

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit f7902d766a0866d92e728449377a406f8e202b2a
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Aug 11 15:43:22 2011 +1000

s4-dsdb: remove the naming_fsmo and pdc_fsmo modules

these are not needed now that the rootdse modules calculates the
validFSMOs attribute at runtime

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit f9d10a304d0197cc1ef5b14ab523d6462040088a
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Aug 11 15:40:53 2011 +1000

s4-dsdb: calculate validFSMOs at runtime instead of pre-computing

this changes the rootdse to compute the validFSMOs attribute at
runtime by checking the fSMORoleOwner attribute on the appropriate
DN. This avoids the need for the pdc_fsmo and naming_fsmo modules.

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

---

Summary of changes:
 lib/tevent/tevent.c|   10 +-
 source4/dsdb/common/util.c |   17 +--
 source4/dsdb/samdb/ldb_modules/naming_fsmo.c   |  108 
 source4/dsdb/samdb/ldb_modules/pdc_fsmo.c  |  113 
 source4/dsdb/samdb/ldb_modules/rootdse.c   |  135 ++-
 source4/dsdb/samdb/ldb_modules/samba_dsdb.c|   12 --
 source4/dsdb/samdb/ldb_modules/wscript_build   |   20 ---
 source4/dsdb/samdb/samdb.h |   10 --
 source4/scripting/python/samba/dbchecker.py|   43 ++
 source4/scripting/python/samba/join.py |8 +-
 .../scripting/python/samba/provision

[SCM] Samba Shared Repository - annotated tag talloc-2.0.6 created

2011-08-09 Thread Andrew Tridgell
The annotated tag, talloc-2.0.6 has been created
at  00190bc1d5284c5739c7e02cfc23f0f44398f674 (tag)
   tagging  b9083b632f09bbc245b841fe63bc68bbf0ea4d6e (commit)
  replaces  tevent-0.9.13
 tagged by  Andrew Tridgell
on  Tue Aug 9 10:19:20 2011 +1000

- Log -
talloc: tag release talloc-2.0.6
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iQEVAwUATkB9CEeTkWETCEAlAQKCGAgAscX9mcVmrqkWn9CYQWcN4X3kkAtZg0Oi
gWM5GpyXs7TPuII7wwjNJMgn9dwWEWqd1rAQThql8W/3xguLyy6S4tCaF4rn0TPC
5LcqLLcjVoWsZJbCO7oKjKlPUTMouXNWduTXgi4Zq5iqAEcgnWUEfFOIeqPAt9A9
VNsxLsvQaF878w2ri1JY8eDE6UhsKCybTTbBWEDtuRLAYhsl6wOqUusIf3kjq0+W
TI2MEQ7KJR5BxQYbZLwkVeXffhrO2dZp8fpt5J5S6INRxheMPfuuU7y6hl6cyTxP
4jh0r0IJ05ZSPqOq4X0Roe6JVqefz+18T2YOkZzhFZwmvljopiRLOQ==
=NMvT
-END PGP SIGNATURE-

Alban Browaeys (1):
  Fix bug #8341 - libsmbclient segfault when feed the root of a mounted 
share via an uri

Amitay Isaacs (41):
  samba-tool: Reimplement GPO functions in python
  ldb: Expose ldb_handler_fold() funcion
  ldb-samba: Allow --show-binary flag on defaultSecurityDescriptor
  s4auth: Remove duplicate assignment of structure variable
  s4auth: Fix the object names for PyCredentials and 
PyCredentialCacheContainer
  s4auth: Fix the object name for Py_Security
  samba-tool: Added python version of samba-tool
  samba-tool: Replace C version of samba-tool with python version
  samba-tool: Display Usage line and list commands alphabetically
  samba-tool: Raise exception on errors and report using base class
  samba-tool: Display usage for main commands and list them alphabetically
  samba-tool: Catch exceptions at top-level and exit with correct return 
value
  s4-param: Fix object names for python objects PyLoadparm and 
PyLoadparmContext
  samba-tool: For samba-tool-c, help lists commands implemented only in C
  s4-libcli: Added python interface for file I/O using SMB
  samba-tool: Python routine to find writable/ldap-capable DC
  s4-libnet: py_net - Remove parsing for credentials argument
  s4-libnet: py_net Add change_password() python command
  samba-tool: Add user password command to change user's own password
  test-blackbox: Rearrange the arguments in required order for samba-tool 
time
  test-blackbox: Remove 'domain\' from username for samba-tool user 
setpassword
  test-blackbox: Rearrange arguments for samba-tool user setpassword command
  test-blackbox: use python version of change password command
  tests-blackbox: Revert the test to use user-level change password command
  s4-libcli: Initialize stack structure variables to zero.
  samba-tool: Change samba-tool gpo semantics (use gpo name instead of dn)
  samba-tool: Added gpo fetch command implementation using python smb 
module.
  s4-libcli: Added python SMB methods for mkdir(), rmdir(), chkpath()
  s4-policy: Expose gp_ads_to_dir_access_mask() function
  s4-policy: Add python wrapper for ads_to_dir_access_mask() function
  samba-tool: Addd functions to print GPO flags and GPlink options
  samba-tool: Rename copy_directory_recurse to 
copy_directory_remote_to_local
  s4-policy: Use the correct local directory for stat.
  s4-libcli: Replace smb_composite_connect() with smb_full_connection()
  s4-libcli: Check if short_name is not null, before converting to python 
string
  s4-libcli: get_acl and set_acl require raw_open to set security descriptor
  samba-tool: Add functions to create directories and copy files over SMB 
share
  samba-tool: Add implementation of gpo create command
  samba-tool: Remove C version of samba-tool
  samba-tool: Rename samba-tool command gpo2 -- gpo
  s4-libcli: Fix the fd leak. Close open file descriptor before return.

Andreas Schneider (78):
  s3-waf: Don't link LIBNTLMSSP twice.
  s3-auth: Fix account check over ncalrpc.
  s3-epmapper: Fix adding tcpip endpoints.
  s3-smbd: Create ev_ctx and msg_ctx and use it.
  s3-smbd: Pass ev_ctx to smbd_parent_loop().
  s3-smbd: Pass ev_ctx and msg_ctx to open_sockets_smbd().
  s3-smbd: Pass ev_ctx and msg_ctx to smbd_accept_connection().
  s3-smbd: Pass ev_ctx to smbd_setup_sig_chld_handler().
  s3-smbd: Pass msg_ctx to smbd_accept_connection.
  s3-smbd: Pass ev_ctx to remove_child_pid().
  s3-smbd: Pass event and messaging context to smbd_parent_housekeeping().
  s3-librpc: Pass messaging context to dcerpc register functions.
  s3-rpc_server: Pass event and messaging context to accept function.
  s3-rpc_server: Fixed segfaults in rpc daemons.
  s3-rpc_server: Add my copyright.
  s3-rpc_server: Fix messaging context in the pipes struct.
  s3-rpc_server: Free the np dir.
  s3-rpc_server: Duplicate the pipe name.
  s3-rpc_server: We need to copy the session_info for external pipes

[SCM] Samba Shared Repository - branch master updated

2011-08-08 Thread Andrew Tridgell
The branch, master has been updated
   via  cf986f2 talloc: ensure the sibling linked list remains valid during 
a free
  from  1f77710 s3:selftest: run the net rpc registry test under s3dc 
instead s3dc:local.

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


- Log -
commit cf986f200804ce873b43c1ecf2d5e1bd08eb8a25
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 8 18:24:32 2011 +1000

talloc: ensure the sibling linked list remains valid during a free

This ensures that the sibling list of a pointer doesn't become invalid
during a free operation. It is an alternative fix to the fix in
6f51a1f45bf4de062cce7a562477e8140630a53d, and avoids the problem of
trying to calculate the parent pointer early

This should fix the subtle spoolss talloc bug that Simo found

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Tue Aug  9 01:53:17 CEST 2011 on sn-devel-104

---

Summary of changes:
 lib/talloc/talloc.c |   18 +++---
 1 files changed, 3 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index a820ebf..19e6a37 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -838,6 +838,7 @@ static inline int _talloc_free_internal(void *ptr, const 
char *location)
} else {
if (tc-prev) tc-prev-next = tc-next;
if (tc-next) tc-next-prev = tc-prev;
+   tc-prev = tc-next = NULL;
}
 
tc-flags |= TALLOC_FLAG_LOOP;
@@ -925,6 +926,7 @@ static void *_talloc_steal_internal(const void *new_ctx, 
const void *ptr)
} else {
if (tc-prev) tc-prev-next = tc-next;
if (tc-next) tc-next-prev = tc-prev;
+   tc-prev = tc-next = NULL;
}
 
tc-parent = new_tc;
@@ -1251,23 +1253,9 @@ static inline void _talloc_free_children_internal(struct 
talloc_chunk *tc,
struct talloc_chunk *p = 
talloc_parent_chunk(tc-child-refs);
if (p) new_parent = TC_PTR_FROM_CHUNK(p);
}
-   /* finding the parent here is potentially quite
-  expensive, but the alternative, which is to change
-  talloc to always have a valid tc-parent pointer,
-  makes realloc more expensive where there are a
-  large number of children.
-
-  The reason we need the parent pointer here is that
-  if _talloc_free_internal() fails due to references
-  or a failing destructor we need to re-parent, but
-  the free call can invalidate the prev pointer.
-   */
-   if (new_parent == null_context  (tc-child-refs || 
tc-child-destructor)) {
-   old_parent = talloc_parent_chunk(ptr);
-   }
if (unlikely(_talloc_free_internal(child, location) == -1)) {
if (new_parent == null_context) {
-   struct talloc_chunk *p = old_parent;
+   struct talloc_chunk *p = 
talloc_parent_chunk(ptr);
if (p) new_parent = TC_PTR_FROM_CHUNK(p);
}
_talloc_steal_internal(new_parent, child);


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-08-08 Thread Andrew Tridgell
The branch, master has been updated
   via  abd2e25 talloc: prepare for 2.0.6 release
  from  cf986f2 talloc: ensure the sibling linked list remains valid during 
a free

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


- Log -
commit abd2e25ee0252cd83914b79a5490f014ec0dcaf0
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Aug 9 08:40:17 2011 +1000

talloc: prepare for 2.0.6 release

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Tue Aug  9 04:03:49 CEST 2011 on sn-devel-104

---

Summary of changes:
 .../ABI/{talloc-2.0.2.sigs = talloc-2.0.6.sigs}   |0
 lib/talloc/wscript |2 +-
 2 files changed, 1 insertions(+), 1 deletions(-)
 copy lib/talloc/ABI/{talloc-2.0.2.sigs = talloc-2.0.6.sigs} (100%)


Changeset truncated at 500 lines:

diff --git a/lib/talloc/ABI/talloc-2.0.2.sigs b/lib/talloc/ABI/talloc-2.0.6.sigs
similarity index 100%
copy from lib/talloc/ABI/talloc-2.0.2.sigs
copy to lib/talloc/ABI/talloc-2.0.6.sigs
diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index 51a06ac..6c0019f 100644
--- a/lib/talloc/wscript
+++ b/lib/talloc/wscript
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'talloc'
-VERSION = '2.0.5'
+VERSION = '2.0.6'
 
 
 blddir = 'bin'


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-08-04 Thread Andrew Tridgell
The branch, master has been updated
   via  fff3f29 s4-ldb: two DNs only match if they have the same deletion 
status
   via  7367787 talloc: check block count aftter references test
   via  2331610 s4-samdb: save the url in the samdb class
   via  37799b0 s4-dsdb: extend the extended_dn_in module to handle DN links
   via  23598d5 ldb: rule_id in ldb_parse_tree should be const
   via  849d042 ldb: added a new always-fail ldap extended match OID
   via  e07ca09 ldb: changed DN matching rules to obey GUID/SID/string 
ordering
   via  7b5f0a7 s4-dsdb: handle search expressions containing extended DNs
   via  d4a1f6a s4-dsdb: added dn_format attribute of a dsdb_attribute
   via  d669e83 s4-dsdb: fixed outgoing one way link DNs
   via  a74f467 s4-dsdb: setup a one_way_link attribute on schema attributes
   via  fc40769 s4-dsdb: fixed a warning on dsdb_delete()
   via  d10553a s4-dsdb: make requests for STORAGE_FORMAT control 
non-critical
   via  a8293a5 ldb: added signatures for 1.1.2
   via  39576e9 ldb: raise minor version
   via  841d17f ldb: added ldb_parse_tree_walk()
   via  4ba8069 ldb: added ldb_dn_replace_components()
  from  ed59f21 s3-ntlmssp void function cannot return value

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


- Log -
commit fff3f290736f0b75903bfefeb961ee935930303b
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Aug 4 14:59:47 2011 +1000

s4-ldb: two DNs only match if they have the same deletion status

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Aug  4 09:34:08 CEST 2011 on sn-devel-104

commit 73677875b46251f59b66c9713f1decc89bd2ea3e
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Aug 4 12:07:19 2011 +1000

talloc: check block count aftter references test

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit 2331610a2e33498527070c45debfea418a97717d
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Aug 3 11:31:45 2011 +1000

s4-samdb: save the url in the samdb class

this is useful for debugging, so we know which database we are dealing
with

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit 37799b0644af6d0135af52f07414efd52bbe697e
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Aug 2 17:19:16 2011 +1000

s4-dsdb: extend the extended_dn_in module to handle DN links

this replaces DN components in incoming filter expressions with the
full extended DN of the target, which allows search expressions based
on GUID= and SID= DNs, as well as fixing the problem with one-way
links in search expressions

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 23598d56ff7a0bf9cb55606da0ede234e12dbc57
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Aug 2 17:17:13 2011 +1000

ldb: rule_id in ldb_parse_tree should be const

this allows assignment to a constant string without allocation

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 849d042dd88e8e7de2748524b054b350af06a859
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Aug 2 17:16:44 2011 +1000

ldb: added a new always-fail ldap extended match OID

this is used when rewriting filter rules to replace a filter rule with
one that is guaranteed not to match

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit e07ca09a7bac30b99b0033a59746ba166e429aec
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Aug 2 17:15:28 2011 +1000

ldb: changed DN matching rules to obey GUID/SID/string ordering

when matching two DNs, the GUID takes priority, then the SID, then the
string component

Pair-Programmed-With: Andrew Bartlett abart...@samba.org
Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit 7b5f0a7120c91989976d2f946ad1af9d6dc934c7
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 1 17:48:53 2011 +1000

s4-dsdb: handle search expressions containing extended DNs

this allows for searches like member=SID=S-1-2-3

Pair-Programmed-With: Andrew Bartlett abart...@samba.org
Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit d4a1f6a42b06a5d63a789cad438cfde693df24a7
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 1 17:47:34 2011 +1000

s4-dsdb: added dn_format attribute of a dsdb_attribute

this is faster than string comparisons during searches at runtime

Pair-Programmed-With: Andrew Bartlett abart...@samba.org
Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit d669e83857600ec59afc5b11c0286f28fceb0d0a
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Aug 1 13:55:58 2011 +1000

s4-dsdb: fixed outgoing one way link DNs

when we return a DN which is a one way link, fix the string DN
component by searching for the GUID and replacing the DN components

[SCM] Samba Shared Repository - branch master updated

2011-07-29 Thread Andrew Tridgell
The branch, master has been updated
   via  d004fd0 talloc: added test suite for talloc_free_children()
   via  52182a5 talloc: preserve context name on talloc_free_children()
   via  03f9250 samba-tool: use ldb.binary_encode() on search expression 
elements
   via  8dda0ef samba-tool: fixed binary encoding of usernames in 
setpassword
   via  7ce4aca pyldb: added binary_encode() and binary_decode() methods
   via  d815ce0 ldb: added a test for an invalid search expression
   via  e3b76bd ldb: fixed a search expression parse bug
  from  2663586 s4-auth Fill in the remainder of the unix info in 
auth_session_info

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


- Log -
commit d004fd0b53fb6f3ae64f0e24cf51f4471d434574
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jul 29 11:57:07 2011 +1000

talloc: added test suite for talloc_free_children()

this tests the fix from Simo

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Fri Jul 29 11:30:13 CEST 2011 on sn-devel-104

commit 52182a528117c4dd9624f64b34a873c0903ad70a
Author: Simo Sorce i...@samba.org
Date:   Wed Jul 27 12:02:35 2011 -0400

talloc: preserve context name on talloc_free_children()

Otherwise tc-name will end up pointing to garbage when it is not
set to a const but rather to a string allocate as child of the context 
itself.

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

commit 03f92508ef2ebb4e7790f612e3f833382c691051
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Jul 28 17:14:28 2011 +1000

samba-tool: use ldb.binary_encode() on search expression elements

this allows us to deal with search elements containing characters that
must be escaped in LDAP

Pair-Programmed-With: Andrew Bartlett abart...@samba.org
Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit 8dda0ef57fa908c94c14d2521ded883ceb253b2f
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Jul 28 17:03:57 2011 +1000

samba-tool: fixed binary encoding of usernames in setpassword

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com
Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 7ce4aca029473b219d053221ced1e3686ce2d3ad
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Jul 28 17:03:06 2011 +1000

pyldb: added binary_encode() and binary_decode() methods

this gives access to RFC2254 encoding from python

Pair-Programmed-With: Andrew Bartlett abart...@samba.org
Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit d815ce094e7a495fb2ddf0668015c5a1b9bb1dc4
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Jul 28 15:56:15 2011 +1000

ldb: added a test for an invalid search expression

this tests the fix for invalid expressions in  and | expressions

Pair-Programmed-With: Andrew Bartlett abart...@samba.org
Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit e3b76bd6205acfc1a89fbcab5d9588b32cb47b88
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Jul 28 15:51:31 2011 +1000

ldb: fixed a search expression parse bug

when a secondary component of a  or | expression was invalid, it was
ignored rather than giving an error. For example:

 (|(objectclass=user)(samaccountname=foo\blah))

was treated as being:

 (objectclass=user)

whereas it should be an error, as foo\blah is invalid

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com
Pair-Programmed-With: Andrew Bartlett abart...@samba.org

---

Summary of changes:
 lib/ldb/common/ldb_parse.c |   12 -
 lib/ldb/pyldb.c|   53 
 lib/ldb/tests/python/api.py|4 ++
 lib/ldb/tests/test-generic.sh  |3 +
 lib/talloc/talloc.c|   23 +
 lib/talloc/testsuite.c |   44 
 source4/scripting/python/samba/join.py |4 +-
 .../scripting/python/samba/netcmd/delegation.py|   10 ++--
 source4/scripting/python/samba/netcmd/domain.py|2 +-
 source4/scripting/python/samba/netcmd/drs.py   |5 +-
 source4/scripting/python/samba/netcmd/gpo.py   |6 +-
 source4/scripting/python/samba/netcmd/rodc.py  |2 +-
 source4/scripting/python/samba/netcmd/spn.py   |8 ++--
 source4/scripting/python/samba/netcmd/user.py  |8 ++--
 source4/scripting/python/samba/samdb.py|   10 ++--
 15 files changed, 167 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ldb/common/ldb_parse.c b/lib/ldb/common/ldb_parse.c
index b4eabf8..8c6c2d9 100644
--- a/lib/ldb/common/ldb_parse.c
+++ b/lib/ldb/common/ldb_parse.c
@@ -534,8 +534,18

[SCM] Samba Shared Repository - branch master updated

2011-07-28 Thread Andrew Tridgell
The branch, master has been updated
   via  427805b samba-tool: ensure prompting of passwords is in the right 
order
   via  2b6ea79 samba-tool: Added gpo fetch command implementation using 
python smb module.
   via  d6db661 samba-tool: Change samba-tool gpo semantics (use gpo name 
instead of dn)
   via  43ff229 s4-libcli: Initialize stack structure variables to zero.
   via  6c1cbfb tests-blackbox: Revert the test to use user-level change 
password command
   via  fca7062 test-blackbox: use python version of change password command
   via  db151ee test-blackbox: Rearrange arguments for samba-tool user 
setpassword command
   via  c876993 test-blackbox: Remove 'domain\' from username for 
samba-tool user setpassword
   via  94976ee test-blackbox: Rearrange the arguments in required order 
for samba-tool time
   via  9e7d8ed samba-tool: Add user password command to change user's own 
password
   via  9c37084 s4-libnet: py_net Add change_password() python command
   via  05ff244 s4-libnet: py_net - Remove parsing for credentials argument
   via  d885280 samba-tool: Python routine to find writable/ldap-capable DC
   via  20f8a8e s4-libcli: Added python interface for file I/O using SMB
   via  c2853e0 samba-tool: For samba-tool-c, help lists commands 
implemented only in C
   via  921424f s4-param: Fix object names for python objects PyLoadparm 
and PyLoadparmContext
   via  48d905f samba-tool: Catch exceptions at top-level and exit with 
correct return value
   via  e79040c samba-tool: Display usage for main commands and list them 
alphabetically
   via  1a44400 samba-tool: Raise exception on errors and report using base 
class
   via  d4c1149 samba-tool: Display Usage line and list commands 
alphabetically
   via  02667cb samba-tool: Replace C version of samba-tool with python 
version
   via  35747fe samba-tool: Added python version of samba-tool
   via  2625199 s4auth: Fix the object name for Py_Security
   via  6a12f7d s4auth: Fix the object names for PyCredentials and 
PyCredentialCacheContainer
   via  b9e0587 s4auth: Remove duplicate assignment of structure variable
   via  ef5e9ec ldb-samba: Allow --show-binary flag on 
defaultSecurityDescriptor
   via  197996c ldb: Expose ldb_handler_fold() funcion
   via  e746610 samba-tool: Reimplement GPO functions in python
   via  8de3f98 samba-tool: Removed newuser
   via  901959d samba-tool: updated test suite to account for newuser change
   via  31ade9c samba-tool: Changed user add implementation
   via  41f073e samba-tool: add -H or --URL where necessary
   via  2e08285 samba-tool: update test suite to reflect the move from 
password to user setpassword
   via  cdf8926 samba-tool: Remove password as it has been moved to user 
setpassword
   via  356a2cc s3-waf: the passdb subsystem needs to be called pdb
  from  d82256c Use existing ISDOT and ISDOTDOT macros.

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


- Log -
commit 427805b87a0781a4b39594f4efdf4b9d023d2324
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Jul 28 15:14:03 2011 +1000

samba-tool: ensure prompting of passwords is in the right order

ask the creds object for the password before prompting for the new
password in the user password change code, to ensure the user is asked
for the old password first

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com
Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Jul 28 08:35:45 CEST 2011 on sn-devel-104

commit 2b6ea7975b5254a90ea183e3a69647920cbf4595
Author: Amitay Isaacs ami...@gmail.com
Date:   Thu Jul 28 14:17:19 2011 +1000

samba-tool: Added gpo fetch command implementation using python smb module.

To copy the GPO files, use libcli python interface list() to get directory
listing and loadfile() to read the contents of the file.

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

commit d6db6614dd3621ad2a2cff58d1d79d6fdf7345f0
Author: Amitay Isaacs ami...@gmail.com
Date:   Thu Jul 28 14:07:44 2011 +1000

samba-tool: Change samba-tool gpo semantics (use gpo name instead of dn)

Instead of using gpo dn as the key to refer to a gpo, use the gpo name
as the key.

If no URL is specified (-H option), find a writable DC and use that.

Extract a commonly used method as get_gpo_info() to find details of a GPO.

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

commit 43ff229b9a71959c2a583d1ff6bec3de5d873af3
Author: Amitay Isaacs ami...@gmail.com
Date:   Thu Jul 28 13:22:01 2011 +1000

s4-libcli: Initialize stack structure variables to zero.

Update do_smb_connect function to return NTSTATUS rather than raise
python exception on error. Error

[SCM] Samba Shared Repository - branch master updated

2011-07-26 Thread Andrew Tridgell
The branch, master has been updated
   via  e98e0cf waf: update to latest waf 1.5 version
  from  4fdad19 Fix bug #8324 - smbclient cannot list directories from a 
big-endian machine.

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


- Log -
commit e98e0cf785ec1269cb5ab9f761d951d35d6792a1
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jul 27 10:07:50 2011 +1000

waf: update to latest waf 1.5 version

this includes an on_results fix from thomas that fixes a dependency
problem with our autoproto code

Note that this changes task signatures, so it will trigger a complete
rebuild

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Jul 27 04:27:32 CEST 2011 on sn-devel-104

---

Summary of changes:
 buildtools/bin/waf-svn |  Bin 109281 - 109232 bytes
 1 files changed, 0 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/bin/waf-svn b/buildtools/bin/waf-svn
index b2e4885..6d54d5f 100755
Binary files a/buildtools/bin/waf-svn and b/buildtools/bin/waf-svn differ


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-07-22 Thread Andrew Tridgell
The branch, master has been updated
   via  2d21fe0 s4-messaging: fixed the removal of messaging sockets in 
child tasks
  from  fafd386 Fix const warning.

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


- Log -
commit 2d21fe079fb57e55d9bac0c69d8527013bf4fbc7
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jul 22 14:55:32 2011 +1000

s4-messaging: fixed the removal of messaging sockets in child tasks

when a child task exits we were firing a destructor on any inherited
messaging contexts, which could trigger a removal of the parents
message socket and messaging database entry.

This adds a new auto_remove flag to imessaging_init(), and exposes the
cleanup code for use by the stream service.

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Fri Jul 22 08:09:06 CEST 2011 on sn-devel-104

---

Summary of changes:
 source4/lib/messaging/messaging.c   |   23 ---
 source4/lib/messaging/messaging.h   |8 +---
 source4/lib/messaging/pymessaging.c |   10 +-
 source4/lib/messaging/tests/irpc.c  |4 ++--
 source4/lib/messaging/tests/messaging.c |   10 +-
 source4/smbd/server.c   |4 ++--
 source4/smbd/service_stream.c   |5 +++--
 source4/smbd/service_task.c |6 +++---
 8 files changed, 41 insertions(+), 29 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/messaging/messaging.c 
b/source4/lib/messaging/messaging.c
index 484f22b..ccc6003 100644
--- a/source4/lib/messaging/messaging.c
+++ b/source4/lib/messaging/messaging.c
@@ -541,10 +541,11 @@ NTSTATUS imessaging_send_ptr(struct imessaging_context 
*msg, struct server_id se
 
 
 /*
-  destroy the messaging context
+  remove our messaging socket and database entry
 */
-static int imessaging_destructor(struct imessaging_context *msg)
+int imessaging_cleanup(struct imessaging_context *msg)
 {
+   DEBUG(5,(imessaging: cleaning up %s\n, msg-path));
unlink(msg-path);
while (msg-names  msg-names[0]) {
irpc_remove_name(msg, msg-names[0]);
@@ -554,11 +555,17 @@ static int imessaging_destructor(struct 
imessaging_context *msg)
 
 /*
   create the listening socket and setup the dispatcher
+
+  use temporary=true when you want a destructor to remove the
+  associated messaging socket and database entry on talloc free. Don't
+  use this in processes that may fork and a child may talloc free this
+  memory
 */
 struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx,
-const char *dir,
-struct server_id server_id, 
-struct tevent_context *ev)
+  const char *dir,
+  struct server_id server_id,
+  struct tevent_context *ev,
+  bool auto_remove)
 {
struct imessaging_context *msg;
NTSTATUS status;
@@ -622,7 +629,9 @@ struct imessaging_context *imessaging_init(TALLOC_CTX 
*mem_ctx,
   EVENT_FD_READ, imessaging_handler, msg);
tevent_fd_set_auto_close(msg-event.fde);
 
-   talloc_set_destructor(msg, imessaging_destructor);
+   if (auto_remove) {
+   talloc_set_destructor(msg, imessaging_cleanup);
+   }

imessaging_register(msg, NULL, MSG_PING, ping_message);
imessaging_register(msg, NULL, MSG_IRPC, irpc_handler);
@@ -641,7 +650,7 @@ struct imessaging_context 
*imessaging_client_init(TALLOC_CTX *mem_ctx,
struct server_id id;
ZERO_STRUCT(id);
id.pid = random() % 0x1000;
-   return imessaging_init(mem_ctx, dir, id, ev);
+   return imessaging_init(mem_ctx, dir, id, ev, true);
 }
 /*
   a list of registered irpc server functions
diff --git a/source4/lib/messaging/messaging.h 
b/source4/lib/messaging/messaging.h
index eb8a8ab..e51590f 100644
--- a/source4/lib/messaging/messaging.h
+++ b/source4/lib/messaging/messaging.h
@@ -54,9 +54,11 @@ NTSTATUS imessaging_register(struct imessaging_context *msg, 
void *private_data,
 NTSTATUS imessaging_register_tmp(struct imessaging_context *msg, void 
*private_data,
msg_callback_t fn, uint32_t *msg_type);
 struct imessaging_context *imessaging_init(TALLOC_CTX *mem_ctx,
-const char *dir,
-struct server_id server_id,
-struct tevent_context *ev);
+  const char *dir

[SCM] Samba Shared Repository - branch master updated

2011-07-20 Thread Andrew Tridgell
The branch, master has been updated
   via  7f9d45b samba-tool: make sure we exit with an error on a bad command
   via  6e82e20 dbcheck: mark the dbcheck as known-fail
   via  e593939 samba-tool: fixed some more calls to samba_tool join to be 
'domain join'
   via  2cfe528 s4-selftest: added undump.sh script
   via  e01f310 tdb: remove 'EOF' print from tdbrestore
   via  6257994 dbcheck: use string DN in delete when fixing broken strings 
DNs
   via  a656b18 s4-provision: run dbcheck on a minimal set of objects in 
provision
   via  a2c4258 s4-kcc: use dsdb_delete() instead of ldb_delete()
   via  114377a s4-dsdb: added dsdb_delete() function
   via  a36af1a pyldb: use dn.is_child_of() instead of dn.compare_base()
   via  9117a2f samba_backup: check that directory really exists
   via  fa194c3 tests: Add alpha13 dumped provision
   via  72ca5c3 s4-dsdb: Use controls provided during the request while 
searching for object to delete
   via  6362c9c s4-dsdb: check group membership only for non deleted objects
   via  76b1657 s4-dsdb: change the samba3sam test to add the show_deleted 
module
   via  3f6df9f pyldb: add unit test for ldbDn.compare_base
   via  521556c ldb-python: add a function to Dn object to compare the Dn 
with a base DN
   via  930fa1e update/add my copyright
   via  9a1dd24 s4-dsdb: In rootdse add extended dn info on all values for 
a given attribute
   via  245f4b2 s4-dsdb: add dsdb_module_extended function similar to other 
dsdb_module_* functions
   via  b1ffe82 s4-schema: add systemFlags to dsdb classes objects
   via  88df1da s4-test: don't fix broken objects during dbcheck test
   via  bba7dc5 dbcheck: test the --reindex option
   via  190ec87 s4-test: added dbcheck run to test suite
   via  a8cba72 samba-tool: nicer error in passwordsettings with no settings
   via  bfd94a1 samba-tool: testparm doesn't take any credentials
   via  7d39937 samba-tool: use 'exportkeytab' instead of 'dumpkeys'
   via  6e7b8aa samba-tool: Fix __doc_ in base classes
   via  5f5eb1b samba-tool: removed synopsis code in base class
   via  452e509 samba-tool: Fixed bugs to determine min and max # of 
allowed arguments
   via  f03a059 samba-tool: Improved --help functionality
   via  a2e2c13 samba-tool: fixed __doc__ in base classes
   via  903ec44 samba-tool: Fix error handling in SuperCommand class
   via  8e0a860 samba-tool: improved Option list for all user commands
   via  7c8b53a samba-tool: added error handling for the user command
   via  a10e231 samba-tool: fixed drs commands synopsis
   via  57b796d samba-tool: fixed samba-tool user syntax
   via  f1a079f samba-tool: fixed synopsis on user commands
   via  c9bf702 samba-tool: fixed synopsis on all user commands
   via  f6fa868 samba-tool: moved takes_optiongroups definition to Command 
base class
   via  1dfcb01 samba-tool: removed the assignment to parser.prog
   via  35d534b samba-tool: fixed prog name in samba-tool
   via  df6fae2 samba-tool: update vampire.py message
   via  b8b20f7 samba-tool: removed join as it has been replaced by domain 
join
   via  2cca4a4 samba-tool: moved join to domain join
   via  9f32f86 samba-tool: updated test suite for the new domain dumpkeys 
option
   via  8f274af samba-tool: removed export as it has been moved to domain 
dumpkeys
   via  c049b14 samba-tool: moved export to domain dumpkeys
   via  eb259a6 samba-tool: updated test suite to reflect the move from 
domainlevel to domain level
   via  0cef2bf samba-tool: removed domainlevel as it has been moved to 
domain level
   via  2d4988c samba-tool: moved domainlevel to domain level
   via  e573037 samba-tool: removed machinepw as it has been moved to 
domain machinepassword
   via  41b2b7e samba-tool: moved machinepw to domain machinepassword
   via  8c7718a samba-tool: update test suite for the new domain object
   via  34f7492 samba-tool: removed pwsettings
   via  e5255f0 samba-tool: created domain object, moved pwsettings to user 
passwordsettings
   via  c4a9229 samba-tool: update test suite for add setpassword
   via  5720143 samba-tool: removed setpassword.py
   via  ff7f323 samba-tool: added setpassword to user
   via  30ba5d0 samba-tool: fix summary of the fsmo command to be clearer
  from  d622cad s3-torture: run_simple_posix_open_test(): replace 
cli_read_old() with cli_read()

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


- Log -
commit 7f9d45bf10d36b1b443305e0f2e79cb448b98cbd
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Jul 21 10:29:21 2011 +1000

samba-tool: make sure we exit with an error on a bad command

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri

[SCM] Samba Shared Repository - branch master updated

2011-07-13 Thread Andrew Tridgell
The branch, master has been updated
   via  3dae323 s4-dsdb: fixed the defaultObjectCategory to have a full GUID
   via  18995cd s4-fault: changed to use %d for PID, instead of %PID%
   via  80c8f42 s4-dsdb: another special case for the member attribute
   via  43c0a92 s4-dsdb Don't process deletion of member attributes here.
   via  014fca1 dsdb: fixed special case of zero NTTIME
   via  fc476ec dbcheck: use samdb_schema for getting the backlink
   via  23b6af1 ldb: added ldb_val_string_cmp()
   via  2087eb1 ldb: use base searches for @ special DNs
   via  c60a489 ldb: don't return special DNs on non-base searches
   via  58e8944 ldb: don't shortcut dn comparison for mismatched special DNs
   via  eb7c2af dbcheck: only do the provision dbcheck if there are objects 
to check
   via  1ee67df s4-test: fixed usage message on renamedc.sh
   via  182fd31 s4-provision: fixed the GUIDs in the provision using dbcheck
   via  afe4b77 s4-dsdb: fixed modify of ACLs on deleted objects
   via  303b57c dbcheck: only fix replPropertyMetaData if we included it in 
the search
   via  5064d73 dbcheck: added checks for missing and orphansed backlinks
   via  b66c577 s4-dsdb: raise debug level for backlink errors
   via  534c1ca dbcheck: fixed ldap check with no database specified
   via  0ab3086 dbcheck: added --reindex option
   via  6bc1957 samba-tool: fixed ldapcmp to run as non-root
   via  d9e2317 dbcheck: added checking of backlinks
   via  94b820a pydsdb: added get_backlink_from_lDAPDisplayName()
   via  0214b7f s4-dsdb: moved checking of duplicate member entries to 
repl_meta_data.c
  from  e858ec6 s3-rpc_server: Removed no longer used functions.

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


- Log -
commit 3dae32397a87534ff1cf764260e7fcadd6665a49
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jul 13 19:36:59 2011 +1000

s4-dsdb: fixed the defaultObjectCategory to have a full GUID

this fixes the DN to have a full GUID for new objects

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Jul 13 14:03:30 CEST 2011 on sn-devel-104

commit 18995cde5c5d2e647d94f9dcde4ba9261464c217
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jul 13 17:26:31 2011 +1000

s4-fault: changed to use %d for PID, instead of %PID%

this matches the s3 behaviour

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 80c8f42f058bdcdf639037927c5941190f019a67
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jul 13 15:58:45 2011 +1000

s4-dsdb: another special case for the member attribute

thanks to Matthias for his great test suite work!

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 43c0a92d23c2be446a9568b9d937e525d676f85e
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Jul 13 15:31:19 2011 +1000

s4-dsdb Don't process deletion of member attributes here.

We don't need to compare the delete against the primaryGroupID check
here - that test is for adds.

Andrew Bartlett

commit 014fca10697c80d49d2c3438089935c63f445644
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jul 13 13:26:48 2011 +1000

dsdb: fixed special case of zero NTTIME

we can't convert 0 NTTIME via a unix time_t

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit fc476ec8ac3357c81b805e0634624f183a6f7b49
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jul 13 13:26:19 2011 +1000

dbcheck: use samdb_schema for getting the backlink

this is not available on an ldap samdb

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 23b6af10f6ab3852ca28338b8d58342be816f0a2
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jul 13 13:25:34 2011 +1000

ldb: added ldb_val_string_cmp()

this should help fix some places where we run past the end of a string

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 2087eb1602d647a7b14523820834231f50dea79d
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jul 13 13:05:19 2011 +1000

ldb: use base searches for @ special DNs

subtree searches on these DNs don't work any more

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit c60a48948a75a6d300e31c2a2629daa4a48cbeb1
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jul 13 12:25:09 2011 +1000

ldb: don't return special DNs on non-base searches

to look at a special DN, give the full DN

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 58e89443e2e1722dec85ec426a63449b53b19ea3
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jul 13 12:24:25 2011 +1000

ldb: don't shortcut dn comparison for mismatched special DNs

DNs

[SCM] Samba Shared Repository - branch master updated

2011-07-13 Thread Andrew Tridgell
The branch, master has been updated
   via  1838e16 Add intrasite code test switch
   via  c8413b3 Add kccsrv_add_repsFrom() possibility of NULL res argument
   via  4b19415 Remove static to allow availability to other KCC files
   via  f6c90df kcc_connection invocation_id added to struct
   via  4dea78d KCC NTDSConnection should utilize NTDSCONN_OPT_IS_GENERATED
   via  0d1c54e Standalone samdb_ntds_site_settings_options() helper
   via  b52246b NTDSConnection and NTDSA Site setting flags
  from  8612c6b dynconfig/wscript: use $libdir/security for PAMMODULESDIR 
as in config.m4

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


- Log -
commit 1838e16f34544c824615481f618c89ed6e062013
Author: Dave Craft wimber...@gmail.com
Date:   Tue Jul 5 21:39:05 2011 -0500

Add intrasite code test switch

kcc_service struct gets a intrasite_code
boolean that is filled in via parametric parameter
kccsrv:intrasite = [true/false] in smb.conf.   This
will allow us to continue to utilize old simple
KCC topology as continuing default while newer
intra-site topology matures further.

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

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Jul 14 00:19:12 CEST 2011 on sn-devel-104

commit c8413b3420d7401fe3b9588a7832d1e30e76a501
Author: Dave Craft wimber...@gmail.com
Date:   Tue Jul 5 21:34:32 2011 -0500

Add kccsrv_add_repsFrom() possibility of NULL res argument

We need the ability to utilize this function in a different
manner.  KCC intra-site topology has already vetted the
replica as being appropriate to produce a repsFrom from.
We do not want kccsrv_add_repsFrom() to produce further
checking as was the case for simple topology.   Thus if
we pass a NULL (res) parameter this extra check will
be skipped.

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

commit 4b19415f5b5f5e6df5ca03ffa5fb0f8b212726ec
Author: Dave Craft wimber...@gmail.com
Date:   Tue Jul 5 21:31:45 2011 -0500

Remove static to allow availability to other KCC files

kccsrv_replica_flags() and
kccsrv_add_repsFrom() need to be available to functions
outside kcc_periodic.c

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

commit f6c90dfebada626b92658cf54da4ce1d9a5277f4
Author: Dave Craft wimber...@gmail.com
Date:   Tue Jul 5 21:26:07 2011 -0500

kcc_connection invocation_id added to struct

Utilized by KCC to carry the invocation id of the NTDSDSA
that we are replicating the name context from.  Utilized
when NTDSConnection is created (much like dsa_guid tracks
the NTDSDSA objectGUID that we are replicating the name
context from).

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

commit 4dea78d5084e0eed4b80dced087d71aa60b1fd3a
Author: Dave Craft wimber...@gmail.com
Date:   Tue Jul 5 21:22:31 2011 -0500

KCC NTDSConnection should utilize NTDSCONN_OPT_IS_GENERATED

Previously this set an explicit (0x1) value whereas it
can now utilize NTDSCONN_OPT_IS_GENERATED from flags.h

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

commit 0d1c54ecafc0f324b84ddd5cdf64db9f6108f517
Author: Dave Craft wimber...@gmail.com
Date:   Tue Jul 5 21:19:54 2011 -0500

Standalone samdb_ntds_site_settings_options() helper

A helper function for retrieving the ntds site settings
via standalone function call.  Used within KCC

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

commit b52246bf2f75e2a4869bce3e474e6c1c81a492b7
Author: Dave Craft wimber...@gmail.com
Date:   Tue Jul 5 21:17:10 2011 -0500

NTDSConnection and NTDSA Site setting flags

Flags that were missing from flags.h or were incorrectly
defined inline to the kcc_topology.c code (and thus unusable
elsewhere).   These are the NTDSConnection and NTDSDSA Site
settings flags.

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

---

Summary of changes:
 libds/common/flags.h  |   20 +++
 source4/dsdb/common/util.c|   48 +
 source4/dsdb/kcc/kcc_connection.c |   10 +++-
 source4/dsdb/kcc/kcc_connection.h |1 +
 source4/dsdb/kcc/kcc_periodic.c   |   12 
 source4/dsdb/kcc/kcc_service.c|6 
 source4/dsdb/kcc/kcc_service.h|3 ++
 source4/dsdb/kcc/kcc_topology.c   |8 --
 8 files changed, 93 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libds/common/flags.h b/libds/common/flags.h
index a3ed771..714251d 100644
--- a/libds/common/flags.h
+++ b/libds/common/flags.h
@@ -185,6 +185,18 @@
 #define DS_FLAG_ATTR_REQ_PARTIAL_SET_MEMBER 0x0002
 #define DS_FLAG_ATTR_IS_CONSTRUCTED0x0004
 
+/* 7.1.1.2.2.1.1   nTDSSiteSettings

[SCM] Samba Shared Repository - branch master updated

2011-07-10 Thread Andrew Tridgell
The branch, master has been updated
   via  330c00a dbcheck: use get_lDAPDisplayName_by_attid()
   via  02562a0 dsdb: added get_lDAPDisplayName_by_attid
   via  082a9cc dbcheck: improved error checking in fixup of missing metdata
   via  396beee s4-provision: use samba.unix2nttime() instead of hard 
coding NTTIME offsets
   via  723fc5f s4-drs: do not return links pointed to unexistant objects
   via  4a4c748 s4-dirsync: do not return linked attribute if the target 
object is no more
   via  74530d6 s4-dsdb: allow objectsid to be specified in a modification 
operation
   via  61fc7f2 s4-samba-tool: dbcheck, check and fix broken metadata
   via  bbd4e27 s4-python: Add functions to get linkid and systemflags of 
an attribute
   via  ab77df8 s4-dsdb: if the provision control is specified, update 
replication metadata even if the data hasn't change
   via  e3fef4d upgradeprovision: reduce the number of attribute that we 
skip
   via  c3106a6 s4-provision: fix the value of creation timestamp to be a 
MS timestamp
   via  6ec4630 s4-dsdb: when replacing linked attribute take always the 
new dn as the old dn might be broken
   via  3764b93 s4-dsdb: check for single valued attribute in 
repl_meta_data module
   via  e14725c dbcheck: check all objects, including deleted objects
   via  6f6cda7 s4-dsdb: deleted objects are expected to be missing 
mandatory attributes
   via  da75e03 s4-dsdb: fixed crash bug in extended_dn_in
   via  faec258 dbcheck: added confirm_all support for remaining checks
   via  059941b dbcheck: use specified DB schema for non-LDAP URLs
  from  86b7b5c socket_wrapper: make sure interfaces are in the valid range 
on bind()

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


- Log -
commit 330c00a14d0d903b5f1accf5a17c226ca3413dc4
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Jul 11 14:28:19 2011 +1000

dbcheck: use get_lDAPDisplayName_by_attid()

this is better than doing a schema search inside the dbcheck code

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Mon Jul 11 07:43:18 CEST 2011 on sn-devel-104

commit 02562a0ca988b5b1e0796a445aabc96dddb408d2
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Jul 11 14:27:21 2011 +1000

dsdb: added get_lDAPDisplayName_by_attid

this allows conversion from a DRS attribute ID to a LDAP display name

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com
Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 082a9cc72815a3873b1cea2779dff6bc41a9773c
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Jul 11 14:05:30 2011 +1000

dbcheck: improved error checking in fixup of missing metdata

when fixing missing attributes in replPropertyMetaData, allow user to
confirm changes, and check for exceptions

Pair-Programmed-With: Andrew Bartlett abart...@samba.org
Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit 396beee776778af7c9b7d48d7c977b32b3ee4654
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Jul 11 13:45:50 2011 +1000

s4-provision: use samba.unix2nttime() instead of hard coding NTTIME offsets

Pair-Programmed-With: Andrew Bartlett abart...@samba.org
Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit 723fc5fadd55987d38641508a3c50314147588c3
Author: Matthieu Patou m...@matws.net
Date:   Fri Jul 8 02:06:04 2011 +0400

s4-drs: do not return links pointed to unexistant objects

When an object is deleted, link pointed to it are marked as inactive.
When the same object is purged we do not remmove the link pointed to it
(we can't know them) so they stay in the database, it turns to be a
problem for Windows 2008.

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

commit 4a4c748d2b3071ad7cd06b96cb0279a89c3ec6d0
Author: Matthieu Patou m...@matws.net
Date:   Fri Jul 8 02:04:52 2011 +0400

s4-dirsync: do not return linked attribute if the target object is no more

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

commit 74530d6453451d7a7ad08a11e37ea8b4672fc4ab
Author: Matthieu Patou m...@matws.net
Date:   Thu Jul 7 00:32:32 2011 +0400

s4-dsdb: allow objectsid to be specified in a modification operation

if we have the provision control, it's used by dbcheck

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

commit 61fc7f285eee888e3603afd7beafba83cca4e378
Author: Matthieu Patou m...@matws.net
Date:   Thu Jul 7 00:31:21 2011 +0400

s4-samba-tool: dbcheck, check and fix broken metadata

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

commit bbd4e27745352cc1069d7070620fe21f46702743
Author: Matthieu Patou m...@matws.net
Date:   Thu Jul 7 00:29:58 2011 +0400

s4-python: Add functions to get linkid and systemflags of an attribute

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

commit

[SCM] Samba Shared Repository - branch master updated

2011-07-05 Thread Andrew Tridgell
The branch, master has been updated
   via  c9a6dd5 s4-dbcheck: support the 'none' option for prompts
   via  bce1be3 s4-pycommon: support 'none' as an option in confirm
   via  c6985f1 dbcheck: only use a paged search when checking a ldap 
database
   via  5f1c443 dbcheck: check for unknown attributes and offer to remove 
them
   via  c9497bd s4-pycommon: allow an optional 'all' choice for confirm 
dialogs
   via  28dbd8b s4-dsdb: allow removal of unknown attributes if RELAX set
  from  4e63ac6 ccan: fix configure tests for __builtin_clz etc.

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


- Log -
commit c9a6dd56e42beafd297f4aefeb4e00ef9a09073a
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jul 5 13:03:18 2011 +1000

s4-dbcheck: support the 'none' option for prompts

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Tue Jul  5 08:22:40 CEST 2011 on sn-devel-104

commit bce1be36dca87bea3b1bdbad86a8265fa1d4bed9
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jul 5 13:02:48 2011 +1000

s4-pycommon: support 'none' as an option in confirm

this allows the user to ask for none of the changes of this type

Pair-Programmed-With: Amitay Isaacs ami...@gmail.com

commit c6985f1e7ed6f2d4d7e39e3eea7ed714f6c6ae06
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jul 5 12:44:07 2011 +1000

dbcheck: only use a paged search when checking a ldap database

paged searches don't work against a local database (they return only
the first N objects)

commit 5f1c443a7768a4b610d6a7aff695cb60f91adf2d
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jul 5 12:42:53 2011 +1000

dbcheck: check for unknown attributes and offer to remove them

this asks the user if they want to remove an unknown attribute. You
can also choose 'all' which will auto-confirm all questions about
removing unknown attributes.

commit c9497bd77fd1e3f69b979a1799b7903b07972304
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jul 5 12:38:31 2011 +1000

s4-pycommon: allow an optional 'all' choice for confirm dialogs

when asking the user to confirm an action, allow for an 'all'
choice, which will be used to allow the user to confirm all future
requests of the same type

commit 28dbd8bbc174f5417b9dccea38f296e385f2c378
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jul 5 12:36:16 2011 +1000

s4-dsdb: allow removal of unknown attributes if RELAX set

this allows attributes not known in the schema to be removed if the
caller has set the RELAX control. This will be used by dbcheck to
allow cleaning of bad attributes from the database

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/objectclass_attrs.c |   12 
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c|   11 +++-
 source4/scripting/python/samba/common.py   |   25 -
 source4/scripting/python/samba/dbchecker.py|   57 ++-
 source4/scripting/python/samba/netcmd/dbcheck.py   |2 +-
 5 files changed, 98 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c 
b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
index 5639a7a..302904a 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
@@ -121,6 +121,12 @@ static int attr_handler(struct oc_context *ac)
attr = dsdb_attribute_by_lDAPDisplayName(ac-schema,
 msg-elements[i].name);
if (attr == NULL) {
+   if (ldb_request_get_control(ac-req, 
LDB_CONTROL_RELAX_OID) 
+   ac-req-operation != LDB_ADD) {
+   /* we allow this for dbcheck to fix
+  broken attributes */
+   goto no_attribute;
+   }
ldb_asprintf_errstring(ldb, objectclass_attrs: 
attribute '%s' on entry '%s' was not found in the schema!,
   msg-elements[i].name,
   ldb_dn_get_linearized(msg-dn));
@@ -172,6 +178,7 @@ static int attr_handler(struct oc_context *ac)
msg-elements[i].name = attr-lDAPDisplayName;
}
 
+no_attribute:
if (ac-req-operation == LDB_ADD) {
ret = ldb_build_add_req(child_req, ldb, ac,
msg, ac-req-controls,
@@ -297,6 +304,11 @@ static int attr_handler2(struct oc_context *ac)
attr = dsdb_attribute_by_lDAPDisplayName(ac-schema

[SCM] Samba Shared Repository - branch master updated

2011-06-22 Thread Andrew Tridgell
The branch, master has been updated
   via  9e766f0 samba-tool: added missing GUID component checks to dbcheck
   via  505dce2 pyldb: added methods to get/set extended components on DNs
   via  202f0a4 pydsdb: added get_syntax_oid_from_lDAPDisplayName()
   via  341884c ldb: added extended_str() method to pyldb
   via  dd5350b ldb: expose syntax oids to python
   via  c4a7908 samba-tool: try to keep dbcheck.py in a logical ordering
   via  c46f808 s4-dsdb: don't add zero GUID to BINARY_DN
  from  c173e6e s3-spoolss: Fix some valgrind warnings.

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


- Log -
commit 9e766f019bff74ec9c1d5df326cdea2c7fe05e2a
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 22 14:44:36 2011 +1000

samba-tool: added missing GUID component checks to dbcheck

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Jun 22 07:59:30 CEST 2011 on sn-devel-104

commit 505dce2d3aa95d475e12c4e5e4e2b3f1907bdd84
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 22 14:44:12 2011 +1000

pyldb: added methods to get/set extended components on DNs

this will be used by the dbcheck code

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 202f0a4b576d78928a403b68f3e057d3a425bddf
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 22 14:41:50 2011 +1000

pydsdb: added get_syntax_oid_from_lDAPDisplayName()

this gives you access to the syntax oid of an attribute

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 341884c835b9c5785794cba562c2a21939eb4bce
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 22 13:49:37 2011 +1000

ldb: added extended_str() method to pyldb

this gives access to ldb_dn_get_extended_linearized() from python

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit dd5350b0a87c82be7d0b0d124885ecfd73bb1b5b
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 22 12:34:32 2011 +1000

ldb: expose syntax oids to python

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit c4a7908f46e7005f323eeca5fd38ec9e88a54aa9
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 22 12:23:05 2011 +1000

samba-tool: try to keep dbcheck.py in a logical ordering

keep individual error handlers together and separate from driver code

commit c46f80824b649647b5a61364a1b8fe26267bbdd9
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 22 11:56:40 2011 +1000

s4-dsdb: don't add zero GUID to BINARY_DN

When converting from DRS to ldb format for a BINARY_DN, don't add the
GUID extended DN element if the GUID is all zeros.

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

---

Summary of changes:
 source4/dsdb/pydsdb.c|   40 ++
 source4/dsdb/schema/schema_syntax.c  |   20 ++--
 source4/lib/ldb/pyldb.c  |   77 +++
 source4/scripting/python/samba/netcmd/dbcheck.py |  160 +
 source4/scripting/python/samba/samdb.py  |5 +
 5 files changed, 262 insertions(+), 40 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c
index 62f33bb..5ca6b02 100644
--- a/source4/dsdb/pydsdb.c
+++ b/source4/dsdb/pydsdb.c
@@ -331,6 +331,38 @@ static PyObject 
*py_dsdb_get_attid_from_lDAPDisplayName(PyObject *self, PyObject
 }
 
 /*
+  return the attribute syntax oid as a string from the attribute name
+ */
+static PyObject *py_dsdb_get_syntax_oid_from_lDAPDisplayName(PyObject *self, 
PyObject *args)
+{
+   PyObject *py_ldb;
+   struct ldb_context *ldb;
+   struct dsdb_schema *schema;
+   const char *ldap_display_name;
+   const struct dsdb_attribute *attribute;
+
+   if (!PyArg_ParseTuple(args, Os, py_ldb, ldap_display_name))
+   return NULL;
+
+   PyErr_LDB_OR_RAISE(py_ldb, ldb);
+
+   schema = dsdb_get_schema(ldb, NULL);
+
+   if (!schema) {
+   PyErr_SetString(PyExc_RuntimeError, Failed to find a schema 
from ldb);
+   return NULL;
+   }
+
+   attribute = dsdb_attribute_by_lDAPDisplayName(schema, 
ldap_display_name);
+   if (attribute == NULL) {
+   PyErr_Format(PyExc_RuntimeError, Failed to find attribute 
'%s', ldap_display_name);
+   return NULL;
+   }
+
+   return PyString_FromString(attribute-syntax-ldap_oid);
+}
+
+/*
   convert a python string to a DRSUAPI drsuapi_DsReplicaAttribute attribute
  */
 static PyObject *py_dsdb_DsReplicaAttribute(PyObject *self, PyObject *args)
@@ -802,6 +834,8 @@ static PyMethodDef py_dsdb_methods[] = {
METH_VARARGS, NULL

[SCM] Samba Shared Repository - branch master updated

2011-06-22 Thread Andrew Tridgell
The branch, master has been updated
   via  a353b49 s4-dsdb: bypass validation when relax set
   via  6d1fe05 samba-tool: allow for running dbcheck against a remove ldap 
server
   via  ff8cdee samba-tool: expanded dbcheck DN checking
   via  c42aeb7 s4-dsdb: prioritise GUID in extended_dn_in
   via  d9ee7ae s4-dsdb: catch duplicate matches in extended_dn_in
  from  21af0af s3: Added missing includes to .clang_complete.

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


- Log -
commit a353b49047a54461a1b4fd3c5f232adcea5fbeaf
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 22 18:14:14 2011 +1000

s4-dsdb: bypass validation when relax set

this allows dbcheck to fix bad attributes

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Jun 22 12:27:06 CEST 2011 on sn-devel-104

commit 6d1fe054dd93b8d282fcf515fc62f5d5ab72e6a8
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 22 17:38:19 2011 +1000

samba-tool: allow for running dbcheck against a remove ldap server

this is useful for running it against a Windows server

commit ff8cdeecfc28be396dcbdc4af6b7e60ab9de45f1
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 22 17:08:28 2011 +1000

samba-tool: expanded dbcheck DN checking

this now checks for bad GUID elements in DN links, and offers to fix
them when possible

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit c42aeb7872c89983ea274d72b7ef8d9c7a59bc08
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 22 17:07:39 2011 +1000

s4-dsdb: prioritise GUID in extended_dn_in

if we search with a base DN that has both a GUID and a SID, then use
the GUID first. This matters for the S-1-5-17 SID.

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit d9ee7aebcb26c6115e0caeacb90f3f916a5af600
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 22 17:05:08 2011 +1000

s4-dsdb: catch duplicate matches in extended_dn_in

When searching using extended DNs, if there are multiple matches then
return an object not found error. This is needed for the case of a
duplicate objectSid, which happens for S-1-5-17

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

---

Summary of changes:
 source4/dsdb/samdb/ldb_modules/extended_dn_in.c|   31 +++-
 source4/dsdb/samdb/ldb_modules/objectclass_attrs.c |3 +-
 source4/scripting/python/samba/netcmd/dbcheck.py   |  144 
 3 files changed, 143 insertions(+), 35 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_in.c 
b/source4/dsdb/samdb/ldb_modules/extended_dn_in.c
index 3e2004d..9a70d9a 100644
--- a/source4/dsdb/samdb/ldb_modules/extended_dn_in.c
+++ b/source4/dsdb/samdb/ldb_modules/extended_dn_in.c
@@ -103,6 +103,18 @@ static int extended_base_callback(struct ldb_request *req, 
struct ldb_reply *are
 
switch (ares-type) {
case LDB_REPLY_ENTRY:
+   if (ac-basedn) {
+   /* we have more than one match! This can
+  happen as S-1-5-17 appears twice in a
+  normal provision. We need to return
+  NO_SUCH_OBJECT */
+   const char *str = talloc_asprintf(req, Duplicate 
base-DN matches found for '%s',
+ 
ldb_dn_get_extended_linearized(req, ac-req-op.search.base, 1));
+   ldb_set_errstring(ldb_module_get_ctx(ac-module), str);
+   return ldb_module_done(ac-req, NULL, NULL,
+  LDB_ERR_NO_SUCH_OBJECT);
+   }
+
if (!ac-wellknown_object) {
ac-basedn = talloc_steal(ac, ares-message-dn);
break;
@@ -303,30 +315,33 @@ static int extended_dn_in_fix(struct ldb_module *module, 
struct ldb_request *req
guid_val = ldb_dn_get_extended_component(dn, GUID);
wkguid_val = ldb_dn_get_extended_component(dn, WKGUID);
 
-   if (sid_val) {
+   /*
+ prioritise the GUID - we have had instances of
+ duplicate SIDs in the database in the
+ ForeignSecurityPrinciples due to provision errors
+*/
+   if (guid_val) {
all_partitions = true;
base_dn = 
ldb_get_default_basedn(ldb_module_get_ctx(module));
-   base_dn_filter = talloc_asprintf(req, (objectSid=%s), 
-ldb_binary_encode(req, 
*sid_val));
+   base_dn_filter = talloc_asprintf(req, (objectGUID=%s

[SCM] Samba Shared Repository - branch master updated

2011-06-21 Thread Andrew Tridgell
The branch, master has been updated
   via  cfdeef4 s3-smbd: longer explanation of smbd_shim code
   via  b373d0e s3-build: Provide a run-time shim to work around duplicate 
symbols
   via  e00b1fa lib/util: Restore CH_UNIX as source charset for d_printf()
   via  bf83b64 lib/util Remove display_cd from d_printf()
   via  c017cbf s4/auth: Trivial spelling fixes.
   via  35a9c23 build: move dynconfig for top level build up
  from  894b027 lib/ccan/tally.h: update for FreeBSD compile.

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


- Log -
commit cfdeef4c11a75f1051c4b9905a643f61c74437c7
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jun 21 15:53:36 2011 +1000

s3-smbd: longer explanation of smbd_shim code

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Tue Jun 21 09:05:37 CEST 2011 on sn-devel-104

commit b373d0e777df8770c24cfcc5cc80bf4808faa815
Author: Andrew Bartlett abart...@samba.org
Date:   Tue May 31 13:18:37 2011 +1000

s3-build: Provide a run-time shim to work around duplicate symbols

The become_root() and similar 'smbd' functions that are used widely in
Samba libraries had 'dummy' copies in dummysmbd.c and dummyroot.c.

These have been replaced by a runtime plugin mechanim, which ensures
that standlone binaries still do nothing, while in smbd the correct
function is used.

This avoids having these as duplicate symbols in the smbd binary,
which can cause unpredictable behaviour.

Andrew Bartlett

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

commit e00b1fa2b032012e741d94f3fe0057d6ea53bf4c
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Jun 21 12:53:12 2011 +1000

lib/util: Restore CH_UNIX as source charset for d_printf()

I'm changed this during the change to use the d_printf() code in
common, but should not have.

However, there is a puzzle: What is the right source charset?
Translated strings in our .mo and .msg files are in UTF8, but strings
such as file names on remote servers are in UNIX (whatever that is).
I can't see how this actually works properly when either CH_DISPLAY or
CH_UNIX are other than UTF8!

Andrew Bartlett

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

commit bf83b641e265a7b1523545294c268c6708999d2a
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Jun 21 12:51:30 2011 +1000

lib/util Remove display_cd from d_printf()

The setting of the display charset is now done by
convert_string_talloc() selecting the right charset based on
CH_DISPLAY.

Andrew Bartlett

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

commit c017cbfaa47f6cb7da38a7021427412fe2e62a8d
Author: Brad Hards br...@frogmouth.net
Date:   Fri Jun 17 19:53:11 2011 +1000

s4/auth: Trivial spelling fixes.

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

commit 35a9c23a016e76df7b5647e1b9285f70d15db807
Author: Andrew Bartlett abart...@samba.org
Date:   Tue Jun 21 12:48:22 2011 +1000

build: move dynconfig for top level build up

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

---

Summary of changes:
 {source4/dynconfig = dynconfig}/wscript|2 +-
 lib/util/dprintf.c  |9 +--
 source3/Makefile.in |3 +-
 source3/lib/dummyroot.c |   34 
 source3/lib/dummysmbd.c |   65 
 source3/lib/smbd_shim.c |  110 +++
 source3/lib/smbd_shim.h |   56 ++
 source3/pam_smbpass/wscript_build   |2 +-
 source3/smbd/blocking.c |6 +-
 source3/smbd/dir.c  |4 +-
 source3/smbd/globals.c  |   16 
 source3/smbd/oplock.c   |4 +-
 source3/smbd/proto.h|   14 
 source3/smbd/statcache.c|4 +-
 source3/smbd/uid.c  |6 +-
 source3/wscript_build   |   91 +++---
 source4/auth/credentials/credentials_krb5.c |6 +-
 source4/auth/kerberos/kerberos_util.c   |6 +-
 wscript |4 +-
 wscript_build   |2 +-
 20 files changed, 267 insertions(+), 177 deletions(-)
 rename {source4/dynconfig = dynconfig}/wscript (99%)
 delete mode 100644 source3/lib/dummyroot.c
 delete mode 100644 source3/lib/dummysmbd.c
 create mode 100644 source3/lib/smbd_shim.c
 create mode 100644 source3/lib/smbd_shim.h


Changeset truncated at 500 lines:

diff --git a/source4/dynconfig/wscript b/dynconfig/wscript
similarity index 99

[SCM] Samba Shared Repository - branch master updated

2011-06-17 Thread Andrew Tridgell
The branch, master has been updated
   via  d2bc45e build: only use the git version on install, not in the 
build tree
   via  0b3b7e3 samba-tool: exit with non-zero status on dbcheck failure
   via  b07e493 talloc: added talloc_stackframe_exists()
   via  e080ae0 s4-auth: quiet down the krb5 warnings when kerberos is not 
set to 'MUST'
   via  705ed1c samba-tool: show success message on group operations
  from  0c3075c s4-pysamdb: fixed the normalisation of grouptype in group 
add

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


- Log -
commit d2bc45e7ffb4e8d47878a6fc53c5f5c90dfd2114
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 17 15:21:39 2011 +1000

build: only use the git version on install, not in the build tree

having the git version in our version.h in the build tree is annoying
for developers, as every time you commit or rebase you need to spend
several minutes re-linking. This changes it to use the git version
only on install, which is much more useful as when you actually
install the binaries you may be using them in a way that reporting the
version is useful

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Fri Jun 17 08:37:06 CEST 2011 on sn-devel-104

commit 0b3b7e3797a9aa0dc8f0922c8cd873b0f0b3231e
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 17 14:40:48 2011 +1000

samba-tool: exit with non-zero status on dbcheck failure

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit b07e4933b7ed4b2452cfdd9d223eecb8c0b74fec
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 17 14:22:28 2011 +1000

talloc: added talloc_stackframe_exists()

This can be used to tell if a talloc stackframe is currently
available. Callers can use this to decide if they will use
talloc_tos() or instead use an alternative strategy. This gives us a
way to safely have calls to talloc_tos() in common code that may end
up in external libraries, as long as all talloc_tos() calls in these
pieces of common code check first that a stackframe is available.

commit e080ae0faa2556825189f82fa61a7ff5f249dbc5
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 17 13:47:14 2011 +1000

s4-auth: quiet down the krb5 warnings when kerberos is not set to 'MUST'

this prevents spurious error messages on client commands when when we
will fallback to NTLM authentication

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 705ed1c4921a1456ebcf80ac352567679ab7dfa9
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 17 13:35:52 2011 +1000

samba-tool: show success message on group operations

---

Summary of changes:
 buildtools/wafsamba/samba_patterns.py|3 ++-
 buildtools/wafsamba/samba_version.py |   15 +--
 lib/util/talloc_stack.c  |   17 +
 lib/util/talloc_stack.h  |8 
 source4/auth/credentials/credentials_krb5.c  |6 +-
 source4/auth/gensec/gensec.c |2 +-
 source4/scripting/python/samba/netcmd/dbcheck.py |4 +++-
 source4/scripting/python/samba/netcmd/group.py   |4 
 wscript  |2 +-
 wscript_build|2 +-
 10 files changed, 51 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_patterns.py 
b/buildtools/wafsamba/samba_patterns.py
index 37ef419..f064608 100644
--- a/buildtools/wafsamba/samba_patterns.py
+++ b/buildtools/wafsamba/samba_patterns.py
@@ -10,7 +10,7 @@ def write_version_header(task):
 src = task.inputs[0].srcpath(task.env)
 tgt = task.outputs[0].bldpath(task.env)
 
-version = samba_version_file(src, task.env.srcdir, env=task.env)
+version = samba_version_file(src, task.env.srcdir, env=task.env, 
is_install=task.env.is_install)
 string = str(version)
 
 f = open(tgt, 'w')
@@ -26,4 +26,5 @@ def SAMBA_MKVERSION(bld, target):
 source= 'VERSION',
 target=target,
 always=True)
+t.env.is_install = bld.is_install
 Build.BuildContext.SAMBA_MKVERSION = SAMBA_MKVERSION
diff --git a/buildtools/wafsamba/samba_version.py 
b/buildtools/wafsamba/samba_version.py
index 0b0c159..0c39ed4 100644
--- a/buildtools/wafsamba/samba_version.py
+++ b/buildtools/wafsamba/samba_version.py
@@ -90,7 +90,7 @@ def git_version_summary(path, env=None):
 
 class SambaVersion(object):
 
-def __init__(self, version_dict, path, env=None):
+def __init__(self, version_dict, path, env=None, is_install=True):
 '''Determine the version

[SCM] Samba Shared Repository - branch master updated

2011-06-16 Thread Andrew Tridgell
The branch, master has been updated
   via  0c3075c s4-pysamdb: fixed the normalisation of grouptype in group 
add
   via  a826979 samba-tool: report total error count and suggest --fix if 
needed
   via  08dc1aa samba-tool: added attribute normalisation checks
   via  4905725 s4-dsdb: if we don't have a remote schema, then use the 
local one
   via  665ef94 s4-pydsdb: added dsdb_normalise_attributes() call
  from  5961852 s3:wb_lookupsids: add some paranoia checks to 
wb_lookupsids_recv()

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


- Log -
commit 0c3075cb57134f6171c332158c3052e05dace595
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 17 12:02:23 2011 +1000

s4-pysamdb: fixed the normalisation of grouptype in group add

ldap integers are signed

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Fri Jun 17 05:43:18 CEST 2011 on sn-devel-104

commit a8269792aa7c75b82b5ccab0e3b819601f7a4ef4
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 17 11:34:19 2011 +1000

samba-tool: report total error count and suggest --fix if needed

commit 08dc1aa4cc1a697dd72db6a09a32d1929421fc09
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 17 11:31:25 2011 +1000

samba-tool: added attribute normalisation checks

this checks that all attributes have the right normalisation, and
offers to fix the ones that don't

commit 49057255999fce2e4aa93de60dc80d40a655e61a
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 17 11:30:41 2011 +1000

s4-dsdb: if we don't have a remote schema, then use the local one

this allows the use of drsuapi_to_ldb() on all attributes for the
local database

commit 665ef94d3c15ba59811143bb3d3e395ffd306a58
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 17 11:29:44 2011 +1000

s4-pydsdb: added dsdb_normalise_attributes() call

this call converts a set of attributes to DRSUAPI format and back to
ldb format. This has the effect of normalising the attributes using
the schema syntax rules

---

Summary of changes:
 source4/dsdb/pydsdb.c|  104 ++
 source4/dsdb/schema/schema_syntax.c  |   10 ++-
 source4/scripting/python/samba/netcmd/dbcheck.py |   69 +--
 source4/scripting/python/samba/samdb.py  |   13 +++-
 4 files changed, 187 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c
index 895bd9a..62f33bb 100644
--- a/source4/dsdb/pydsdb.c
+++ b/source4/dsdb/pydsdb.c
@@ -423,6 +423,109 @@ static PyObject *py_dsdb_DsReplicaAttribute(PyObject 
*self, PyObject *args)
return ret;
 }
 
+
+/*
+  normalise a ldb attribute list
+ */
+static PyObject *py_dsdb_normalise_attributes(PyObject *self, PyObject *args)
+{
+   PyObject *py_ldb, *el_list, *ret;
+   struct ldb_context *ldb;
+   char *ldap_display_name;
+   const struct dsdb_attribute *a;
+   struct dsdb_schema *schema;
+   struct dsdb_syntax_ctx syntax_ctx;
+   struct ldb_message_element *el;
+   struct drsuapi_DsReplicaAttribute *attr;
+   TALLOC_CTX *tmp_ctx;
+   WERROR werr;
+   Py_ssize_t i;
+
+   if (!PyArg_ParseTuple(args, OsO, py_ldb, ldap_display_name, 
el_list)) {
+   return NULL;
+   }
+
+   PyErr_LDB_OR_RAISE(py_ldb, ldb);
+
+   if (!PyList_Check(el_list)) {
+   PyErr_Format(PyExc_TypeError, ldif_elements must be a list);
+   return NULL;
+   }
+
+   schema = dsdb_get_schema(ldb, NULL);
+   if (!schema) {
+   PyErr_SetString(PyExc_RuntimeError, Failed to find a schema 
from ldb);
+   return NULL;
+   }
+
+   a = dsdb_attribute_by_lDAPDisplayName(schema, ldap_display_name);
+   if (a == NULL) {
+   PyErr_Format(PyExc_RuntimeError, Failed to find attribute 
'%s', ldap_display_name);
+   return NULL;
+   }
+
+   dsdb_syntax_ctx_init(syntax_ctx, ldb, schema);
+   syntax_ctx.is_schema_nc = false;
+
+   tmp_ctx = talloc_new(ldb);
+   if (tmp_ctx == NULL) {
+   PyErr_NoMemory();
+   return NULL;
+   }
+
+   el = talloc_zero(tmp_ctx, struct ldb_message_element);
+   if (el == NULL) {
+   PyErr_NoMemory();
+   talloc_free(tmp_ctx);
+   return NULL;
+   }
+
+   el-name = ldap_display_name;
+   el-num_values = PyList_Size(el_list);
+
+   el-values = talloc_array(el, struct ldb_val, el-num_values);
+   if (el-values == NULL) {
+   PyErr_NoMemory();
+   talloc_free(tmp_ctx);
+   return NULL;
+   }
+
+   for (i = 0; i  el-num_values; i++) {
+   PyObject *item = PyList_GetItem

[SCM] Samba Shared Repository - branch master updated

2011-06-14 Thread Andrew Tridgell
The branch, master has been updated
   via  d575b2b samba-tool: disable validation on removing an empty 
attribute in dbcheck
   via  2320221 pyldb: make ldb operations more consistent
   via  8741f03 pyldb: added validate option to ldb.modify()
  from  8096b1a s3:smbd/quotas: add #include system/filesys.h (bug #8224)

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


- Log -
commit d575b2b0aba0aeaf73d82e2ed58150110db4025b
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jun 14 16:43:10 2011 +1000

samba-tool: disable validation on removing an empty attribute in dbcheck

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Tue Jun 14 10:49:34 CEST 2011 on sn-devel-104

commit 23202211050b3b3d41632d2bf2795249644d7e8a
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jun 14 16:41:35 2011 +1000

pyldb: make ldb operations more consistent

This changes the controls option on ldb operations to be a keyword
argument, which is more consistent with general python
conventions. This also fixes the pydoc output to include the controls
option.

commit 8741f039955853c092c45cc7f2cedca2384b4c57
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jun 14 16:39:49 2011 +1000

pyldb: added validate option to ldb.modify()

This allows validation of ldb messages in a ldb modify operation to be
bypassed, by setting validate=False. This is useful in the dbcheck
tool to allow for removing invalid empty attributes from the database

---

Summary of changes:
 source4/lib/ldb/pyldb.c  |   57 ++
 source4/scripting/python/samba/netcmd/dbcheck.py |2 +-
 2 files changed, 37 insertions(+), 22 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c
index 68f9098..61662f6 100644
--- a/source4/lib/ldb/pyldb.c
+++ b/source4/lib/ldb/pyldb.c
@@ -819,7 +819,7 @@ static PyObject *py_ldb_connect(PyLdbObject *self, PyObject 
*args, PyObject *kwa
Py_RETURN_NONE;
 }
 
-static PyObject *py_ldb_modify(PyLdbObject *self, PyObject *args)
+static PyObject *py_ldb_modify(PyLdbObject *self, PyObject *args, PyObject 
*kwargs)
 {
PyObject *py_msg;
PyObject *py_controls = Py_None;
@@ -829,8 +829,12 @@ static PyObject *py_ldb_modify(PyLdbObject *self, PyObject 
*args)
struct ldb_message *msg;
int ret;
TALLOC_CTX *mem_ctx;
+   bool validate=true;
+   const char * const kwnames[] = { message, controls, validate, 
NULL };
 
-   if (!PyArg_ParseTuple(args, O|O, py_msg, py_controls))
+   if (!PyArg_ParseTupleAndKeywords(args, kwargs, O|Ob,
+discard_const_p(char *, kwnames),
+py_msg, py_controls, validate))
return NULL;
 
mem_ctx = talloc_new(NULL);
@@ -855,11 +859,13 @@ static PyObject *py_ldb_modify(PyLdbObject *self, 
PyObject *args)
}
msg = PyLdbMessage_AsMessage(py_msg);
 
-   ret = ldb_msg_sanity_check(ldb_ctx, msg);
-   if (ret != LDB_SUCCESS) {
-   PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ret, ldb_ctx);
-   talloc_free(mem_ctx);
-   return NULL;
+   if (validate) {
+   ret = ldb_msg_sanity_check(ldb_ctx, msg);
+   if (ret != LDB_SUCCESS) {
+   PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ret, 
ldb_ctx);
+   talloc_free(mem_ctx);
+   return NULL;
+   }
}
 
ret = ldb_build_mod_req(req, ldb_ctx, mem_ctx, msg, parsed_controls,
@@ -958,7 +964,7 @@ static struct ldb_message *PyDict_AsMessage(TALLOC_CTX 
*mem_ctx,
return msg;
 }
 
-static PyObject *py_ldb_add(PyLdbObject *self, PyObject *args)
+static PyObject *py_ldb_add(PyLdbObject *self, PyObject *args, PyObject 
*kwargs)
 {
PyObject *py_obj;
int ret;
@@ -968,8 +974,11 @@ static PyObject *py_ldb_add(PyLdbObject *self, PyObject 
*args)
PyObject *py_controls = Py_None;
TALLOC_CTX *mem_ctx;
struct ldb_control **parsed_controls;
+   const char * const kwnames[] = { message, controls, NULL };
 
-   if (!PyArg_ParseTuple(args, O|O, py_obj, py_controls ))
+   if (!PyArg_ParseTupleAndKeywords(args, kwargs, O|O,
+discard_const_p(char *, kwnames),
+py_obj, py_controls))
return NULL;
 
mem_ctx = talloc_new(NULL);
@@ -1047,7 +1056,7 @@ static PyObject *py_ldb_add(PyLdbObject *self, PyObject 
*args)
Py_RETURN_NONE;
 }
 
-static PyObject *py_ldb_delete(PyLdbObject *self, PyObject *args)
+static PyObject *py_ldb_delete(PyLdbObject *self, PyObject *args, PyObject 
*kwargs

[SCM] Samba Shared Repository - branch master updated

2011-06-14 Thread Andrew Tridgell
The branch, master has been updated
   via  8c14dec build: fixed development symlinks for libraries in 
subdirectories
   via  720da3c build: fixed dependencies on install prefix for pc files 
and python scripts
  from  5d736d8 s3:utils/net_*registry: use c99 initializers which are 
supported by old gcc 2.95 compilers (bug #8226)

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


- Log -
commit 8c14decdb8cbc5622d7cf9804bef857d0538ede0
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 15 14:13:04 2011 +1000

build: fixed development symlinks for libraries in subdirectories

this fixes the symlink for libsmbclient.so

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Jun 15 07:23:10 CEST 2011 on sn-devel-104

commit 720da3cb9131d4e3bdd0352538f0c5d52c4655c8
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 15 13:53:19 2011 +1000

build: fixed dependencies on install prefix for pc files and python scripts

waf can't automatically determine these dependencies as the
construction of the files is via a python function

thanks to Andrew for noticing this bug

---

Summary of changes:
 buildtools/wafsamba/pkgconfig.py |1 +
 buildtools/wafsamba/samba_install.py |4 ++--
 buildtools/wafsamba/wafsamba.py  |2 ++
 3 files changed, 5 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/pkgconfig.py b/buildtools/wafsamba/pkgconfig.py
index 09bfcb9..8a3f807 100644
--- a/buildtools/wafsamba/pkgconfig.py
+++ b/buildtools/wafsamba/pkgconfig.py
@@ -53,6 +53,7 @@ def PKG_CONFIG_FILES(bld, pc_files, vnum=None):
 rule=subst_at_vars,
 source=f+'.in',
 target=f)
+bld.add_manual_dependency(bld.path.find_or_declare(f), 
bld.env['PREFIX'])
 t.vars = []
 if t.env.RPATH_ON_INSTALL:
 t.env.LIB_RPATH = t.env.RPATH_ST % t.env.LIBDIR
diff --git a/buildtools/wafsamba/samba_install.py 
b/buildtools/wafsamba/samba_install.py
index d755d01..26d0a37 100644
--- a/buildtools/wafsamba/samba_install.py
+++ b/buildtools/wafsamba/samba_install.py
@@ -137,9 +137,9 @@ def install_library(self):
os.path.join(self.path.abspath(bld.env), inst_name))
 if install_link and install_link != install_name:
 # and the symlink if needed
-bld.symlink_as(os.path.join(install_path, install_link), install_name)
+bld.symlink_as(os.path.join(install_path, install_link), 
os.path.basename(install_name))
 if dev_link:
-bld.symlink_as(os.path.join(install_path, dev_link), install_name)
+bld.symlink_as(os.path.join(install_path, dev_link), 
os.path.basename(install_name))
 
 
 @feature('cshlib')
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 43b7f61..d76afc4 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -692,6 +692,8 @@ def install_file(bld, destdir, file, chmod=MODE_644, 
flat=False,
 rule=copy_and_fix_python_path,
 source=file,
 target=inst_file)
+bld.add_manual_dependency(bld.path.find_or_declare(inst_file), 
bld.env[PYTHONARCHDIR])
+bld.add_manual_dependency(bld.path.find_or_declare(inst_file), 
bld.env[PYTHONDIR])
 file = inst_file
 if base_name:
 file = os.path.join(base_name, file)


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-06-10 Thread Andrew Tridgell
The branch, master has been updated
   via  0c89d62 s4-samba-tool: added dbcheck commmand
   via  683f986 waf-symbols: don't look for symbol lists in GENERATOR 
targets
   via  ae1414e waf: fixed 'make bin/XXX' for the remaining binaries
  from  91f3515 s3-param Avoid strupper_m() where possible.

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


- Log -
commit 0c89d624e6d5620c9e37649cc2976aba918b1e6a
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 10 17:17:12 2011 +1000

s4-samba-tool: added dbcheck commmand

this will be used as a consistency checker and repair tool for
sam.ldb. This initial checkin just checks for empty attributes and
offers to fix them

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Fri Jun 10 10:31:56 CEST 2011 on sn-devel-104

commit 683f9868eb13cfaaf0da81bf002a85b81c928f51
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 10 12:16:59 2011 +1000

waf-symbols: don't look for symbol lists in GENERATOR targets

generated header files are not object files

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit ae1414e79698c0c506aabd7458c4fbae8cc8fcf5
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 10 11:32:27 2011 +1000

waf: fixed 'make bin/XXX' for the remaining binaries

this fixes 'make bin/smbd' to work correctly with the waf build. It
didn't work before as smbd is actually 'smbd/smbd' internally and we
tried to use the target name 'smbd'. The new approach reads the
symlink to get the right target.

This also speeds up the null build by quite a lot

---

Summary of changes:
 Makefile  |2 +-
 buildtools/scripts/Makefile.waf   |2 +-
 buildtools/wafsamba/samba_wildcard.py |   35 +-
 buildtools/wafsamba/symbols.py|2 +-
 source4/scripting/python/samba/netcmd/__init__.py |2 +
 source4/scripting/python/samba/netcmd/dbcheck.py  |  123 +
 6 files changed, 159 insertions(+), 7 deletions(-)
 create mode 100644 source4/scripting/python/samba/netcmd/dbcheck.py


Changeset truncated at 500 lines:

diff --git a/Makefile b/Makefile
index cbbf045..3b40c73 100644
--- a/Makefile
+++ b/Makefile
@@ -68,7 +68,7 @@ ctags:
 
 # this allows for things like make bin/smbtorture
 bin/%:: FORCE
-   $(WAF) --targets=`basename $@`
+   $(WAF) --targets=$@
 FORCE:
 
 pydoctor:
diff --git a/buildtools/scripts/Makefile.waf b/buildtools/scripts/Makefile.waf
index 716ab93..5fc939c 100644
--- a/buildtools/scripts/Makefile.waf
+++ b/buildtools/scripts/Makefile.waf
@@ -62,7 +62,7 @@ ctags:
$(WAF) ctags
 
 bin/%:: FORCE
-   $(WAF) --targets=`basename $@`
+   $(WAF) --targets=$@
 FORCE:
 
 configure: autogen-waf.sh BUILDTOOLS/scripts/configure.waf
diff --git a/buildtools/wafsamba/samba_wildcard.py 
b/buildtools/wafsamba/samba_wildcard.py
index 5bf1267..75ab5de 100644
--- a/buildtools/wafsamba/samba_wildcard.py
+++ b/buildtools/wafsamba/samba_wildcard.py
@@ -17,7 +17,7 @@ def run_task(t, k):
 def run_named_build_task(cmd):
'''run a named build task, matching the cmd name using fnmatch
wildcards against inputs and outputs of all build tasks'''
-   bld = fake_build_environment()
+   bld = fake_build_environment(info=False)
found = False
cwd_node = bld.root.find_dir(os.getcwd())
top_node = bld.root.find_dir(bld.srcnode.abspath())
@@ -50,6 +50,28 @@ def run_named_build_task(cmd):
raise Utils.WafError(Unable to find build target matching %s 
% cmd)
 
 
+def rewrite_compile_targets():
+   '''cope with the bin/ form of compile target'''
+   if not Options.options.compile_targets:
+   return
+
+   bld = fake_build_environment(info=False)
+   targets = LOCAL_CACHE(bld, 'TARGET_TYPE')
+   tlist = []
+
+   for t in Options.options.compile_targets.split(','):
+   if not os.path.islink(t):
+   tlist.append(t)
+   continue
+   link = os.readlink(t)
+   list = link.split('/')
+   for name in [list[-1], '/'.join(list[-2:])]:
+   if name in targets:
+   tlist.append(name)
+   continue
+   Options.options.compile_targets = ,.join(tlist)
+
+
 
 def wildcard_main(missing_cmd_fn):
'''this replaces main from Scripting, allowing us to override the
@@ -60,6 +82,9 @@ def wildcard_main(missing_cmd_fn):
   '''
Scripting.commands = Options.arg_line[:]
 
+   # rewrite the compile targets to cope with the bin/xx form
+   rewrite_compile_targets()
+
while Scripting.commands:
x

[SCM] Samba Shared Repository - branch master updated

2011-06-09 Thread Andrew Tridgell
The branch, master has been updated
   via  516dc40 samba-tool: added --local option to drs replicate command
   via  1596595 s4-ipv6: don't default to 127.0.0.1 in provision
  from  19213b8 Ensure when creating a directory, if we make any changes 
due to inheritance parameters, we update the stat returned.

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


- Log -
commit 516dc404fd7f299b68adae356f2416ca8e265031
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Jun 9 15:01:30 2011 +1000

samba-tool: added --local option to drs replicate command

this allows replication directly to the local SAM, which means it can
run without the samba daemon running. It also bypasses all usnChanged
checks, which is useful for forcing replication of a set of objects
which are not marked as replication being needed

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu Jun  9 08:15:10 CEST 2011 on sn-devel-104

commit 1596595b7e644de6432d7c8fb9e10ee2b525440e
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Jun 9 15:00:03 2011 +1000

s4-ipv6: don't default to 127.0.0.1 in provision

it is better to just leave the IPv4 address out of the zone file

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

---

Summary of changes:
 source4/scripting/python/samba/netcmd/drs.py   |   40 +++-
 .../scripting/python/samba/provision/__init__.py   |   13 --
 2 files changed, 47 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/scripting/python/samba/netcmd/drs.py 
b/source4/scripting/python/samba/netcmd/drs.py
index 56c0e39..61717a7 100644
--- a/source4/scripting/python/samba/netcmd/drs.py
+++ b/source4/scripting/python/samba/netcmd/drs.py
@@ -233,6 +233,39 @@ class cmd_drs_kcc(Command):
 self.message(Consistency check on %s successful. % DC)
 
 
+def drs_local_replicate(self, SOURCE_DC, NC):
+'''replicate from a source DC to the local SAM'''
+self.server = SOURCE_DC
+drsuapi_connect(self)
+
+self.local_samdb = SamDB(session_info=system_session(), url=None,
+ credentials=self.creds, lp=self.lp)
+
+self.samdb = SamDB(url=ldap://%s; % self.server,
+   session_info=system_session(),
+   credentials=self.creds, lp=self.lp)
+
+# work out the source and destination GUIDs
+res = self.local_samdb.search(base=, scope=ldb.SCOPE_BASE, 
attrs=[dsServiceName])
+self.ntds_dn = res[0][dsServiceName][0]
+
+res = self.local_samdb.search(base=self.ntds_dn, scope=ldb.SCOPE_BASE, 
attrs=[objectGUID])
+self.ntds_guid = misc.GUID(self.samdb.schema_format_value(objectGUID, 
res[0][objectGUID][0]))
+
+
+source_dsa_invocation_id = misc.GUID(self.samdb.get_invocation_id())
+destination_dsa_guid = self.ntds_guid
+
+self.samdb.transaction_start()
+repl = drs_utils.drs_Replicate(ncacn_ip_tcp:%s[seal] % self.server, 
self.lp,
+   self.creds, self.local_samdb)
+try:
+repl.replicate(NC, source_dsa_invocation_id, destination_dsa_guid)
+except Exception, e:
+raise CommandError(Error replicating DN %s % NC, e)
+self.samdb.transaction_commit()
+
+
 
 class cmd_drs_replicate(Command):
 replicate a naming context between two DCs
@@ -250,9 +283,10 @@ class cmd_drs_replicate(Command):
 takes_options = [
 Option(--add-ref, help=use ADD_REF to add to repsTo on source, 
action=store_true),
 Option(--sync-forced, help=use SYNC_FORCED to force inbound 
replication, action=store_true),
+Option(--local, help=pull changes directly into the local database 
(destination DC is ignored), action=store_true),
 ]
 
-def run(self, DEST_DC, SOURCE_DC, NC, add_ref=False, sync_forced=False,
+def run(self, DEST_DC, SOURCE_DC, NC, add_ref=False, sync_forced=False, 
local=False,
 sambaopts=None,
 credopts=None, versionopts=None, server=None):
 
@@ -261,6 +295,10 @@ class cmd_drs_replicate(Command):
 
 self.creds = credopts.get_credentials(self.lp, fallback_machine=True)
 
+if local:
+drs_local_replicate(self, SOURCE_DC, NC)
+return
+
 drsuapi_connect(self)
 samdb_connect(self)
 
diff --git a/source4/scripting/python/samba/provision/__init__.py 
b/source4/scripting/python/samba/provision/__init__.py
index 324e76f..f272872 100644
--- a/source4/scripting/python/samba/provision/__init__.py
+++ b/source4/scripting/python/samba/provision/__init__.py
@@ -1585,14 +1585,15 @@ def provision(logger, session_info, credentials, 
smbconf=None,
 if hostip is None:
 logger.info(Looking up IPv4 addresses)
 hostips = interface_ips_v4(lp)
-if len(hostips) == 0

[SCM] Samba Shared Repository - branch master updated

2011-06-09 Thread Andrew Tridgell
The branch, master has been updated
   via  73cbcd9 s4-drs: added debug lines for missing linked attribute 
fields
   via  56d09d5 s4-drs: ensure we add a RMD_ADDTIME when upgrading a linked 
attribute
   via  3e4c080 s4-drs: cope with missing RMD_ADDTIME in linked attributes
  from  fe02f47 s3:vfs cleanup unused code in vfs_recycle

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


- Log -
commit 73cbcd9c99e89cc24de84cdb098693d96dd6419d
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 10 10:11:01 2011 +1000

s4-drs: added debug lines for missing linked attribute fields

this improved the logging of bugs related to linked attribute
replication

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Fri Jun 10 03:26:21 CEST 2011 on sn-devel-104

commit 56d09d5904e036ae9cf483b7be202956aae998b3
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 10 10:10:04 2011 +1000

s4-drs: ensure we add a RMD_ADDTIME when upgrading a linked attribute

if the link was a w2k style, and we are upgrading it, then set the
RMD_ADDTIME to the current time

commit 3e4c08096d913834143b23f4fbc662d92659a83f
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 10 09:10:09 2011 +1000

s4-drs: cope with missing RMD_ADDTIME in linked attributes

upgraded links can be missing the RMD_ADDTIME field

---

Summary of changes:
 source4/dsdb/common/util.c  |2 +-
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c |3 ++-
 source4/rpc_server/drsuapi/getncchanges.c   |   18 ++
 3 files changed, 17 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 0cba20b..3fa8f67 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -3192,7 +3192,7 @@ bool dsdb_dn_is_deleted_val(const struct ldb_val *val)
  */
 bool dsdb_dn_is_upgraded_link_val(struct ldb_val *val)
 {
-   return memmem(val-data, val-length, RMD_ADDTIME=, 13) != NULL;
+   return memmem(val-data, val-length, RMD_VERSION=, 13) != NULL;
 }
 
 /*
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c 
b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 04311a4..9d2e5e2 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -1643,7 +1643,8 @@ static int replmd_update_la_val(TALLOC_CTX *mem_ctx, 
struct ldb_val *v, struct d
if (old_addtime == NULL) {
old_addtime = tval;
}
-   if (dsdb_dn != old_dsdb_dn) {
+   if (dsdb_dn != old_dsdb_dn ||
+   ldb_dn_get_extended_component(dn, RMD_ADDTIME) == NULL) {
ret = ldb_dn_set_extended_component(dn, RMD_ADDTIME, 
old_addtime);
if (ret != LDB_SUCCESS) return ret;
}
diff --git a/source4/rpc_server/drsuapi/getncchanges.c 
b/source4/rpc_server/drsuapi/getncchanges.c
index 0c196aa..c57fec2 100644
--- a/source4/rpc_server/drsuapi/getncchanges.c
+++ b/source4/rpc_server/drsuapi/getncchanges.c
@@ -360,27 +360,37 @@ static WERROR get_nc_changes_add_la(TALLOC_CTX *mem_ctx,
la-attid = sa-attributeID_id;
la-flags = active?DRSUAPI_DS_LINKED_ATTRIBUTE_FLAG_ACTIVE:0;
 
-   status = dsdb_get_extended_dn_nttime(dsdb_dn-dn, 
la-originating_add_time, RMD_ADDTIME);
-   if (!NT_STATUS_IS_OK(status)) {
-   return ntstatus_to_werror(status);
-   }
status = dsdb_get_extended_dn_uint32(dsdb_dn-dn, 
la-meta_data.version, RMD_VERSION);
if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0,(__location__  No RMD_VERSION in linked attribute '%s' 
in '%s'\n,
+sa-lDAPDisplayName, ldb_dn_get_linearized(msg-dn)));
return ntstatus_to_werror(status);
}
status = dsdb_get_extended_dn_nttime(dsdb_dn-dn, 
la-meta_data.originating_change_time, RMD_CHANGETIME);
if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0,(__location__  No RMD_CHANGETIME in linked attribute 
'%s' in '%s'\n,
+sa-lDAPDisplayName, ldb_dn_get_linearized(msg-dn)));
return ntstatus_to_werror(status);
}
status = dsdb_get_extended_dn_guid(dsdb_dn-dn, 
la-meta_data.originating_invocation_id, RMD_INVOCID);
if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0,(__location__  No RMD_INVOCID in linked attribute '%s' 
in '%s'\n,
+sa-lDAPDisplayName, ldb_dn_get_linearized(msg-dn)));
return ntstatus_to_werror(status);
}
status = dsdb_get_extended_dn_uint64(dsdb_dn-dn, 
la-meta_data.originating_usn, RMD_ORIGINATING_USN);
if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0,(__location__  No RMD_ORIGINATING_USN in linked 
attribute '%s

[SCM] Samba Shared Repository - branch master updated

2011-06-07 Thread Andrew Tridgell
The branch, master has been updated
   via  632f672 s4-cldap: fixed the CLDAP response for IPv6 clients
   via  285293c s4-ipv6: fixed a crash in the IPv6 DNS code
   via  a58e69a s4-dns: fixed samba_tool - samba-tool
   via  6ea8db1 s4-build: install a build link bin/provision
  from  78a0195 selftest: Fix 'make quicktest' on systems without LDAP 
development support

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


- Log -
commit 632f672b0859cee995788a00ecd464a0a8d5c74a
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jun 7 15:46:17 2011 +1000

s4-cldap: fixed the CLDAP response for IPv6 clients

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Tue Jun  7 08:57:48 CEST 2011 on sn-devel-104

commit 285293c8b5d85383aa5af9968dc73fba5beb9de0
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jun 7 14:10:38 2011 +1000

s4-ipv6: fixed a crash in the IPv6 DNS code

commit a58e69a734085f9963b60042be3d9a33a90616a7
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jun 7 13:46:24 2011 +1000

s4-dns: fixed samba_tool - samba-tool

commit 6ea8db1bd418aa5308a042d59e3288b68312739b
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jun 7 13:15:15 2011 +1000

s4-build: install a build link bin/provision

---

Summary of changes:
 source4/cldap_server/netlogon.c|   14 --
 source4/libcli/resolve/dns_ex.c|2 +-
 source4/scripting/bin/setup_dns.sh |2 +-
 source4/setup/wscript_build|2 ++
 4 files changed, 12 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index 92f7a4a..77f50ff 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -37,6 +37,7 @@
 #include param/param.h
 #include ../lib/tsocket/tsocket.h
 #include libds/common/flag_mapping.h
+#include lib/util/util_net.h
 
 /*
   fill in the cldap netlogon union for a given version
@@ -292,16 +293,17 @@ NTSTATUS fill_netlogon_samlogon_response(struct 
ldb_context *sam_ctx,
  src_address, NULL);
NT_STATUS_HAVE_NO_MEMORY(client_site);
load_interface_list(mem_ctx, lp_ctx, ifaces);
-   /*
-* TODO: the caller should pass the address which the client
-* used to trigger this call, as the client is able to reach
-* this ip.
-*/
+
if (src_address) {
pdc_ip = iface_list_best_ip(ifaces, src_address);
} else {
pdc_ip = iface_list_first_v4(ifaces);
}
+   if (pdc_ip == NULL || !is_ipaddress_v4(pdc_ip)) {
+   /* this matches windows behaviour */
+   pdc_ip = 127.0.0.1;
+   }
+
ZERO_STRUCTP(netlogon);
 
/* check if either of these bits is present */
@@ -325,7 +327,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context 
*sam_ctx,
netlogon-data.nt5_ex.server_site  = server_site;
netlogon-data.nt5_ex.client_site  = client_site;
if (version  NETLOGON_NT_VERSION_5EX_WITH_IP) {
-   /* Clearly this needs to be fixed up for IPv6 */
+   /* note that this is always a IPV4 address */
extra_flags = NETLOGON_NT_VERSION_5EX_WITH_IP;
netlogon-data.nt5_ex.sockaddr.sockaddr_family= 2;
netlogon-data.nt5_ex.sockaddr.pdc_ip   = pdc_ip;
diff --git a/source4/libcli/resolve/dns_ex.c b/source4/libcli/resolve/dns_ex.c
index cb2d2c3..1d56a4b 100644
--- a/source4/libcli/resolve/dns_ex.c
+++ b/source4/libcli/resolve/dns_ex.c
@@ -267,7 +267,7 @@ static void run_child_dns_lookup(struct dns_ex_state 
*state, int fd)
port = state-port;
}
 
-   switch (rr-type) {
+   switch (addrs_rr[i]-type) {
case rk_ns_t_a:
if (inet_ntop(AF_INET, addrs_rr[i]-u.a,
  addrstr, sizeof(addrstr)) == NULL) {
diff --git a/source4/scripting/bin/setup_dns.sh 
b/source4/scripting/bin/setup_dns.sh
index 646ee81..bc2ae96 100755
--- a/source4/scripting/bin/setup_dns.sh
+++ b/source4/scripting/bin/setup_dns.sh
@@ -13,7 +13,7 @@ IP=$3
 RSUFFIX=$(echo $DOMAIN | sed s/[\.]/,DC=/g)
 
 [ -z $PRIVATEDIR ]  {
-PRIVATEDIR=$(bin/samba_tool testparm --section-name=global 
--parameter-name='private dir' --suppress-prompt 2 /dev/null)
+PRIVATEDIR=$(bin/samba-tool testparm --section-name=global 
--parameter-name='private dir' --suppress-prompt 2 /dev/null)
 }
 
 OBJECTGUID=$(bin/ldbsearch -s base -H $PRIVATEDIR/sam.ldb -b CN=NTDS 
Settings,CN=$HOSTNAME,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=$RSUFFIX
 objectguid|grep ^objectGUID| cut -d

[SCM] Samba Shared Repository - branch master updated

2011-06-07 Thread Andrew Tridgell
The branch, master has been updated
   via  4afe426 s4-ipv6: fill in pdc_ip in DsRGetDCNameEx2
   via  e14538d s4-wins: ensure we only use IPv4 for WINS owner
   via  79ef434 s4-interface: raise the debug level for interface discovery
  from  c790213 s4-gensec bring GSS_S_CONTEXT_EXPIRED into it's own error 
handler

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


- Log -
commit 4afe426877fed3ed4d1dae4a8d96dce3f4983b91
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 8 11:49:24 2011 +1000

s4-ipv6: fill in pdc_ip in DsRGetDCNameEx2

this may be different from the CLDAP response, as it can be IPv6

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Jun  8 06:07:29 CEST 2011 on sn-devel-104

commit e14538d9394fc5d21a5e3ec34574b9fb5c468ba2
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 8 10:42:02 2011 +1000

s4-wins: ensure we only use IPv4 for WINS owner

commit 79ef434b900288f23f352dcce083c37308baef2d
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 8 10:41:38 2011 +1000

s4-interface: raise the debug level for interface discovery

---

Summary of changes:
 source4/lib/socket/interface.c|6 +++---
 source4/nbt_server/wins/wins_ldb.c|2 +-
 source4/nbt_server/wins/winsserver.c  |2 +-
 source4/rpc_server/netlogon/dcerpc_netlogon.c |   15 ---
 4 files changed, 17 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/socket/interface.c b/source4/lib/socket/interface.c
index 9cb8f5e..d5b610f 100644
--- a/source4/lib/socket/interface.c
+++ b/source4/lib/socket/interface.c
@@ -116,18 +116,18 @@ static void add_interface(TALLOC_CTX *mem_ctx, const 
struct iface_struct *ifs, s
/* keep string versions too, to avoid people tripping over the implied
   static in inet_ntoa() */
print_sockaddr(addr, sizeof(addr), iface-ip);
-   DEBUG(2,(added interface %s ip=%s ,
+   DEBUG(4,(added interface %s ip=%s ,
 iface-name, addr));
iface-ip_s = talloc_strdup(iface, addr);
 
print_sockaddr(addr, sizeof(addr),
   iface-bcast);
-   DEBUG(2,(bcast=%s , addr));
+   DEBUG(4,(bcast=%s , addr));
iface-bcast_s = talloc_strdup(iface, addr);
 
print_sockaddr(addr, sizeof(addr),
   iface-netmask);
-   DEBUG(2,(netmask=%s\n, addr));
+   DEBUG(4,(netmask=%s\n, addr));
iface-nmask_s = talloc_strdup(iface, addr);
 
/*
diff --git a/source4/nbt_server/wins/wins_ldb.c 
b/source4/nbt_server/wins/wins_ldb.c
index 6519f9e..304c98d 100644
--- a/source4/nbt_server/wins/wins_ldb.c
+++ b/source4/nbt_server/wins/wins_ldb.c
@@ -93,7 +93,7 @@ static int wins_ldb_init(struct ldb_module *module)
if (!owner) {
struct interface *ifaces;
load_interface_list(module, lp_ctx, ifaces);
-   owner = iface_list_n_ip(ifaces, 0);
+   owner = iface_list_first_v4(ifaces);
if (!owner) {
owner = 0.0.0.0;
}
diff --git a/source4/nbt_server/wins/winsserver.c 
b/source4/nbt_server/wins/winsserver.c
index 604c86e..5f1f417 100644
--- a/source4/nbt_server/wins/winsserver.c
+++ b/source4/nbt_server/wins/winsserver.c
@@ -1058,7 +1058,7 @@ NTSTATUS nbtd_winsserver_init(struct nbtd_server *nbtsrv)
if (owner == NULL) {
struct interface *ifaces;
load_interface_list(nbtsrv-task, nbtsrv-task-lp_ctx, 
ifaces);
-   owner = iface_list_n_ip(ifaces, 0);
+   owner = iface_list_first_v4(ifaces);
}
 
nbtsrv-winssrv-wins_db = winsdb_connect(nbtsrv-winssrv, 
nbtsrv-task-event_ctx, 
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c 
b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 8964c1d..d5a7eeb 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -37,6 +37,7 @@
 #include lib/tsocket/tsocket.h
 #include librpc/gen_ndr/ndr_netlogon.h
 #include librpc/gen_ndr/ndr_irpc.h
+#include lib/socket/netif.h
 
 struct netlogon_server_pipe_state {
struct netr_Credential client_challenge;
@@ -1233,6 +1234,7 @@ static NTSTATUS 
dcesrv_netr_NetrEnumerateTrustedDomains(struct dcesrv_call_state
 static NTSTATUS dcesrv_netr_LogonGetCapabilities(struct dcesrv_call_state 
*dce_call, TALLOC_CTX *mem_ctx,
   struct netr_LogonGetCapabilities *r)
 {
+
/* we don't support AES yet */
return NT_STATUS_NOT_IMPLEMENTED;
 }
@@ -1710,6 +1712,8 @@ static WERROR dcesrv_netr_DsRGetDCNameEx2(struct 
dcesrv_call_state *dce_call,
NTSTATUS status;
const char *dc_name = NULL;
const char *domain_name = NULL;
+   struct

[SCM] Samba Shared Repository - branch master updated

2011-06-06 Thread Andrew Tridgell
The branch, master has been updated
   via  8acbc3a s4-provision: fixed detection of V4/V6 addresses
   via  3ccb72d s4-ipv6: fixed iface_list_same_net() for IPv6
   via  64380ff s4-ipv6: fixed DNS handling with new IPv6 code
   via  5d7ba30 s4-dsdb: cope with missing backlinks in rpmd handling
   via  c6252c2 s4-netlogon: force an IPv4 address
   via  6a6d4d8 s4-ipv6: fix iface_list_best_ip() for IPv6
  from  776598a s3-docs Add documentation for ncalrpc dir

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


- Log -
commit 8acbc3a17435ef330910993aa40b5ec1e4c1dab2
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jun 7 12:55:31 2011 +1000

s4-provision: fixed detection of V4/V6 addresses

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Tue Jun  7 06:07:24 CEST 2011 on sn-devel-104

commit 3ccb72d7496aadbdf35b0aee3b2384466d9dd3b8
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jun 7 12:55:09 2011 +1000

s4-ipv6: fixed iface_list_same_net() for IPv6

commit 64380ff050c77b2b67c0fac4ada8650e834c4b4a
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jun 7 12:35:10 2011 +1000

s4-ipv6: fixed DNS handling with new IPv6 code

commit 5d7ba305490b5047b4d404353e95c217c8ef7d10
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Jun 7 10:44:48 2011 +1000

s4-dsdb: cope with missing backlinks in rpmd handling

if backlinks have not propogated correctly in a previous replication
this allows us to recover

commit c6252c2e9d9c43496f1b5ecbf66099979096f66e
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Jun 6 15:19:16 2011 +1000

s4-netlogon: force an IPv4 address

this interface is currently V4 only, don't try and return a V6 address
in a V4 structure

commit 6a6d4d8884788c1e860bda886d168301623e1ea3
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Jun 6 15:18:12 2011 +1000

s4-ipv6: fix iface_list_best_ip() for IPv6

return an interface with the same address family as the target

---

Summary of changes:
 source4/cldap_server/netlogon.c|2 +-
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c|   11 +-
 source4/lib/socket/interface.c |   42 ++--
 source4/libcli/resolve/dns_ex.c|   17 +++-
 .../scripting/python/samba/provision/__init__.py   |   31 +-
 5 files changed, 94 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/cldap_server/netlogon.c b/source4/cldap_server/netlogon.c
index e950d70..92f7a4a 100644
--- a/source4/cldap_server/netlogon.c
+++ b/source4/cldap_server/netlogon.c
@@ -300,7 +300,7 @@ NTSTATUS fill_netlogon_samlogon_response(struct ldb_context 
*sam_ctx,
if (src_address) {
pdc_ip = iface_list_best_ip(ifaces, src_address);
} else {
-   pdc_ip = iface_list_n_ip(ifaces, 0);
+   pdc_ip = iface_list_first_v4(ifaces);
}
ZERO_STRUCTP(netlogon);
 
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c 
b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index 90933c4..04311a4 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -254,7 +254,16 @@ static int replmd_process_backlink(struct ldb_module 
*module, struct la_backlink
msg-elements[0].flags |= LDB_FLAG_INTERNAL_DISABLE_SINGLE_VALUE_CHECK;
 
ret = dsdb_module_modify(module, msg, DSDB_FLAG_NEXT_MODULE, parent);
-   if (ret != LDB_SUCCESS) {
+   if (ret == LDB_ERR_NO_SUCH_ATTRIBUTE  !bl-active) {
+   /* we allow LDB_ERR_NO_SUCH_ATTRIBUTE as success to
+  cope with possible corruption where the backlink has
+  already been removed */
+   DEBUG(0,(WARNING: backlink from %s already removed from %s - 
%s\n,
+ldb_dn_get_linearized(target_dn),
+ldb_dn_get_linearized(source_dn),
+ldb_errstring(ldb)));
+   ret = LDB_SUCCESS;
+   } else if (ret != LDB_SUCCESS) {
ldb_asprintf_errstring(ldb, Failed to %s backlink from %s to 
%s - %s,
   bl-active?add:remove,
   ldb_dn_get_linearized(source_dn),
diff --git a/source4/lib/socket/interface.c b/source4/lib/socket/interface.c
index 96cee2f..9cb8f5e 100644
--- a/source4/lib/socket/interface.c
+++ b/source4/lib/socket/interface.c
@@ -372,6 +372,23 @@ const char *iface_list_first_v4(struct interface *ifaces)
 }
 
 /**
+  return the first IPv6 interface address we have registered
+  **/
+static const char *iface_list_first_v6(struct interface *ifaces)
+{
+   struct interface *i;
+
+#ifdef HAVE_IPV6
+   for (i=ifaces; i; i=i-next

[SCM] Samba Shared Repository - branch master updated

2011-06-05 Thread Andrew Tridgell
The branch, master has been updated
   via  d168a5e s4-ipv6: fill in family when initialising from sockaddr
   via  66aec3c s4-ipv6: removed the old unused ipv6 code in dcerpc_sock.c
   via  25ac58d s4-ipv6: fix the address family for IPv6 string addresses
   via  5d2dbf9 s4-ipv6: allow for IPv6 in dcerpc socket calls
   via  d8e2302 s4-ipv6: allow for IPv6 in resolver top level calls
   via  3736f29 s4-ipv6: use the server address family
   via  b81eac1 util-net: added is_ipaddress_v6()
   via  d1c90c4 s4-ipv6: cope with IPv6 in our async DNS client code
   via  473b344 s4-script: install some of the samba scripts in bin/ during 
build
   via  0e1d7eb s4-testparm: testparm is now part of samba_tool
   via  dc1e610 s4-ipv6: enable IPv6 by default
   via  0b11061 s4-ipv6: fixed binding to ipv4 addresses
   via  be91eff s4-ipv6: removed an old comment
   via  c4e43f9 s4-ipv6: don't add link local addresses to DNS
   via  b34013d s4-ipv6: ensure wrepl server does not use ipv6
   via  74a7e68 ipv6: always try to convert as a numeric address first
   via  7d59e9c s4-ipv6: added IPv6 support to samba_dnsupdate
   via  40dc94a s4-ipv6: update callers to load_interface_list()
   via  44d47e8 s4-ipv6: allow ipv6 to be enabled/disabled in smb.conf
   via  087ee1f s4-gpo: fixed display of GPO version numbers
   via  2f66fb92 s4-ipv6: the wins replication server can only handle IPv4
   via  78a8087 s4-webserver: fixed a talloc reference error on startup 
failure
   via  1812dca s4-ipv6: only listen on V4 addresses in the NBT server
   via  8f3ce14 s4-ipv6: use ip instead of ipv4 for servers
   via  dc8c8fd s4-ipv6: use iface_list_wildcard() to listen on IPv6
   via  d510687 s4-ipv6: fixed stream_setup_socket() to handle IPv6
   via  df63248 s4-ipv6: fixed ipv6_listen() to use IPV6_V6ONLY
   via  244137b s4-ipv6: added socket_address_from_sockaddr_storage()
   via  d8d63b5 s4-ipv6: added ipv4 functions to interface code
   via  a527b96 s4-ipv6: fixed a warning
   via  62af4a3 s4-ipv6: allow IPv6 addresses in our interfaces list
   via  1c87f16 s4-ipv6: changed the default socket address
   via  2fc1151 s4-ipv6: added iface_list_wildcard()
  from  13ac91d nss_wins: Add a stackframe to lookup_byname_backend()

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


- Log -
commit d168a5e703288a5fba3f35a6e44d3f5d5733e6c5
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Jun 6 11:31:23 2011 +1000

s4-ipv6: fill in family when initialising from sockaddr

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Mon Jun  6 05:35:36 CEST 2011 on sn-devel-104

commit 66aec3cf67595c7aec5d10775892dad2538caf65
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Jun 6 10:43:05 2011 +1000

s4-ipv6: removed the old unused ipv6 code in dcerpc_sock.c

the code is now generic to both V4 and V6

commit 25ac58dccef5d1da9946aeb191d6b6c4ee8782cf
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Jun 6 10:42:28 2011 +1000

s4-ipv6: fix the address family for IPv6 string addresses

commit 5d2dbf93b3bfed193c6d8224be6e1d3af7e66d0f
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Jun 6 10:13:41 2011 +1000

s4-ipv6: allow for IPv6 in dcerpc socket calls

commit d8e2302330db1b4d1c5b29608823d46a03fd087a
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Jun 6 10:13:20 2011 +1000

s4-ipv6: allow for IPv6 in resolver top level calls

commit 3736f29696288f908aac4189aedfc7149c431caa
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Jun 6 10:11:53 2011 +1000

s4-ipv6: use the server address family

don't force v4 in connect_multi

commit b81eac1e2b47b0f3885cfe8bb251eeb6245706f9
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Jun 6 10:11:13 2011 +1000

util-net: added is_ipaddress_v6()

commit d1c90c465ee3d0bf60daf23c8eb9510071426c97
Author: Andrew Tridgell tri...@samba.org
Date:   Mon Jun 6 08:09:02 2011 +1000

s4-ipv6: cope with IPv6 in our async DNS client code

commit 473b3446998ca49e6597e30f8bbca43fd7215769
Author: Andrew Tridgell tri...@samba.org
Date:   Sat Jun 4 08:22:30 2011 +1000

s4-script: install some of the samba scripts in bin/ during build

commit 0e1d7eb429a3c6b34ed659f86b8d7a92434acd37
Author: Andrew Tridgell tri...@samba.org
Date:   Sat Jun 4 08:20:54 2011 +1000

s4-testparm: testparm is now part of samba_tool

commit dc1e6109c8bcc21831defd443fcf42427706c642
Author: Andrew Tridgell tri...@samba.org
Date:   Sat Jun 4 07:59:54 2011 +1000

s4-ipv6: enable IPv6 by default

it now passes all tests

commit 0b11061b05cf6fdda8bf8a9be1a8da5b0cac1707
Author: Andrew Tridgell tri...@samba.org
Date:   Fri Jun 3 17:57:57 2011 +1000

s4-ipv6: fixed binding to ipv4 addresses

commit be91effc20b6454f2b71aaadff3ff02378df164f
Author: Andrew

[SCM] Samba Shared Repository - branch master updated

2011-06-01 Thread Andrew Tridgell
The branch, master has been updated
   via  9bd695c samba-tool: update tests for new 'user enable' syntax
   via  1bc1ac0 samba-tool: improved error handling in user setexpiry
   via  7b3d8b6 samba-tool: improved user enable error handling
   via  23177b5 s4:samba-tool: Move samba-tool setexpiry to samba-tool user 
setexpiry user
   via  726ee12 s4/samba-tool: Move samba-tool enableaccount to samba-tool 
user enable command.
  from  f725e2b build: fixed a problem with installing scripts in the build 
tree

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


- Log -
commit 9bd695c83f43cacfc08566f3c18db44b61f7ed75
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 1 17:22:15 2011 +1000

samba-tool: update tests for new 'user enable' syntax

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Jun  1 10:37:50 CEST 2011 on sn-devel-104

commit 1bc1ac0d084976fccf187526f7bd8d9ad818da10
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 1 14:46:04 2011 +1000

samba-tool: improved error handling in user setexpiry

commit 7b3d8b6c908a37bb06e413dee406cebd29b99b3e
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 1 14:41:51 2011 +1000

samba-tool: improved user enable error handling

commit 23177b5f44815bc5b46943c70d37dc626ed60288
Author: Theresa Halloran theresahallo...@gmail.com
Date:   Thu May 19 16:24:00 2011 -0400

s4:samba-tool: Move samba-tool setexpiry to samba-tool user setexpiry user

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

commit 726ee12bb450821f929e05ca1c708f3e33f909cf
Author: Theresa Halloran theresahallo...@gmail.com
Date:   Thu May 19 16:17:07 2011 -0400

s4/samba-tool: Move samba-tool enableaccount to samba-tool user enable 
command.

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

---

Summary of changes:
 source4/scripting/python/samba/netcmd/__init__.py  |5 +-
 .../scripting/python/samba/netcmd/enableaccount.py |   60 -
 source4/scripting/python/samba/netcmd/setexpiry.py |   67 ---
 source4/scripting/python/samba/netcmd/user.py  |   89 +++-
 source4/scripting/python/samba/samdb.py|6 ++
 source4/setup/tests/blackbox_newuser.sh|   12 ++--
 testprogs/blackbox/test_kinit.sh   |2 +-
 testprogs/blackbox/test_pkinit.sh  |2 +-
 8 files changed, 103 insertions(+), 140 deletions(-)
 delete mode 100644 source4/scripting/python/samba/netcmd/enableaccount.py
 delete mode 100644 source4/scripting/python/samba/netcmd/setexpiry.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 cf514d5..d934cf8 100644
--- a/source4/scripting/python/samba/netcmd/__init__.py
+++ b/source4/scripting/python/samba/netcmd/__init__.py
@@ -2,6 +2,7 @@
 
 # Unix SMB/CIFS implementation.
 # Copyright (C) Jelmer Vernooij jel...@samba.org 2009
+# Copyright (C) Theresa Halloran theresahallo...@gmail.com 2011
 #
 # 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
@@ -179,10 +180,6 @@ from samba.netcmd.domainlevel import cmd_domainlevel
 commands[domainlevel] = cmd_domainlevel()
 from samba.netcmd.setpassword import cmd_setpassword
 commands[setpassword] = cmd_setpassword()
-from samba.netcmd.setexpiry import cmd_setexpiry
-commands[setexpiry] = cmd_setexpiry()
-from samba.netcmd.enableaccount import cmd_enableaccount
-commands[enableaccount] = cmd_enableaccount()
 from samba.netcmd.newuser import cmd_newuser
 commands[newuser] = cmd_newuser()
 from samba.netcmd.netacl import cmd_acl
diff --git a/source4/scripting/python/samba/netcmd/enableaccount.py 
b/source4/scripting/python/samba/netcmd/enableaccount.py
deleted file mode 100644
index 3ceddb3..000
--- a/source4/scripting/python/samba/netcmd/enableaccount.py
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/usr/bin/env python
-#
-# Enables an user account on a Samba4 server
-# Copyright Jelmer Vernooij 2008
-#
-# Based on the original in EJS:
-# Copyright Andrew Tridgell 2005
-#
-# 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

[SCM] Samba Shared Repository - branch master updated

2011-05-31 Thread Andrew Tridgell
The branch, master has been updated
   via  f725e2b build: fixed a problem with installing scripts in the build 
tree
  from  5a8218b s3-param Make lp_ncalrpc_dir() const

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


- Log -
commit f725e2b64eec48c0fe21a125065152c684d361ee
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Jun 1 11:43:52 2011 +1000

build: fixed a problem with installing scripts in the build tree

the SAMBA_SCRIPT() function was not always triggering correctly. The
base problem was that we were using a target outside the build
tree. This implements a simpler solution where we just create the
links directly in SAMBA_SCRIPT() rather than creating a waf task

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Wed Jun  1 06:50:04 CEST 2011 on sn-devel-104

---

Summary of changes:
 buildtools/wafsamba/wafsamba.py |   27 +--
 1 files changed, 9 insertions(+), 18 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
index 2a1c82a..43b7f61 100644
--- a/buildtools/wafsamba/wafsamba.py
+++ b/buildtools/wafsamba/wafsamba.py
@@ -628,17 +628,6 @@ def ENABLE_TIMESTAMP_DEPENDENCIES(conf):
 Utils.h_file = h_file
 
 
-
-t = Task.simple_task_type('copy_script', 'rm -f ${LINK_TARGET}  ln -s 
${SRC[0].abspath(env)} ${LINK_TARGET}',
-  shell=True, color='PINK', ext_in='.bin')
-t.quiet = True
-
-@feature('copy_script')
-@before('apply_link')
-def copy_script(self):
-tsk = self.create_task('copy_script', self.allnodes[0])
-tsk.env.TARGET = self.target
-
 def SAMBA_SCRIPT(bld, name, pattern, installdir, installname=None):
 '''used to copy scripts from the source tree into the build directory
for use by selftest'''
@@ -653,15 +642,17 @@ def SAMBA_SCRIPT(bld, name, pattern, installdir, 
installname=None):
 target = os.path.join(installdir, iname)
 tgtdir = os.path.dirname(os.path.join(bld.srcnode.abspath(bld.env), 
'..', target))
 mkdir_p(tgtdir)
-t = bld(features='copy_script',
-source   = s,
-target   = target,
-always   = True,
-install_path = None)
-t.env.LINK_TARGET = target
-
+link_src = os.path.normpath(os.path.join(bld.curdir, s))
+link_dst = os.path.join(tgtdir, os.path.basename(iname))
+if os.path.islink(link_dst) and os.readlink(link_dst) == link_src:
+continue
+if os.path.exists(link_dst):
+os.unlink(link_dst)
+Logs.info(symlink: %s - %s/%s % (s, installdir, iname))
+os.symlink(link_src, link_dst)
 Build.BuildContext.SAMBA_SCRIPT = SAMBA_SCRIPT
 
+
 def copy_and_fix_python_path(task):
 pattern='sys.path.insert(0, bin/python)'
 if task.env[PYTHONARCHDIR] in sys.path and task.env[PYTHONDIR] in 
sys.path:


-- 
Samba Shared Repository


autobuild: intermittent test failure detected

2011-05-30 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-31-0620/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-31-0620/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-31-0620/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-31-0620/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-31-0620/samba4.stdout
  
The top commit at the time of the failure was:

commit 4ac4ad21084b0cd09261ca37199c2a89607f86eb
Author: Günther Deschner g...@samba.org
Date:   Tue May 31 00:35:58 2011 +0200

s3-utils: fix another -Wunused-but-set-variable build warning.

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Tue May 31 05:18:42 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-05-28 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-28-2306/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-28-2306/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-28-2306/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-28-2306/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-28-2306/samba4.stdout
  
The top commit at the time of the failure was:

commit 797316ae9797f7567e01f853effbd87d98b2abbb
Author: Volker Lendecke v...@samba.org
Date:   Sat May 28 21:01:59 2011 +0200

s3: Use cli_connect_nb in net_rpc_check

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Sat May 28 21:57:04 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-05-24 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-24-1907/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-24-1907/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-24-1907/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-24-1907/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-24-1907/samba4.stdout
  
The top commit at the time of the failure was:

commit 9c3e5380ecabe44796f5d53f8aa9f81642434dd8
Author: Jeremy Allison j...@samba.org
Date:   Mon May 23 10:57:56 2011 -0700

Fix bug #8150 - Ban 'dos charset = utf8'

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Tue May 24 03:52:50 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-05-23 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-24-0244/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-24-0244/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-24-0244/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-24-0244/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-24-0244/samba4.stdout
  
The top commit at the time of the failure was:

commit 18ec1dab59b16db7cf353c0144c43969cfdc3be7
Author: Volker Lendecke v...@samba.org
Date:   Mon May 23 12:26:03 2011 +0200

s3: Remove unused cli_get_nt_error

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Mon May 23 16:54:21 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-05-22 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-22-1220/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-22-1220/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-22-1220/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-22-1220/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-22-1220/samba4.stdout
  
The top commit at the time of the failure was:

commit feb1d9fef3b976e17c252edca333b1c287511170
Author: Volker Lendecke v...@samba.org
Date:   Sat May 21 22:20:18 2011 +0200

s3: Remove clistr_align_out

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Sat May 21 23:31:12 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-05-19 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-19-1634/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-19-1634/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-19-1634/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-19-1634/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-19-1634/samba4.stdout
  
The top commit at the time of the failure was:

commit 66c3d5d74b25b9b7703c2f48fd02a43f1d2ae9f2
Author: Jeremy Allison j...@samba.org
Date:   Wed May 18 15:28:28 2011 -0700

Fix bug found when building on an IPv6-only system by Kai Blin.

When building on IPv6-only, doing:

hints.ai_family = AF_INET;
getaddrinfo(0.0.0.0, NULL, hints, ppres)

fails as AF_INET is unavailable on an IPv6-only system. This
causes us to fallback to our replacement getaddrinfo code
which is IPv4-only.

As we're only trying to detect a specific AIX bug here,
broaden the tests to find that bug, and also test for
working getaddrinfo in an IPv6-only safe way.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Thu May 19 02:21:54 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-05-18 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-18-1027/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-18-1027/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-18-1027/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-18-1027/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-18-1027/samba4.stdout
  
The top commit at the time of the failure was:

commit 902b1d9a19ca8bbc32c3cf1f67efd9cf6627d711
Author: Stefan Metzmacher me...@samba.org
Date:   Mon May 2 12:51:58 2011 +0200

s4:ntvfs/cifs: return NT_STATUS_INTERNAL_ERROR if no credentials are 
available

This is a configuration problem on the server, no invalid parameter
from the client.

metze

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Wed May 18 08:49:00 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-05-18 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-18-1427/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-18-1427/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-18-1427/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-18-1427/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-18-1427/samba4.stdout
  
The top commit at the time of the failure was:

commit b25f7d4020276c199b29597ba4c575d9f8f8a4e3
Author: Matthieu Patou m...@matws.net
Date:   Wed May 18 08:44:05 2011 +0400

torture: desactivate the level 4 tests for DFS referral

Autobuild-User: Matthieu Patou m...@samba.org
Autobuild-Date: Wed May 18 13:04:00 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-05-18 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-18-1627/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-18-1627/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-18-1627/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-18-1627/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-18-1627/samba4.stdout
  
The top commit at the time of the failure was:

commit d97faae7db451184d61c860d9756cdce2d792519
Author: Günther Deschner g...@samba.org
Date:   Wed May 18 13:15:01 2011 +0200

s3-smbtorture: fix build warning (shadowed NTSTATUS variable).

Guenther

Autobuild-User: Günther Deschner g...@samba.org
Autobuild-Date: Wed May 18 14:17:13 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-05-16 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-16-1256/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-16-1256/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-16-1256/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-16-1256/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-16-1256/samba4.stdout
  
The top commit at the time of the failure was:

commit 20179bb5508cddca917732b6a459afa1d7136789
Author: Christian Ambach christian.amb...@de.ibm.com
Date:   Fri May 6 13:16:26 2011 +0200

s3:libsmb convert user-specified domain to uppercase

with client ntlmv2 auth = yes, there is a small difference between
using smbclient -U user\domain and smbclient -U user -W domain
if domain is provided in lowercase

using -W will uppercase the given parameter, while picking the
domain name from -U will not convert it to uppercase and this
leads to failing NTLMv2 authentication

with this patch, there is no difference between
smbclient -U domain\user and smbclient -U user -W domain any more

Autobuild-User: Christian Ambach a...@samba.org
Autobuild-Date: Mon May 16 11:42:55 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-05-15 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-15-1220/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-15-1220/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-15-1220/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-15-1220/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-15-1220/samba4.stdout
  
The top commit at the time of the failure was:

commit 30be9fe554af0f63e1c5fe0b3dd60b8a084cf2c8
Author: Volker Lendecke v...@samba.org
Date:   Sat May 14 18:04:49 2011 +0200

s3: Makeuse set_socket_addr_v4

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Sat May 14 18:57:57 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-05-14 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-15-0409/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-15-0409/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-15-0409/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-15-0409/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-15-0409/samba4.stdout
  
The top commit at the time of the failure was:

commit 30be9fe554af0f63e1c5fe0b3dd60b8a084cf2c8
Author: Volker Lendecke v...@samba.org
Date:   Sat May 14 18:04:49 2011 +0200

s3: Makeuse set_socket_addr_v4

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Sat May 14 18:57:57 CEST 2011 on sn-devel-104


[SCM] Samba Shared Repository - branch master updated

2011-05-10 Thread Andrew Tridgell
The branch, master has been updated
   via  628fcd1 s3-events: tevent_internal.h is not a public header
  from  44cc165 s3: Use tevent_req_ntstatus properly in a few places

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


- Log -
commit 628fcd111af9b51020191a6ee916896c127c88c1
Author: Andrew Tridgell tri...@samba.org
Date:   Tue May 10 14:55:45 2011 +0200

s3-events: tevent_internal.h is not a public header

We need to use the foo.h form instead of the foo.h form for
headers that are not installed publicly. Otherwise when an external
version of tevent is used we won't find the header and the build will
fail.

Note that this creates a structure dependency between the
tevent structures in the external library and the headers in our
source tree. That is not ideal, but is currently OK as the waf build
will only use the external library if it is at least the same version
as the internal tree, which means it will actually be the same
version, as we release the external version from our tree.

We should come up with a better solution, but for now this allows
openchange to build again.

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Tue May 10 16:06:40 CEST 2011 on sn-devel-104

---

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


Changeset truncated at 500 lines:

diff --git a/source3/lib/events.c b/source3/lib/events.c
index e461ebe..9ff1488 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -19,7 +19,7 @@
 */
 
 #include includes.h
-#include tevent_internal.h
+#include lib/tevent/tevent_internal.h
 #include ../lib/util/select.h
 #include system/select.h
 


-- 
Samba Shared Repository


autobuild: intermittent test failure detected

2011-05-10 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-11-0254/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-11-0254/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-11-0254/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-11-0254/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-11-0254/samba4.stdout
  
The top commit at the time of the failure was:

commit 05e8881fef02e309a6dfbaee544f11c3d5088278
Author: Michael Adam ob...@samba.org
Date:   Tue May 10 22:02:49 2011 +0200

s3:librpc: remove unneded gssapi includes from source3/librpc/crypto/gse.c

These come in via the smb_krb5.h include (and lib/replace/system/kerberos.h)
in the end.

Pair-Programmed-With: Stefan Metzmacher me...@samba.org

Autobuild-User: Michael Adam ob...@samba.org
Autobuild-Date: Tue May 10 23:12:31 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-05-09 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-09-1453/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-09-1453/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-09-1453/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-09-1453/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-09-1453/samba4.stdout
  
The top commit at the time of the failure was:

commit 14f99167f600ae9a3351d4ff7d089e54ca3149ac
Author: Andrew Bartlett abart...@samba.org
Date:   Mon May 9 11:00:18 2011 +0200

build: Remove --disable-s3build so we can rely on these subsystems

This will make it easier to write code that uses the whole codebase.

Andrew Bartlett

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Mon May  9 12:25:33 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-05-08 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-08-1059/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-08-1059/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-08-1059/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-08-1059/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-08-1059/samba4.stdout
  
The top commit at the time of the failure was:

commit 622faa268754eb1832bab638380991d419625519
Author: Volker Lendecke v...@samba.org
Date:   Sat May 7 10:38:12 2011 +0200

s3: Fix including libsmb/proto.h without prior ads.h

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Sat May  7 11:38:11 CEST 2011 on sn-devel-104


[SCM] Samba Shared Repository - branch master updated

2011-05-08 Thread Andrew Tridgell
The branch, master has been updated
   via  c596d85 s4-interfaces: keep interfaces in the order they were 
declared
   via  64adea3 s3-test: build smbtorture with --enable-developer
   via  8a07ec7 lib/socket: Remove outdated comment
   via  22cb631 s4-interfaces Rename interfaces code so not to conflict 
with source3/
   via  897ef82 s3-lib Use common lib/socket code for get_interfaces() et al
   via  f346a73 lib/socket move interfaces code to the top level
   via  879498b s4-lib/socket Samba4 is not IPv6 compatible
   via  5a8b6ac s4-lib merge get_interfaces() from Samba3 to Samba4
  from  45e26fd s3-smbd: expose smbd_set_server_fd()

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


- Log -
commit c596d85afd41c2512ef77a10a9d6b40f4836c386
Author: Andrew Tridgell tri...@samba.org
Date:   Sun May 8 12:55:41 2011 +0200

s4-interfaces: keep interfaces in the order they were declared

the spoolss notify test depends on the interfaces order

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Sun May  8 13:57:58 CEST 2011 on sn-devel-104

commit 64adea3d857ac7fcfb86264e877e96a08c7b5aa0
Author: Andrew Tridgell tri...@samba.org
Date:   Sun May 8 12:55:00 2011 +0200

s3-test: build smbtorture with --enable-developer

this makes debugging of tests much easier, as we get debug symbols

commit 8a07ec7babe728adf8a3d590e4c6e6a5d5f66bcd
Author: Andrew Bartlett abart...@samba.org
Date:   Tue May 3 20:24:39 2011 +1000

lib/socket: Remove outdated comment

The autoconf and waf tests for interfaces logic are in libreplace now.

commit 22cb631b4fd0647b70fbaaafaffda8712a84a999
Author: Andrew Bartlett abart...@samba.org
Date:   Mon May 2 15:57:19 2011 +1000

s4-interfaces Rename interfaces code so not to conflict with source3/

The iface_count, iface_n_bcast, and load_interfaces functions
conflicted with functions of the same name in source3, so the source4
functions were renamed.  Hopefully we can actually wrap one around the
other in future.

Andrew Bartlett

commit 897ef820a40afffbf337b5487a49d957464def67
Author: Andrew Bartlett abart...@samba.org
Date:   Mon May 2 12:20:21 2011 +1000

s3-lib Use common lib/socket code for get_interfaces() et al

commit f346a737855bb5018978f0fcf1dcafbf5dc7e603
Author: Andrew Bartlett abart...@samba.org
Date:   Mon May 2 13:02:17 2011 +1000

lib/socket move interfaces code to the top level

commit 879498b3622102630a5ade8d7d5421720f6fd7c6
Author: Andrew Bartlett abart...@samba.org
Date:   Tue May 3 19:41:41 2011 +1000

s4-lib/socket Samba4 is not IPv6 compatible

Don't add IPv6 interfaces until we actually support them.

I'll soon have IPv6 service at home, and then I'll make it my buisness
to sort this out once and for all.

Andrew Bartlett

commit 5a8b6ac4c0ea88bdab12349830985560c69cbf8c
Author: Andrew Bartlett abart...@samba.org
Date:   Mon May 2 12:09:19 2011 +1000

s4-lib merge get_interfaces() from Samba3 to Samba4

---

Summary of changes:
 {source3/lib = lib/socket}/interfaces.c |   10 +-
 {source3/include = lib/socket}/interfaces.h |   21 +--
 lib/socket/wscript_build |7 +
 libcli/nbt/tools/nmblookup.c |6 +-
 source3/Makefile-smbtorture4 |2 +-
 source3/Makefile.in  |2 +-
 source3/lib/access.c |2 +-
 source3/lib/interface.c  |2 +-
 source3/lib/util_sock.c  |2 +-
 source3/wscript_build|5 +-
 source4/cldap_server/cldap_server.c  |8 +-
 source4/cldap_server/netlogon.c  |6 +-
 source4/dns_server/dns_server.c  |8 +-
 source4/echo_server/echo_server.c|   10 +-
 source4/kdc/kdc.c|8 +-
 source4/ldap_server/ldap_server.c|6 +-
 source4/lib/socket/interface.c   |  273 +-
 source4/lib/socket/netif.c   |  127 
 source4/lib/socket/netif.h   |   14 +--
 source4/lib/socket/testsuite.c   |   14 +-
 source4/lib/socket/wscript_build |   10 +-
 source4/libcli/resolve/bcast.c   |6 +-
 source4/libcli/resolve/wins.c|2 +-
 source4/libcli/wrepl/winsrepl.c  |4 +-
 source4/nbt_server/interfaces.c  |   16 +-
 source4/nbt_server/nbt_server.c  |4 +-
 source4/nbt_server/wins/wins_ldb.c   |4 +-
 source4/nbt_server/wins/winsserver.c |6 +-
 source4/rpc_server/dcerpc_server.c   |6 +-
 source4/scripting/python/pyglue.c

autobuild: intermittent test failure detected

2011-05-08 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-08-1832/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-08-1832/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-08-1832/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-08-1832/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-08-1832/samba4.stdout
  
The top commit at the time of the failure was:

commit c596d85afd41c2512ef77a10a9d6b40f4836c386
Author: Andrew Tridgell tri...@samba.org
Date:   Sun May 8 12:55:41 2011 +0200

s4-interfaces: keep interfaces in the order they were declared

the spoolss notify test depends on the interfaces order

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Sun May  8 13:57:58 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-05-06 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-06-2032/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-06-2032/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-06-2032/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-06-2032/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-06-2032/samba4.stdout
  
The top commit at the time of the failure was:

commit f7b3909103a0acd5ee0426b85112f2c9ed4e7730
Author: Jeremy Allison j...@samba.org
Date:   Fri May 6 07:54:18 2011 -0700

A couple more off-by-one calculations with strlcpy.

Autobuild-User: Jeremy Allison j...@samba.org
Autobuild-Date: Fri May  6 18:39:17 CEST 2011 on sn-devel-104


[SCM] Samba Shared Repository - branch master updated

2011-05-05 Thread Andrew Tridgell
The branch, master has been updated
   via  f455772 s3-winbind: another strlcpy()/fstring fix
   via  2fc8ad8 s3-auth: fixed bug with usernames longer than sizeof(char *)
  from  153a091 Fix const in smbtorture.

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


- Log -
commit f455772b99dec88ae0eafc3206d42d88de89461d
Author: Andrew Tridgell tri...@samba.org
Date:   Fri May 6 14:49:36 2011 +1000

s3-winbind: another strlcpy()/fstring fix

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Fri May  6 07:50:33 CEST 2011 on sn-devel-104

commit 2fc8ad88871bf8287e22cc13cea5d4dc4ddbeb61
Author: Andrew Tridgell tri...@samba.org
Date:   Fri May 6 14:00:27 2011 +1000

s3-auth: fixed bug with usernames longer than sizeof(char *)

using sizeof(user) when user is fstring user as a C parameter
actually returns sizeof(char *), which means that long usernames
aren't allowed.

Jeremy, you need a longer username :-)

Cheers, Tridge

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

---

Summary of changes:
 source3/smbd/password.c   |6 +++---
 source3/winbindd/idmap_hash/mapfile.c |4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/password.c b/source3/smbd/password.c
index 3438434..69b3759 100644
--- a/source3/smbd/password.c
+++ b/source3/smbd/password.c
@@ -644,7 +644,7 @@ bool authorise_login(struct smbd_server_connection *sconn,
get_session_workgroup(sconn),
user2,password)) {
ok = True;
-   strlcpy(user,user2,sizeof(user));
+   strlcpy(user,user2,sizeof(fstring));
DEBUG(3,(authorise_login: ACCEPTED: session 
 list username (%s) and given 
 password ok\n, user));
@@ -695,7 +695,7 @@ bool authorise_login(struct smbd_server_connection *sconn,
get_session_workgroup(sconn),
user2,password)) {
ok = True;
-   strlcpy(user,user2,sizeof(user));
+   strlcpy(user,user2,sizeof(fstring));
DEBUG(3,(authorise_login: ACCEPTED: 
 user list username and 
 given password ok (%s)\n,
@@ -714,7 +714,7 @@ bool authorise_login(struct smbd_server_connection *sconn,
fstrcpy(guestname,lp_guestaccount());
guest_pw = Get_Pwnam_alloc(talloc_tos(), guestname);
if (guest_pw != NULL) {
-   strlcpy(user,guestname,sizeof(user));
+   strlcpy(user,guestname,sizeof(fstring));
ok = True;
DEBUG(3,(authorise_login: ACCEPTED: guest account 
 and guest ok (%s)\n, user));
diff --git a/source3/winbindd/idmap_hash/mapfile.c 
b/source3/winbindd/idmap_hash/mapfile.c
index 1183328..075f0f2 100644
--- a/source3/winbindd/idmap_hash/mapfile.c
+++ b/source3/winbindd/idmap_hash/mapfile.c
@@ -87,8 +87,8 @@ static bool mapfile_read_line(fstring key, fstring value)
*p = '\0';
p++;
 
-   strlcpy(key, buffer, sizeof(key));
-   strlcpy(value, p, sizeof(value));
+   strlcpy(key, buffer, sizeof(fstring));
+   strlcpy(value, p, sizeof(fstring));
 
/* Eat whitespace */
 


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2011-05-04 Thread Andrew Tridgell
The branch, master has been updated
   via  323c744 s4-auth: removed the password combinations code in auth_unix
  from  8563d5c s3-rpc_server: run minimal_includes.pl.

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


- Log -
commit 323c7445713d17989452b99bbb541248bb2388eb
Author: Andrew Tridgell tri...@samba.org
Date:   Thu May 5 13:59:08 2011 +1000

s4-auth: removed the password combinations code in auth_unix

this code never did anything due to a typo, and was untested. We
should not be inluding a password cracker in Samba anyway.

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

Autobuild-User: Andrew Tridgell tri...@samba.org
Autobuild-Date: Thu May  5 07:00:14 CEST 2011 on sn-devel-104

---

Summary of changes:
 source4/auth/ntlm/auth_unix.c |   43 +++-
 1 files changed, 4 insertions(+), 39 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/ntlm/auth_unix.c b/source4/auth/ntlm/auth_unix.c
index 743cb81..7fdb4b3 100644
--- a/source4/auth/ntlm/auth_unix.c
+++ b/source4/auth/ntlm/auth_unix.c
@@ -737,46 +737,11 @@ static NTSTATUS check_unix_password(TALLOC_CTX *ctx, 
struct loadparm_context *lp
return nt_status;
}
 
-   if ( user_info-flags | USER_INFO_CASE_INSENSITIVE_PASSWORD) {
-   return nt_status;
-   }
-
-   /* if the password was given to us with mixed case then we don't
-* need to proceed as we know it hasn't been case modified by the
-* client */
-   if (strhasupper(password)  strhaslower(password)) {
-   return nt_status;
-   }
-
-   /* make a copy of it */
-   pwcopy = talloc_strdup(ctx, password);
-   if (!pwcopy)
-   return NT_STATUS_NO_MEMORY;
-
-   /* try all lowercase if it's currently all uppercase */
-   if (strhasupper(pwcopy)) {
-   strlower(pwcopy);
-   nt_status = password_check(username, pwcopy, crypted, salt);
-   if NT_STATUS_IS_OK(nt_status) {
-   *ret_passwd = pws;
-   return nt_status;
-   }
-   }
-
-   /* give up? */
-   if (level  1) {
-   return NT_STATUS_WRONG_PASSWORD;
-   }
-
-   /* last chance - all combinations of up to level chars upper! */
-   strlower(pwcopy);
+   /* we no longer try different case combinations here. The use
+* of this code is now web auth, where trying different case
+* combinations makes no sense
+*/
 
-#if 0
-if (NT_STATUS_IS_OK(nt_status = string_combinations(pwcopy, 
password_check, level))) {
-   *ret_passwd = pws;
-   return nt_status;
-   }
-#endif   
return NT_STATUS_WRONG_PASSWORD;
 }
 


-- 
Samba Shared Repository


autobuild: intermittent test failure detected

2011-05-01 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-05-02-0452/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-02-0452/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-05-02-0452/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-05-02-0452/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-05-02-0452/samba4.stdout
  
The top commit at the time of the failure was:

commit d87427973c0f43d85546f5875b223929ac1a50d4
Author: Volker Lendecke v...@samba.org
Date:   Sat Apr 30 19:23:55 2011 +0200

s3: Make name_resolve_bcast return sockaddr_storage

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Sat Apr 30 20:40:46 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-04-29 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-04-29-1442/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-29-1442/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-04-29-1442/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-29-1442/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-04-29-1442/samba4.stdout
  
The top commit at the time of the failure was:

commit 4d41a5effdc9a13921367be3412b53a39f75d73a
Author: Andrew Bartlett abart...@samba.org
Date:   Fri Apr 29 18:43:30 2011 +1000

s3-ldap Only prototype ldap_init_fd() when we have found it in the libraries

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Fri Apr 29 11:47:07 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-04-29 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-04-29-1843/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-29-1843/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-04-29-1843/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-29-1843/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-04-29-1843/samba4.stdout
  
The top commit at the time of the failure was:

commit df099e66240c7670c9f7b7dcccb1c38216bac3ec
Author: Volker Lendecke v...@samba.org
Date:   Fri Apr 29 13:00:14 2011 +0200

s3: Avoid a potential 100% CPU loop in winbindd

In the clustering case if ctdb is unhappy, winbindd_reinit_after_fork fails.
This can lead to an endless loop depending on the scheduling of the parent 
vs
child. Parent forks, child is immediately scheduled and exits. Parent gets
SIGCHLD, parent is then scheduled before it sends the request out to the 
child.
Parent tries to fork again immediately.

The code before this patch did not really take into account that
reinit_after_fork can fail. The code now sends the result of
winbindd_reinit_after_fork to the parent and the parent only considers the
child alive when it got NT_STATUS_OK.

This was seen in 3.4 winbind. winbind has changed significantly since then, 
so
it might be possible that this does not happen anymore in exactly this way. 
But
passing up the status of reinit_after_fork and only consider the child alive
when that's ok is the correct thing to do anyway.

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Fri Apr 29 17:58:19 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-04-29 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-04-29-2042/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-29-2042/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-04-29-2042/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-29-2042/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-04-29-2042/samba4.stdout
  
The top commit at the time of the failure was:

commit df099e66240c7670c9f7b7dcccb1c38216bac3ec
Author: Volker Lendecke v...@samba.org
Date:   Fri Apr 29 13:00:14 2011 +0200

s3: Avoid a potential 100% CPU loop in winbindd

In the clustering case if ctdb is unhappy, winbindd_reinit_after_fork fails.
This can lead to an endless loop depending on the scheduling of the parent 
vs
child. Parent forks, child is immediately scheduled and exits. Parent gets
SIGCHLD, parent is then scheduled before it sends the request out to the 
child.
Parent tries to fork again immediately.

The code before this patch did not really take into account that
reinit_after_fork can fail. The code now sends the result of
winbindd_reinit_after_fork to the parent and the parent only considers the
child alive when it got NT_STATUS_OK.

This was seen in 3.4 winbind. winbind has changed significantly since then, 
so
it might be possible that this does not happen anymore in exactly this way. 
But
passing up the status of reinit_after_fork and only consider the child alive
when that's ok is the correct thing to do anyway.

Autobuild-User: Volker Lendecke vlen...@samba.org
Autobuild-Date: Fri Apr 29 17:58:19 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-04-29 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-04-29-2243/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-29-2243/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-04-29-2243/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-29-2243/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-04-29-2243/samba4.stdout
  
The top commit at the time of the failure was:

commit e64ffee1c212b6956a993ebb2032f664c0ac5802
Author: Matthias Dieter Wallnöfer m...@samba.org
Date:   Sun Apr 10 19:41:34 2011 +0200

ldb:tdb backend - cache - remove unused last_attribute structure member

Reviewed-by: abartlet

Autobuild-User: Matthias Dieter Wallnöfer m...@samba.org
Autobuild-Date: Fri Apr 29 20:07:27 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-04-28 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-04-28-0842/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-28-0842/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-04-28-0842/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-28-0842/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-04-28-0842/samba4.stdout
  
The top commit at the time of the failure was:

commit 1c5cc4a2d1449296a96e8a137dc177191df00c8d
Author: Andrew Bartlett abart...@samba.org
Date:   Thu Apr 28 13:31:33 2011 +1000

s4-selftest: Don't use a hardcoded target DC name

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Thu Apr 28 07:34:31 CEST 2011 on sn-devel-104


autobuild: intermittent test failure detected

2011-04-28 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-04-28-1501/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-28-1501/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-04-28-1501/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-28-1501/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-04-28-1501/samba4.stdout
  
The top commit at the time of the failure was:

commit 2e1522f3785d542c429fce83264ad67f35bcef68
Author: Volker Lendecke v...@samba.org
Date:   Wed Apr 27 17:52:30 2011 +0200

s3: Close the winbind client fds after forking

In an overload situation, the winbind helper child process inherits all 
those
hundreds of fd's which it will never talk to. Close them.

We (Christian Ambach and me) just saw a crash in libkrb5. Christian's 
analysis
showed that libkrb5 also does select, probably exceeding FD_SETSIZE and
crashing due to that reason. The parent winbind in theory does not do 
Kerberos
at all, so this should fix that problem.

The crash is interesting because the child process did not really crash.
Somewhere in glibc backtrace() is called, probably due to an assert() or 
some
explicit consistency check. This then somehow generates a signal probably 
due
to corrupted memory structures. That signal triggers Samba to again call
backtrace(). This blocks hard on a ptrace_once(). Sorry for the long 
backtrace
here, but this *is* interesting.

The child process blocking and not really crashing makes the situation 
worse:
The parent process does not get told the child has crashed and more client
sockets pile up.

This patch is intended to put some relief on this problem by closing the
majority of sockets the parent holds.

(gdb) bt
\#0  0x2ad686a2b07b in pthread_once () from /lib64/libpthread.so.0
\#1  0x2ad6867adf87 in backtrace () from /lib64/libc.so.6
\#2  0x2ad683eab27c in log_stack_trace () at lib/util.c:1580
\#3  0x2ad683eab34b in smb_panic (why=0x2ad6841c6ec3 internal error) 
at lib/util.c:1481
\#4  0x2ad683e9af3e in fault_report (sig=1) at lib/fault.c:52
\#5  sig_fault (sig=1) at lib/fault.c:75 #6  signal handler called
\#7  0x2ad68673b005 in _int_malloc () from /lib64/libc.so.6
\#8  0x2ad68673c95d in calloc () from /lib64/libc.so.6
\#9  0x2ad684503e25 in _dl_new_object () from 
/lib64/ld-linux-x86-64.so.2
\#10 0x2ad6844ffadc in _dl_map_object_from_fd () from 
/lib64/ld-linux-x86-64.so.2
\#11 0x2ad684501d43 in _dl_map_object () from 
/lib64/ld-linux-x86-64.so.2
\#12 0x2ad68450ac8d in dl_open_worker () from 
/lib64/ld-linux-x86-64.so.2
\#13 0x2ad684506ed6 in _dl_catch_error () from 
/lib64/ld-linux-x86-64.so.2
\#14 0x2ad68450a68c in _dl_open () from /lib64/ld-linux-x86-64.so.2
\#15 0x2ad6867d0ba0 in do_dlopen () from /lib64/libc.so.6
\#16 0x2ad684506ed6 in _dl_catch_error () from 
/lib64/ld-linux-x86-64.so.2
\#17 0x2ad6867d0d07 in __libc_dlopen_mode () from /lib64/libc.so.6
\#18 0x2ad6867adeea in init () from /lib64/libc.so.6
\#19 0x2ad686a2b083 in pthread_once () from /lib64/libpthread.so.0
\#20 0x2ad6867adf87 in backtrace () from /lib64/libc.so.6
\#21 0x2ad68673285f in __libc_message () from /lib64/libc.so.6
\#22 0x2ad68673a30f in _int_free () from /lib64/libc.so.6
\#23 0x2ad68673a76b in free () from /lib64/libc.so.6
\#24 0x2ad6853fe346 in krb5int_sendto () from /usr/lib64/libkrb5.so.3
\#25 0x2ad6853fe511 in krb5_sendto_kdc () from /usr/lib64/libkrb5.so.3
\#26 0x2ad6853df7c4 in ?? () from /usr/lib64/libkrb5.so.3
\#27 0x2ad6853e0919 in krb5_get_init_creds () from 
/usr/lib64/libkrb5.so.3
\#28 0x2ad6853e2a94 in krb5_get_init_creds_password () from 
/usr/lib64/libkrb5.so.3
\#29 0x2ad684169ff1 in kerberos_kinit_password_ext 
(principal=0x2ad684702180 sanitized, password=0x2ad6844c5bb0 sanitized, 
time_offset=0, expire_time=0x2ad6846bf380, renew_till_time=0x0, 
cache_name=0x2ad6843cb3e0 MEMORY:winbind_ccache, request_pac=false, 
add_netbios_addr=false, renewable_time=value optimized out, ntstatus=0x0) at 
libads/kerberos.c:223
\#30 0x2ad68416a223 in ads_kinit_password (ads=0x2ad6846bf330) at 
libads/kerberos.c:327
\#31 0x2ad68415f725 in ads_sasl_spnego_bind (ads=0x2ad6846bf330) at 
libads/sasl.c:812
\#32 0x2ad68415dbc1 in ads_sasl_bind (ads=0x2ad6846bf330) at 
libads/sasl.c:1114
\#33 0x2ad68415c09b in ads_connect (ads=0x2ad6846bf330) at 
libads/ldap.c:711
\#34 0x2ad683e1b8f7 in ads_cached_connection (domain=0x2ad6846b07c0) at 
winbindd/winbindd_ads.c:124
\#35 

autobuild: intermittent test failure detected

2011-04-28 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-04-28-1700/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-28-1700/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-04-28-1700/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-28-1700/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-04-28-1700/samba4.stdout
  
The top commit at the time of the failure was:

commit 2e1522f3785d542c429fce83264ad67f35bcef68
Author: Volker Lendecke v...@samba.org
Date:   Wed Apr 27 17:52:30 2011 +0200

s3: Close the winbind client fds after forking

In an overload situation, the winbind helper child process inherits all 
those
hundreds of fd's which it will never talk to. Close them.

We (Christian Ambach and me) just saw a crash in libkrb5. Christian's 
analysis
showed that libkrb5 also does select, probably exceeding FD_SETSIZE and
crashing due to that reason. The parent winbind in theory does not do 
Kerberos
at all, so this should fix that problem.

The crash is interesting because the child process did not really crash.
Somewhere in glibc backtrace() is called, probably due to an assert() or 
some
explicit consistency check. This then somehow generates a signal probably 
due
to corrupted memory structures. That signal triggers Samba to again call
backtrace(). This blocks hard on a ptrace_once(). Sorry for the long 
backtrace
here, but this *is* interesting.

The child process blocking and not really crashing makes the situation 
worse:
The parent process does not get told the child has crashed and more client
sockets pile up.

This patch is intended to put some relief on this problem by closing the
majority of sockets the parent holds.

(gdb) bt
\#0  0x2ad686a2b07b in pthread_once () from /lib64/libpthread.so.0
\#1  0x2ad6867adf87 in backtrace () from /lib64/libc.so.6
\#2  0x2ad683eab27c in log_stack_trace () at lib/util.c:1580
\#3  0x2ad683eab34b in smb_panic (why=0x2ad6841c6ec3 internal error) 
at lib/util.c:1481
\#4  0x2ad683e9af3e in fault_report (sig=1) at lib/fault.c:52
\#5  sig_fault (sig=1) at lib/fault.c:75 #6  signal handler called
\#7  0x2ad68673b005 in _int_malloc () from /lib64/libc.so.6
\#8  0x2ad68673c95d in calloc () from /lib64/libc.so.6
\#9  0x2ad684503e25 in _dl_new_object () from 
/lib64/ld-linux-x86-64.so.2
\#10 0x2ad6844ffadc in _dl_map_object_from_fd () from 
/lib64/ld-linux-x86-64.so.2
\#11 0x2ad684501d43 in _dl_map_object () from 
/lib64/ld-linux-x86-64.so.2
\#12 0x2ad68450ac8d in dl_open_worker () from 
/lib64/ld-linux-x86-64.so.2
\#13 0x2ad684506ed6 in _dl_catch_error () from 
/lib64/ld-linux-x86-64.so.2
\#14 0x2ad68450a68c in _dl_open () from /lib64/ld-linux-x86-64.so.2
\#15 0x2ad6867d0ba0 in do_dlopen () from /lib64/libc.so.6
\#16 0x2ad684506ed6 in _dl_catch_error () from 
/lib64/ld-linux-x86-64.so.2
\#17 0x2ad6867d0d07 in __libc_dlopen_mode () from /lib64/libc.so.6
\#18 0x2ad6867adeea in init () from /lib64/libc.so.6
\#19 0x2ad686a2b083 in pthread_once () from /lib64/libpthread.so.0
\#20 0x2ad6867adf87 in backtrace () from /lib64/libc.so.6
\#21 0x2ad68673285f in __libc_message () from /lib64/libc.so.6
\#22 0x2ad68673a30f in _int_free () from /lib64/libc.so.6
\#23 0x2ad68673a76b in free () from /lib64/libc.so.6
\#24 0x2ad6853fe346 in krb5int_sendto () from /usr/lib64/libkrb5.so.3
\#25 0x2ad6853fe511 in krb5_sendto_kdc () from /usr/lib64/libkrb5.so.3
\#26 0x2ad6853df7c4 in ?? () from /usr/lib64/libkrb5.so.3
\#27 0x2ad6853e0919 in krb5_get_init_creds () from 
/usr/lib64/libkrb5.so.3
\#28 0x2ad6853e2a94 in krb5_get_init_creds_password () from 
/usr/lib64/libkrb5.so.3
\#29 0x2ad684169ff1 in kerberos_kinit_password_ext 
(principal=0x2ad684702180 sanitized, password=0x2ad6844c5bb0 sanitized, 
time_offset=0, expire_time=0x2ad6846bf380, renew_till_time=0x0, 
cache_name=0x2ad6843cb3e0 MEMORY:winbind_ccache, request_pac=false, 
add_netbios_addr=false, renewable_time=value optimized out, ntstatus=0x0) at 
libads/kerberos.c:223
\#30 0x2ad68416a223 in ads_kinit_password (ads=0x2ad6846bf330) at 
libads/kerberos.c:327
\#31 0x2ad68415f725 in ads_sasl_spnego_bind (ads=0x2ad6846bf330) at 
libads/sasl.c:812
\#32 0x2ad68415dbc1 in ads_sasl_bind (ads=0x2ad6846bf330) at 
libads/sasl.c:1114
\#33 0x2ad68415c09b in ads_connect (ads=0x2ad6846bf330) at 
libads/ldap.c:711
\#34 0x2ad683e1b8f7 in ads_cached_connection (domain=0x2ad6846b07c0) at 
winbindd/winbindd_ads.c:124
\#35 

autobuild: intermittent test failure detected

2011-04-28 Thread Andrew Tridgell
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2011-04-28-1900/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-28-1900/samba3.stderr
   http://git.samba.org/autobuild.flakey/2011-04-28-1900/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2011-04-28-1900/samba4.stderr
   http://git.samba.org/autobuild.flakey/2011-04-28-1900/samba4.stdout
  
The top commit at the time of the failure was:

commit 2e1522f3785d542c429fce83264ad67f35bcef68
Author: Volker Lendecke v...@samba.org
Date:   Wed Apr 27 17:52:30 2011 +0200

s3: Close the winbind client fds after forking

In an overload situation, the winbind helper child process inherits all 
those
hundreds of fd's which it will never talk to. Close them.

We (Christian Ambach and me) just saw a crash in libkrb5. Christian's 
analysis
showed that libkrb5 also does select, probably exceeding FD_SETSIZE and
crashing due to that reason. The parent winbind in theory does not do 
Kerberos
at all, so this should fix that problem.

The crash is interesting because the child process did not really crash.
Somewhere in glibc backtrace() is called, probably due to an assert() or 
some
explicit consistency check. This then somehow generates a signal probably 
due
to corrupted memory structures. That signal triggers Samba to again call
backtrace(). This blocks hard on a ptrace_once(). Sorry for the long 
backtrace
here, but this *is* interesting.

The child process blocking and not really crashing makes the situation 
worse:
The parent process does not get told the child has crashed and more client
sockets pile up.

This patch is intended to put some relief on this problem by closing the
majority of sockets the parent holds.

(gdb) bt
\#0  0x2ad686a2b07b in pthread_once () from /lib64/libpthread.so.0
\#1  0x2ad6867adf87 in backtrace () from /lib64/libc.so.6
\#2  0x2ad683eab27c in log_stack_trace () at lib/util.c:1580
\#3  0x2ad683eab34b in smb_panic (why=0x2ad6841c6ec3 internal error) 
at lib/util.c:1481
\#4  0x2ad683e9af3e in fault_report (sig=1) at lib/fault.c:52
\#5  sig_fault (sig=1) at lib/fault.c:75 #6  signal handler called
\#7  0x2ad68673b005 in _int_malloc () from /lib64/libc.so.6
\#8  0x2ad68673c95d in calloc () from /lib64/libc.so.6
\#9  0x2ad684503e25 in _dl_new_object () from 
/lib64/ld-linux-x86-64.so.2
\#10 0x2ad6844ffadc in _dl_map_object_from_fd () from 
/lib64/ld-linux-x86-64.so.2
\#11 0x2ad684501d43 in _dl_map_object () from 
/lib64/ld-linux-x86-64.so.2
\#12 0x2ad68450ac8d in dl_open_worker () from 
/lib64/ld-linux-x86-64.so.2
\#13 0x2ad684506ed6 in _dl_catch_error () from 
/lib64/ld-linux-x86-64.so.2
\#14 0x2ad68450a68c in _dl_open () from /lib64/ld-linux-x86-64.so.2
\#15 0x2ad6867d0ba0 in do_dlopen () from /lib64/libc.so.6
\#16 0x2ad684506ed6 in _dl_catch_error () from 
/lib64/ld-linux-x86-64.so.2
\#17 0x2ad6867d0d07 in __libc_dlopen_mode () from /lib64/libc.so.6
\#18 0x2ad6867adeea in init () from /lib64/libc.so.6
\#19 0x2ad686a2b083 in pthread_once () from /lib64/libpthread.so.0
\#20 0x2ad6867adf87 in backtrace () from /lib64/libc.so.6
\#21 0x2ad68673285f in __libc_message () from /lib64/libc.so.6
\#22 0x2ad68673a30f in _int_free () from /lib64/libc.so.6
\#23 0x2ad68673a76b in free () from /lib64/libc.so.6
\#24 0x2ad6853fe346 in krb5int_sendto () from /usr/lib64/libkrb5.so.3
\#25 0x2ad6853fe511 in krb5_sendto_kdc () from /usr/lib64/libkrb5.so.3
\#26 0x2ad6853df7c4 in ?? () from /usr/lib64/libkrb5.so.3
\#27 0x2ad6853e0919 in krb5_get_init_creds () from 
/usr/lib64/libkrb5.so.3
\#28 0x2ad6853e2a94 in krb5_get_init_creds_password () from 
/usr/lib64/libkrb5.so.3
\#29 0x2ad684169ff1 in kerberos_kinit_password_ext 
(principal=0x2ad684702180 sanitized, password=0x2ad6844c5bb0 sanitized, 
time_offset=0, expire_time=0x2ad6846bf380, renew_till_time=0x0, 
cache_name=0x2ad6843cb3e0 MEMORY:winbind_ccache, request_pac=false, 
add_netbios_addr=false, renewable_time=value optimized out, ntstatus=0x0) at 
libads/kerberos.c:223
\#30 0x2ad68416a223 in ads_kinit_password (ads=0x2ad6846bf330) at 
libads/kerberos.c:327
\#31 0x2ad68415f725 in ads_sasl_spnego_bind (ads=0x2ad6846bf330) at 
libads/sasl.c:812
\#32 0x2ad68415dbc1 in ads_sasl_bind (ads=0x2ad6846bf330) at 
libads/sasl.c:1114
\#33 0x2ad68415c09b in ads_connect (ads=0x2ad6846bf330) at 
libads/ldap.c:711
\#34 0x2ad683e1b8f7 in ads_cached_connection (domain=0x2ad6846b07c0) at 
winbindd/winbindd_ads.c:124
\#35 

  1   2   3   4   5   6   7   8   9   10   >