rusty/samba.git
8 years agoFix bug 8072 - PANIC: create_file_acl_common frees handle two times. master
Jeremy Allison [Fri, 8 Apr 2011 21:24:44 +0000 (14:24 -0700)]
Fix bug 8072 - PANIC: create_file_acl_common frees handle two times.

Caused by premature optimisation storing the parent ACL on the
module handle instead of (correctly) on the file fsp. Previous
code wasn't reentrant safe. This is less optimal but doesn't
crash in the specific case :-).

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Apr  9 02:05:15 CEST 2011 on sn-devel-104

8 years agoSubtle change. Microsoft SMB2 tests return different access mask than for SMB1 with...
Jeremy Allison [Fri, 8 Apr 2011 23:18:56 +0000 (16:18 -0700)]
Subtle change. Microsoft SMB2 tests return different access mask than for SMB1 with raw.acls.

8 years agos3:net idmap check: fix output of an invalid record
Michael Adam [Fri, 8 Apr 2011 12:49:43 +0000 (14:49 +0200)]
s3:net idmap check: fix output of an invalid record

Only print the value number for hwm, version and seqnum keys.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Apr  8 17:29:31 CEST 2011 on sn-devel-104

8 years agos3-net: "idmap check" ignore __db_sequence_number__
Gregor Beck [Fri, 8 Apr 2011 12:53:25 +0000 (14:53 +0200)]
s3-net: "idmap check" ignore __db_sequence_number__

Signed-off-by: Michael Adam <obnox@samba.org>
8 years agotalloc/testsuite: avoid memory leak reported by valgrind
Stefan Metzmacher [Mon, 4 Apr 2011 13:53:46 +0000 (15:53 +0200)]
talloc/testsuite: avoid memory leak reported by valgrind

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Apr  8 10:15:41 CEST 2011 on sn-devel-104

8 years agotalloc/testsuite: test more talloc_pool related things
Stefan Metzmacher [Thu, 31 Mar 2011 17:50:47 +0000 (19:50 +0200)]
talloc/testsuite: test more talloc_pool related things

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
8 years agotalloc: include valgrind headers if available
Stefan Metzmacher [Mon, 4 Apr 2011 14:28:31 +0000 (16:28 +0200)]
talloc: include valgrind headers if available

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
8 years agotalloc: add TC_INVALIDATE_POOL marco
Stefan Metzmacher [Mon, 4 Apr 2011 13:08:20 +0000 (15:08 +0200)]
talloc: add TC_INVALIDATE_POOL marco

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
8 years agotalloc: add TC_UNDEFINE_GROW_CHUNK() marco
Stefan Metzmacher [Mon, 4 Apr 2011 11:29:47 +0000 (13:29 +0200)]
talloc: add TC_UNDEFINE_GROW_CHUNK() marco

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
8 years agotalloc: add TC_INVALIDATE_SHRINK_CHUNK() marco
Stefan Metzmacher [Mon, 4 Apr 2011 11:28:11 +0000 (13:28 +0200)]
talloc: add TC_INVALIDATE_SHRINK_CHUNK() marco

This invalidates the unused bytes if we shrink memory.

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
8 years agotalloc: add TC_INVALIDATE_FULL_CHUNK() macro
Stefan Metzmacher [Mon, 4 Apr 2011 09:47:57 +0000 (11:47 +0200)]
talloc: add TC_INVALIDATE_FULL_CHUNK() macro

This makes it easier to mark a talloc pointer as
invalid.

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
8 years agotalloc: use VALGRIND_MAKE_MEM_UNDEFINED() before memmove()
Stefan Metzmacher [Mon, 4 Apr 2011 14:46:21 +0000 (16:46 +0200)]
talloc: use VALGRIND_MAKE_MEM_UNDEFINED() before memmove()

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
8 years agotalloc: optimize talloc_free() and talloc_realloc() for talloc pools
Stefan Metzmacher [Thu, 31 Mar 2011 14:58:46 +0000 (16:58 +0200)]
talloc: optimize talloc_free() and talloc_realloc() for talloc pools

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
8 years agotalloc: add TC_POOL_FIRST_CHUNK() macro
Stefan Metzmacher [Thu, 31 Mar 2011 14:56:18 +0000 (16:56 +0200)]
talloc: add TC_POOL_FIRST_CHUNK() macro

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
8 years agotalloc: add TC_POOL_SPACE_LEFT() macro
Stefan Metzmacher [Thu, 31 Mar 2011 14:51:40 +0000 (16:51 +0200)]
talloc: add TC_POOL_SPACE_LEFT() macro

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
8 years agotalloc: add TC_ALIGN16() macro
Stefan Metzmacher [Thu, 31 Mar 2011 14:55:00 +0000 (16:55 +0200)]
talloc: add TC_ALIGN16() macro

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
8 years agotalloc: use TC_HDR_SIZE instead of sizeof(struct talloc_chunk)
Stefan Metzmacher [Thu, 31 Mar 2011 13:18:55 +0000 (15:18 +0200)]
talloc: use TC_HDR_SIZE instead of sizeof(struct talloc_chunk)

