Karolin Seeger [Tue, 24 Feb 2015 18:52:24 +0000 (19:52 +0100)]
VERSION: Disable git snapshots for the 4.2.0rc5 release.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Karolin Seeger [Tue, 24 Feb 2015 18:24:32 +0000 (19:24 +0100)]
WHATSNEW: Add release notes for Samba 4.2.0rc5.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Andreas Schneider [Mon, 16 Feb 2015 09:59:23 +0000 (10:59 +0100)]
s3-netlogon: Make sure we do not deference a NULL pointer.
This is an additional patch for CVE-2015-0240.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11077#c32
Pair-Programmed-With: Michael Adam <obnox@samba.org>
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: Volker Lendecke <vl@samba.org>
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Mon Feb 23 23:07:35 CET 2015 on sn-devel-104
Jeremy Allison [Wed, 28 Jan 2015 22:47:31 +0000 (14:47 -0800)]
CVE-2015-0240: s3: netlogon: Ensure we don't call talloc_free on an uninitialized pointer.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11077
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Jeremy Allison [Fri, 20 Feb 2015 02:50:45 +0000 (18:50 -0800)]
s3: smbd: SMB2 close. If a file has delete on close, store the return info before deleting.
If we delete the file on close, the stat after the close
will fail so we fail to return the attributes requested.
Bug 11104 - SMB2/SMB3 close response does not include attributes when requested.
https://bugzilla.samba.org/show_bug.cgi?id=11104
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Steve French <sfrench@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Feb 20 20:54:18 CET 2015 on sn-devel-104
(cherry picked from commit
a6008b2de7b2974073f38a1df88aacc27d3c6f57)
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Sun Feb 22 16:41:21 CET 2015 on sn-devel-104
Jeremy Allison [Fri, 20 Feb 2015 02:49:03 +0000 (18:49 -0800)]
s3: smbd: SMB2 close. Call utility function setup_close_full_information()
Replaces existing inline code.
Bug 11104 - SMB2/SMB3 close response does not include attributes when requested.
https://bugzilla.samba.org/show_bug.cgi?id=11104
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Steve French <sfrench@samba.org>
(cherry picked from commit
4a8c6988e349a4f714f3052ebf3f96f801d3c11f)
Jeremy Allison [Fri, 20 Feb 2015 02:46:55 +0000 (18:46 -0800)]
s3: smbd: SMB2 close. Add utility function setup_close_full_information()
Not yet used.
Bug 11104 - SMB2/SMB3 close response does not include attributes when requested.
https://bugzilla.samba.org/show_bug.cgi?id=11104
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Steve French <sfrench@samba.org>
(cherry picked from commit
2ccfdf760e4adcf25d59c629c9d6d6b31a10a9f1)
Jeremy Allison [Wed, 18 Feb 2015 19:51:53 +0000 (11:51 -0800)]
s4: smbtorture: leases - show stat opens grant leases and can be broken.
https://bugzilla.samba.org/show_bug.cgi?id=11102
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Feb 19 23:10:43 CET 2015 on sn-devel-104
(cherry picked from commit
75dff778c5f13c008419cf292d2ea73cf3a33d7b)
Jeremy Allison [Wed, 18 Feb 2015 19:49:27 +0000 (11:49 -0800)]
s3: smbd: leases - losen paranoia check. Stat opens can grant leases.
https://bugzilla.samba.org/show_bug.cgi?id=11102
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
(cherry picked from commit
cec2a38e971ac83260f3a9a5c4ac7095f8d23d65)
Jeremy Allison [Wed, 18 Feb 2015 19:48:31 +0000 (11:48 -0800)]
s3: smbd: leases - new torture test shows stat opens can get leases.
Can also issue breaks on these leases.
https://bugzilla.samba.org/show_bug.cgi?id=11102
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
(cherry picked from commit
2d3db5e7930af9dd2a70727b2f2828bd73a1ec3b)
Marc Muehlfeld [Sat, 31 Jan 2015 18:44:26 +0000 (19:44 +0100)]
samba-tool: Create NIS enabled users and unixHomeDirectory attribute
Allow to create NIS enabled user accounts via 'samba-tool user add'.
To create NIS enabled accounts, the parameters
--uid-number=, --login-shell=, --unix-home=, --gid-number=
are mandatory. Because we didn't had a parameter to set unixHomeDirectory
yet, this patch also adds this feature.
'unixUserPassword: ABCD!efgh12345$67890' is added by default, when you
enable NIS on an account in ADUC. The same we do in samba-tool.
See: https://bugzilla.samba.org/show_bug.cgi?id=10909
Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Autobuild-User(master): Marc Muehlfeld <mmuehlfeld@samba.org>
Autobuild-Date(master): Tue Feb 3 17:18:32 CET 2015 on sn-devel-104
(cherry picked from commit
362cac25a744d2d5c6e01495d341969b863d7f12)
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Sat Feb 21 22:44:33 CET 2015 on sn-devel-104
Jeremy Allison [Tue, 10 Feb 2015 17:32:11 +0000 (09:32 -0800)]
s3: smbclient: Allinfo leaves the file handle open.
https://bugzilla.samba.org/show_bug.cgi?id=11094
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): Tue Feb 10 23:28:46 CET 2015 on sn-devel-104
(cherry picked from commit
080ec0f7d9735b27138deb5f91a397935f089f02)
David Disseldorp [Tue, 3 Feb 2015 18:26:42 +0000 (19:26 +0100)]
printing/cups: pack requested-attributes with IPP_TAG_KEYWORD
The CUPS IPP_GET_JOBS requested-attributes array indicates which job
attributes the caller would like in the cupsd response.
Until now, Samba has packed these attributes with a IPP_TAG_NAME
format tag. In recent versions of CUPS, this results in the IPP_GET_JOBS
response only including the job-id and job-printer-uri fields, even with
JobPrivateValues=none configured.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10808
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): Tue Feb 10 01:38:58 CET 2015 on sn-devel-104
(cherry picked from commit
2f4998113e539ea4ba6fb0a72ba6ac25c9d74bd6)
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Wed Feb 11 23:30:21 CET 2015 on sn-devel-104
Stefan Metzmacher [Thu, 29 Jan 2015 09:12:30 +0000 (10:12 +0100)]
s3:smb2_server: protect against integer wrap with "smb2 max credits = 65535"
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9702
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jan 29 14:58:40 CET 2015 on sn-devel-104
(cherry picked from commit
8aed0fc38ae28cce7fd1a443844a865265fc719c)
Autobuild-User(v4-2-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-2-test): Sun Feb 1 12:39:51 CET 2015 on sn-devel-104
Stefan Metzmacher [Wed, 28 Jan 2015 14:22:30 +0000 (15:22 +0100)]
s3:smb2_server: always try to grant the credits the client just consumed
It turns out that the effective credits_requested is always at least 1,
even if the client sends credits_requested == 0.
This means the client is not able to reduce the amount of credits
itself.
Without this fix a client (e.g. Windows7) would reach the case
where it has been granted all credits it asked for.
When copying a large file with a lot of parallel requests,
all these requests have credits_requested == 0.
This means the amount of granted credits where reduced by each
request and only when the granted credits reached 0,
the server granted one credit to allow the client to go on.
The client might require more than one credit ([MS-SMB2] says
Windows clients require at least 4 credits) and freezes
with just 1 credit.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9702
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
1944c857e59922a2ebfc88a6a824a6ed9396f2d5)
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
(cherry picked from commit
47155641cb48d39d3ee7d8b8962f5ed6b23617d4)
Autobuild-User(v4-2-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-2-test): Tue Jan 27 13:22:33 CET 2015 on sn-devel-104
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>
(cherry picked from commit
4da20e2e31790ca54f17b4a6039c24b7b502ac5f)
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>
(cherry picked from commit
85a30cc44070b09de963961ccfa3d7c40144317b)
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>
(cherry picked from commit
7668e457a6463fb2c1d7499659f37d10ca322190)
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
(cherry picked from commit
115eb94215f4d9c73d05606de2ad978f6b48d07f)
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>
(cherry picked from commit
9f2979a1a42f4714bdc49d09e4b5094333409834)
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>
(cherry picked from commit
ffff95d421e3ca7fa31ec668a2e8fc7fdaee05df)
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>
(cherry picked from commit
d7bd51a79d0784d3db809c0c5e82193f79799dc3)
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>
(cherry picked from commit
a6bda1f2bc85779feb9680bc74821da5ccd401c5)
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>
(cherry picked from commit
707dc16987c982b75c83cd5b06d4373c23e777e0)
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>
(cherry picked from commit
dc808a466ef835535a3d4bb87f19316eeff1c567)
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>
(cherry picked from commit
d744c7c080d81121b84a592a95761e03c2a1090c)
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>
(cherry picked from commit
46fdd6221e9c64b459e0d05e6d02d89deb8dafb5)
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>
(cherry picked from commit
52eb8854ff8535577c9282f8e4133875fbb0ed33)
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>
(cherry picked from commit
4683fc0f1dc5af3bcf81edaebfbd6c8d3b38df9e)
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>
(cherry picked from commit
208be32c6a9b275c507fb5e3334b832a3cb9578a)
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>
(cherry picked from commit
0f4ce418ae1410a294aa6e629beea68c6a16aff8)
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>
(cherry picked from commit
7a3dc668528f398458851aca5d27ff789414343a)
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>
(cherry picked from commit
ab4b988ba2ba85ec2bfb01d7711d6870b3e0f710)
Ralph Boehme [Thu, 18 Dec 2014 05:37:28 +0000 (06:37 +0100)]
wafsamba: check for rpath compiler/linker flags
Older SunOS linker only support -Wl,-R,/path instead of -Wl,-rpath,/path.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Ralph Boehme <slow@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit
89cc31f5cf9181f04f3ca1a5f7000ee15a74e86e)
Stefan Metzmacher [Thu, 18 Dec 2014 14:05:12 +0000 (15:05 +0100)]
wafsamba: fill PRIVATE_NAME() logic again
We append bld.env.PRIVATE_EXTENSION to the name of private libraries
again, but only unless they have a abi_directory, vnum or soname defined.
This avoids naming conflicts with system libraries, e.g. libidmap.so
on Solaris
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10112
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit
76fdcf5c15bd904c3686f0c2dd93d27486c61ca4)
Stefan Metzmacher [Fri, 7 Nov 2014 08:36:16 +0000 (09:36 +0100)]
wafsamba: add -Werror=return-type for developer builds
This avoids errors like this:
../source3/utils/status.c: In function ‘print_share_mode’:
../source3/utils/status.c:126:3: error: ‘return’ with no value, in function
returning non-void [-Werror=return-type]
return;
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit
6ff9388172909ce249fd6254703eee707d821731)
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)
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)
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
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)
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)
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)
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)
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)
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)
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)
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)
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
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)
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)
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)
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)
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)
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)
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.
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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]
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)
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
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
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
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
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
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
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
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
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
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)
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)
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)
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)
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)
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)
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)
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)
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
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>
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>
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>
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>
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>
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>
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
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)
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)
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>
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)
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)
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)
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)