sfrench/samba-autobuild/.git
5 years agotdb_wrap: don't let tdb_wrap_open() segfault with name==NULL
Stefan Metzmacher [Mon, 19 Jan 2015 11:37:13 +0000 (12:37 +0100)]
tdb_wrap: don't let tdb_wrap_open() segfault with name==NULL

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Jan 19 16:17:28 CET 2015 on sn-devel-104

5 years agoselftest: use env.SELFTEST_PREFIX to define subunit_cache
Stefan Metzmacher [Sat, 10 Jan 2015 08:51:45 +0000 (09:51 +0100)]
selftest: use env.SELFTEST_PREFIX to define subunit_cache

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoREADME.Coding: Add hint for if-statments
Volker Lendecke [Mon, 19 Jan 2015 09:48:20 +0000 (10:48 +0100)]
README.Coding: Add hint for if-statments

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan 19 13:25:12 CET 2015 on sn-devel-104

5 years agodocs/idmap_rid: remove deprecated base_rid from example
David Disseldorp [Fri, 16 Jan 2015 15:21:24 +0000 (16:21 +0100)]
docs/idmap_rid: remove deprecated base_rid from example

The base_rid option has been deprecated for some time. Specifying a
value of 1000 (as recommended in the parameter description and example
section) can result in failed mapping of group SIDs, where RIDs do not
start at 1000.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Jan 19 09:09:22 CET 2015 on sn-devel-104

5 years agolibsmb: provide authinfo domain for DFS referral auth
David Disseldorp [Fri, 16 Jan 2015 15:21:23 +0000 (16:21 +0100)]
libsmb: provide authinfo domain for DFS referral auth

libsmbclient uses the smbc_init->smbc_get_auth_data_fn() provided
workgroup/domain in initial connections, but then switches to the
default smb.conf workgroup/domain when handling DFS referrals.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: reuse connections derived from DFS referrals
David Disseldorp [Fri, 16 Jan 2015 15:21:22 +0000 (16:21 +0100)]
libsmb: reuse connections derived from DFS referrals

[MS-DFSC] 3.2.1.1 and 3.2.1.2 states that DFS targets with the same site
location or relative cost are placed in random order in a DFS referral
response.

libsmbclient currently resolves DFS referrals on every API call, always
using the first entry in the referral response. With random ordering,
libsmbclient may open a new server connection, rather than reuse an
existing (cached) connection established in a previous DFS referred API
call.

This change sees libsmbclient check the connection cache for any of the
DFS referral response entries before creating a new connection.

This change is based on a patch by Har Gagan Sahai
<SHarGagan@novell.com>.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoutils: Fix 'net time' segfault.
Andreas Schneider [Tue, 13 Jan 2015 16:04:26 +0000 (17:04 +0100)]
utils: Fix 'net time' segfault.

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

This is part two of the bugfix. Make sure we pass the IP we found to
cli_servertime(). Hence we always pass at least one of name or IP.

Pair-Programmed-With: Michael Adam <obnox@samba.org>

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agocli_connect_nb_send: don't segfault on host == NULL.
Michael Adam [Fri, 16 Jan 2015 15:18:45 +0000 (16:18 +0100)]
cli_connect_nb_send: don't segfault on host == NULL.

The functions called futher down can cope with host == NULL.

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

This is part one of the bugfix:
This ensures that it is enough to pass one of host or address to the function.

Pair-Programmed-With: Andreas Schneider <asn@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowafsamba: create unique names when building shared modules
Stefan Metzmacher [Fri, 16 Jan 2015 23:24:53 +0000 (00:24 +0100)]
wafsamba: create unique names when building shared modules

After commit 76fdcf5c15bd904c3686f0c2dd93d27486c61ca4, we could endup
with bin/default/source3/auth/libauth-samba4.so being created two times.
Once by SAMBA3_LIBRARY('auth',...) and once again by SAMBA3_MODULE('auth_samba4', ...).

As a result bin/default/source3/auth/libauth-samba4.so gets randomly
overwritten.

SAMBA3_MODULE('auth_samba4', ...) results in
bin/default/source3/auth/libauth_module_samba4.so now.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Jan 19 04:43:53 CET 2015 on sn-devel-104

