]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
10 years agoReduce the no-op build times by 30%
Thomas Nagy [Fri, 26 Sep 2014 21:46:01 +0000 (23:46 +0200)] 
Reduce the no-op build times by 30%

Change-Id: Ie68436c1e7c75c1786e9ed6b6a54d2b55abbbcea
Reviewed-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Oct  3 13:25:18 CEST 2014 on sn-devel-104

(cherry picked from commit 1c5ef289a872cf0dc78b2e9dd35b20fa99db86fb)

10 years agoDon't use a nested function when testing for visibility attribute support.
Jelmer Vernooij [Sat, 8 Nov 2014 16:22:30 +0000 (16:22 +0000)] 
Don't use a nested function when testing for visibility attribute support.

Some compilers support __attribute__((visibility)), but not nested
functions (e.g. http://www.cprover.org/goto-cc/)

Change-Id: I01a5dd6f5f913664621c4090e2dca177527436bb
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749983
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749985
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=749986
Signed-Off-By: Jelmer Vernooij <jelmer@debian.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov 10 08:29:19 CET 2014 on sn-devel-104

(cherry picked from commit 2afc5b797826780c07e04ed153edc82f410668a2)

10 years agoFix more pep8 issues in code I touched recently.
Jelmer Vernooij [Mon, 2 Jun 2014 00:53:01 +0000 (02:53 +0200)] 
Fix more pep8 issues in code I touched recently.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Change-Id: I35f3204bdf5d00b3280d703427ded2fa2163a6f7

(similar to commit 0c2408531709eb720a2e96f72afbc2ecbfe6b06d)
This only backports the buildtools/wafsamba/ changes

10 years agoRemove last instances of pep8 error E712 (use 'is' rather than '==' for booleans)
Jelmer Vernooij [Mon, 2 Jun 2014 00:36:13 +0000 (02:36 +0200)] 
Remove last instances of pep8 error E712 (use 'is' rather than '==' for booleans)

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Change-Id: I43b394a6225b4c2049d979fda75548c82d781f67
(cherry picked from commit bd6faaf56a6237874cc84ddb8be0f09a9b742a54)

10 years agos3: lib, s3: modules: Fix compilation on Solaris.
Jeremy Allison [Fri, 3 Oct 2014 16:24:04 +0000 (09:24 -0700)] 
s3: lib, s3: modules: Fix compilation on Solaris.

Based on work from YOUZHONG YANG <youzhong@gmail.com>.
Code needs fixing when HAVE_STRUCT_MSGHDR_MSG_CONTROL is
not defined. Also Solaris doesn't have msg_flags field
(which we set to zero anyway, so if we initialize
the entire struct to zero, we never need to refer to it).

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Oct  6 12:33:36 CEST 2014 on sn-devel-104

(cherry picked from commit 57bcb8055eb3e15c4ce7bcdeeef7efed175ed347)

10 years agos4:dsdb/tests: add test_timevalues1() to verify timestamp values
Stefan Metzmacher [Fri, 9 Jan 2015 07:56:59 +0000 (08:56 +0100)] 
s4:dsdb/tests: add test_timevalues1() to verify timestamp values

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Jan 24 20:17:20 CET 2015 on sn-devel-104

(cherry picked from commit dc2f91020e3b52942f8aab60fd1db70d2afadd51)

10 years agoldb: version 1.1.20
Stefan Metzmacher [Mon, 19 Jan 2015 16:17:13 +0000 (17:17 +0100)] 
ldb: version 1.1.20

- Bug 9810 - validate_ldb of String(Generalized-Time) does not accept millisecond format ".000Z"

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit c7af8ae9d2aa19db2533e69b8a4d7c1b6f8e2d9f)

10 years agolib/ldb: fix logic in ldb_val_to_time()
Stefan Metzmacher [Mon, 19 Jan 2015 14:47:58 +0000 (15:47 +0100)] 
lib/ldb: fix logic in ldb_val_to_time()

040408072012Z should represent 20040408072012.0Z
as well as 20040408072012.000Z or
20040408072012.RandomIgnoredCharaters...Z

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
(cherry picked from commit d1b515535da46591d3a646a848c7427b6ff951a7)

10 years agoRemove use of the "staticforward" macro
Petr Viktorin [Wed, 3 Dec 2014 12:59:58 +0000 (13:59 +0100)] 
Remove use of the "staticforward" macro

This macro was used for compatibility with broken compilers.
Since Python 2.3, it is always defined as `static`, and only exists
"for source compatibility with old C extensions".

Signed-off-by: Petr Viktorin <pviktori@redhat.com>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 02980268e8641a1558c6f475d4669ce4d663504d)

10 years agoldb: bump to version 1.1.19
Andrew Bartlett [Fri, 19 Dec 2014 02:25:03 +0000 (15:25 +1300)] 
ldb: bump to version 1.1.19

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
(cherry picked from commit 02f6ab85a0dcec59c12384a8738eecf7d322071f)