As this includes the padding to 16 bytes.

metze

Signed-off-By: Andrew Tridgell <tridge@samba.org>
8 years agoldb:ldb/common/ldb_modules.c - change the request counter type to be "unsigned"
Matthias Dieter Wallnöfer [Fri, 8 Apr 2011 06:30:41 +0000 (08:30 +0200)]
ldb:ldb/common/ldb_modules.c - change the request counter type to be "unsigned"

Just for consistency since all other LDB counters are unsigned as well.

And also the debug output specifier has been chosen to be "%u" - so it
really should be unsigned.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Apr  8 09:17:47 CEST 2011 on sn-devel-104

8 years agoldb:ldb/common/ldb_modules.c - trivial - fix integer output specifiers
Matthias Dieter Wallnöfer [Fri, 8 Apr 2011 06:29:51 +0000 (08:29 +0200)]
ldb:ldb/common/ldb_modules.c - trivial - fix integer output specifiers

8 years agos3:net rpc trust: fix two C++ implicit void * cast warnings
Michael Adam [Thu, 7 Apr 2011 14:54:12 +0000 (16:54 +0200)]
s3:net rpc trust: fix two C++ implicit void * cast warnings

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Apr  7 17:52:28 CEST 2011 on sn-devel-104

8 years agos3:passdb:pdb_ipa: fix a C++ implicit void * cast warnings
Michael Adam [Thu, 7 Apr 2011 14:54:12 +0000 (16:54 +0200)]
s3:passdb:pdb_ipa: fix a C++ implicit void * cast warnings

8 years agos3:net idmap check: fix a couple of c++ implicit void * cast warnings
Michael Adam [Thu, 7 Apr 2011 14:54:12 +0000 (16:54 +0200)]
s3:net idmap check: fix a couple of c++ implicit void * cast warnings

8 years agopackaging(RHEL-CTDB): fix configure.rpm (honour additional cmdline parameters)
Michael Adam [Wed, 6 Apr 2011 15:53:14 +0000 (17:53 +0200)]
packaging(RHEL-CTDB): fix configure.rpm (honour additional cmdline parameters)

8 years agoldb:ldb_msg.c - make "ldb_msg_find_attr_as_*" more robust against invalid values
Matthias Dieter Wallnöfer [Wed, 6 Apr 2011 07:57:51 +0000 (09:57 +0200)]
ldb:ldb_msg.c - make "ldb_msg_find_attr_as_*" more robust against invalid values

- Integer handling was modeled after validate code from "schema_syntax.c".
- Double handling was modeled similar, but with a dynamic buffer.
  I don't know if there is a maximum literal length for double values but an
  allocation shouldn't a problem here since doubles are rare.
- String handlind is enhanced with a terminating "0" test for safety.

Reviewed-by: abartlet + metze
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Thu Apr  7 16:38:57 CEST 2011 on sn-devel-104

8 years agoldb:ldb_msg_check_sanity - clean it up from unneeded stuff
Matthias Dieter Wallnöfer [Thu, 7 Apr 2011 08:11:46 +0000 (10:11 +0200)]
ldb:ldb_msg_check_sanity - clean it up from unneeded stuff

8 years agodsdb:schema/schema_syntax.c - correctly check error code of "ldb_string_utc_to_time"
Matthias Dieter Wallnöfer [Mon, 4 Apr 2011 19:34:12 +0000 (21:34 +0200)]
dsdb:schema/schema_syntax.c - correctly check error code of "ldb_string_utc_to_time"

This one doesn't set ERRNO. An error happens if the result is "0".

Reviewed-by: abartlet
8 years agodsdb:schema/schema_syntax.c - add some empty value checks on validate functions
Matthias Dieter Wallnöfer [Mon, 4 Apr 2011 19:33:11 +0000 (21:33 +0200)]
dsdb:schema/schema_syntax.c - add some empty value checks on validate functions