5 years agowafsamba: remove unused variable in SAMBA_MODULE()
Stefan Metzmacher [Fri, 16 Jan 2015 23:24:53 +0000 (00:24 +0100)]
wafsamba: remove unused variable in SAMBA_MODULE()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
5 years agowafsamba: passing 'subsystem' to SAMBA_MODULE() is not optional
Stefan Metzmacher [Fri, 16 Jan 2015 23:24:53 +0000 (00:24 +0100)]
wafsamba: passing 'subsystem' to SAMBA_MODULE() is not optional

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
5 years agowafsamba: make it possible to pass bundled_name to SAMBA_LIBRARY()
Stefan Metzmacher [Fri, 16 Jan 2015 23:24:53 +0000 (00:24 +0100)]
wafsamba: make it possible to pass bundled_name to SAMBA_LIBRARY()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
5 years agolib/util: add missing commas to statfs_types
Ralph Boehme [Thu, 15 Jan 2015 20:08:47 +0000 (21:08 +0100)]
lib/util: add missing commas to statfs_types

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Jan 16 13:24:16 CET 2015 on sn-devel-104

5 years agosamba3.py: Correctly initialize cache directory for passdb test
Christof Schmitt [Thu, 15 Jan 2015 21:31:19 +0000 (14:31 -0700)]
samba3.py: Correctly initialize cache directory for passdb test

Running 'make test TESTS=tests.samba3' succeeds, but the log shows that
it tried to open the gencache tdb in the wrong directory:
Unable to create directory /usr/local/samba/var/cache for file gencache.tdb. Error was No such file or directory

Fix this by correctly initializing the cache directory.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Fri Jan 16 02:36:39 CET 2015 on sn-devel-104

5 years agosmbd: Stop using vfs_Chdir after SMB_VFS_DISCONNECT.
Ira Cooper [Thu, 15 Jan 2015 16:41:50 +0000 (11:41 -0500)]
smbd: Stop using vfs_Chdir after SMB_VFS_DISCONNECT.

This sequencing is causing problems for vfs_ceph, and likely
other vfs modules.

Signed-off-by: Ira Cooper <ira@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jan 16 00:13:17 CET 2015 on sn-devel-104

5 years agoCVE-2014-8143:dsdb-samldb: Check for extended access rights before we allow changes...
Andrew Bartlett [Thu, 4 Dec 2014 04:23:29 +0000 (17:23 +1300)]
CVE-2014-8143:dsdb-samldb: Check for extended access rights before we allow changes to userAccountControl

This requires an additional control to be used in the
LSA server to add domain trust account objects.

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

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Thu Jan 15 14:54:47 CET 2015 on sn-devel-104

5 years agoCVE-2014-8143:dsdb: Allow use of dsdb_autotransaction_request outside util.c
Andrew Bartlett [Mon, 8 Dec 2014 01:20:21 +0000 (14:20 +1300)]
CVE-2014-8143:dsdb: Allow use of dsdb_autotransaction_request outside util.c

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

Change-Id: If6bc90305a1e9a5a92562a01ba7e44330de91cc1
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoCVE-2014-8143:pydsdb: Pull in UF_USE_AES_KEYS flag
Andrew Bartlett [Sun, 7 Dec 2014 23:19:19 +0000 (12:19 +1300)]
CVE-2014-8143:pydsdb: Pull in UF_USE_AES_KEYS flag

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

Change-Id: I36ad5ebc5d8a4811c41b59af90a3add4ae5fd857
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agoCVE-2014-8143:auth: Force talloc type of session_info pointer to match
Andrew Bartlett [Tue, 11 Nov 2014 02:23:02 +0000 (15:23 +1300)]
CVE-2014-8143:auth: Force talloc type of session_info pointer to match

This helps us keep things safe in LDB where we put this in a opaque pointer.

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

Andrew Bartlett

Change-Id: I46fe53ba655ca0810c276b72fbca524884cdf22d
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agos3: auth - tests: Add test for "force user" being a unix-only user, not in passdb.
Jeremy Allison [Tue, 13 Jan 2015 21:49:58 +0000 (13:49 -0800)]
s3: auth - tests: Add test for "force user" being a unix-only user, not in passdb.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jan 14 08:46:08 CET 2015 on sn-devel-104

5 years agos3: auth: Add previously missing allocation fail check.
Jeremy Allison [Tue, 13 Jan 2015 21:49:36 +0000 (13:49 -0800)]
s3: auth: Add previously missing allocation fail check.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos3: auth: Plumb in the SamInfo3_handle_sids() utility function into passwd_to_SamInfo3().
Jeremy Allison [Tue, 13 Jan 2015 21:45:16 +0000 (13:45 -0800)]
s3: auth: Plumb in the SamInfo3_handle_sids() utility function into passwd_to_SamInfo3().

Core fix for:

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

Based on code from Michael Zeis <mzeis.quantum@gmail.com>

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos3: auth: Convert samu_to_SamInfo3() to use the new utility function.
Jeremy Allison [Tue, 13 Jan 2015 21:39:21 +0000 (13:39 -0800)]
s3: auth: Convert samu_to_SamInfo3() to use the new utility function.