10 years agoldb: Allow to register extended match rules
Samuel Cabrero [Wed, 5 Nov 2014 10:02:25 +0000 (11:02 +0100)] 
ldb: Allow to register extended match rules

This allows to extend LDB by registering extended match rules from outside
the library itself. This is necessary when the implementation requires
knowledge about syntaxes implemented in samba extensions, like the
LDAP_MATCHING_RULE_TRANSITIVE_EVAL match.

Signed-off-by: Samuel Cabrero <samuelcabrero@kernevil.me>
Singed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
(cherry picked from commit faa4be0535fd41bf282b1afc749a05412f4ee96c)

10 years agos3-pam_smbpass: Fix memory leak in pam_sm_authenticate().
Andreas Schneider [Thu, 22 Jan 2015 09:27:59 +0000 (10:27 +0100)] 
s3-pam_smbpass: Fix memory leak in pam_sm_authenticate().

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 0cb9b28acb7008cd30c6de3add9876eb5607a5a6)

Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Sun Jan 25 00:37:52 CET 2015 on sn-devel-104

10 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>
(cherry picked from commit 45829800eb3f3a8aeccfe7c1114dcf9df60371d5)

10 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>
(cherry picked from commit a0a254f74234bed6c9a0c71a5bda8254fa6f633f)

10 years agovfs_snapper: encode and decode Snapper DBus strings
David Disseldorp [Wed, 21 Jan 2015 17:16:57 +0000 (18:16 +0100)] 
vfs_snapper: encode and decode Snapper DBus strings

Snapper uses a special character encoding for strings used in DBus
requests and responses. This change ensures that Samba packs and unpacks
strings in the corresponding format, using the previously added
encode/decode helper functions.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 32e9d7fa220d05f5ca95ed61cf6c7aa7d0261c03)

10 years agovfs_snapper: add DBus string encoding and decoding helpers
David Disseldorp [Wed, 21 Jan 2015 17:16:56 +0000 (18:16 +0100)] 
vfs_snapper: add DBus string encoding and decoding helpers

Snapper uses the following mechanism for encoding and decoding strings
used in DBus traffic:
Characters above 127 (0x7F - ASCII DEL) must be encoded hexadecimal as
"\x??". As a consequence "\" must be encoded as "\\".

This change adds string encoding and decoding helpers to vfs_snapper.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 3d48fc96739bde631f8197aa313a81808481adf3)

10 years agovfs_snapper: free dbus req messages in error paths
David Disseldorp [Wed, 21 Jan 2015 17:16:55 +0000 (18:16 +0100)] 
vfs_snapper: free dbus req messages in error paths

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit f72fa6390b73f47a57033282335786c24664a3f8)

10 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.

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

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 5deb685ecd6f611bcf357f7040dc62582a50d2aa)

10 years agovfs_glusterfs: Add comments to the pipe(2) code.
Ira Cooper [Thu, 22 Jan 2015 22:14:31 +0000 (17:14 -0500)] 
vfs_glusterfs: Add comments to the pipe(2) code.

The guarantees around read(2) and write(2) and pipes are critical
to understanding this code.  Hopefully these comments will help.

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 23 20:58:51 CET 2015 on sn-devel-104

(cherry picked from commit 3b2d8bdbb1851961536241d3aaaf6ac936964517)

The last 10 patches address
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11069
Backport remaining performance patches for vfs_glusterfs to 4.2/4.1.

10 years agovfs: Fix a typo
Volker Lendecke [Wed, 21 Jan 2015 19:49:24 +0000 (20:49 +0100)] 
vfs: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jan 22 13:14:38 CET 2015 on sn-devel-104

(cherry picked from commit db63e4887c81c3e458194004353d7ef92c67b393)

10 years agovfs:glusterfs: whitespace fix.
Michael Adam [Wed, 21 Jan 2015 21:07:53 +0000 (22:07 +0100)] 
vfs:glusterfs: whitespace fix.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jan 22 03:20:17 CET 2015 on sn-devel-104

(cherry picked from commit cde5d380e192487ae77734afcb3eb3d327aafb98)

10 years agovfs_glusterfs: Replace eventfd with pipes, for AIO use
Ira Cooper [Tue, 20 Jan 2015 04:08:17 +0000 (23:08 -0500)] 
vfs_glusterfs: Replace eventfd with pipes, for AIO use

Pipes clean up the AIO implementation substantially, due to the fact
that they implement a natural ithread safe queue instead of us
creating our own queue.

Signed-off-by: Ira Cooper <ira@samba.org>
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Ira Cooper <ira@samba.org>
Autobuild-Date(master): Wed Jan 21 20:40:11 CET 2015 on sn-devel-104

(cherry picked from commit 4c3a3d9e6adc95d0f0e1f6030b2406613d9f9f53)

10 years agovfs/glusterfs: Change xattr key to match gluster key.
raghavendra talur [Wed, 10 Dec 2014 15:45:03 +0000 (21:15 +0530)] 
vfs/glusterfs: Change xattr key to match gluster key.