They are needed since the check in "ldb_msg_sanity_check" will be removed.

Reviewed-by: abartlet
8 years agos4:objectclass LDB module - "ldb_msg_sanity_check" call not really needed
Matthias Dieter Wallnöfer [Mon, 4 Apr 2011 12:04:18 +0000 (14:04 +0200)]
s4:objectclass LDB module - "ldb_msg_sanity_check" call not really needed

This call should only be performed at the beginning of a request.
"ldb_msg_sanity_check" checks for DN validity (which should already have been
done at the beginning of the request) and empty attributes (which should
be done by the "objectclass_attrs" LDB module).

Hence it is superflous here.

Reviewed-by: abartlet
8 years agoldb:ldbadd/modify tool - return error code when at least one operation has failed
Matthias Dieter Wallnöfer [Mon, 4 Apr 2011 10:59:30 +0000 (12:59 +0200)]
ldb:ldbadd/modify tool - return error code when at least one operation has failed

This is required to better detect failures and should raise the
compatiblity to "ldapadd"/"ldapmodify".

Reviewed-by: abartlet
8 years agoldb:tests - "init.ldif" - deactivate empty "seeAlso" attribute
Matthias Dieter Wallnöfer [Thu, 7 Apr 2011 08:13:45 +0000 (10:13 +0200)]
ldb:tests - "init.ldif" - deactivate empty "seeAlso" attribute

8 years agoldb:ldb/common/ldb_modules.c - always use LDB error codes if possible
Matthias Dieter Wallnöfer [Mon, 4 Apr 2011 08:43:39 +0000 (10:43 +0200)]
ldb:ldb/common/ldb_modules.c - always use LDB error codes if possible

The callers do compare against LDB error codes - hence don't give back
"-1".