Based on code from Michael Zeis <mzeis.quantum@gmail.com>

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos3: auth: Add a utility function - SamInfo3_handle_sids() that factors out the code...
Jeremy Allison [Tue, 13 Jan 2015 21:35:56 +0000 (13:35 -0800)]
s3: auth: Add a utility function - SamInfo3_handle_sids() that factors out the code to handle "Unix Users" and "Unix Groups".

Based on code from Michael Zeis <mzeis.quantum@gmail.com>

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agorwrap: Bump version to 1.1.2.
Andreas Schneider [Tue, 13 Jan 2015 14:14:25 +0000 (15:14 +0100)]
rwrap: Bump version to 1.1.2.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jan 13 19:19:25 CET 2015 on sn-devel-104

5 years agorwrap: Fix ns_name_compress detection.
Andreas Schneider [Tue, 13 Jan 2015 14:13:40 +0000 (15:13 +0100)]
rwrap: Fix ns_name_compress detection.

On some platforms it is a macro and not a function. So we need to
check if the macro exists.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
5 years agorwrap: Bump version to 1.1.1.
Andreas Schneider [Mon, 12 Jan 2015 16:36:44 +0000 (17:36 +0100)]
rwrap: Bump version to 1.1.1.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
5 years agorwrap: Fix a possible NULL dereference.
Andreas Schneider [Mon, 12 Jan 2015 16:33:58 +0000 (17:33 +0100)]
rwrap: Fix a possible NULL dereference.

CID: #84271

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
5 years agorwrap: If we do not have ns_name_compress() use dn_comp().
Andreas Schneider [Mon, 12 Jan 2015 16:32:45 +0000 (17:32 +0100)]
rwrap: If we do not have ns_name_compress() use dn_comp().

This should fix older Linux versions which do not export
ns_name_compress(). In newer glibc versions dn_comp() calls
ns_name_compress().

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

Reviewed-by: Jakub Hrozek <jakub.hrozek@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agonet: Fix sam addgroupmem
Volker Lendecke [Tue, 13 Jan 2015 11:51:13 +0000 (12:51 +0100)]
net: Fix sam addgroupmem

Domain local groups come across as SID_TYPE_ALIAS and are sent to us in the
PAC/Info3 struct. We should allow this in net sam addgroupmem.

Volker

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Jan 13 15:28:16 CET 2015 on sn-devel-104

5 years agos3-util: Fix authentication with long hostnames.
Andreas Schneider [Mon, 12 Jan 2015 17:12:13 +0000 (18:12 +0100)]
s3-util: Fix authentication with long hostnames.

If the hostname is longer than MAX_NETBIOSNAME_LEN we fail to correctly
check the hostname.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jan 12 23:10:30 CET 2015 on sn-devel-104

5 years agoleases_db: don't leak lock_path onto talloc tos
David Disseldorp [Mon, 12 Jan 2015 15:49:54 +0000 (16:49 +0100)]
leases_db: don't leak lock_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan 12 19:22:31 CET 2015 on sn-devel-104

5 years agosmbd: Fix a small leak on talloc_tos()
Volker Lendecke [Fri, 9 Jan 2015 14:47:18 +0000 (15:47 +0100)]
smbd: Fix a small leak on talloc_tos()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sun Jan 11 20:34:56 CET 2015 on sn-devel-104

5 years agosmbd: Fix an uninitialized variable read
Volker Lendecke [Fri, 9 Jan 2015 14:45:41 +0000 (15:45 +0100)]
smbd: Fix an uninitialized variable read

If dbwrap_fetch_locked failed, we did a TALLOC_FREE(value). Fix this with a
talloc hierarchy.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agosmbd: Make talloc_report of smb_filename more readable
Volker Lendecke [Fri, 9 Jan 2015 14:38:19 +0000 (15:38 +0100)]
smbd: Make talloc_report of smb_filename more readable

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agovfs_unityed_media: VFS module for sharing AVID projects
Ralph Boehme [Wed, 22 Oct 2014 17:17:12 +0000 (19:17 +0200)]
vfs_unityed_media: VFS module for sharing AVID projects

Based on <https://code.google.com/p/vfs-unityed-media/>.

The existing VFS module media_harmony has some problems relative to Avid
media sharing:

Avid looks at the modification time of the ingest directory. Since
media_harmony has everyone using the same directory, users (or client
systems) have to somehow create "fake" directories with special names
and then media_harmony returns the mod time of those fake directories
for the different clients rather than the actual mod time of the
communal ingest directory.

To make matters worse, users then have to have a special utility or
understand how to update the modtime on these specially named
directories. Otherwise, their client system will never update the
indexes to show new media.