Gluster changed the key used to do get_real_filename
in 3.5. This changes Samba's glusterfs vfs-module
to use the same key.

This will render SMB_VFS_GET_REALFILENAME() working
again under 3.5 and will remove support for that functionality
for Gluster 3.4 and older.

Signed-off-by: raghavendra talur <raghavendra.talur@gmail.com>
Reviewed-by: Ira Cooper <ira@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit af9ec9fea5a730023cdee6e236f9585e3a18b0e6)

10 years agovfs_glusterfs: Implement AIO support
Poornima G [Thu, 11 Dec 2014 02:05:10 +0000 (07:35 +0530)] 
vfs_glusterfs: Implement AIO support

Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Dec 17 16:35:37 CET 2014 on sn-devel-104

(cherry picked from commit 051b81aac81c7ccb234da221e9f8272b70b265ce)

10 years agovfs_glusterfs: Change sys_get_acl_file/fd to return ACLs corresponding to mode bits...
Poornima G [Fri, 12 Dec 2014 13:11:49 +0000 (14:11 +0100)] 
vfs_glusterfs: Change sys_get_acl_file/fd to return ACLs corresponding to mode bits when there are no ACLs set.

Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 26b3544251babdfcdf5ada338a4ed39ff18bc47a)

10 years agovfs_glusterfs: Set connectpath as snapdir-entry-path.
raghavendra talur [Wed, 10 Dec 2014 07:00:10 +0000 (12:30 +0530)] 
vfs_glusterfs: Set connectpath as snapdir-entry-path.

snapview client in gluster would require connectpath
in order add snapdir entry to readdir result.

Signed-off-by: raghavendra talur <raghavendra.talur@gmail.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Dec 10 16:38:27 CET 2014 on sn-devel-104

(cherry picked from commit a12ae815b01b372cbf8697d32d5d45d7b2d5f93d)

10 years agovfs_glusterfs: Remember the connect path too for reopening.
raghavendra talur [Wed, 10 Dec 2014 06:56:34 +0000 (12:26 +0530)] 
vfs_glusterfs: Remember the connect path too for reopening.

As Samba allows us to share subdirs, lets re-use preopened
connections to glusterfs only if they are for same volume
AND same connectpath.

Signed-off-by: raghavendra talur <raghavendra.talur@gmail.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 2fb4317352a165d0dd4af78fcf0a576fa246eab2)

10 years agovfs_glusterfs: In vfs_gluster_sys_acl_get_file/fd, reduce the number of getxattr...
Poornima G [Thu, 30 Oct 2014 11:44:51 +0000 (17:14 +0530)] 
vfs_glusterfs: In vfs_gluster_sys_acl_get_file/fd, reduce the number of getxattr calls.

Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Ira Cooper <ira@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit a4fa9ca5a7a4c0b770079ab126f8172ff6d6851c)

10 years agolibsmb: provide authinfo domain for encrypted session referrals
David Disseldorp [Mon, 19 Jan 2015 12:39:35 +0000 (13:39 +0100)] 
libsmb: provide authinfo domain for encrypted session referrals

6c9de0cd056afc0b478c02f1bdb0e06532388037 requires this extra change.

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>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 21 04:29:06 CET 2015 on sn-devel-104

(cherry picked from commit 6da86012a2ca521efe0cf1bf05fcd04c3099b190)

10 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>
(cherry picked from commit 6c9de0cd056afc0b478c02f1bdb0e06532388037)
[ddiss@samba.org: 4.2 rebase with cli_init_creds() call]

10 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>
(cherry picked from commit 7b7d4f740fe5017107d3100041cc8c7982f0eac7)

10 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
(cherry picked from commit c31f54112e21b2e76398a402e864a2b6b6c74e6c)

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

10 years agogencache: Request mutexes for gencache_notrans.tdb
Christof Schmitt [Mon, 17 Nov 2014 21:59:34 +0000 (14:59 -0700)] 
gencache: Request mutexes for gencache_notrans.tdb

The check in tdb_wrap ensures that mutexes are only used on systems that
properly support them.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Nov 26 19:04:11 CET 2014 on sn-devel-104
(cherry picked from commit 068f9e26486fbcd36c109df9ada50c9384ba52c5)

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

10 years agogencache: Convert gencache.tdb to tdb_wrap
Christof Schmitt [Mon, 17 Nov 2014 22:44:47 +0000 (15:44 -0700)] 
gencache: Convert gencache.tdb to tdb_wrap

This change is not strictly necessary, but for consistency both gencache
tdbs are now opened through tdb_wrap.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit f80bbba2870a80ed421a1a222e430df86028e7c7)

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

10 years agogencache: Convert gencache_notrans to use tdb_wrap
Christof Schmitt [Mon, 17 Nov 2014 21:30:49 +0000 (14:30 -0700)] 
gencache: Convert gencache_notrans to use tdb_wrap

