9 years agoparam: Remove remaining references to announce as and announce version
Andrew Bartlett [Fri, 24 Jun 2011 02:57:47 +0000 (12:57 +1000)]
param: Remove remaining references to announce as and announce version

9 years agos3-build Require fully defined symbols in ALL libraries by default
Andrew Bartlett [Fri, 24 Jun 2011 01:47:45 +0000 (11:47 +1000)]
s3-build Require fully defined symbols in ALL libraries by default

The only exception here is libsmbregistry, which needs further work to
resolve the library loop caused by the registry based smb.conf

Andrew Bartlett

Autobuild-User: Andrew Bartlett <>
Autobuild-Date: Fri Jun 24 05:01:38 CEST 2011 on sn-devel-104

9 years agos3-build: Require fully defined symbols for all public libraries
Andrew Bartlett [Wed, 25 May 2011 06:05:23 +0000 (16:05 +1000)]
s3-build: Require fully defined symbols for all public libraries

9 years agos3-build: Remove SECRETS3 as a samba3core dep
Andrew Bartlett [Thu, 23 Jun 2011 07:33:04 +0000 (17:33 +1000)]
s3-build: Remove SECRETS3 as a samba3core dep

This resolves the the library loop between libsmbconf and
SECRETS3/passdb, and allows the next commit to require fully defined
symbols in public libraries.

Andrew Bartlett

9 years agos3-param Remove %(DomainSID) support
Andrew Bartlett [Thu, 23 Jun 2011 07:32:07 +0000 (17:32 +1000)]
s3-param Remove %(DomainSID) support

This also removes the now unused longvar support.  This experiment
never took off.

Fixing this allows me to resolve the the library loop between libsmbconf
and SECRETS3/passdb.

Andreas correctly points out that this loop originally comes from my
patch to obtain the domain sid from passdb
(25cfa29e29bdbb6c84bd85ea02ec542228ae585f), but as I would prefer to
keep that feature, I'm hoping to break the loop here instead.

Andrew Bartlett

9 years agoFix bug #8254 - "acl check permissions = no" does not work in all cases
Jeremy Allison [Thu, 23 Jun 2011 22:06:16 +0000 (15:06 -0700)]
Fix bug #8254 - "acl check permissions = no" does not work in all cases

Move lp_acl_check_permissions() into can_delete_file_in_directory()
where it makes sense. Remove ACL check when requesting DELETE_ACCESS
when lp_acl_check_permissions is false.

Thanks to John Janosik @ IBM for noticing this.

Autobuild-User: Jeremy Allison <>
Autobuild-Date: Fri Jun 24 01:18:11 CEST 2011 on sn-devel-104

9 years agobuild: Add a script to install python and Samba with one command
Andrew Bartlett [Thu, 23 Jun 2011 10:43:16 +0000 (20:43 +1000)]
build: Add a script to install python and Samba with one command

This should help folks on systems that don't have a recent python
provided by the OS.

Python is installed into the same prefix as Samba, not in the default

Andrew Bartlett

Autobuild-User: Andrew Bartlett <>
Autobuild-Date: Thu Jun 23 14:56:54 CEST 2011 on sn-devel-104

9 years agos3-param Remove 'announce version' parameter
Andrew Bartlett [Tue, 21 Jun 2011 05:14:29 +0000 (15:14 +1000)]
s3-param Remove 'announce version' parameter

The only users I can find of this on the internet involve confused
users, and our own documentation recommends never setting this.  Don't
confuse our users any longer.

Andrew Bartlett

9 years agoparam: Remove "announce as" parameter
Andrew Bartlett [Tue, 21 Jun 2011 00:20:05 +0000 (10:20 +1000)]
param: Remove "announce as" parameter

9 years agos3-net: Bind our gettext results to 'unix charset'
Andrew Bartlett [Wed, 22 Jun 2011 00:40:26 +0000 (10:40 +1000)]
s3-net: Bind our gettext results to 'unix charset'

This ensures that the translations and any embedded strings are in the
same charset.  It won't be the one from the user's locale (we no
longer auto-detect that), but it will be self-consistent.

Thanks to Steve Langasek for pointing this function out!

Andrew Bartlett

9 years agos3-swat Remove d_printf() calls
Andrew Bartlett [Wed, 22 Jun 2011 00:12:39 +0000 (10:12 +1000)]
s3-swat Remove d_printf() calls