To make it even worse than that, Avid creates new directories on the
fly, so you can't just set this up statically at the beginning. Avid
will silently create a new directory and your reindexing problems will
start all over until you create new fake directories.

With unityed_media:

* there are no reindexes between clients

* clients don't need to know which directories have been created for
  them, it's automatic.

* clients never have to reindex other systems directories.

* unityed_media let's each client have their own directories.

* unityed_media works much more like Avid's own ISIS servers work.

A module option controls which name is appended to client specific
paths: the username, the hostname (will not work with OS X) or the
client's IP.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jan 10 04:15:04 CET 2015 on sn-devel-104

5 years agolib: Simplify iov_buf
Volker Lendecke [Sun, 21 Dec 2014 13:52:17 +0000 (14:52 +0100)]
lib: Simplify iov_buf

According to

https://www.securecoding.cert.org/confluence/display/seccode/INT30-C.+Ensure+that+unsigned+integer+operations+do+not+wrap

we only need to check against one operand.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jan  9 23:42:49 CET 2015 on sn-devel-104

5 years agounix_msg: Fix 80-line formatting
Volker Lendecke [Tue, 25 Nov 2014 17:50:25 +0000 (18:50 +0100)]
unix_msg: Fix 80-line formatting

This is pretty fresh code, so hope this change does not fall under the "no
reformatting" rule yet

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoMake sure response->extra_data.data is always cleared out
Matthew Newton [Thu, 8 Jan 2015 15:11:15 +0000 (15:11 +0000)]
Make sure response->extra_data.data is always cleared out

Otherwise a bad read can sometimes cause the function to return -1 with
an invalid pointer in extra_data.data, which is attempted to be freed
by the caller (e.g. libwbclient/wbc_pam.c wbcAuthenticateUserEx())
by calling winbindd_free_response().

Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotest: Fix quoting
Volker Lendecke [Mon, 8 Dec 2014 16:12:24 +0000 (17:12 +0100)]
test: Fix quoting

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Jan  9 17:33:31 CET 2015 on sn-devel-104

5 years agos3-vfs: Fix developer build of vfs_ceph module.
Günther Deschner [Fri, 9 Jan 2015 11:54:51 +0000 (12:54 +0100)]
s3-vfs: Fix developer build of vfs_ceph module.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoctdb: improve helpfulness of debug message when taking reclock fails
Michael Adam [Thu, 8 Jan 2015 23:10:37 +0000 (00:10 +0100)]
ctdb: improve helpfulness of debug message when taking reclock fails

Print out the errno if the fcntl call.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Jan  9 04:25:02 CET 2015 on sn-devel-104

5 years agoctdb-daemon: Handle out-of-memory when setting recovery lock file
Martin Schwenke [Tue, 9 Dec 2014 02:40:23 +0000 (13:40 +1100)]
ctdb-daemon: Handle out-of-memory when setting recovery lock file

Log a message when the reclock file actually changes and avoid a
memory allocation when it doesn't change.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoctdb-scripts: Don't use the GNU awk gensub() function
Martin Schwenke [Fri, 19 Dec 2014 03:19:32 +0000 (14:19 +1100)]
ctdb-scripts: Don't use the GNU awk gensub() function

This is a gawk extension and can't be used reliably if just running
"awk".  It is simple enough to switch to using the standard sub() and
gsub() functions.

The alternative is to switch to explicitly running "gawk".  However,
although the eventscripts aren't exactly portable, it is probably
better to move closer to portability than further away.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoctdb-scripts: Try to deal with Ubuntu having /usr/sbin/service
Martin Schwenke [Mon, 1 Dec 2014 01:21:16 +0000 (12:21 +1100)]
ctdb-scripts: Try to deal with Ubuntu having /usr/sbin/service

Falling back to running the initscript doesn't work because it detects
that upstart is being used and fails.  This was observed when trying
to start winbind on Ubuntu 11.04.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoctdb-tests: Fix tickle sniffing for IPv4
Martin Schwenke [Sat, 20 Dec 2014 08:54:13 +0000 (19:54 +1100)]
ctdb-tests: Fix tickle sniffing for IPv4

tcptickle_sniff_start() assumes that if $dst contains a ': then it
should use the IPv6 sniffing code.  However, $dst is a socket, so has
a trailing ":<port>".

Strip the trailing ":<port>" before checking for ':' as a marker for
an IPv6 address.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agoctdb-scripts: Fix bashism in ctdbd_wrapper script
Led [Sun, 14 Dec 2014 19:06:44 +0000 (21:06 +0200)]
ctdb-scripts: Fix bashism in ctdbd_wrapper script

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