This allows using on the mutex check in tdb_wrap.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 139bd9589ac759b4e7a6ae9aa465320c5fa85d18)

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

10 years agos3:gencache: don't use transaction non non-persistent gencache_notrans.tdb
Michael Adam [Wed, 2 Jul 2014 05:44:04 +0000 (07:44 +0200)] 
s3:gencache: don't use transaction non non-persistent gencache_notrans.tdb

gencache_notrans.tdb is a non-persistent cache layer above the
persistent gencache.tdb. Despite its name, and despite the
nature of non-persistent tdbs, the current stabilization code
uses a transaction on gencache_notrans.tdb like this:

  transaction_start(cache)
  transaction_start(cache_notrans)
  traverse(cache_notrans, stabilize_fn)
  transaction_commit(cache)
  transaction_commit(cache_notrans)

where stabilze_fn does this on a record:
  1. store it to or delete it from cache
     (depending on the timeout)
  2. delete it from the cache_notrans

This patch changes gencache_notrans.tdb to avoid
transactions by using an all-record lock like this:

  tdb_allrecord_lock(cache_notrans)
  transaction_start(cache)
  traverse(cache_notrans, stabilize_fn_mod)
  transaction_commit(cache)
  traverse(cache_notrans, wipe_fn)
  tdb_wipe_all(cache_notrans)
  tdb_allrecord_unlock(cache_notrans)

with stabilize_fn_mod doing only:
  1. store the record to or delete it from cache
     (depending on the timeout)

and wipe_fn deleting the records from the gencache_notrans db.

This is a step towards making non-persistent-db specific features
like mutex locking usable for gencache_notrans.tdb.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
(cherry picked from commit 35fd2ca4984b3a1a8bbcb5c1c9e0d724e3c63d80)

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

10 years agos3:gencache: simply stabilize() a bit more: remove error from state
Michael Adam [Thu, 26 Jun 2014 14:56:41 +0000 (16:56 +0200)] 
s3:gencache: simply stabilize() a bit more: remove error from state

state.error is set to true if and only if the traverse
callback returns error (-1), and hence only if the traverse
fails.

Hence the the error state is redundant.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
(cherry picked from commit d240cf7894f076a2ed2b6bc434f20a93cfbb1ca4)

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

10 years agos3:gencache: fix logic in stabilization when deleting a record from stable cache
Michael Adam [Thu, 26 Jun 2014 14:37:17 +0000 (16:37 +0200)] 
s3:gencache: fix logic in stabilization when deleting a record from stable cache

Set state->written = true in the delete case
if and only if the record has really been deleted.

This does currently not seem to lead to an unneeded
write to the DB, since failure to delete the record
will cause the traverse and hence the transaction
to cancel. But I think this is clearer.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
(cherry picked from commit 202ee81e869f4b51e1f904ef6ac3fb0030edfede)

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

10 years agolib: Use tdb_parse_record in gencache_set
Volker Lendecke [Tue, 25 Nov 2014 21:03:18 +0000 (21:03 +0000)] 
lib: Use tdb_parse_record in gencache_set

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Nov 26 14:50:38 CET 2014 on sn-devel-104
(cherry picked from commit ec0c9ad0994d35e22ecc50e552d14582c51622b1)

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

10 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

(cherry picked from commit d098b6c877629af0f23070481deaccdf65acd249)

Autobuild-User(v4-2-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-2-test): Fri Jan 23 11:04:50 CET 2015 on sn-devel-104

10 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>
(cherry picked from commit 83066ed539658a9fa6deb897b15b20a0624227fe)

10 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>
(cherry picked from commit 60895e62fe21e41cf4a09ec8a92239b8f015b450)

10 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>
(cherry picked from commit d20b2d397205c1ab85a43f54bc95360a732265f3)

10 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>
(cherry picked from commit 9395243890aff5bb2166e18e33492afb28850097)

10 years agonsswitch: fix soname of linux nss_*.so.2 modules
Stefan Metzmacher [Thu, 18 Dec 2014 09:33:34 +0000 (10:33 +0100)] 
nsswitch: fix soname of linux nss_*.so.2 modules

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 575b093dac3c509b1bfaab0b4ad29b9b4214e487)

10 years agoselftest: use shared/libnss_wrapper_winbind.so.2
Stefan Metzmacher [Thu, 18 Dec 2014 19:13:44 +0000 (20:13 +0100)] 
selftest: use shared/libnss_wrapper_winbind.so.2

This library is always available in make test.
nss-wrapper strictly requires the linux nss api.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 4eb24fa545234be506eb1330ccbbfd5c2b9e0d82)

10 years agowafsamba: add optional keep_underscore=True to SAMBA_LIBRARY()
Stefan Metzmacher [Thu, 18 Dec 2014 09:21:30 +0000 (10:21 +0100)] 
wafsamba: add optional keep_underscore=True to SAMBA_LIBRARY()

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 82e583b04b04e560c121163850d70c52d2fce78d)