Reviewed-by: Tridge + abartlet
8 years agoldb:common/*.c - check for some OOM conditions
Matthias Dieter Wallnöfer [Mon, 4 Apr 2011 08:26:47 +0000 (10:26 +0200)]
ldb:common/*.c - check for some OOM conditions

Reviewed-by: abartlet
8 years agos4:objectclass LDB module - fix a comment - add a ")"
Matthias Dieter Wallnöfer [Mon, 4 Apr 2011 12:06:45 +0000 (14:06 +0200)]
s4:objectclass LDB module - fix a comment - add a ")"

Reviewed-by: abartlet
8 years agoselftest:Samba4: setup DC_* variables in provision_rpc_proxy()
Stefan Metzmacher [Fri, 25 Mar 2011 11:33:33 +0000 (12:33 +0100)]
selftest:Samba4: setup DC_* variables in provision_rpc_proxy()

The "rpc_proxy" should behave like "member", just with a different
configuration.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Apr  7 15:52:25 CEST 2011 on sn-devel-104

8 years agos4-smbtorture: fix lsa forest trust test.
Günther Deschner [Thu, 7 Apr 2011 10:05:58 +0000 (12:05 +0200)]
s4-smbtorture: fix lsa forest trust test.

lsa_lsaRSetForestTrustInformation takes a policy handle obtained from
lsaopenpolicy/lsaopenpolicy2 and not a trusted domain handle
(MS-LSAD 3.1.4.7.16 LsarSetForestTrustInformation (Opnum 74)).

Sumit, please check.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Apr  7 14:52:52 CEST 2011 on sn-devel-104

8 years agolsa: use lsa_TrustedAccessMask in some more places in the lsa IDL.
Günther Deschner [Thu, 7 Apr 2011 09:47:44 +0000 (11:47 +0200)]
lsa: use lsa_TrustedAccessMask in some more places in the lsa IDL.

Guenther

8 years agos3-net: document "idmap check"
Gregor Beck [Thu, 7 Apr 2011 09:00:41 +0000 (11:00 +0200)]
s3-net: document "idmap check"

Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Apr  7 13:58:13 CEST 2011 on sn-devel-104

8 years agos3-net: fix the usage output of "net idmap check"
Gregor Beck [Thu, 7 Apr 2011 09:00:41 +0000 (11:00 +0200)]
s3-net: fix the usage output of "net idmap check"

Signed-off-by: Michael Adam <obnox@samba.org>
8 years agos4-samba_dnsupate Fix syntax error
Andrew Bartlett [Thu, 7 Apr 2011 06:02:44 +0000 (16:02 +1000)]
s4-samba_dnsupate Fix syntax error

This particular sub-part of the script isn't tested in 'make test' due
to it making real changes to DNS.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr  7 08:51:11 CEST 2011 on sn-devel-104

8 years agoRevert "s3-test: disable ktest for now"
Andrew Bartlett [Thu, 7 Apr 2011 03:11:04 +0000 (13:11 +1000)]
Revert "s3-test: disable ktest for now"

This reverts commit 77820d59fe517168db5cb79b05214ae9fd6b4467.

I beleive this is now reliable, after the changes to wait for an
actual connection at startup and to use the fake DNS file.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr  7 07:20:03 CEST 2011 on sn-devel-104

8 years agos3-selftest actually wait for smbclient to connect
Andrew Bartlett [Thu, 7 Apr 2011 03:07:23 +0000 (13:07 +1000)]
s3-selftest actually wait for smbclient to connect

This means that we actually have a working smbd.  The previous code didn't know if it worked or not, and so created flaky tests.

Andrew Bartlett

8 years agos3-selftest Fix use of the 'fake DNS' file
Andrew Bartlett [Thu, 7 Apr 2011 02:33:34 +0000 (12:33 +1000)]
s3-selftest Fix use of the 'fake DNS' file

This ensures we don't use netbios before the hosts file and that we do
fill in the fake DNS zone correctly for the way we invoke smbtorture4.
Currently this works because the realm in client.conf is "", if this
changes then this will need to change too (perhaps an additional
entry).

Andrew Bartlett

8 years agowintest Allow setting of the firewall to fail
Andrew Bartlett [Thu, 7 Apr 2011 04:06:31 +0000 (14:06 +1000)]
wintest Allow setting of the firewall to fail

This is also required to allow a telnet connection as non-admin.

Andrew Bartlett

8 years agos3-wintest Add test of 'net use' against the Samba3 member
Andrew Bartlett [Wed, 6 Apr 2011 22:54:52 +0000 (08:54 +1000)]
s3-wintest Add test of 'net use' against the Samba3 member

8 years agowintest Allow changing the telnet settings to fail, we might not be admin
Andrew Bartlett [Thu, 7 Apr 2011 02:25:30 +0000 (12:25 +1000)]
wintest Allow changing the telnet settings to fail, we might not be admin

This allows us to test logging in as non-admin users over telnet

8 years agosamba_dnsupdate: Don't use subprocess.check_call, it isn't in python 2.4
Andrew Bartlett [Wed, 6 Apr 2011 21:34:47 +0000 (07:34 +1000)]
samba_dnsupdate: Don't use subprocess.check_call, it isn't in python 2.4

RHEL5 and clones use python 2.5

8 years agos3-test: disable ktest for now
Andrew Tridgell [Thu, 7 Apr 2011 00:51:23 +0000 (10:51 +1000)]
s3-test: disable ktest for now

the ktest tests are currently flakey. Once andrew has found the
problem they can be re-enabled

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Apr  7 03:36:36 CEST 2011 on sn-devel-104

8 years agoldb: fixed --paged option in ldb tools
Andrew Tridgell [Wed, 6 Apr 2011 23:35:58 +0000 (09:35 +1000)]
ldb: fixed --paged option in ldb tools

we were sometimes using 'paged_result' and sometimes using 'paged_results'.
The latter seemed to be more common, so I changed the two places that
used the 'paged_result' string to 'paged_results'

8 years agoFix bug 6966 - "allow trusted domains = no" not respected in winbind.
Dmitry Butskoy [Wed, 6 Apr 2011 20:52:42 +0000 (13:52 -0700)]
Fix bug 6966 - "allow trusted domains = no" not respected in winbind.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Apr  6 23:37:27 CEST 2011 on sn-devel-104

8 years agos4:dsdb/repl_meta_data: update replPropertyMetaData on originating renames
Stefan Metzmacher [Wed, 6 Apr 2011 12:02:08 +0000 (14:02 +0200)]
s4:dsdb/repl_meta_data: update replPropertyMetaData on originating renames

The version of the "name" attribute needs to change even if the value
is the same. This also normalizes the rdn attribute name based on
the schema.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Apr  6 19:55:50 CEST 2011 on sn-devel-104

8 years agos4:dsdb/repl_meta_data: allow passing an explicit attribute list to replmd_update_rpmd()
Stefan Metzmacher [Wed, 6 Apr 2011 14:10:34 +0000 (16:10 +0200)]
s4:dsdb/repl_meta_data: allow passing an explicit attribute list to replmd_update_rpmd()

This will be used for renames.

metze

8 years agos4:dsdb/repl_meta_data: normalize the rdn attribute name based on the schema
Stefan Metzmacher [Tue, 5 Apr 2011 14:47:20 +0000 (16:47 +0200)]
s4:dsdb/repl_meta_data: normalize the rdn attribute name based on the schema

metze

8 years agos3: Fix tldap_make_mod_blob_int() debug messages
Sumit Bose [Mon, 4 Apr 2011 11:46:18 +0000 (13:46 +0200)]
s3: Fix tldap_make_mod_blob_int() debug messages

Signed-off-by: Günther Deschner <gd@samba.org>
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Apr  6 13:10:30 CEST 2011 on sn-devel-104

8 years agos3-net: Add delete op for net trust utility
Sumit Bose [Thu, 31 Mar 2011 15:46:56 +0000 (17:46 +0200)]
s3-net: Add delete op for net trust utility

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos3-net: Add net trust utility
Sumit Bose [Thu, 24 Mar 2011 11:10:13 +0000 (12:10 +0100)]
s3-net: Add net trust utility

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos3-pdb_ipa: Create DN for new object
Sumit Bose [Wed, 23 Mar 2011 11:09:22 +0000 (12:09 +0100)]
s3-pdb_ipa: Create DN for new object

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos3-pdb_ipa: Add ipasam_create_dom_group()
Sumit Bose [Fri, 18 Mar 2011 10:39:37 +0000 (11:39 +0100)]
s3-pdb_ipa: Add ipasam_create_dom_group()

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos3-net: add IPA provision
Sumit Bose [Fri, 18 Mar 2011 10:37:15 +0000 (11:37 +0100)]
s3-net: add IPA provision

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos3-pdb_ipa: Add ipasam_create_user()
Sumit Bose [Mon, 4 Apr 2011 11:23:05 +0000 (13:23 +0200)]
s3-pdb_ipa: Add ipasam_create_user()

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos3-pdb_ipa: Detect IPA server
Sumit Bose [Mon, 4 Apr 2011 11:20:19 +0000 (13:20 +0200)]
s3-pdb_ipa: Detect IPA server

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos3-pdb_ipa: Use new smbldap_make_mod_blob() without a return value
Sumit Bose [Mon, 4 Apr 2011 11:14:47 +0000 (13:14 +0200)]
s3-pdb_ipa: Use new smbldap_make_mod_blob() without a return value

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos3-smbldap: make octet_strings/DATA_BLOBs const.
Sumit Bose [Mon, 4 Apr 2011 12:16:44 +0000 (14:16 +0200)]
s3-smbldap: make octet_strings/DATA_BLOBs const.

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos3-ipasam: rename of smbldap_make_mod_blob to _smbldap_make_mod_blob.
Günther Deschner [Wed, 6 Apr 2011 09:33:12 +0000 (11:33 +0200)]
s3-ipasam: rename of smbldap_make_mod_blob to _smbldap_make_mod_blob.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos3-smbldap: support storing octet_strings/DATA_BLOBs.
Günther Deschner [Thu, 29 Oct 2009 22:36:14 +0000 (23:36 +0100)]
s3-smbldap: support storing octet_strings/DATA_BLOBs.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos3-pdb_ipa: Fix indentation
Sumit Bose [Mon, 4 Apr 2011 11:07:37 +0000 (13:07 +0200)]
s3-pdb_ipa: Fix indentation

Signed-off-by: Günther Deschner <gd@samba.org>
8 years agos4-test: fixed a problem with very verbose NDR debug
Andrew Tridgell [Wed, 6 Apr 2011 05:34:22 +0000 (15:34 +1000)]
s4-test: fixed a problem with very verbose NDR debug

lp.get("log level") returns a string, not an integer. It needs to be
cast to an integer for comparison with a number

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Apr  6 08:58:05 CEST 2011 on sn-devel-104

8 years agolib/crypto: rename the SHA256_ functions to samba_SHA256_
Andrew Tridgell [Wed, 6 Apr 2011 04:36:21 +0000 (14:36 +1000)]
lib/crypto: rename the SHA256_ functions to samba_SHA256_

this prevents a symbol duplication with the openssl library, which may
be linked in via a secondary library dependency

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agotstream: make npa_tstream a private library
Andrew Tridgell [Wed, 6 Apr 2011 04:29:34 +0000 (14:29 +1000)]
tstream: make npa_tstream a private library

this prevents symbol duplication of the npa_tstream symbols

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agolib: make asn1_util a private library
Andrew Tridgell [Wed, 6 Apr 2011 04:28:28 +0000 (14:28 +1000)]
lib: make asn1_util a private library

this prevents symbol duplication of the asn1 symbols in the service
and ntvfs subsystems

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agolib: moved data_blob.c into samba-util-common
Andrew Tridgell [Wed, 6 Apr 2011 04:26:00 +0000 (14:26 +1000)]
lib: moved data_blob.c into samba-util-common

this avoids a duplication of the data_blob symbols some binaries
(eg. smbtorture)

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

8 years agoThis reverts commit 378c4b221a6be75e1d32cb6fb3a773ce5de6dbda.
Volker Lendecke [Wed, 6 Apr 2011 05:25:12 +0000 (07:25 +0200)]
This reverts commit 378c4b221a6be75e1d32cb6fb3a773ce5de6dbda.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Apr  6 08:11:53 CEST 2011 on sn-devel-104

8 years agowaf: a better way to detect duplicated symbols
Andrew Tridgell [Wed, 6 Apr 2011 03:35:49 +0000 (13:35 +1000)]
waf: a better way to detect duplicated symbols

this detects when we have the same symbol linked in twice in any
binary by using ldd and nm on the binary and its associated libraries.

Some of these duplicates are caused by a subsystem being linked twice,
and some are caused by two versions of the same function name being
linked into a binary

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Apr  6 06:44:14 CEST 2011 on sn-devel-104

8 years agos4: Update/Set local USN only on attribute that have been modified/created
Matthieu Patou [Tue, 5 Apr 2011 10:49:05 +0000 (14:49 +0400)]
s4: Update/Set local USN only on attribute that have been modified/created

Signed-off-by: Andrew Tridgell <tridge@samba.org>
8 years agos3-selftest Add tests to show kerberos works across a password change
Andrew Bartlett [Tue, 5 Apr 2011 23:12:15 +0000 (09:12 +1000)]
s3-selftest Add tests to show kerberos works across a password change

It is important that a machine account password change does not
invalidate existing tickets.

This is only for the default kerberos method with a password in
secrets.tdb.  The keytab based methods are still not tested.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr  6 05:24:48 CEST 2011 on sn-devel-104

8 years agos3-librpc Fix creation of in-memory keytab for previous password
Andrew Bartlett [Tue, 5 Apr 2011 23:10:13 +0000 (09:10 +1000)]
s3-librpc Fix creation of in-memory keytab for previous password

We set the current password twice, rather than the current and old
password.

Andrew Bartlett

8 years agos3-selftest names into DNS hosts file to avoid NBT lookups
Andrew Bartlett [Wed, 6 Apr 2011 02:10:03 +0000 (12:10 +1000)]
s3-selftest names into DNS hosts file to avoid NBT lookups

NBT lookups cause trouble and variablity in 'make test', so it's much
better if we just use the fake DNS code.  This code is only used by
smbtorture4 at this time, but the other client tools are generally
told to contact by IP address.

We need to contact by name to test Kerberos, and this should make the
kerberos tests much more reliable.

Andrew Bartlett

8 years agolibcli/nbt Cope with blank lines in DNS hosts file
Andrew Bartlett [Wed, 6 Apr 2011 02:09:41 +0000 (12:09 +1000)]
libcli/nbt Cope with blank lines in DNS hosts file

8 years agodocs: fix the missing parameter description section in the smb.conf manpage
Michael Adam [Tue, 5 Apr 2011 21:07:01 +0000 (23:07 +0200)]
docs: fix the missing parameter description section in the smb.conf manpage

The smb.conf (5) manpage recently sometimes failed to contain the
contents of the description of each parameter section. The reason
was a unreliable chain of dependencies in the Makefile.

The error can be reproduced by touching manpages-3/smb.conf.5.xml
and then building the manpages.
Then smb.conf.5.xml is newer than any of the smbdotconf/*/*.xml
files and hence the intermediate inexistent parameters.*.xml
don't get generated.