Signed-off-by: Oleksandr Chumachenko <ledest@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agowafadmin: backported the openbsd fixes from waf 1.7
Thomas Nagy [Mon, 16 Sep 2013 22:00:40 +0000 (00:00 +0200)]
wafadmin: backported the openbsd fixes from waf 1.7

This is a backport from waf 1.5...

Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jan  9 02:02:07 CET 2015 on sn-devel-104

5 years agowafsamba: remove commented out code.
Michael Adam [Mon, 22 Dec 2014 10:30:21 +0000 (11:30 +0100)]
wafsamba: remove commented out code.

This code has only ever been there as commented out...

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agoRevert "waf: added suncc_wrap"
Michael Adam [Mon, 22 Dec 2014 10:27:40 +0000 (11:27 +0100)]
Revert "waf: added suncc_wrap"

This reverts commit 65743f932b511db009655847e77288c95c0aa525.

Conflicts:
buildtools/wafsamba/samba_optimisation.py

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agowafsamba: generate an empty.c file if a SAMBA_{LIBRARY,SUBSYSTEM} doesn't have any...
Stefan Metzmacher [Fri, 19 Dec 2014 12:10:30 +0000 (13:10 +0100)]
wafsamba: generate an empty.c file if a SAMBA_{LIBRARY,SUBSYSTEM} doesn't have any source files

This is better than passing '-' as filename to the compiler/linker.
This replaces commit 65743f932b511db009655847e77288c95c0aa525.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=9334
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10315

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
5 years agowafsamba: flags from enviroment are put before our own internal versions
Ralph Boehme [Fri, 19 Dec 2014 08:05:33 +0000 (09:05 +0100)]
wafsamba: flags from enviroment are put before our own internal versions

Ensure user provided CPPFLAGS and LDFLAGS are put *behind* our
internally computed compiler and linker flags.

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

Pair-Programmed-With: Michael Adam <obnox@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agowafsamba: filter out standard library paths from RPATH and LIBPATH
Michael Adam [Thu, 18 Dec 2014 20:36:07 +0000 (21:36 +0100)]
wafsamba: filter out standard library paths from RPATH and LIBPATH

We should avoid passing them explicitly to the compiler/linker.

We ask the compiler with the '-print-search-dirs' argument
or fallback to [ '/usr/lib', '/usr/lib64' ].

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowafsamba: fix ordering problems with lib-provided and internal RPATHs
Michael Adam [Thu, 18 Dec 2014 17:09:15 +0000 (18:09 +0100)]
wafsamba: fix ordering problems with lib-provided and internal RPATHs

When a library or system (like cups) provides an RPATH,
e.g. with -Wl,-R or -Wl,-rpath, this was added by waf
to the LINKFLAGS, wich was later prepended to our RPATH.
But if the path by chance contains an older version of
one of our internal libraries like talloc, this would lead
to linking the too old talloc into our binaries.

This has been observed on, e.g., FreeBSD, but it is a general
problem.

This patch fixes the problem by specially parsing the RPATH
linker options from the pkg-config(, cups-config, ....) output
and putting the paths into the RPATH_<lib> container, which
is then later correctly appended to our internal RPATH.

This is a better fix than commit 64f5e24100a764ec198cab9a8d2c43fa86e7027c
as it touches wafsamba only. 64f5e24100a764ec198cab9a8d2c43fa86e7027c
is already in waf 1.5 upstream, but has some possible bugs,
e.g. it doesn't handle -Wl,-R, (with ',' at the end)
or some combinations where the path is given via an additional
-Wl,/path argument.

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

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowafsamba: make it possible to specify ADDITIONAL_{CFLAGS,LDFLAGS} as env var to ...
Stefan Metzmacher [Wed, 7 Jan 2015 10:13:04 +0000 (11:13 +0100)]
wafsamba: make it possible to specify ADDITIONAL_{CFLAGS,LDFLAGS} as env var to ./configure

CFLAGS and LDFLAGS are also used during the configure checks and might impact
their results.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agowafsamba: improve -fvisibility=hidden, we should check it together this WERROR_CFLAGS
Stefan Metzmacher [Wed, 7 Jan 2015 08:16:57 +0000 (09:16 +0100)]
wafsamba: improve -fvisibility=hidden, we should check it together this WERROR_CFLAGS

GCC ignores -fvisibility=hidden with a warning instead of failing
om some platforms (e.g. Solaris).

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

Based on a patch from Tom Schulz <schulz@adi.com>.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agowafsamba: let CURRENT_CFLAGS() use bld.env.VISIBILITY_CFLAGS
Stefan Metzmacher [Wed, 7 Jan 2015 08:58:38 +0000 (09:58 +0100)]
wafsamba: let CURRENT_CFLAGS() use bld.env.VISIBILITY_CFLAGS