10 years agodsdb: Add tokenGroupsGlobalAndUniversal, tokenGroups, tokenGroupsNoGCAcceptable
Garming Sam [Wed, 3 Dec 2014 22:53:12 +0000 (11:53 +1300)] 
dsdb: Add tokenGroupsGlobalAndUniversal, tokenGroups, tokenGroupsNoGCAcceptable

This includes additional tests based directly on the docs, rather than
simply testing our internal implementation in client and server contexts,
that create a user and groups.

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

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming-Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Dec 22 17:17:02 CET 2014 on sn-devel-104

(similar to commit e4213512d0a967e87a74a1ae816c903fb38dd8b9)

10 years agoVERSION: Re-enable git snapshots...
Karolin Seeger [Thu, 15 Jan 2015 15:53:23 +0000 (16:53 +0100)] 
VERSION: Re-enable git snapshots...

and bump version up to 4.2.0rc5.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Thu Jan 15 22:37:56 CET 2015 on sn-devel-104

10 years agoVERSION: Disable git snapshots for the 4.2.0rc4 release. samba-4.2.0rc4
Karolin Seeger [Thu, 15 Jan 2015 15:51:50 +0000 (16:51 +0100)] 
VERSION: Disable git snapshots for the 4.2.0rc4 release.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoWHATSNEW: Add release notes for Samba 4.2.0rc4.
Karolin Seeger [Thu, 15 Jan 2015 15:51:08 +0000 (16:51 +0100)] 
WHATSNEW: Add release notes for Samba 4.2.0rc4.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 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>
10 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>
10 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>
10 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>
10 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

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 56e2384dfe29fd8f16b9d0cf7264f9bb8ed38966)

Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Thu Jan 15 16:16:51 CET 2015 on sn-devel-104

10 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

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit d9c22a3af2ac319d075a952c71496b6b76c83fcf)

10 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>
(cherry picked from commit a13e29cc4345d85ab6fe4482119386b87e4e8673)

10 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>
(cherry picked from commit 87c176563baea3458c5322f1e3dfae6cf074b4b4)
Signed-off-by: Andreas Schneider <asn@samba.org>
10 years agospoolss: clear PrinterInfo on GetPrinter error
David Disseldorp [Wed, 17 Dec 2014 15:54:42 +0000 (16:54 +0100)] 
spoolss: clear PrinterInfo on GetPrinter error

If an error is returned without zeroing a pre-allocated @info pointer,
then marshalling of the response will fail.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit a11e97b79645ff0d9e7d20f5318a979194a858fe)

10 years agospoolss: clear info on GetPrinterDriverDirectory error
David Disseldorp [Wed, 17 Dec 2014 15:47:50 +0000 (16:47 +0100)] 
spoolss: clear info on GetPrinterDriverDirectory error

If an error is returned without zeroing a pre-allocated @info pointer,
then marshalling of the response will fail.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit c9fccb5018f9a19bb654b9ad79aa716e37a274d6)

10 years agospoolss: clear info on GetPrintProcessorDirectory error
David Disseldorp [Wed, 17 Dec 2014 14:54:22 +0000 (15:54 +0100)] 
spoolss: clear info on GetPrintProcessorDirectory error

If an error is returned without zeroing a pre-allocated @info pointer,
then marshalling of the response will fail.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 679c781112ce6b7cffca11c28e58ae5f9a0d717d)

10 years agospoolss: clear FormInfo on GetForm error
David Disseldorp [Wed, 17 Dec 2014 14:29:52 +0000 (15:29 +0100)] 
spoolss: clear FormInfo on GetForm error

In handling a spoolss GetForm request, the handler may return an
immediate error if one of the input parameters is invalid.  If this is
done without zeroing the pre-allocated @info pointer, then marshalling
of the response will fail.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit b113ed6043622cdec68f3a70631b363594f3a8d0)

10 years agospoolss: clear DriverInfo on GetPrinterDriver2 error
David Disseldorp [Wed, 17 Dec 2014 14:21:33 +0000 (15:21 +0100)] 
spoolss: clear DriverInfo on GetPrinterDriver2 error

In handling a spoolss GetPrinterDriver2 request, the handler may
return an immediate error if one of the input parameters is invalid.
If this is done without zeroing the pre-allocated @info pointer, then
marshalling of the response will fail.

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit fb9ecb044ee986ab3496da6cbad162a224378475)

10 years agospoolss: clear JobInfo on GetJob error
David Disseldorp [Thu, 4 Dec 2014 19:03:39 +0000 (20:03 +0100)] 
spoolss: clear JobInfo on GetJob error

In handling a spoolss GetJob request, the _spoolss_GetJob() handler may
return an immediate error if one of the input parameters is invalid. If
this is done without zeroing the pre-allocated @info pointer, then
api_spoolss_GetJob() will attempt to marshall @info, which in the case
of an @offered value of zero results in a marshalling error:

ndr_push_error(7): Bad subcontext (PUSH) content_size 64 is larger
than size_is(0)

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

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 89869e090c56a3f83b451b437f9c3f40a231dd24)

10 years ago[PATCH] vfs: Add glusterfs manpage.
Günther Deschner [Wed, 14 Jan 2015 20:44:50 +0000 (21:44 +0100)] 
[PATCH] 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

10 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>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11051

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Jan 13 15:28:16 CET 2015 on sn-devel-104

10 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

(cherry picked from commit c5948040805f2585dd9da3a6955f605d8d9fa70c)

10 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>
(cherry picked from commit da2611adef32107f5a0eec97501c01232ab72efc)
Signed-off-by: Andreas Schneider <asn@samba.org>
10 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
(cherry picked from commit a2670f15dea27c10e3827216adf572f9c3894f85)

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

Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Tue Jan 13 23:17:05 CET 2015 on sn-devel-104

10 years agowinbind: Retry LogonControl RPC in ping-dc after session expiration
Christof Schmitt [Mon, 22 Dec 2014 23:19:47 +0000 (15:19 -0800)] 
winbind: Retry LogonControl RPC in ping-dc after session expiration

When the underlying session expires, the LogonControl RPC call used in
ping-dc returns NT_STATUS_IO_DEVICE_ERROR. Retry once in this case,
instead of returning the error to the caller.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Dec 23 02:46:34 CET 2014 on sn-devel-104
(cherry picked from commit 2fdc55160309cec89aeb88243cb18d058c67e918)

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

10 years agotdb_wrap: Make mutexes easier to use
Volker Lendecke [Tue, 30 Sep 2014 11:04:21 +0000 (11:04 +0000)] 
tdb_wrap: Make mutexes easier to use

This patch makes sure we work fine and open without mutexes if they
are not supported.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 911439639a2caa17a9680cb297e9fe26eba56149)

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

Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Mon Jan 12 22:28:31 CET 2015 on sn-devel-104

10 years agonss_wrapper: check for nss.h
Andreas Schneider [Wed, 15 Oct 2014 09:29:12 +0000 (11:29 +0200)] 
nss_wrapper: check for nss.h

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Oct 15 14:06:11 CEST 2014 on sn-devel-104

(cherry picked from commit ee9d075ae44ca8fdfa16afe878038711641f9a0c)

Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Fri Jan  2 23:52:50 CET 2015 on sn-devel-104

10 years agoctdb-daemon: Use correct tdb flags when enabling robust mutex support
Amitay Isaacs [Thu, 11 Dec 2014 02:16:47 +0000 (13:16 +1100)] 
ctdb-daemon: Use correct tdb flags when enabling robust mutex support

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

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit e0bf5dd4566785b41ad1fa0492a9f215639f1685)

10 years agotdb: version 1.3.4
Stefan Metzmacher [Fri, 12 Dec 2014 11:28:47 +0000 (12:28 +0100)] 
tdb: version 1.3.4

Transactions are supported with TDB_MUTEX_LOCKING.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Dec 19 11:41:26 CET 2014 on sn-devel-104

(cherry picked from commit a1a90f74eb10a10ac9d508028ed998f8c843f88a)

10 years agotdb/toos: allow transactions with TDB_MUTEX_LOCKING
Stefan Metzmacher [Fri, 12 Dec 2014 11:53:37 +0000 (12:53 +0100)] 
tdb/toos: allow transactions with TDB_MUTEX_LOCKING

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit f32747ddd06445b5c51aa3f1b56fead48285a735)

10 years agotdb/test: add tdb1-run-mutex-transaction1 test
Stefan Metzmacher [Fri, 12 Dec 2014 11:24:50 +0000 (12:24 +0100)] 
tdb/test: add tdb1-run-mutex-transaction1 test

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit 5d5d91fae55a806261375b87bf7109a980471799)

10 years agotdb: allow transactions on on tdb's with TDB_MUTEX_LOCKING
Stefan Metzmacher [Fri, 12 Dec 2014 10:22:47 +0000 (11:22 +0100)] 
tdb: allow transactions on on tdb's with TDB_MUTEX_LOCKING

There's no real reason to disallow transactions as the
allrecord lock is also available with mutexes enabled.

E.g. ctdbd requires transactions also on non-persistent databases
opened with TDB_CLEAR_IF_FIRST and TDB_MUTEX_LOCKING.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit d0839af9d60a6fdf0720cd0b1a859e0e2241903f)

10 years agoVERSION: Bump version up to 4.2.0rc4 and...
Karolin Seeger [Sat, 20 Dec 2014 15:04:41 +0000 (16:04 +0100)] 
VERSION: Bump version up to 4.2.0rc4 and...