This patch fixes this problem by introducing a phony "parameters"
target referencing the parameters.*.xml targets, so that they
get build unconditionally.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Apr  6 01:22:00 CEST 2011 on sn-devel-104

8 years agopackaging(RHEL-CTDB): Fix debuginfo builds
Michael Adam [Fri, 3 Dec 2010 09:13:46 +0000 (02:13 -0700)]
packaging(RHEL-CTDB): Fix debuginfo builds

At least on RHEL 5.5, we observed broken debuginfo packages
when either old build directories were still present or old
debuginfo packages (of samba) were installed.

This patch removes the debuginfo samba RPMs and old RPM build
directories, giving the user a 10 second chance to quit.

8 years agopackaging(RHEL-CTDB): add BuildRequires to ctdb-devel >= 1.2.25
Michael Adam [Tue, 5 Apr 2011 13:49:39 +0000 (15:49 +0200)]
packaging(RHEL-CTDB): add BuildRequires to ctdb-devel >= 1.2.25

This should make sure we build against ctdb with SCHEDULE_FOR_DELETION control.

8 years agopackaging(RHEL-CTDB): replace Prereq by Requires.
Michael Adam [Thu, 10 Feb 2011 06:33:56 +0000 (07:33 +0100)]
packaging(RHEL-CTDB): replace Prereq by Requires.