These calls only ever output ASCII strings (protocol strings and
debugging), and never user content, so make it clear that these don't
need to be converted into UTF8.

Andrew Bartlett

9 years agolib/util/charset: Remove autodetection of charset from LOCALE
Andrew Bartlett [Tue, 21 Jun 2011 23:58:59 +0000 (09:58 +1000)]
lib/util/charset: Remove autodetection of charset from LOCALE

In the past, our LOCALE would set the display charset of Samba.  The
display charset has now been removed.  This patch removes the support
code that detected the locale from the environment.  We cannot safely
have 'unix charset' follow the locale (at it creates files on disk and
entries in databases that must not vary), so this code is unused.

As an example, imagine a database is manipulated in the
administrator's locale, and then read by smbd starting up in the
system default locale.  Or smbd restarted by the administrator rather
than a startup script.  Both of these situations could corrupt
databases or filenames on disk.

Andrew Bartlett

9 years agolib/util/charset: Remove 'display charset'
Andrew Bartlett [Tue, 21 Jun 2011 23:52:31 +0000 (09:52 +1000)]
lib/util/charset: Remove 'display charset'

As discussed in 'CH_DISPLAY and gettext' on the samba-technical list:

Setting this to a value other than 'unix charset' does not make sense,
as any system where the filesytem charset does not equal the terminal
charset will already have problems with programs as simple as 'ls'.
It also means that our output could not be pasted as our input in
interactive programs or onto our command line, as we never did
translate in the DISPLAY -> UNIX direction.

The d_printf() calls are retained in case we need to revisit this, and
to support display_set_stderr().

Andrew Bartlett

9 years agos3: Add IO_REPARSE_TAG_SYMLINK define
Volker Lendecke [Thu, 23 Jun 2011 10:24:40 +0000 (12:24 +0200)]


Autobuild-User: Volker Lendecke <>
Autobuild-Date: Thu Jun 23 13:46:37 CEST 2011 on sn-devel-104

9 years agos3: Fix some nonempty blank lines
Volker Lendecke [Thu, 23 Jun 2011 10:24:21 +0000 (12:24 +0200)]
s3: Fix some nonempty blank lines

9 years agos3: remove prototype of convert_string_error from proto.h
Michael Adam [Tue, 21 Jun 2011 08:23:51 +0000 (10:23 +0200)]
s3: remove prototype of convert_string_error from proto.h

Autobuild-User: Michael Adam <>
Autobuild-Date: Thu Jun 23 12:34:31 CEST 2011 on sn-devel-104

9 years agos3: remove prototype of convert_string from proto.h
Michael Adam [Tue, 21 Jun 2011 08:23:17 +0000 (10:23 +0200)]
s3: remove prototype of convert_string from proto.h

9 years agodfsreferral: search client's site and use it
Matthieu Patou [Wed, 22 Jun 2011 22:35:50 +0000 (02:35 +0400)]
dfsreferral: search client's site and use it

Autobuild-User: Matthieu Patou <>
Autobuild-Date: Thu Jun 23 01:50:39 CEST 2011 on sn-devel-104

9 years agos4-dbcheck: fix uninitialized errstr in err_dn_target_mismatch
Matthieu Patou [Wed, 22 Jun 2011 17:28:25 +0000 (21:28 +0400)]
s4-dbcheck: fix uninitialized errstr in err_dn_target_mismatch

Autobuild-User: Matthieu Patou <>
Autobuild-Date: Wed Jun 22 21:22:27 CEST 2011 on sn-devel-104

9 years agos4-dbcheck: remove unused include
Matthieu Patou [Wed, 22 Jun 2011 17:28:00 +0000 (21:28 +0400)]
s4-dbcheck: remove unused include

9 years agos4-schema: avoid segfaulting if id3.guid is NULL
Matthieu Patou [Wed, 22 Jun 2011 16:54:37 +0000 (20:54 +0400)]
s4-schema: avoid segfaulting if id3.guid is NULL

9 years agos4-samba_dnsupdate: set environment via the env parameter
Matthieu Patou [Tue, 21 Jun 2011 09:39:28 +0000 (13:39 +0400)]
s4-samba_dnsupdate: set environment via the env parameter

I faced a situation where the os.environ("KRB5CCNAME") = ... didn't
seems to be effective