re-enable git snapshots.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoVERSION: Disable git snapshots for the 4.2.0rc3 release. samba-4.2.0rc3
Karolin Seeger [Sat, 20 Dec 2014 15:00:30 +0000 (16:00 +0100)] 
VERSION: Disable git snapshots for the 4.2.0rc3 release.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoWHATSNEW: Add release notes for Samba 4.2.0rc3.
Karolin Seeger [Sat, 20 Dec 2014 13:32:26 +0000 (14:32 +0100)] 
WHATSNEW: Add release notes for Samba 4.2.0rc3.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agos3:passdb: let pdb_get_trust_credentials() try pdb_get_trusteddom_creds() first
Stefan Metzmacher [Tue, 16 Dec 2014 15:05:17 +0000 (15:05 +0000)] 
s3:passdb: let pdb_get_trust_credentials() try pdb_get_trusteddom_creds() first

NT_STATUS_NOT_IMPLEMENTED lets it fallback to the old get_trust_pw_clear2()
code.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Dec 18 06:46:05 CET 2014 on sn-devel-104

(cherry picked from commit 12aaafd2971ac71823ccbebda7b2afd689239770)

Autobuild-User(v4-2-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-2-test): Thu Dec 18 13:06:40 CET 2014 on sn-devel-104

10 years agos3:passdb: add optional get_trusteddom_creds() hooks
Stefan Metzmacher [Thu, 11 Dec 2014 10:52:53 +0000 (10:52 +0000)] 
s3:passdb: add optional get_trusteddom_creds() hooks

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 8e90b93ddceabd582cb28e40882036e7772608aa)

10 years agopdb: fix build issues with shared modules
Garming Sam [Wed, 3 Dec 2014 21:44:26 +0000 (10:44 +1300)] 
pdb: fix build issues with shared modules

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

Change-Id: I26e78b56ead0c66afcda6b3fb8b1fd09130b24a5
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
(cherry picked from commit 7a9147dab593a495c5ed5e1157ec8eb8a2809586)

10 years agos3:idmap_cache: remove unused idmap_cache_set_sid2[u|g]id()
Stefan Metzmacher [Sat, 29 Nov 2014 09:52:05 +0000 (10:52 +0100)] 
s3:idmap_cache: remove unused idmap_cache_set_sid2[u|g]id()

Change-Id: I40bcfacb812b0dac7917533c9baf82a79f598efd
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Autobuild-User(master): Garming Sam <garming@samba.org>
Autobuild-Date(master): Wed Dec  3 06:44:29 CET 2014 on sn-devel-104

(cherry picked from commit 816751a3a8ed564f2cf880fd1ca3b1e8f9c85471)

10 years agopdb: Increase version number to fix ABI
Garming Sam [Tue, 25 Nov 2014 01:56:45 +0000 (14:56 +1300)] 
pdb: Increase version number to fix ABI

In the process, we can also rename pdb to avoid conflicts with libpdb.

We don't depend directly on pdb to avoid duplicate symbols.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10355
Change-Id: I4df6ba2f4ce35d3718dc4198b527cca46a139efe
Pair-programmed-with: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 3b76b705f03b8f639ece2308afdc0962d230c42a)

10 years agoidmap: return the correct id type to *id_to_sid methods
Garming Sam [Wed, 26 Nov 2014 02:33:35 +0000 (15:33 +1300)] 
idmap: return the correct id type to *id_to_sid methods

We have a pointer to a unixid which is sent down instead of a uid or
gid. We can use this as an in-out variable so that pdb_samba_dsdb can be
returned ID_TYPE_BOTH to cache correctly instead of leaving it as
ID_TYPE_UID or ID_TYPE_GID.

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

Change-Id: I0cef2e419cbb337531244b7b41c708cf2ab883e3
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 58b343be4742b3ba1f447701a8254453c21af413)

10 years agoidmap: unify passdb *id_to_sid methods
Garming Sam [Tue, 25 Nov 2014 01:45:26 +0000 (14:45 +1300)] 
idmap: unify passdb *id_to_sid methods

Instead of passing down gid or uid, a pointer to a unixid is now sent
down. This acts as an in-out variable so that the idmap functions can
correctly receive ID_TYPE_BOTH, filling in cache details correctly
rather than forcing the cache to store ID_TYPE_UID or ID_TYPE_GID.

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

Change-Id: I11409a0f498e61a3c0a6ae606dd7af1135e6b066
Pair-programmed-with: Andrew Bartlett <abarlet@samba.org>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 7979c6cc50eaa792e5094866878c63df36e715c3)

10 years agos3:passdb: avoid invalid pointer type warnings in pdb_wbc_sam.c
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)] 
s3:passdb: avoid invalid pointer type warnings in pdb_wbc_sam.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 7ec8401f82994070eaaf81ff067c0cd0576d58e3)

10 years agos3:passdb: always copy the history in pdb_set_plaintext_passwd()
Stefan Metzmacher [Wed, 26 Feb 2014 19:16:26 +0000 (20:16 +0100)] 
s3:passdb: always copy the history in pdb_set_plaintext_passwd()

We should not write to memory marked as const
(returned from pdb_get_pw_history())!

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 966192ee16d6802da5c2b046d2488ddd1a7ec960)