In RHEL6, Prereq is deprecated.

8 years agos3-auth: Make server_info const in create_local_token()
Andrew Bartlett [Tue, 5 Apr 2011 20:46:26 +0000 (06:46 +1000)]
s3-auth: Make server_info const in create_local_token()

Andreas Schneider <asn@samba.org> correctly points out that this input
parameter should now be const, and that found a bug where I used then
used it incorrectly as a talloc context.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Apr  6 00:33:31 CEST 2011 on sn-devel-104

8 years agokdc: always ldb escape the realm
Andrew Bartlett [Tue, 5 Apr 2011 06:21:14 +0000 (16:21 +1000)]
kdc: always ldb escape the realm

8 years agoauth: Move auth_session_info into IDL
Andrew Bartlett [Tue, 5 Apr 2011 06:15:27 +0000 (16:15 +1000)]
auth: Move auth_session_info into IDL

This changes auth_session_info_transport to just be a wrapper, rather
than a copy that has to be kept in sync.

As auth_session_info was already wrapped in python, this required
changes to the existing pyauth wrapper and it's users.

Andrew Bartlett

8 years agos4-auth: Always talloc_zero() the struct auth_session_info
Andrew Bartlett [Tue, 5 Apr 2011 05:57:42 +0000 (15:57 +1000)]
s4-auth: Always talloc_zero() the struct auth_session_info