9 years agos4-upgradeprovision: Don't forget to populate the non replicated objects, and don...
Matthieu Patou [Tue, 21 Jun 2011 09:37:26 +0000 (13:37 +0400)]
s4-upgradeprovision: Don't forget to populate the non replicated objects, and don't touch rIDPreviousAllocationPool

9 years agodbchecker: cope with a broken link to Deleted Objects
Andrew Tridgell [Wed, 22 Jun 2011 12:06:18 +0000 (22:06 +1000)]
dbchecker: cope with a broken link to Deleted Objects

if a DN link to Deleted Objects has a bad GUID, we need to use

9 years agodbchecker: fixed argument error for -H and DN
Andrew Tridgell [Wed, 22 Jun 2011 11:22:39 +0000 (21:22 +1000)]
dbchecker: fixed argument error for -H and DN

9 years agodbchecker: when fixing a bad GUID in a DN, search by the string DN
Andrew Tridgell [Wed, 22 Jun 2011 10:53:44 +0000 (20:53 +1000)]
dbchecker: when fixing a bad GUID in a DN, search by the string DN

9 years agosamba-tool: added --attrs option to dbcheck
Andrew Tridgell [Wed, 22 Jun 2011 10:44:35 +0000 (20:44 +1000)]
samba-tool: added --attrs option to dbcheck

this allows checking of a specific list of attributes

9 years agosamba-tool: make the dbcheck class available outside of samba-tool
Andrew Tridgell [Wed, 22 Jun 2011 10:01:58 +0000 (20:01 +1000)]
samba-tool: make the dbcheck class available outside of samba-tool

this will be used in provision, and probably in upgradeprovision as

9 years agosamba-tool: added --quiet option to dbcheck
Andrew Tridgell [Wed, 22 Jun 2011 09:32:45 +0000 (19:32 +1000)]
samba-tool: added --quiet option to dbcheck

this will be used to allow for other tools (such as provision) to call
into dbcheck without generating a lot of noise

9 years agos4:winbind/wb_init_domain: use DCERPC_SCHANNEL_128 in order to work against w2k8r2
Stefan Metzmacher [Wed, 22 Jun 2011 16:25:30 +0000 (18:25 +0200)]
s4:winbind/wb_init_domain: use DCERPC_SCHANNEL_128 in order to work against w2k8r2


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Wed Jun 22 19:40:47 CEST 2011 on sn-devel-104

9 years agos4:ntvfs/cifs: add option to use S4U2Proxy
Stefan Metzmacher [Fri, 11 Mar 2011 07:32:22 +0000 (08:32 +0100)]
s4:ntvfs/cifs: add option to use S4U2Proxy

Note: this doesn't work against a Samba4 KDC yet.


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Wed Jun 22 18:17:43 CEST 2011 on sn-devel-104

9 years agos4:auth/kerberos: protect kerberos_kinit_password_cc() against old KDCs
Stefan Metzmacher [Tue, 21 Jun 2011 09:05:15 +0000 (11:05 +0200)]
s4:auth/kerberos: protect kerberos_kinit_password_cc() against old KDCs

If the KDC does not support S4U2Proxy, it might return a ticket
for the TGT client principal.


9 years agos4:auth/kerberos: add S4U2Proxy support to kerberos_kinit_password_cc()
Stefan Metzmacher [Mon, 20 Jun 2011 18:28:44 +0000 (20:28 +0200)]
s4:auth/kerberos: add S4U2Proxy support to kerberos_kinit_password_cc()

For S4U2Proxy we need to use the ticket from the S4U2Self stage
and ask the kdc for the delegated ticket for the target service.


9 years agoUpdate eDirectory schema
Jim McDonough [Wed, 22 Jun 2011 11:36:20 +0000 (07:36 -0400)]
Update eDirectory schema

Autobuild-User: Jim McDonough <>
Autobuild-Date: Wed Jun 22 14:48:09 CEST 2011 on sn-devel-104

9 years agos4-dsdb: bypass validation when relax set
Andrew Tridgell [Wed, 22 Jun 2011 08:14:14 +0000 (18:14 +1000)]
s4-dsdb: bypass validation when relax set

this allows dbcheck to fix bad attributes

Autobuild-User: Andrew Tridgell <>
Autobuild-Date: Wed Jun 22 12:27:06 CEST 2011 on sn-devel-104

