The branch, master has been updated via 8f3542c... build fix via 045e04a... s4-ldb: test the 'displayName=a,b' bug via ec3ed28... s3-provision: cope with the policy directory already existing via fd59a7c... s4-ldb: fixed the ldb 'displayName=a,b' indexing bug via 1cc471d... s4-ldb: add some comments explaining the ltdb_index_idxptr() function from 68e8696... s3: Remove smbd_server_fd() from smbd_process
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 8f3542c58e843d49dcecd2753f85f45731bd13c0 Author: Brad Hards <br...@frogmouth.net> Date: Tue Aug 17 08:43:28 2010 +1000 build fix commit 045e04a2c6649c2c11d0925969f960662f637673 Author: Andrew Tridgell <tri...@samba.org> Date: Mon Aug 16 11:38:26 2010 +1000 s4-ldb: test the 'displayName=a,b' bug Pair-Programmed-With: Andrew Bartlett <abart...@samba.org> commit ec3ed2898fec44ceb48ee78fc934c6f4e67aaf73 Author: Andrew Tridgell <tri...@samba.org> Date: Tue Aug 3 17:15:10 2010 +1000 s3-provision: cope with the policy directory already existing Signed-off-by: Andrew Bartlett <abart...@samba.org> commit fd59a7c4affdd1a6c6fe7caf29264acabcd0c03e Author: Andrew Tridgell <tri...@samba.org> Date: Mon Aug 16 11:03:58 2010 +1000 s4-ldb: fixed the ldb 'displayName=a,b' indexing bug the problem was the inconsistency between the key form of DNs between the itdb used for indexing and the on disk form Thanks to Matthieu Patou for finding this bug! Signed-off-by: Andrew Bartlett <abart...@samba.org> commit 1cc471d69fc6ff5dc835462b712645415f8feca4 Author: Andrew Tridgell <tri...@samba.org> Date: Mon Aug 16 11:00:41 2010 +1000 s4-ldb: add some comments explaining the ltdb_index_idxptr() function this function copes with alignment sensitive CPUs Signed-off-by: Andrew Bartlett <abart...@samba.org> ----------------------------------------------------------------------- Summary of changes: source4/lib/ldb/ldb_tdb/ldb_index.c | 14 ++++++++++++-- source4/lib/ldb/tests/test.ldif | 6 ++++++ source4/librpc/wscript_build | 6 +++++- source4/scripting/python/samba/provision.py | 11 ++++++++--- 4 files changed, 31 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/lib/ldb/ldb_tdb/ldb_index.c b/source4/lib/ldb/ldb_tdb/ldb_index.c index 828dca1..a39e6c7 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_index.c +++ b/source4/lib/ldb/ldb_tdb/ldb_index.c @@ -95,6 +95,11 @@ static int ltdb_dn_list_find_str(struct dn_list *list, const char *dn) return ltdb_dn_list_find_val(list, &v); } +/* + this is effectively a cast function, but with lots of paranoia + checks and also copes with CPUs that are fussy about pointer + alignment + */ static struct dn_list *ltdb_index_idxptr(struct ldb_module *module, TDB_DATA rec, bool check_parent) { struct dn_list *list; @@ -103,6 +108,9 @@ static struct dn_list *ltdb_index_idxptr(struct ldb_module *module, TDB_DATA rec "Bad data size for idxptr %u", (unsigned)rec.dsize); return NULL; } + /* note that we can't just use a cast here, as rec.dptr may + not be aligned sufficiently for a pointer. A cast would cause + platforms like some ARM CPUs to crash */ memcpy(&list, rec.dptr, sizeof(void *)); list = talloc_get_type(list, struct dn_list); if (list == NULL) { @@ -1438,8 +1446,10 @@ static int delete_index(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, vo * index entry */ list.dn = NULL; list.count = 0; - v.data = key.dptr; - v.length = strnlen((char *)key.dptr, key.dsize); + + /* the offset of 3 is to remove the DN= prefix. */ + v.data = key.dptr + 3; + v.length = strnlen((char *)key.dptr, key.dsize) - 3; dn = ldb_dn_from_ldb_val(ltdb, ldb_module_get_ctx(module), &v); ret = ltdb_dn_list_store(module, dn, &list); diff --git a/source4/lib/ldb/tests/test.ldif b/source4/lib/ldb/tests/test.ldif index e53fadc..fd37f00 100644 --- a/source4/lib/ldb/tests/test.ldif +++ b/source4/lib/ldb/tests/test.ldif @@ -409,3 +409,9 @@ homephone: +1 313 555 8421 pager: +1 313 555 2844 facsimiletelephonenumber: +1 313 555 9700 telephonenumber: +1 313 555 5331 + +dn: cn=Fred Bassett,ou=Alumni Association,ou=People,o=University of Michigan,c=TEST +objectclass: OpenLDAPperson +cn: Fred Bassett +sn: Bassett +uid: Bassett, Fred diff --git a/source4/librpc/wscript_build b/source4/librpc/wscript_build index 4ee0770..9133bc8 100755 --- a/source4/librpc/wscript_build +++ b/source4/librpc/wscript_build @@ -340,6 +340,10 @@ bld.SAMBA_SUBSYSTEM('NDR_DNSP', public_deps='LIBNDR' ) +bld.SAMBA_SUBSYSTEM('NDR_NTPRINTING', + source='../../librpc/gen_ndr/ndr_ntprinting.c ../../librpc/ndr/ndr_ntprinting.c', + public_deps='LIBNDR' + ) bld.SAMBA_LIBRARY('NDR_STANDARD', source='../../librpc/gen_ndr/ndr_echo.c ../../librpc/gen_ndr/ndr_lsa.c ../../librpc/gen_ndr/ndr_samr.c ../../librpc/ndr/ndr_netlogon.c ../../librpc/gen_ndr/ndr_netlogon.c ../../librpc/gen_ndr/ndr_dfs.c ../../librpc/gen_ndr/ndr_atsvc.c ../../librpc/gen_ndr/ndr_wkssvc.c ../../librpc/gen_ndr/ndr_srvsvc.c ../../librpc/ndr/ndr_svcctl.c ../../librpc/gen_ndr/ndr_svcctl.c ../../librpc/gen_ndr/ndr_winreg.c ../../librpc/gen_ndr/ndr_initshutdown.c ../../librpc/gen_ndr/ndr_eventlog.c ../../librpc/gen_ndr/ndr_ntsvcs.c', @@ -356,7 +360,7 @@ bld.SAMBA_PIDL_TABLES('GEN_NDR_TABLES', 'gen_ndr/tables.c') bld.SAMBA_SUBSYSTEM('NDR_TABLE', source='../../librpc/ndr/ndr_table.c gen_ndr/tables.c', - public_deps='NDR_STANDARD NDR_AUDIOSRV NDR_DSBACKUP NDR_EFS NDR_DRSUAPI NDR_POLICYAGENT NDR_UNIXINFO NDR_SPOOLSS NDR_EPMAPPER NDR_DBGIDL NDR_DSSETUP NDR_MSGSVC NDR_WINSIF NDR_MGMT NDR_PROTECTED_STORAGE NDR_OXIDRESOLVER NDR_REMACT NDR_WZCSVC NDR_BROWSER NDR_W32TIME NDR_SCERPC NDR_TRKWKS NDR_KEYSVC NDR_KRB5PAC NDR_XATTR NDR_SCHANNEL NDR_ROT NDR_DRSBLOBS NDR_NBT NDR_WINSREPL NDR_SECURITY NDR_DNSSERVER NDR_WINSTATION NDR_IRPC NDR_OPENDB NDR_SASL_HELPERS NDR_NOTIFY NDR_WINBIND NDR_FRSRPC NDR_FRSAPI NDR_FRSTRANS NDR_NFS4ACL NDR_NTP_SIGND NDR_DCOM NDR_WMI NDR_NAMED_PIPE_AUTH NDR_NTLMSSP NDR_DFSBLOBS NDR_DNSP', + public_deps='NDR_STANDARD NDR_AUDIOSRV NDR_DSBACKUP NDR_EFS NDR_DRSUAPI NDR_POLICYAGENT NDR_UNIXINFO NDR_SPOOLSS NDR_EPMAPPER NDR_DBGIDL NDR_DSSETUP NDR_MSGSVC NDR_WINSIF NDR_MGMT NDR_PROTECTED_STORAGE NDR_OXIDRESOLVER NDR_REMACT NDR_WZCSVC NDR_BROWSER NDR_W32TIME NDR_SCERPC NDR_TRKWKS NDR_KEYSVC NDR_KRB5PAC NDR_XATTR NDR_SCHANNEL NDR_ROT NDR_DRSBLOBS NDR_NBT NDR_WINSREPL NDR_SECURITY NDR_DNSSERVER NDR_WINSTATION NDR_IRPC NDR_OPENDB NDR_SASL_HELPERS NDR_NOTIFY NDR_WINBIND NDR_FRSRPC NDR_FRSAPI NDR_FRSTRANS NDR_NFS4ACL NDR_NTP_SIGND NDR_DCOM NDR_WMI NDR_NAMED_PIPE_AUTH NDR_NTLMSSP NDR_DFSBLOBS NDR_DNSP NDR_NTPRINTING', depends_on='GEN_NDR_TABLES' ) diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 8be3f65..9014e49 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -949,11 +949,16 @@ def getpolicypath(sysvolpath, dnsdomain, guid): return policy_path def create_gpo_struct(policy_path): - os.makedirs(policy_path, 0755) + if not os.path.exists(policy_path): + os.makedirs(policy_path, 0755) open(os.path.join(policy_path, "GPT.INI"), 'w').write( "[General]\r\nVersion=65543") - os.makedirs(os.path.join(policy_path, "MACHINE"), 0755) - os.makedirs(os.path.join(policy_path, "USER"), 0755) + p = os.path.join(policy_path, "MACHINE") + if not os.path.exists(p): + os.makedirs(p, 0755) + p = os.path.join(policy_path, "USER") + if not os.path.exists(p): + os.makedirs(p, 0755) def setup_gpo(sysvolpath, dnsdomain, policyguid, policyguid_dc): -- Samba Shared Repository