This is better than a hardcoded value in multiple places.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agowafsamba: move -fvisibility=hidden checks from lib/replace to wafsamba
Stefan Metzmacher [Wed, 7 Jan 2015 08:56:56 +0000 (09:56 +0100)]
wafsamba: move -fvisibility=hidden checks from lib/replace to wafsamba

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agowafsamba: move '-fstack-protector' checks from lib/replace to wafsamba
Stefan Metzmacher [Wed, 7 Jan 2015 08:54:43 +0000 (09:54 +0100)]
wafsamba: move '-fstack-protector' checks from lib/replace to wafsamba

This moves the check to the end of the configure run,
which means we no longer use this on configure checks,
but only for the real build.

This behavior is similar than our developer cflags.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agowafsamba: move WERROR_CFLAGS checks from lib/replace to wafsamba
Stefan Metzmacher [Wed, 7 Jan 2015 08:52:53 +0000 (09:52 +0100)]
wafsamba: move WERROR_CFLAGS checks from lib/replace to wafsamba

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agowafsamba: move compiler / cflags related stuff from lib/replace to wafsamba
Stefan Metzmacher [Wed, 7 Jan 2015 08:48:38 +0000 (09:48 +0100)]
wafsamba: move compiler / cflags related stuff from lib/replace to wafsamba

We should have this just in one central place.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agowafsamba: let TO_LIST(mylist) return a copy of mylist
Stefan Metzmacher [Wed, 7 Jan 2015 08:41:02 +0000 (09:41 +0100)]
wafsamba: let TO_LIST(mylist) return a copy of mylist

In most cases we have TO_LIST(mystring) which returns an independent
list.

newlist = TO_LIST(mylist) returned just a reference to mylist.
Which means newlist.append("end") would also modify mylist.

TO_LIST() should always return an independent list.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agovfs_fruit: mmap under FreeBSD needs PROT_READ
Volker Lendecke [Thu, 8 Jan 2015 16:14:37 +0000 (17:14 +0100)]
vfs_fruit: mmap under FreeBSD needs PROT_READ

We memmove, which does read

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib/util: Avoid collision which alread defined consumer DEBUG macro.
Andreas Schneider [Thu, 8 Jan 2015 09:24:36 +0000 (10:24 +0100)]
lib/util: Avoid collision which alread defined consumer DEBUG macro.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Thu Jan  8 21:41:30 CET 2015 on sn-devel-104

5 years agos4:torture:vfs_fruit: fix model name check
Ralph Boehme [Wed, 7 Jan 2015 21:47:13 +0000 (22:47 +0100)]
s4:torture:vfs_fruit: fix model name check

Don't abort when the model string is not "Samba", simply log it.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jan  8 15:31:44 CET 2015 on sn-devel-104

5 years agovfs_fruit: fix base_fsp name conversion
Volker Lendecke [Tue, 6 Jan 2015 15:55:15 +0000 (15:55 +0000)]
vfs_fruit: fix base_fsp name conversion

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agoAdd a script-only idmap module.
Richard Sharpe [Wed, 24 Dec 2014 01:33:34 +0000 (17:33 -0800)]
Add a script-only idmap module.

In this third version I have cleaned up some unused variable warnings that
only the Samba 3 build found and added a man page based on the idmap_tdb2
man page. I have also added support for ID_TYPE_BOTH mappings and replaced
calls to popen with something safer. Also, I removed some non-PC macros.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jan  8 04:30:32 CET 2015 on sn-devel-104

5 years agoallow net ads join accept new osServicePack parameter
Noel Power [Thu, 2 Oct 2014 15:13:18 +0000 (16:13 +0100)]
allow net ads join accept new osServicePack parameter

osServicePack paramater allows the default behaviour ( which is to use
the samba version string as the operatingSystemServicePack attribute )
to be overridden
Additionally make sure if blank string is passed that it is treated
as attribute deletion. This is necessary as values for the os attributes
are eventually passed to ads_modlist_add if the value is "" then the
attempt to add this attribute fails in the underlying ldap
'ldap_modfiy_ext_s' function. In this case we need to pass NULL as the
value to force deletion of the ldap attribute

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jan  8 00:18:05 CET 2015 on sn-devel-104

5 years agos3-libads: Fix a possible segfault in kerberos_fetch_pac().
Andreas Schneider [Wed, 7 Jan 2015 16:12:54 +0000 (17:12 +0100)]
s3-libads: Fix a possible segfault in kerberos_fetch_pac().

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs: Add glusterfs manpage.
Günther Deschner [Wed, 17 Dec 2014 12:48:53 +0000 (13:48 +0100)]
vfs: Add glusterfs manpage.

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

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Jan  7 20:57:57 CET 2015 on sn-devel-104