9 years agosamba-tool: allow for running dbcheck against a remove ldap server
Andrew Tridgell [Wed, 22 Jun 2011 07:38:19 +0000 (17:38 +1000)]
samba-tool: allow for running dbcheck against a remove ldap server

this is useful for running it against a Windows server

9 years agosamba-tool: expanded dbcheck DN checking
Andrew Tridgell [Wed, 22 Jun 2011 07:08:28 +0000 (17:08 +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 <>

9 years agos4-dsdb: prioritise GUID in extended_dn_in
Andrew Tridgell [Wed, 22 Jun 2011 07:07:39 +0000 (17:07 +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 <>

9 years agos4-dsdb: catch duplicate matches in extended_dn_in
Andrew Tridgell [Wed, 22 Jun 2011 07:05:08 +0000 (17:05 +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 <>

9 years agos3: Added missing includes to .clang_complete.
Andreas Schneider [Tue, 21 Jun 2011 13:09:28 +0000 (15:09 +0200)]
s3: Added missing includes to .clang_complete.

Autobuild-User: Andreas Schneider <>
Autobuild-Date: Wed Jun 22 11:15:56 CEST 2011 on sn-devel-104

9 years agos4:auth/kerberos: protect kerberos_kinit_password_cc() against old KDCs
Stefan Metzmacher [Mon, 20 Jun 2011 23:39:58 +0000 (01:39 +0200)]
s4:auth/kerberos: protect kerberos_kinit_password_cc() against old KDCs

Old KDCs may not support S4U2Self (or S4U2Proxy) and return tickets
which belongs to the client principal of the TGT.


Autobuild-User: Stefan Metzmacher <>
Autobuild-Date: Wed Jun 22 09:10:55 CEST 2011 on sn-devel-104

9 years agos4:auth/kerberos: remove one indentation level in kerberos_kinit_password_cc()
Stefan Metzmacher [Mon, 20 Jun 2011 19:23:45 +0000 (21:23 +0200)]
s4:auth/kerberos: remove one indentation level in kerberos_kinit_password_cc()

This will make the following changes easier to review.


9 years agos4:auth/kerberos: reformat kerberos_kinit_password_cc()
Stefan Metzmacher [Mon, 20 Jun 2011 19:09:13 +0000 (21:09 +0200)]
s4:auth/kerberos: reformat kerberos_kinit_password_cc()

In order to make the following changes easier to review.


9 years agos4:auth/kerberos: don't mix s4u2self creds with machine account creds
Stefan Metzmacher [Mon, 20 Jun 2011 13:27:58 +0000 (15:27 +0200)]
s4:auth/kerberos: don't mix s4u2self creds with machine account creds

It's important that we don't store the tgt for the machine account
in the same krb5_ccache as the ticket for the impersonated principal.

We may pass it to some krb5/gssapi functions and they may use them
in the wrong way, which would grant machine account privileges to
the client.


9 years agos4:auth/kerberos: use better variable names in kerberos_kinit_password_cc()
Stefan Metzmacher [Mon, 20 Jun 2011 16:01:49 +0000 (18:01 +0200)]
s4:auth/kerberos: use better variable names in kerberos_kinit_password_cc()

This will make the following changes easier to review.


9 years agos4:auth/kerberos: don't ignore return code in kerberos_kinit_password_cc()
Stefan Metzmacher [Mon, 20 Jun 2011 15:41:52 +0000 (17:41 +0200)]
s4:auth/kerberos: don't ignore return code in kerberos_kinit_password_cc()


9 years agosamba-tool: added missing GUID component checks to dbcheck
Andrew Tridgell [Wed, 22 Jun 2011 04:44:36 +0000 (14:44 +1000)]
samba-tool: added missing GUID component checks to dbcheck

Pair-Programmed-With: Andrew Bartlett <>

Autobuild-User: Andrew Tridgell <>
Autobuild-Date: Wed Jun 22 07:59:30 CEST 2011 on sn-devel-104

9 years agopyldb: added methods to get/set extended components on DNs
Andrew Tridgell [Wed, 22 Jun 2011 04:44:12 +0000 (14:44 +1000)]
pyldb: added methods to get/set extended components on DNs

this will be used by the dbcheck code

Pair-Programmed-With: Andrew Bartlett <>

9 years agopydsdb: added get_syntax_oid_from_lDAPDisplayName()
Andrew Tridgell [Wed, 22 Jun 2011 04:41:50 +0000 (14:41 +1000)]
pydsdb: added get_syntax_oid_from_lDAPDisplayName()

this gives you access to the syntax oid of an attribute

Pair-Programmed-With: Andrew Bartlett <>

9 years agoldb: added extended_str() method to pyldb
Andrew Tridgell [Wed, 22 Jun 2011 03:49:37 +0000 (13:49 +1000)]
ldb: added extended_str() method to pyldb

this gives access to ldb_dn_get_extended_linearized() from python

Pair-Programmed-With: Andrew Bartlett <>

9 years agoldb: expose syntax oids to python
Andrew Tridgell [Wed, 22 Jun 2011 02:34:32 +0000 (12:34 +1000)]
ldb: expose syntax oids to python

Pair-Programmed-With: Andrew Bartlett <>

9 years agosamba-tool: try to keep in a logical ordering
Andrew Tridgell [Wed, 22 Jun 2011 02:23:05 +0000 (12:23 +1000)]
samba-tool: try to keep in a logical ordering

keep individual error handlers together and separate from driver code

9 years agos4-dsdb: don't add zero GUID to BINARY_DN
Andrew Tridgell [Wed, 22 Jun 2011 01:56:40 +0000 (11:56 +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 <>

9 years agos3-spoolss: Fix some valgrind warnings.
Andreas Schneider [Mon, 20 Jun 2011 17:27:01 +0000 (19:27 +0200)]
s3-spoolss: Fix some valgrind warnings.

These are in/out values and need to be initialized.

Signed-off-by: Günther Deschner <>
Autobuild-User: Günther Deschner <>
Autobuild-Date: Tue Jun 21 18:58:30 CEST 2011 on sn-devel-104

9 years agos3-rpc_client: Fix some valgrind warnings.
Andreas Schneider [Mon, 20 Jun 2011 13:39:36 +0000 (15:39 +0200)]
s3-rpc_client: Fix some valgrind warnings.

These are in/out values and need to be initialized.

Signed-off-by: Günther Deschner <>
9 years agos4-smbtorture: rework the spoolss notify test a bit.
Günther Deschner [Tue, 21 Jun 2011 13:06:27 +0000 (15:06 +0200)]
s4-smbtorture: rework the spoolss notify test a bit.


9 years agos4-smbtorture: use ipv4 addresses for backchannel spoolss change notify
Günther Deschner [Mon, 20 Jun 2011 16:01:38 +0000 (18:01 +0200)]
s4-smbtorture: use ipv4 addresses for backchannel spoolss change notify
connections for now.


9 years agos3: Remove unused code
Volker Lendecke [Mon, 20 Jun 2011 20:25:20 +0000 (22:25 +0200)]
s3: Remove unused code

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Tue Jun 21 15:36:01 CEST 2011 on sn-devel-104

9 years agos3: Convert WINBINDD_WINS_BYNAME to the async API
Volker Lendecke [Tue, 14 Jun 2011 21:51:10 +0000 (23:51 +0200)]
s3: Convert WINBINDD_WINS_BYNAME to the async API

9 years agos3-smbd: longer explanation of smbd_shim code
Andrew Tridgell [Tue, 21 Jun 2011 05:53:36 +0000 (15:53 +1000)]
s3-smbd: longer explanation of smbd_shim code

Pair-Programmed-With: Andrew Bartlett <>

Autobuild-User: Andrew Tridgell <>
Autobuild-Date: Tue Jun 21 09:05:37 CEST 2011 on sn-devel-104

9 years agos3-build: Provide a run-time shim to work around duplicate symbols
Andrew Bartlett [Tue, 31 May 2011 03:18:37 +0000 (13:18 +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 <>
9 years agolib/util: Restore CH_UNIX as source charset for d_printf()
Andrew Bartlett [Tue, 21 Jun 2011 02:53:12 +0000 (12:53 +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 <>
9 years agolib/util Remove display_cd from d_printf()
Andrew Bartlett [Tue, 21 Jun 2011 02:51:30 +0000 (12:51 +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

Andrew Bartlett

Signed-off-by: Andrew Tridgell <>
9 years agos4/auth: Trivial spelling fixes.
Brad Hards [Fri, 17 Jun 2011 09:53:11 +0000 (19:53 +1000)]
s4/auth: Trivial spelling fixes.

Signed-off-by: Andrew Tridgell <>
9 years agobuild: move dynconfig for top level build up
Andrew Bartlett [Tue, 21 Jun 2011 02:48:22 +0000 (12:48 +1000)]
build: move dynconfig for top level build up

Signed-off-by: Andrew Tridgell <>
9 years agolib/ccan/tally.h: update for FreeBSD compile.
Rusty Russell [Tue, 21 Jun 2011 01:50:07 +0000 (11:20 +0930)]
lib/ccan/tally.h: update for FreeBSD compile.

Based on commit 0284423676209380a2e07086b9b356096a2f93e6 from CCAN:
Author: Rusty Russell <>
Date:   Tue Jun 21 10:43:31 2011 +0930

    tally: fix FreeBSD compile, memleak in tests.

    Posix says ssize_t is in sys/types.h; on Linux stdlib.h is enough.

Autobuild-User: Rusty Russell <>
Autobuild-Date: Tue Jun 21 05:52:12 CEST 2011 on sn-devel-104

9 years agos4-param Autogenerate the loadparm_globals and loadparm_service tables
Andrew Bartlett [Mon, 20 Jun 2011 05:48:12 +0000 (15:48 +1000)]
s4-param Autogenerate the loadparm_globals and loadparm_service tables

This makes it much easier and less error prone to add new parameters
as we merge the s3 and s4 loadparm systems.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <>
Autobuild-Date: Tue Jun 21 04:41:54 CEST 2011 on sn-devel-104

9 years agoselftest: Run tests for libsmbclient and libnetapi
Andrew Bartlett [Tue, 10 May 2011 20:14:34 +0000 (22:14 +0200)]
selftest: Run tests for libsmbclient and libnetapi

This adds the known failure for the one test (netbios browsing) that

Andrew Bartlett

9 years agos4-torture Enable libnetapi and libsmbclient tests using combined build
Andrew Bartlett [Tue, 10 May 2011 20:12:52 +0000 (22:12 +0200)]
s4-torture Enable libnetapi and libsmbclient tests using combined build

Because we now always build the source3 code, we can link directly
against a private libnetapi and libsmbclient to test the behaviour of
these important APIs.

We use a private libnetapi_net_init(), and by using this interface
rather than the public one, we can ensure that the correct smb.conf is
loaded (as smbtorture4 is a Samba4 semantics binary).

The #include of the source3 includes.h is required to do the manual

Andrew Bartlett

9 years agobuild: disable -Wl,--as-needed to try and fix the build
Andrew Bartlett [Mon, 20 Jun 2011 11:22:59 +0000 (21:22 +1000)]
build: disable -Wl,--as-needed to try and fix the build

The issue here is that the source3 components now built as part of the
top level build do not have their depenencies fully specified, and
this causes the build to fail for many of our users.

When we fix that, we can restore this flag, so we again find that kind
of bug, which will show up for our Gentoo users regardless.

Andrew Bartlett

9 years agos4-cmdline: Rename popt tables to avoid symbol conflicts
Andrew Bartlett [Mon, 20 Jun 2011 10:57:41 +0000 (20:57 +1000)]
s4-cmdline: Rename popt tables to avoid symbol conflicts

These same names are use in the source3 popt code, which is called from
in libsmbclient and libnet.  These are then included in the smbtorture
binary for testing

Andrew Bartlett

9 years agolib/util Remove samba-util-common!
Andrew Bartlett [Mon, 20 Jun 2011 10:36:46 +0000 (20:36 +1000)]
lib/util Remove samba-util-common!

All of this code is now in common, so we don't need the second
'-common' library any more!

Andrew Bartlett

9 years agolib/util: allow parmlist.c to compile under s3 includes.h
Andrew Bartlett [Mon, 20 Jun 2011 10:43:42 +0000 (20:43 +1000)]
lib/util: allow parmlist.c to compile under s3 includes.h

9 years agolib/util: Use common d_printf() in the whole codebase
Andrew Bartlett [Mon, 20 Jun 2011 09:56:50 +0000 (19:56 +1000)]
lib/util: Use common d_printf() in the whole codebase

This removes the lang_tdb based varient, the only user of the lang_tdb
code is SWAT, which calls that directly.

'net' and 'pam_winbind' are internationalised using gettext.

Andrew Bartlett

9 years agos3-param Put &Globals in the FN_ macros, rather than in each entry
Andrew Bartlett [Mon, 20 Jun 2011 07:57:24 +0000 (17:57 +1000)]
s3-param Put &Globals in the FN_ macros, rather than in each entry

This global replace allows an easier comparison between the source3
and source4 loadparm systems.

Andrew Bartlett

9 years agos4-param Add my authorship to this script
Andrew Bartlett [Mon, 20 Jun 2011 05:51:18 +0000 (15:51 +1000)]
s4-param Add my authorship to this script

9 years agolib/util Make unused d_vfprintf() static
Andrew Bartlett [Mon, 20 Jun 2011 05:02:46 +0000 (15:02 +1000)]
lib/util Make unused d_vfprintf() static

9 years agos3: Fix a winbind message
Volker Lendecke [Mon, 20 Jun 2011 20:18:48 +0000 (22:18 +0200)]
s3: Fix a winbind message

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Mon Jun 20 23:28:43 CEST 2011 on sn-devel-104

9 years agos3:idmap_autorid: remove redundant code
Michael Adam [Thu, 9 Jun 2011 22:50:42 +0000 (00:50 +0200)]
s3:idmap_autorid: remove redundant code

Autobuild-User: Michael Adam <>
Autobuild-Date: Mon Jun 20 14:56:29 CEST 2011 on sn-devel-104

9 years agos3:idmap_autorid: in initialize, don't leak storedconfig to talloc_tos() in the succe...
Michael Adam [Thu, 9 Jun 2011 22:49:37 +0000 (00:49 +0200)]
s3:idmap_autorid: in initialize, don't leak storedconfig to talloc_tos() in the success case

9 years agos3:idmap_autorid: use "idmap config * : rangesize" instead of "autorid : rangesize"
Michael Adam [Thu, 9 Jun 2011 22:46:19 +0000 (00:46 +0200)]
s3:idmap_autorid: use "idmap config * : rangesize" instead of "autorid : rangesize"

9 years agos3:idmap_autorid: fail initialization if the domain is not "*"
Michael Adam [Tue, 7 Jun 2011 13:53:49 +0000 (15:53 +0200)]
s3:idmap_autorid: fail initialization if the domain is not "*"

autorid can only be used as a backend for the default idmap configuration.

9 years agos3: Fix the build, NAME_MAX not universally available
Volker Lendecke [Mon, 20 Jun 2011 10:09:06 +0000 (12:09 +0200)]
s3: Fix the build, NAME_MAX not universally available

Autobuild-User: Volker Lendecke <>
Autobuild-Date: Mon Jun 20 13:45:21 CEST 2011 on sn-devel-104

9 years agoUse tevent_req_oom
Volker Lendecke [Sun, 19 Jun 2011 19:10:01 +0000 (21:10 +0200)]
Use tevent_req_oom

This fixes a few Coverity errors

9 years agotevent: change version to 0.9.12 tevent-0.9.12
Volker Lendecke [Mon, 20 Jun 2011 09:43:51 +0000 (11:43 +0200)]
tevent: change version to 0.9.12

9 years agotevent: Add tevent_req_oom
Volker Lendecke [Sun, 19 Jun 2011 18:55:46 +0000 (20:55 +0200)]
tevent: Add tevent_req_oom

This is a replacement for tevent_req_nomem(NULL, req)

9 years agotdb_compat: respect TDB_NO_FSYNC environment variable for tdb2.
Rusty Russell [Mon, 20 Jun 2011 09:10:34 +0000 (18:40 +0930)]
tdb_compat: respect TDB_NO_FSYNC environment variable for tdb2.

I don't think this kind of hack belongs in the tdb2 source, but SAMBA uses
it to speed testing, so we should respect it: handle it in our compat
open wrapper.

Signed-off-by: Rusty Russell <>
Autobuild-User: Rusty Russell <>
Autobuild-Date: Mon Jun 20 12:32:08 CEST 2011 on sn-devel-104

9 years agotdb2: tie it into build process if --enable-tdb2-breaks-compat
Rusty Russell [Mon, 20 Jun 2011 09:10:34 +0000 (18:40 +0930)]
tdb2: tie it into build process if --enable-tdb2-breaks-compat

This is simplistic.  We need to support making TDB2 a standalone library,
but for now, we simply built it in-tree.

Once we have tdb1 compatibility in tdb2, we can rename this option to

Signed-off-by: Rusty Russell <>
9 years agotdb2: create tdb2 versions of various testing TDBs.
Rusty Russell [Mon, 20 Jun 2011 09:10:33 +0000 (18:40 +0930)]
tdb2: create tdb2 versions of various testing TDBs.

Soon, TDB2 will handle tdb1 files, but until then, we substitute.

Signed-off-by: Rusty Russell <>
9 years agotdb2: python wrapper
Rusty Russell [Mon, 20 Jun 2011 09:10:33 +0000 (18:40 +0930)]
tdb2: python wrapper

Signed-off-by: Rusty Russell <>
9 years agosource3/lib/util_tdb.c: operation timeout support for TDB2.
Rusty Russell [Mon, 20 Jun 2011 09:10:33 +0000 (18:40 +0930)]
source3/lib/util_tdb.c: operation timeout support for TDB2.

TDB2 doesn't have (the racy) signal pointer; the new method is to
override the locking callbacks and do the timeout internally.

The technique here is to invalidate the struct flock when the timeout
occurs, so it works even if it happens before we enter the fcntl() call.

Signed-off-by: Rusty Russell <>
9 years agotdb2: minor changes to SAMBIFY it.
Rusty Russell [Mon, 20 Jun 2011 09:10:33 +0000 (18:40 +0930)]
tdb2: minor changes to SAMBIFY it.

This is a bit messy, but it works.  Kept as a separate patch so it's
easier to merge back and forth with CCAN's tdb2.

Signed-off-by: Rusty Russell <>
9 years agotdb2: add lib/tdb2 (from CCAN init-1161-g661d41f)
Rusty Russell [Mon, 20 Jun 2011 09:10:33 +0000 (18:40 +0930)]
tdb2: add lib/tdb2 (from CCAN init-1161-g661d41f)

Signed-off-by: Rusty Russell <>
9 years agotdb_compat: Higher level API fixes.
Rusty Russell [Mon, 20 Jun 2011 09:10:33 +0000 (18:40 +0930)]
tdb_compat: Higher level API fixes.

My previous patches fixed up all direct TDB callers, but there are a
few utility functions and the db_context functions which are still
using the old -1 / 0 return codes.

It's clearer to fix up all the callers of these too, so everywhere is
consistent: non-zero means an error.

Signed-off-by: Rusty Russell <>
9 years agotdb_compat: use tdb_open_compat.
Rusty Russell [Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +0930)]
tdb_compat: use tdb_open_compat.

This is a helper for the common case of opening a tdb with a logging
function, but it doesn't do all the work, since TDB1 and TDB2's log
functions are different types.

Signed-off-by: Rusty Russell <>
9 years agotdb2: tdb_parse_record() returns negative errors, not -1.
Rusty Russell [Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +0930)]
tdb2: tdb_parse_record() returns negative errors, not -1.

Fixup callers to tdb_parse_record() to be compatible with tdb2.

Signed-off-by: Rusty Russell <>
9 years agosource3/winbindd/idmap_tdb.c: tdb2 support for wrong endian.
Rusty Russell [Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +0930)]
source3/winbindd/idmap_tdb.c: tdb2 support for wrong endian.

TDB has no idea of endian itself, but it knows whether the TDB is the
same endian as the current machine, so we should use that rather than
implementing TDB_BIGENDIAN in tdb2.

Signed-off-by: Rusty Russell <>
9 years agotdb_validate: TDB2 support for tdb_validate_child and tdb_backup.
Rusty Russell [Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +0930)]
tdb_validate: TDB2 support for tdb_validate_child and tdb_backup.

We don't expose freelist or hash size for TDB2.

Signed-off-by: Rusty Russell <>
9 years agotdb2: #ifdef out TDB_ERR_NOLOCK and TDB_ERR_LOCK_TIMEOUT.
Rusty Russell [Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +0930)]

These don't exist in tdb2.  The former is used in one weird place in
tdb1, and the latter not at all.

Signed-off-by: Rusty Russell <>
9 years agoldb: replace 'struct TDB_DATA' with 'TDB_DATA'
Rusty Russell [Mon, 20 Jun 2011 09:10:32 +0000 (18:40 +0930)]
ldb: replace 'struct TDB_DATA' with 'TDB_DATA'

The typedef is TDB2 compatible, the struct isn't.

Signed-off-by: Rusty Russell <>