8 years agopidl: Add support for the [ignore] property
Andrew Bartlett [Tue, 5 Apr 2011 05:55:07 +0000 (15:55 +1000)]
pidl: Add support for the [ignore] property

This is implemented to simply never push this pointer, but to push a
NULL in it's place.  Likewise a pull will simply return a NULL.

Andrew Bartlett

8 years agolibrpc/idl Add [nopython] to krb5pac ndrdump functions
Andrew Bartlett [Tue, 5 Apr 2011 05:50:08 +0000 (15:50 +1000)]
librpc/idl Add [nopython] to krb5pac ndrdump functions

These functions are not real RPC functions, but are used to help
ndrdump operate.  They don't need python bindings.

Andrew Bartlett

8 years agoFix bug #7080 - Quota only shown when logged as root.
Jeremy Allison [Tue, 5 Apr 2011 18:24:39 +0000 (11:24 -0700)]
Fix bug #7080 - Quota only shown when logged as root.

Remove the final incorrect uses of conn->session_info->utok.uid.
When we're in the "admin users" list, then this value is not set
to zero.

Inspired by the comment on this bug by Dmitry Butskoy <dmitry@butskoy.name>.

I'll create a different fix for 3.5.x.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Apr  5 21:53:59 CEST 2011 on sn-devel-104

8 years agos3: Add maintainers for s3/auth
Volker Lendecke [Tue, 5 Apr 2011 08:32:37 +0000 (10:32 +0200)]
s3: Add maintainers for s3/auth

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Apr  5 19:09:14 CEST 2011 on sn-devel-104

8 years agos3/vfs_gpfs: s/syncops/gpfs
Björn Jacke [Sun, 3 Apr 2011 14:19:11 +0000 (16:19 +0200)]
s3/vfs_gpfs: s/syncops/gpfs

as pointed out by Metze in bug #8031

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue Apr  5 18:08:42 CEST 2011 on sn-devel-104