5 years agopassdb: Cache output from pdb_[ug]id_to_sid
Volker Lendecke [Mon, 5 Jan 2015 15:34:29 +0000 (16:34 +0100)]
passdb: Cache output from pdb_[ug]id_to_sid

A customer complained that after upgrading to Samba 4.0 fileserver
its LDAP server was flooded with uid2sid and gid2sid request for id
0. With 4.0 we do a lot more user-space ACL checking which involves
uid2sid/gid2sid. This caches the corresponding results.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jan  7 12:00:10 CET 2015 on sn-devel-104

5 years agoselftest: fix dns_host_file in samba3 target
Garming Sam [Tue, 6 Jan 2015 23:18:55 +0000 (12:18 +1300)]
selftest: fix dns_host_file in samba3 target

When setting up s3member twice in a row, the join ending up attempting kerberos
and using an old ticket in the st folder, failing with bad credentials.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan  7 03:58:10 CET 2015 on sn-devel-104

5 years agofixup: check for NULL pointers
Ralph Boehme [Tue, 6 Jan 2015 23:56:16 +0000 (15:56 -0800)]
fixup: check for NULL pointers

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos4:rpc_server/lsa: remove msDS-TrustForestTrustInfo if FOREST_TRANSITIVE is cleared
Stefan Metzmacher [Mon, 5 Jan 2015 15:01:16 +0000 (16:01 +0100)]
s4:rpc_server/lsa: remove msDS-TrustForestTrustInfo if FOREST_TRANSITIVE is cleared

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan  6 22:50:23 CET 2015 on sn-devel-104

5 years agos4:rpc_server/lsa: allow LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE to be changed.
Stefan Metzmacher [Mon, 5 Jan 2015 14:59:31 +0000 (15:59 +0100)]
s4:rpc_server/lsa: allow LSA_TRUST_ATTRIBUTE_FOREST_TRANSITIVE to be changed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
5 years agowinbind: Retry after SESSION_EXPIRED error in ping-dc
Christof Schmitt [Fri, 19 Dec 2014 19:24:53 +0000 (12:24 -0700)]
winbind: Retry after SESSION_EXPIRED error in ping-dc

Trying to establish a netlogon connection when the service ticket
expires might fail with NT_STATUS_NETWORK_SESSION_EXPIRED. The
underlying client code already marks the session as invalid, so retry
the netlogon connect in this case.

Signed-off-by: Christof Schmit <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan  6 02:58:57 CET 2015 on sn-devel-104

5 years agosmbd: Properly handle EINTR in vfs_aio_fork
Volker Lendecke [Wed, 31 Dec 2014 13:27:03 +0000 (14:27 +0100)]
smbd: Properly handle EINTR in vfs_aio_fork

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agosmbd: Use msghdr.[ch] in vfs_aio_fork
Volker Lendecke [Wed, 31 Dec 2014 13:26:43 +0000 (14:26 +0100)]
smbd: Use msghdr.[ch] in vfs_aio_fork

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agolib: Use msghdr_prep_recv_fds in unix_msg
Volker Lendecke [Wed, 31 Dec 2014 13:19:13 +0000 (14:19 +0100)]
lib: Use msghdr_prep_recv_fds in unix_msg

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agolib: Add msghdr_prep_recv_fds
Volker Lendecke [Wed, 31 Dec 2014 13:18:59 +0000 (14:18 +0100)]
lib: Add msghdr_prep_recv_fds

This will prepare a msghdr for receiving fd's. Same pattern as before: First
get the buffer size, then fill in msghdr.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agolib: Use msghdr_extract_fds in unix_msg
Volker Lendecke [Wed, 31 Dec 2014 12:33:48 +0000 (13:33 +0100)]
lib: Use msghdr_extract_fds in unix_msg

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agolib: Add msghdr_extract_fds
Volker Lendecke [Wed, 31 Dec 2014 12:14:41 +0000 (13:14 +0100)]
lib: Add msghdr_extract_fds

This is a copy of the extract_fd_array_from_msghdr routine in unix_msg.c, with
a similar use pattern: First call it without an output array to get the length
and then call it a second time to actually fill in the array.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agosmbd: Use msghdr_prep_fds in vfs_aio_fork
Volker Lendecke [Wed, 31 Dec 2014 12:03:24 +0000 (13:03 +0100)]
smbd: Use msghdr_prep_fds in vfs_aio_fork

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agolib: Use msghdr in unix_msg
Volker Lendecke [Tue, 30 Dec 2014 14:05:02 +0000 (14:05 +0000)]
lib: Use msghdr in unix_msg

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agolib: Add msghdr.[ch]
Volker Lendecke [Tue, 30 Dec 2014 13:36:46 +0000 (13:36 +0000)]
lib: Add msghdr.[ch]