10 years agopdb_tdb: Avoid a nasty error message with ctdb
Volker Lendecke [Tue, 11 Nov 2014 10:36:23 +0000 (10:36 +0000)] 
pdb_tdb: Avoid a nasty error message with ctdb

ctdb gives us 0-sized records for deleted passdb entries

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Nov 11 16:19:37 CET 2014 on sn-devel-104

(cherry picked from commit c2bda5bfae2cac4e473f2ae42775d2e35995c790)

10 years agopdb_tdb: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:28 +0000 (20:21 +0100)] 
pdb_tdb: don't leak state_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 6d5b8dd70e542840a96c45b916b1bd2b9685697f)

10 years agoaccount_pol: don't leak state_path onto talloc tos
David Disseldorp [Sun, 2 Nov 2014 19:21:27 +0000 (20:21 +0100)] 
account_pol: don't leak state_path onto talloc tos

Also check for allocation failures.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit f88535e56e23e27492851c0fc6e9a86cfdaab041)

10 years agopassdb: Use common code in cli_credentials_set_machine_account_db_ctx()
Andrew Bartlett [Thu, 2 Oct 2014 17:35:28 +0000 (06:35 +1300)] 
passdb: Use common code in cli_credentials_set_machine_account_db_ctx()

This avoids some duplication in setting the machine account passsword
for the domain member and DC case.

This does not yet remove the duplication, that requires a bigger
restructure of the various routines used here to obtain the machine
and domain trust secrets.

Also no longer used is the timeout/2 code to not set the previous
password.  It is now always passed to the caller.

Andrew Bartlett

Change-Id: Idd5bafedf4cbac30b174955d743ec4128a6902ee
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 37f5d822d636d4286bd8ee64c7e9e44ae1a297e1)

10 years agoauth/credentials: Ensure that we set the realm when reading secrets.tdb
Andrew Bartlett [Mon, 6 Oct 2014 00:51:25 +0000 (13:51 +1300)] 
auth/credentials: Ensure that we set the realm when reading secrets.tdb

Otherwise, we try and kinit as host$@DOMAIN and that will not work.

Andrew Bartlett

Change-Id: Id2fde673423e74dfa1e6ac48f47f49c61ee59779
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit e9dc6423d3f1ab3401314e134ecc574fc5d4c18b)

10 years agocredentials: Allow the secret.tdb handle to be passed in to cli_credentials_set_machi...
Andrew Bartlett [Thu, 2 Oct 2014 17:32:39 +0000 (06:32 +1300)] 
credentials: Allow the secret.tdb handle to be passed in to cli_credentials_set_machine_account()

This adds a new wrapper, cli_credentials_set_machine_account_db_ctx()

Andrew Bartlett

Change-Id: Ia2cceefede4ba9cf7f8de41986daf9372c19d997
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 35b8ed7710f60abcc70e0b070afc16bf3faef263)

10 years agocredentials: Improve error message on failure to set machine account password
Andrew Bartlett [Thu, 2 Oct 2014 16:14:56 +0000 (05:14 +1300)] 
credentials: Improve error message on failure to set machine account password

Change-Id: I4136067d6d0e5cfe92770a2e7efa39f4ebcb2aca
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 89daf5dc534ab03724a2622d3b6b4d6783756bae)

10 years agocredentials: Set secure_channel_type from secrets.tdb in cli_credentials_set_machine_...
Andrew Bartlett [Thu, 2 Oct 2014 16:14:21 +0000 (05:14 +1300)] 
credentials: Set secure_channel_type from secrets.tdb in cli_credentials_set_machine_account

This should ensure more parts of the source4 code can work with a
password set in secrets.tdb.

Andrew Bartlett

Change-Id: I4a890a719246b073898333d2e04841904c6e1a5d
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit adb3eb79ea828b6e6e1858c3d1b8b5ffe868f8ed)

10 years agos3:locking: fix uninitialiazed variable in brl_get_locks_readonly_parser()
Stefan Metzmacher [Wed, 17 Dec 2014 09:43:33 +0000 (10:43 +0100)] 
s3:locking: fix uninitialiazed variable in brl_get_locks_readonly_parser()

In a cluster this can be called with an empty record, while
brl_parse_data() relies on an initialized structure.

This is a regression in commit 837e29035c911f3509135252c3f423d0f56b606d.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 6bc41c459f6da7de62d2113590bc7d0c2d04e136)

10 years agoctdb-build: fix build without xsltproc
Björn Baumbach [Mon, 1 Dec 2014 12:28:13 +0000 (13:28 +0100)] 
ctdb-build: fix build without xsltproc

Check for XSLTPROC_MANPAGES before trying to build the docs.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 8d5f58120b6eeb73d1dc3c4df2ec6e12170888aa)

The last 4 patches address
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11014
Top level build does not install CTDB configuration files.

Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Wed Dec 17 23:45:20 CET 2014 on sn-devel-104