8 years agos3-waf: fix typo in ctdb checks.
Günther Deschner [Tue, 5 Apr 2011 12:15:24 +0000 (14:15 +0200)]
s3-waf: fix typo in ctdb checks.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Tue Apr  5 17:20:19 CEST 2011 on sn-devel-104

8 years agos3: Make vlp printing work by default
Volker Lendecke [Sat, 2 Apr 2011 16:51:55 +0000 (18:51 +0200)]
s3: Make vlp printing work by default

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Apr  5 13:12:14 CEST 2011 on sn-devel-104

8 years agos3: Fix print_spool_end
Volker Lendecke [Sat, 2 Apr 2011 16:46:58 +0000 (18:46 +0200)]
s3: Fix print_spool_end

We have to use the spoolss pipe instance opened in print_spool_open, otherwise
the spoolss server won't be able to find the right printer and job.

8 years agos4 samba-tool: Implement "testparm" command
Kai Blin [Wed, 23 Mar 2011 22:06:18 +0000 (23:06 +0100)]
s4 samba-tool: Implement "testparm" command

This is a port of the existing "testparm" python script to a samba-tool
command.

Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Tue Apr  5 07:49:13 CEST 2011 on sn-devel-104

8 years agos3-selftest Look only under source3 for smb.conf files
Andrew Bartlett [Mon, 4 Apr 2011 11:01:40 +0000 (21:01 +1000)]
s3-selftest Look only under source3 for smb.conf files

This test looks for any .conf file with [global] in it, and assumes
it's a Samba3 format smb.conf file.  If 'make test' has been run in
the top level build, it was finding the smb.conf files it generated.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Apr  4 23:50:06 CEST 2011 on sn-devel-104

8 years agos3-auth Rename user_session_key -> session_key to match auth_session_info
Andrew Bartlett [Mon, 14 Feb 2011 00:35:21 +0000 (11:35 +1100)]
s3-auth Rename user_session_key -> session_key to match auth_session_info

8 years agos3-auth use create_local_token() to transform server_info -> session_info
Andrew Bartlett [Fri, 11 Feb 2011 00:50:37 +0000 (11:50 +1100)]
s3-auth use create_local_token() to transform server_info -> session_info

Before a auth_serversupplied_info struct can be used for
authorization, the local groups and privileges must be calculated.
create_local_token() now copies the server_info, and then sets the
calulated token and unix groups.

Soon, it will also transform the result into an expanded struct
auth_session_info.  Until then, the variable name (server_info vs
session_info provides a clue to the developer about what information
has been entered in the structure).

By moving the calls to create_local_token within the codebase, we
remove duplication, and ensure that the session key (where modified)
is consistently copied into the new structure.

Andrew Bartlett

8 years agoMove SET_STAT_INVALID call added by Volker as fix for bug 8042 - Newly create files...
Jeremy Allison [Mon, 4 Apr 2011 17:22:03 +0000 (10:22 -0700)]
Move SET_STAT_INVALID call added by Volker as fix for bug 8042 - Newly create files are always failed with NT_STATUS_FILE_IS_A_DIRECTORY

Ensure we do this for all cases where the stat fails.

Jeremy

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Apr  4 20:08:45 CEST 2011 on sn-devel-104

8 years agoNote that check_parent_exists() doesn't change the contents of smb_fname (add const).
Jeremy Allison [Mon, 4 Apr 2011 17:15:16 +0000 (10:15 -0700)]
Note that check_parent_exists() doesn't change the contents of smb_fname (add const).

8 years agos3-net: add command "net idmap check"
Gregor Beck [Fri, 28 Jan 2011 09:55:58 +0000 (10:55 +0100)]
s3-net: add command "net idmap check"

This is a tool to check the consistency of an idmap tdb database.

The default mode is to scan the database and list invalid entries,
e.g. records with an invalid format, or records which are valid
but for which the reverse mapping entry is missing.

With the "--repair" switch, one can enter an interactive
repair mode which will prompt for each invalid entry found
with the option to delete, skip or edit the record.

There is also a non-interactive repair mode triggered by "--auto"
which will remove all records with invalid content and fill up
mappings which are missing the reverse entry.

The "--test" parameter lets "net idmap check" only list the
changes that would be written and not actually commit them to
the database.

The "--lock" option allows to lock the database already in the
first reading traverse, in order to remove the race when the
database has to be closed and reopened again before writing
the changes.

Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Apr  4 18:21:09 CEST 2011 on sn-devel-104