This is a little set of routines to deal with the ugly fd-passing macros.

This patch is the first step assisting the creation of msghrds for sending fds.
Receiving fd helpers will follow later.

The basic idea behind these routines is that they fill a variable-sized buffer.
They are supposed to be called twice per msghdr preparation. First with a
0-sized NULL output buffer to calculate the required bufsize, and then a second
time filling in the buffer as such.

This does not take care of the old msg_accrights way of passing file
descriptors. CMSG/SCM_RIGHTS is standardized for quite a while now, and I
believe this intreface can be made to also take care of msg_accrights if
needed.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agolib: unix_dgram_msg does not need "num_fds"
Volker Lendecke [Tue, 30 Dec 2014 11:26:16 +0000 (12:26 +0100)]
lib: unix_dgram_msg does not need "num_fds"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agotorture3: Fix a typo
Volker Lendecke [Wed, 31 Dec 2014 09:39:25 +0000 (10:39 +0100)]
torture3: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3:winbindd: improve logic to use CLDAP for a given domain.
Stefan Metzmacher [Tue, 23 Dec 2014 09:43:19 +0000 (09:43 +0000)]
s3:winbindd: improve logic to use CLDAP for a given domain.

As an AC Domain Controller we should try CLDAP for active directory domains.
E.g. FreeIPA domains doesn't provide NBT at all...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Jan  5 19:23:40 CET 2015 on sn-devel-104

5 years agos3:winbindd: mark our primary as active_directory if possible
Stefan Metzmacher [Tue, 23 Dec 2014 09:43:03 +0000 (09:43 +0000)]
s3:winbindd: mark our primary as active_directory if possible

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
5 years agolibcli/netlogon: We need to handle a bug in FreeIPA (at least <= 4.1.2).
Stefan Metzmacher [Tue, 23 Dec 2014 11:09:04 +0000 (11:09 +0000)]
libcli/netlogon: We need to handle a bug in FreeIPA (at least <= 4.1.2).

They include the ip address information without setting
NETLOGON_NT_VERSION_5EX_WITH_IP, while using
ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX instead of
ndr_push_NETLOGON_SAM_LOGON_RESPONSE_EX_with_flags.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
5 years agos3:passdb: fix logic in pdb_set_pw_history()
Stefan Metzmacher [Wed, 24 Dec 2014 12:58:12 +0000 (13:58 +0100)]
s3:passdb: fix logic in pdb_set_pw_history()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Jan  5 16:51:30 CET 2015 on sn-devel-104

5 years agoHappy New Year 2015!
Stefan Metzmacher [Wed, 31 Dec 2014 23:23:35 +0000 (00:23 +0100)]
Happy New Year 2015!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jan  1 02:47:59 CET 2015 on sn-devel-104

5 years agotorture: NULL out after talloc_free
Garming Sam [Mon, 29 Dec 2014 20:36:37 +0000 (09:36 +1300)]
torture: NULL out after talloc_free

This appeared as a segmentation fault in rpc.spoolss.printer.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Dec 30 02:49:01 CET 2014 on sn-devel-104

5 years agolib: Fix a comment
Volker Lendecke [Sat, 27 Dec 2014 16:51:32 +0000 (16:51 +0000)]
lib: Fix a comment

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Use iov_advance in write_data_iov
Volker Lendecke [Sat, 27 Dec 2014 16:48:55 +0000 (16:48 +0000)]
lib: Use iov_advance in write_data_iov

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Use iov_advance in writev_handler
Volker Lendecke [Sat, 27 Dec 2014 16:39:08 +0000 (16:39 +0000)]
lib: Use iov_advance in writev_handler

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Add iov_advance
Volker Lendecke [Sat, 27 Dec 2014 13:16:20 +0000 (13:16 +0000)]
lib: Add iov_advance

This chops off n bytes from an iovec array. Used for short writev's

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: iov_buf does not need talloc.h anymore
Volker Lendecke [Sat, 27 Dec 2014 12:24:13 +0000 (12:24 +0000)]
lib: iov_buf does not need talloc.h anymore

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Use talloc_memdup in messaging_rec_dup
Volker Lendecke [Sat, 13 Dec 2014 08:52:42 +0000 (09:52 +0100)]
lib: Use talloc_memdup in messaging_rec_dup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Dec 28 04:20:48 CET 2014 on sn-devel-104

5 years agolib: Simplify check_log_size
Volker Lendecke [Mon, 15 Dec 2014 11:09:11 +0000 (12:09 +0100)]
lib: Simplify check_log_size

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>