samba.git
10 years agoVERSION: Bump version up to 3.6.22. v3-6-test
Karolin Seeger [Fri, 29 Nov 2013 08:55:15 +0000 (09:55 +0100)]
VERSION: Bump version up to 3.6.22.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoWHATSNEW: Add release notes for Samba 3.6.21.
Karolin Seeger [Thu, 28 Nov 2013 09:40:40 +0000 (10:40 +0100)]
WHATSNEW: Add release notes for Samba 3.6.21.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agospoolss: accept XPS_PASS datatype used by Windows 8
Arvid Requate [Thu, 21 Nov 2013 11:35:20 +0000 (12:35 +0100)]
spoolss: accept XPS_PASS datatype used by Windows 8

The new v4 driver model used in Windows 8 declares print jobs
intended to bypass the XPS processing layer by setting datatype to
"XPS_PASS" instead of "RAW".

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

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

10 years agoxattr: fix listing EAs on *BSD for non-root users
Jeremy Allison [Tue, 12 Nov 2013 20:17:26 +0000 (12:17 -0800)]
xattr: fix listing EAs on *BSD for non-root users

Thanks to Stefan Rompf for reporting.

This fixes bug #10247

Back-ported to 3.6.next from master commit 374b2cfde74e0c61f4b2da724b30d0e430596092

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoVERSION: Bump version up to 3.6.21.
Karolin Seeger [Mon, 11 Nov 2013 10:53:00 +0000 (11:53 +0100)]
VERSION: Bump version up to 3.6.21.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoWHATSNEW: Add release notes for Samba 3.6.20.
Karolin Seeger [Thu, 7 Nov 2013 11:49:34 +0000 (12:49 +0100)]
WHATSNEW: Add release notes for Samba 3.6.20.

Bug 10235 - CVE-2013-4475: No access check verification on stream files.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
(cherry picked from commit 12598a76c0330ea1067c4b11b295ab3473e93f15)

10 years agoFix bug #10229 - No access check verification on stream files.
Jeremy Allison [Thu, 31 Oct 2013 20:48:42 +0000 (13:48 -0700)]
Fix bug #10229 - No access check verification on stream files.

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

We need to check if the requested access mask
could be used to open the underlying file (if
it existed), as we're passing in zero for the
access mask to the base filename.

Signed-off-by: Jeremy Allison <jra@samba.org>
Fix Bug #10235 - CVE-2013-4475: No access check verification on stream files.
https://bugzilla.samba.org/show_bug.cgi?id=10235
(cherry picked from commit 14d48130870579541c07f5a0f64638e635ddce95)

10 years agoFix bug #10118 - Samba is chatty about being unable to open a printer.
Korobkin [Tue, 29 Oct 2013 10:25:12 +0000 (11:25 +0100)]
Fix bug #10118 - Samba is chatty about being unable to open a printer.

10 years agonsswitch: Fix short writes in winbind_write_sock
Volker Lendecke [Tue, 15 Oct 2013 08:23:10 +0000 (08:23 +0000)]
nsswitch: Fix short writes in winbind_write_sock

We set the socket to nonblocking and don't handle EAGAIN right. We do
a poll anyway, so wait for writability, which should fix this.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10195
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit c6909887c26d4e827633acd50b11cf08c6aee0f7)
Signed-off-by: Andreas Schneider <asn@samba.org>
10 years agos3-winbind: Send online/offline message of the domain to the parent.
Andreas Schneider [Thu, 10 Oct 2013 08:03:32 +0000 (10:03 +0200)]
s3-winbind: Send online/offline message of the domain to the parent.

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

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Oct 11 13:37:56 CEST 2013 on sn-devel-104

(cherry picked from commit 275f6586c4d4547978c6ff2f04670b0d8f89fd4b)

10 years agos3-winbind: Register handlers for domain online/offline messages.
Andreas Schneider [Thu, 10 Oct 2013 08:02:27 +0000 (10:02 +0200)]
s3-winbind: Register handlers for domain online/offline messages.

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

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

10 years agos3-winbind: Add functions for domain online/offline handling.
Andreas Schneider [Thu, 10 Oct 2013 08:01:40 +0000 (10:01 +0200)]
s3-winbind: Add functions for domain online/offline handling.

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

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

10 years agoidl: Add a new message for winbind domain states.
Andreas Schneider [Thu, 10 Oct 2013 07:15:57 +0000 (09:15 +0200)]
idl: Add a new message for winbind domain states.

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

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

10 years agoFix bug #10187 - Missing talloc_free can leak stackframe in error path.
Jeremy Allison [Tue, 8 Oct 2013 22:01:38 +0000 (15:01 -0700)]
Fix bug #10187 - Missing talloc_free can leak stackframe in error path.

Fix error path.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Oct  9 03:50:56 CEST 2013 on sn-devel-104

10 years agoFix is_legal_name() to not emit character conversion error messages.
Jeremy Allison [Thu, 12 Sep 2013 21:44:58 +0000 (14:44 -0700)]
Fix is_legal_name() to not emit character conversion error messages.

Using next_codepoint() does the same check, but without the conversion
message.

Signed-off-by: Jeremy Allison <jra@samba.org>
Fix bug #10139 - valid utf8 filenames cause "invalid conversion error" messages.

10 years agos3: smb2 server - fix bug 10167 smb2 breaks "smb encryption = mandatory
Jeremy Allison [Thu, 26 Sep 2013 09:55:19 +0000 (02:55 -0700)]
s3: smb2 server - fix bug 10167 smb2 breaks "smb encryption = mandatory

Refuse an SMB2 tcon on a share wher eencryption is required.
SMB2 doesn't support this.

Signed-off-by: Jeremy Allison <jra@samba.org>
10 years agoWHATSNEW: Start release notes for Samba 3.6.20.
Karolin Seeger [Wed, 2 Oct 2013 07:18:08 +0000 (09:18 +0200)]
WHATSNEW: Start release notes for Samba 3.6.20.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoVERSION: Bump version up to 3.6.20.
Karolin Seeger [Wed, 2 Oct 2013 07:12:42 +0000 (09:12 +0200)]
VERSION: Bump version up to 3.6.20.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoWHATSNEW: Prepare release notes for Samba 3.6.19.
Karolin Seeger [Wed, 18 Sep 2013 08:40:16 +0000 (10:40 +0200)]
WHATSNEW: Prepare release notes for Samba 3.6.19.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agos3:libnet increase timeout for machine password change
Christian Ambach [Tue, 5 Mar 2013 10:44:03 +0000 (11:44 +0100)]
s3:libnet increase timeout for machine password change

DCs might run password filter modules that can delay the setting of
the machine password for a significant amount of time
use the same timeout as in the other paths of domain join
(e.g. rpccli_netlogon_set_trust_password)

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit 9755541ed156d71df98607375ee3b925266c3c74)

The last 2 patches address bug #8955 - NetrServerPasswordSet2 timeout is too
short.

10 years agos3: Give machine password changes 10 minutes of time
Volker Lendecke [Fri, 22 Jun 2012 12:26:45 +0000 (14:26 +0200)]
s3: Give machine password changes 10 minutes of time

This is what we do at domain join time as well, see
lib/netapi/joindomain.c:141

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit b9a15f1bfad30a824f9ec87bc9f7c65adf50dae0)

10 years agos3-serverid: call serverid_init_readonly() from commandline tools.
Günther Deschner [Fri, 6 Sep 2013 16:08:45 +0000 (18:08 +0200)]
s3-serverid: call serverid_init_readonly() from commandline tools.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
The last 4 patches are follow-up patches for bug #10127 - smbstatus stopped
working as non-root user.

10 years agos3-serverid: add a readonly variant of the serverid init code.
Günther Deschner [Fri, 6 Sep 2013 15:44:49 +0000 (17:44 +0200)]
s3-serverid: add a readonly variant of the serverid init code.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
10 years agos3-serverid: restructure serverid initialization.
Günther Deschner [Fri, 6 Sep 2013 15:43:50 +0000 (17:43 +0200)]
s3-serverid: restructure serverid initialization.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
10 years agos3-sessionid: move sessionid init call to the only function where it is needed.
Günther Deschner [Fri, 6 Sep 2013 16:08:23 +0000 (18:08 +0200)]
s3-sessionid: move sessionid init call to the only function where it is needed.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
10 years agos3-sessionid: use sessionid_init_readonly() from cmdline tools.
Günther Deschner [Wed, 4 Sep 2013 14:57:17 +0000 (16:57 +0200)]
s3-sessionid: use sessionid_init_readonly() from cmdline tools.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
The last 3 patches address bug #10127 - smbstatus stopped working as non-root
user.

10 years agos3-sessionid: change session_db_ctx() to always return the session_id_ctx pointer.
Günther Deschner [Wed, 4 Sep 2013 14:55:11 +0000 (16:55 +0200)]
s3-sessionid: change session_db_ctx() to always return the session_id_ctx pointer.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
10 years agos3-sessionid: make sure to call sessionid_init() also from the cmdline tools.
Günther Deschner [Wed, 4 Sep 2013 14:45:32 +0000 (16:45 +0200)]
s3-sessionid: make sure to call sessionid_init() also from the cmdline tools.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
10 years agoOptimization. Don't do the retry logic if sitename_fetch() returned NULL, we already...
Jeremy Allison [Tue, 3 Sep 2013 21:07:43 +0000 (14:07 -0700)]
Optimization. Don't do the retry logic if sitename_fetch() returned NULL, we already did a NULL query.

Bug 5917 - Samba does not work on site with Read Only Domain Controller

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Sep  4 01:19:05 CEST 2013 on sn-devel-104

(cherry picked from commit bdab6f9431715fbfd28f8cc0dfb4dde2966f22f3)

10 years agoMove the retry logic when site_name is passed in a NULL or "" to the wrapper function.
Jeremy Allison [Tue, 3 Sep 2013 19:20:52 +0000 (12:20 -0700)]
Move the retry logic when site_name is passed in a NULL or "" to the wrapper function.

Bug 5917 - Samba does not work on site with Read Only Domain Controller

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
(cherry picked from commit 68e7b1c9446c7d1274b0fb85b59b90ac1a7f6041)

10 years agoMove the manipulation of site_name into the caller function dsgetdcname().
Jeremy Allison [Tue, 3 Sep 2013 19:08:46 +0000 (12:08 -0700)]
Move the manipulation of site_name into the caller function dsgetdcname().

Leave dsgetdcname_internal() only using const char *site_name.

Bug 5917 - Samba does not work on site with Read Only Domain Controller

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
(cherry picked from commit 181c11066bd53b07015a199f56eb71182e89ff71)

10 years agoRefactor dsgetdcname to be called via a wrapper function.
Jeremy Allison [Tue, 3 Sep 2013 19:04:37 +0000 (12:04 -0700)]
Refactor dsgetdcname to be called via a wrapper function.

Bug 5917 - Samba does not work on site with Read Only Domain Controller

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
(cherry picked from commit 66006be7ef703b2935334633d27641050cee5f58)

10 years agodsgetdcname_cache_fetch() doesn't use the site_name parameter so don't pass it.
Jeremy Allison [Tue, 3 Sep 2013 19:13:45 +0000 (12:13 -0700)]
dsgetdcname_cache_fetch() doesn't use the site_name parameter so don't pass it.

Bug 5917 - Samba does not work on site with Read Only Domain Controller

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Richard Sharpe <rsharpe@samba.org>
(cherry picked from commit dd12bfbcbf359c1642cc2e968aec62ae904aad5d)

10 years agosmbd: Correctly return INFO_LENGTH_MISMATCH for smb1
Volker Lendecke [Tue, 27 Aug 2013 09:40:19 +0000 (09:40 +0000)]
smbd: Correctly return INFO_LENGTH_MISMATCH for smb1

This is required if the client offered less buffer than the fixed portion
of the info level data requires

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10106
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 1b1935b876a14154ef74e447bf53eb7cd0a5dde9)

10 years agosmbd: Fix error return for STREAM_INFO
Volker Lendecke [Tue, 27 Aug 2013 09:39:17 +0000 (09:39 +0000)]
smbd: Fix error return for STREAM_INFO

The stream_info marshalling follows its own rules. This needs unifying
eventually...

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10106
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 5634f240fd4273cb7327111140ccbea0fd41e3fc)

10 years agosmbd: Revert a93f9c3
Volker Lendecke [Tue, 27 Aug 2013 09:38:29 +0000 (09:38 +0000)]
smbd: Revert a93f9c3

This was too broad and has been replaced by finer-grained error checks

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10106
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit b37edda32930fec372d6467d442f67532c3fbd33)

10 years agosmbd: Correctly return BUFFER_OVERFLOW in smb2_getinfo
Volker Lendecke [Tue, 27 Aug 2013 09:37:34 +0000 (09:37 +0000)]
smbd: Correctly return BUFFER_OVERFLOW in smb2_getinfo

Also, don't overflow the client buffer

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10106
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 40f60024ca19e33cbbe9825b42692f386a8f1dd9)

10 years agosmbd: Correctly return INFO_LENGTH_MISMATCH in smb2_getinfo
Volker Lendecke [Tue, 27 Aug 2013 09:36:03 +0000 (09:36 +0000)]
smbd: Correctly return INFO_LENGTH_MISMATCH in smb2_getinfo

We have to return this error if the client offered less than the fixed
portion of the infolevel data requires

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10106
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 91939614760837b2ac2c6bb8b5daac108a4f4670)

10 years agosmbd: qfsinfo has fixed/variable buffers
Volker Lendecke [Tue, 27 Aug 2013 09:06:27 +0000 (09:06 +0000)]
smbd: qfsinfo has fixed/variable buffers

The error message will have to change depending whether the buffer is
too small for the fixed or variable buffers

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10106
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit ac41df91a5a425633fc716ca02187e753879d795)

10 years agosmbd: qfilepathinfo has fixed/variable buffers
Volker Lendecke [Tue, 27 Aug 2013 09:06:27 +0000 (09:06 +0000)]
smbd: qfilepathinfo has fixed/variable buffers

The error message will have to change depending whether the buffer is
too small for the fixed or variable buffers

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10106
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 53123996033594f68a3fc9037474aada3aef0750)

10 years agosmbd: Use #defines in smb2_getinfo_send
Volker Lendecke [Mon, 26 Aug 2013 08:36:14 +0000 (08:36 +0000)]
smbd: Use #defines in smb2_getinfo_send

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 Aug 27 15:08:08 CEST 2013 on sn-devel-104

(cherry picked from commit 323cccd35d06c7327c19dc5cb891043507624d7d)

10 years agos3:smbd: allow info class SMB_QUERY_FS_ATTRIBUTE_INFO to return partial data
Ralph Wuerthner [Wed, 10 Jul 2013 14:43:39 +0000 (16:43 +0200)]
s3:smbd: allow info class SMB_QUERY_FS_ATTRIBUTE_INFO to return partial data

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
(cherry picked from commit 270d29a743a030653037cb176f3764bec3c79b6c)

10 years agos3:smbd: allow info class SMB_QUERY_FS_VOLUME_INFO to return partial data
Ralph Wuerthner [Wed, 10 Jul 2013 13:52:06 +0000 (15:52 +0200)]
s3:smbd: allow info class SMB_QUERY_FS_VOLUME_INFO to return partial data

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
(cherry picked from commit ec46f6b91941e38dd92f8e0fb0f278592e3157b6)

10 years agos3:smbd: allow status code in smbd_do_qfsinfo() to be set by information class handler
Ralph Wuerthner [Fri, 5 Jul 2013 09:32:27 +0000 (11:32 +0200)]
s3:smbd: allow status code in smbd_do_qfsinfo() to be set by information class handler

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
(cherry picked from commit 616777f029e462f53c5118d79de8c6405a5fb7c1)

10 years agos3:smbd: allow GetInfo responses with STATUS_BUFFER_OVERFLOW to return partial, but...
Ralph Wuerthner [Fri, 5 Jul 2013 09:03:16 +0000 (11:03 +0200)]
s3:smbd: allow GetInfo responses with STATUS_BUFFER_OVERFLOW to return partial, but valid data

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
(cherry picked from commit a91d2b05bab329a8a9772c2c79a3b1e02933182e)

10 years agos3:smbd: return NT_STATUS_INFO_LENGTH_MISMATCH for GetInfo in case output_buffer_leng...
Ralph Wuerthner [Wed, 10 Jul 2013 06:59:58 +0000 (08:59 +0200)]
s3:smbd: return NT_STATUS_INFO_LENGTH_MISMATCH for GetInfo in case output_buffer_length is too small

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
(cherry picked from commit a93f9c3d33e442c84d0c9da7eb5d25ca4b54fc33)

10 years agosmbd: Simplify dropbox special case in unix_convert
Volker Lendecke [Wed, 28 Aug 2013 22:42:22 +0000 (15:42 -0700)]
smbd: Simplify dropbox special case in unix_convert

EACCESS needs special treatment: If we want to create a fresh file,
return OBJECT_PATH_NOT_FOUND, so that the client will continue creating
the file. If the client wants us to open a potentially existing file,
we need to correctly return ACCESS_DENIED.

This patch makes this behaviour hopefully a bit clearer than the code
before did.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
The last 2 patches address bug #10114 - Dropbox (write-only-directory) case
isn't handled correctly in pathname lookup.

10 years agosmbd: Fix a profile problem
Volker Lendecke [Wed, 28 Aug 2013 22:39:41 +0000 (15:39 -0700)]
smbd: Fix a profile problem

When trying to read a profile, under certain circumstances Windows tries
to read with its machine account first. The profile previously written
was stored with an ACL that only allows access for the user and not
the machine. Windows should get an NT_STATUS_ACCESS_DENIED when using
the machine account, making it retry with the user account (which would
then succeed).

Samba under these circumstances erroneously gives
NT_STATUS_OBJECT_PATH_NOT_FOUND, which makes Windows give up and not
retry. The reasons is the "dropbox" patch in unix_convert, turning EACCESS
on the last path component to OBJECT_PATH_NOT_FOUND. This patch makes
the dropbox behaviour only kick in when we are creating a file. I think
this is an abstraction violation. unix_convert() should not have to know
about the create_disposition, but given that we have pathname resolution
separated from the core open code right now this is the best we can do.

Signed-off-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3-winbindd: fix fallback to ncacn_np in cm_connect_lsat().
Günther Deschner [Mon, 12 Aug 2013 15:23:12 +0000 (17:23 +0200)]
s3-winbindd: fix fallback to ncacn_np in cm_connect_lsat().

Fallback to lsa named-pipe connection when tcp connection has failed twice (it
could be a trusted domain connection where we cannot setup a secure channel).

Guenther

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

Signed-off-by: Günther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Tested-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Aug 13 20:55:33 CEST 2013 on sn-devel-104

10 years agoFix bug #10097 - MacOSX 10.9 will not follow path-based DFS referrals handed out...
Richard Sharpe [Mon, 19 Aug 2013 20:14:55 +0000 (13:14 -0700)]
Fix bug #10097 - MacOSX 10.9 will not follow path-based DFS referrals handed out by Samba.

Windows overloads the EA Length field in the DIRECTORY INFO leves of FIND FIRST/FIND NEXT.

This field indicates either the REPARSE_TAG if the file/folder has a reparse proint or
the EA Length if it has EAs, and is the fundamental reason you cannot have both on a
file or folder.

Signed-off-by: Richard Sharpe <rsharpe@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agodocs: Fix variable list in man vfs_crossrename.
Karolin Seeger [Tue, 13 Aug 2013 09:04:50 +0000 (11:04 +0200)]
docs: Fix variable list in man vfs_crossrename.

The varlist entries need a paragraph, otherwise the list is broken and the list
entries end with ".RE".

Fix bug #10076 - varlist in man vfs_crossrename broken.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 20 04:19:42 CEST 2013 on sn-devel-104
(cherry picked from commit 1808316b1245290fd4a4aa87a801410899e4c1e3)

10 years agos3-libads: Print a message if no realm has been specified.
Andreas Schneider [Mon, 5 Aug 2013 07:25:11 +0000 (09:25 +0200)]
s3-libads: Print a message if no realm has been specified.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Aug  5 12:24:44 CEST 2013 on sn-devel-104

(cherry picked from commit 6659f0164c6b8d7ad522bcd6c2c6748c3d9bca81)

The last 2 patches address bug #10073 - net ads join - segmentation fault in
create_local_private_krb5_conf_for_domain.

10 years agos3-libads: Fail create_local_private_krb5_conf_for_domain() if parameters missing.
Günther Deschner [Fri, 17 May 2013 13:14:35 +0000 (15:14 +0200)]
s3-libads: Fail create_local_private_krb5_conf_for_domain() if parameters missing.

Guenther

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

10 years agos3-winbind: Do not delete an existing valid credential cache.
Andreas Schneider [Thu, 11 Jul 2013 11:44:53 +0000 (13:44 +0200)]
s3-winbind: Do not delete an existing valid credential cache.

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

Thanks to David Woodhouse <dwmw2@infradead.org>.

Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jul 15 12:48:46 CEST 2013 on sn-devel-104

(cherry picked from commit 0529b59fbe3f96509893fc4e93a75d6928b5a532)

10 years agoWHATWNEW: Start release notes for Samba 3.6.19.
Karolin Seeger [Wed, 14 Aug 2013 07:56:58 +0000 (09:56 +0200)]
WHATWNEW: Start release notes for Samba 3.6.19.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoVERSION: Bump version up to 3.6.19.
Karolin Seeger [Wed, 14 Aug 2013 07:52:57 +0000 (09:52 +0200)]
VERSION: Bump version up to 3.6.19.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoWHATSNEW: Prepare release notes for Samba 3.6.18.
Karolin Seeger [Mon, 12 Aug 2013 07:20:38 +0000 (09:20 +0200)]
WHATSNEW: Prepare release notes for Samba 3.6.18.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoEnsure gpfs kernel leases are wrapped in a become_root()/unbecome_root() pair.
Ralph Wuerthner [Wed, 31 Jul 2013 23:33:48 +0000 (16:33 -0700)]
Ensure gpfs kernel leases are wrapped in a become_root()/unbecome_root() pair.

Ensures correct lease owner for signal delivery.

Signed-off-by: Ralph Wuerthner <ralphw@de.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Aug  1 03:57:11 CEST 2013 on sn-devel-104

The last 2 patches address bug #10064 - Linux kernel oplock breaks can miss
signals.

10 years agoWrap setting leases in become_root()/unbecome_root() to ensure correct delivery of...
Jeremy Allison [Wed, 31 Jul 2013 23:32:20 +0000 (16:32 -0700)]
Wrap setting leases in become_root()/unbecome_root() to ensure correct delivery of signals.

Remove workaround for Linux kernel bug https://bugzilla.kernel.org/show_bug.cgi?id=43336
as we don't need to set capabilities when we're already root.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
10 years agoFix bug 9678 - Windows 8 Roaming profiles fail
Gregor Beck [Thu, 1 Aug 2013 12:16:24 +0000 (14:16 +0200)]
Fix bug 9678 - Windows 8 Roaming profiles fail

Windows 8 tries to set 'ATTRIBUTE_SECURITY_INFORMATION' on some
dirs. Ignoring it makes roaming profiles work again.
Just like w2k3 gracefully ignore all the other bits.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
10 years agosecurity.idl: add new security_secinfo bits
Gregor Beck [Wed, 31 Jul 2013 13:28:51 +0000 (15:28 +0200)]
security.idl: add new security_secinfo bits

[MS-DTYP].pdf 2.4.7

Signed-off-by: Gregor Beck <gbeck@sernet.de>
10 years agoWHATSNEW: Start release notes for Samba 3.6.18.
Karolin Seeger [Mon, 5 Aug 2013 10:46:58 +0000 (12:46 +0200)]
WHATSNEW: Start release notes for Samba 3.6.18.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoVERSION: Bump version number up to 3.6.18.
Karolin Seeger [Mon, 5 Aug 2013 10:44:46 +0000 (12:44 +0200)]
VERSION: Bump version number up to 3.6.18.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoWHATSNEW: Add release notes for Samba 3.6.17.
Karolin Seeger [Mon, 29 Jul 2013 18:55:18 +0000 (20:55 +0200)]
WHATSNEW: Add release notes for Samba 3.6.17.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
(cherry picked from commit e03ad1401fd1cca54f9f5c4c1e98ec9ad87b5565)

10 years agoFix bug #10010 - Missing integer wrap protection in EA list reading can cause server...
Jeremy Allison [Thu, 11 Jul 2013 00:10:17 +0000 (17:10 -0700)]
Fix bug #10010 - Missing integer wrap protection in EA list reading can cause server to loop with DOS.

Ensure we never wrap whilst adding client provided input.
CVE-2013-4124

Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit efdbcabbe97a594572d71d714d258a5854c5d8ce)

10 years agobuild:autoconf: fix output of syslog-facility check
Björn Jacke [Wed, 20 Feb 2013 18:57:24 +0000 (19:57 +0100)]
build:autoconf: fix output of syslog-facility check

thanks to Thomas Bork for reporting!

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Fix bug #9983 - configure and syslog facility and disk-quotas support.

10 years agoPIDL: fix parsing linemarkers in preprocessor output
Alexander Bokovoy [Wed, 6 Feb 2013 08:17:57 +0000 (10:17 +0200)]
PIDL: fix parsing linemarkers in preprocessor output

When PIDL calls out to C preprocessor to expand IDL files
and parse the output, it filters out linemarkers and line control
information as described in http://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html
and http://gcc.gnu.org/onlinedocs/cpp/Line-Control.html#Line-Control

With gcc 4.8 stdc-predef.h is included automatically and linemarker for the
file has extended flags that PIDL couldn't parse ('system header that needs to
be extern "C" protected for C++')

Thanks to Jakub Jelinek <jakub@redhat.com> for explanation of the linemarker format.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=906517

Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 6ba7ab5c14801aecae96373d5a9db7ab82957526)

Signed-off-by: Andreas Schneider <asn@samba.org>
Fix bug #9636 - pidl can't parse new linemarkers in preprocessor output.
(cherry picked from commit 643571470f2e4cd2f58bd60ac7189abb826d33cc)

10 years agolibreplace: add a missing "eval" to the AC_VERIFY_C_PROTOTYPE macro
Michael Adam [Fri, 14 Oct 2011 12:05:09 +0000 (14:05 +0200)]
libreplace: add a missing "eval" to the AC_VERIFY_C_PROTOTYPE macro

Without this eval, upon test success the corresponding actions
(like defining corresponding variables) are not taken.

Found by Timur I. Bakeyev, and based on his patch for 3.5.
(cherry picked from commit 0ef506d4f31d206c300e4f3f326edac2b60bdc15)

10 years agodocs: mention AD prerequirements for using idmap_ad
Björn Jacke [Wed, 15 May 2013 13:52:25 +0000 (15:52 +0200)]
docs: mention AD prerequirements for using idmap_ad

Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit c3057f69a274f0d8e0e66183bd5e8be7703b6750)

Reviewed-by: David Disseldorp <ddiss@samba.org>
The last 2 patches address bug #9880 - Use of wrong RFC2307 primary group field.

10 years agowinbind/idmap_ad: be verbose about the user that we fail to map
Björn Jacke [Tue, 14 May 2013 14:51:28 +0000 (16:51 +0200)]
winbind/idmap_ad: be verbose about the user that we fail to map

Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit f08205be7003f6c0a15fd5fd99d01951164ad15c)

Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agoEnsure we test the dirsort module in make test.
Jeremy Allison [Tue, 9 Apr 2013 23:56:24 +0000 (16:56 -0700)]
Ensure we test the dirsort module in make test.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr 11 21:17:21 CEST 2013 on sn-devel-104

The last 10 patches address bug #9777 - vfs_dirsort uses non-stackable calls,
dirfd(), malloc instead of talloc and doesn't cope with directories being
modified whilst reading.

10 years agoRemove unneeded initializations (we already talloc_zero).
Jeremy Allison [Tue, 9 Apr 2013 18:02:58 +0000 (11:02 -0700)]
Remove unneeded initializations (we already talloc_zero).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoRemove the use of dirfd inside the vfs_dirsort.c.
Jeremy Allison [Tue, 9 Apr 2013 17:50:55 +0000 (10:50 -0700)]
Remove the use of dirfd inside the vfs_dirsort.c.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoConvert mtime from a time_t to a struct timespec.
Jeremy Allison [Tue, 9 Apr 2013 17:43:53 +0000 (10:43 -0700)]
Convert mtime from a time_t to a struct timespec.

In preparation for removing the dirfd and using fsp_stat()
and VFS_STAT functions.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoCheck SMB_VFS_NEXT_OPENDIR return in dirsort_opendir().
Jeremy Allison [Tue, 9 Apr 2013 17:38:24 +0000 (10:38 -0700)]
Check SMB_VFS_NEXT_OPENDIR return in dirsort_opendir().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoClean error paths in opendir and fd_opendir by only setting handle data on success.
Jeremy Allison [Tue, 9 Apr 2013 17:29:47 +0000 (10:29 -0700)]
Clean error paths in opendir and fd_opendir by only setting handle data on success.

Pass extra struct dirsort_privates * to open_and_sort_dir() function
to avoid it having to re-read the handle data.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoProtect open_and_sort_dir() from the directory changing size.
Jeremy Allison [Mon, 8 Apr 2013 23:40:35 +0000 (16:40 -0700)]
Protect open_and_sort_dir() from the directory changing size.

Otherwise there could be an error between initial count, allocation
and re-read.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoUse an index i rather than re-using a state variable.
Jeremy Allison [Mon, 8 Apr 2013 23:38:03 +0000 (16:38 -0700)]
Use an index i rather than re-using a state variable.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoProtect against early error in SMB_VFS_NEXT_READDIR.
Jeremy Allison [Mon, 8 Apr 2013 23:31:53 +0000 (16:31 -0700)]
Protect against early error in SMB_VFS_NEXT_READDIR.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoChange source3/modules/vfs_dirsort.c from MALLOC -> TALLOC.
Jeremy Allison [Mon, 8 Apr 2013 22:11:28 +0000 (15:11 -0700)]
Change source3/modules/vfs_dirsort.c from MALLOC -> TALLOC.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoWHATSNEW: Start release notes for Samba 3.6.17.
Karolin Seeger [Wed, 19 Jun 2013 08:53:41 +0000 (10:53 +0200)]
WHATSNEW: Start release notes for Samba 3.6.17.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoVERSION: Bump version number up to 3.6.17.
Karolin Seeger [Wed, 19 Jun 2013 08:47:13 +0000 (10:47 +0200)]
VERSION: Bump version number up to 3.6.17.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoWHATSNEW: Add another fix since 3.6.15.
Karolin Seeger [Wed, 19 Jun 2013 07:33:11 +0000 (09:33 +0200)]
WHATSNEW: Add another fix since 3.6.15.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agos3-autoconf: Add missing libtevent dependency for dbwrap_torture.
Michael Adam [Tue, 18 Jun 2013 09:47:17 +0000 (11:47 +0200)]
s3-autoconf: Add missing libtevent dependency for dbwrap_torture.

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Karolin Seeger <kseeger@samba.org>
The last 3 patches are part of a fix for bug #9881 - Samba doesn't check for
system libtevent.

10 years agos3-autoconf: Add missing libtevent dependency to dbwrap_tool.
Michael Adam [Tue, 18 Jun 2013 09:32:19 +0000 (11:32 +0200)]
s3-autoconf: Add missing libtevent dependency to dbwrap_tool.

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agos3-autoconf: Add missing libtevent dependency.
Andreas Schneider [Mon, 17 Jun 2013 09:53:09 +0000 (11:53 +0200)]
s3-autoconf: Add missing libtevent dependency.

Signed-off-by: Andreas Schneider <asn@samba.org>
10 years agoWHATSNEW: Add changes since 3.6.15.
Karolin Seeger [Mon, 17 Jun 2013 07:34:16 +0000 (09:34 +0200)]
WHATSNEW: Add changes since 3.6.15.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
10 years agoBug 8997: change libreplace GPL source to LGPL
David Disseldorp [Mon, 3 Jun 2013 11:00:31 +0000 (13:00 +0200)]
Bug 8997: change libreplace GPL source to LGPL

libreplace currently includes socket.c and getifaddrs.c both of which
are GPL licensed.
Although not required, talloc and tdb build alongside this source,
leading to some ambiguity regarding their LGPL licences.

The following copyright holders have agreed to the GPL->LGPL change:
lib/replace/getifaddrs.c
   Copyright (C) Andrew Tridgell 1998
   Copyright (C) Jeremy Allison 2007
   Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007

lib/replace/test/getifaddrs.c
lib/replace/socket.c
 * Copyright (C) Michael Adam <obnox@samba.org> 2008

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 8a6743e4edcdff1c7860d150720483f19f3b33bb)

10 years agoWhen message-type is drvupgrade, MSG_DEBUG should be replaced with MSG_PRINTER_DRVUPG...
Peng Haitao [Wed, 22 May 2013 21:03:13 +0000 (14:03 -0700)]
When message-type is drvupgrade, MSG_DEBUG should be replaced with MSG_PRINTER_DRVUPGRADE.

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Fix bug #9941 - Fix a bug of drvupgrade of smbcontrol.

10 years agocheck_parent_exists() can change errno. Ensure we preserve it across calls.
Anand Avati [Mon, 29 Apr 2013 22:21:00 +0000 (15:21 -0700)]
check_parent_exists() can change errno. Ensure we preserve it across calls.

Reviewed-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 Apr 30 11:00:11 CEST 2013 on sn-devel-104

Fix bug #9927 - errno gets overwritten in call to check_parent_exists().

10 years agoBUG 9881: Check for system libtevent.
Andreas Schneider [Tue, 14 May 2013 07:59:44 +0000 (09:59 +0200)]
BUG 9881: Check for system libtevent.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoFix bug #9822 - Samba crashing during Win8 sync.
Jeremy Allison [Fri, 26 Apr 2013 17:47:41 +0000 (10:47 -0700)]
Fix bug #9822 - Samba crashing during Win8 sync.

When refactoring the dptr desctructor in the
fix for bug:

9778 (Samba directory code uses dirfd() without vectoring through a VFS call)

I removed the code to NULL out the struct smb_Dir *
pointer inside the fsp struct by mistake.

Re-add the NULLing out of that pointer when
closing a directory pointer associated with
an open file.

Reporter confirms it fixes the crash.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Sat Apr 27 20:44:55 CEST 2013 on sn-devel-104
(cherry picked from commit 251767cde9a146d8122d76e257ab232c05ad452a)

10 years agoRemove dependency on detection of HAVE_DIRFD for use of fdopendir().
Jeremy Allison [Wed, 10 Apr 2013 23:30:10 +0000 (16:30 -0700)]
Remove dependency on detection of HAVE_DIRFD for use of fdopendir().

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): Fri Apr 12 16:21:10 CEST 2013 on sn-devel-104
(cherry picked from commit 7a4dd845958f1411daa8031ca242987001ab2f26)

10 years agoRemove the "Ugly hack" that was the second use of dirfd().
Jeremy Allison [Wed, 10 Apr 2013 23:29:03 +0000 (16:29 -0700)]
Remove the "Ugly hack" that was the second use of dirfd().

The destructor does all the resource deallocation needed.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 0fe894fb89f4867e266bb04670a58101311e0234)

10 years agoIn the struct smb_Dir destructor, use the fsp back pointer to release resources.
Jeremy Allison [Wed, 10 Apr 2013 23:24:15 +0000 (16:24 -0700)]
In the struct smb_Dir destructor, use the fsp back pointer to release resources.

Removes one use of dirfd().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit ea14c9443178da9ae6ccbe71e573156396f6f699)

10 years agoMaintain a back-pointer to the fsp in struct smb_Dir when opening with FDOPENDIR.
Jeremy Allison [Wed, 10 Apr 2013 23:21:39 +0000 (16:21 -0700)]
Maintain a back-pointer to the fsp in struct smb_Dir when opening with FDOPENDIR.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit e89ec641fc98ffd7f7193deb3728b0a284a093eb)

10 years agoFix bug 9900: is_printer_published GUID retrieval
David Disseldorp [Wed, 22 May 2013 15:58:38 +0000 (17:58 +0200)]
Fix bug 9900: is_printer_published GUID retrieval

Samba currently always responds to GetPrinter(level = 7) requests with
DSPRINT_UNPUBLISH, regardless of the AD publish status tracked via the
PRINTER_ATTRIBUTE_PUBLISHED flag. This is due to erroneous "objectGUID"
unmarshalling in is_printer_published().

This change splits "objectGUID" retrieval into a separate function, and
adds a pull_reg_sz() call to correctly unmarshall the GUID.

10 years agoprinting: explicitly clear PUBLISHED attribute
David Disseldorp [Thu, 23 May 2013 17:32:08 +0000 (19:32 +0200)]
printing: explicitly clear PUBLISHED attribute

Currently nt_printer_publish(DSPRINT_UNPUBLISH) flips (via xor) the
info2->attributes PRINTER_ATTRIBUTE_PUBLISHED flag, rather than
explicitly clearing it.

10 years agoprinting: use const in is_printer_published
David Disseldorp [Wed, 24 Apr 2013 12:06:50 +0000 (14:06 +0200)]
printing: use const in is_printer_published

10 years agos3-docs: Remove "experimental" label on "max protocol=SMB2" parameter
SATOH Fumiyasu [Tue, 26 Feb 2013 17:06:32 +0000 (02:06 +0900)]
s3-docs: Remove "experimental" label on "max protocol=SMB2" parameter

Fix bug #9688 - smb.conf(5) says: "max protocol=SMB2" is experimental.

Signed-off-by: Karolin Seeger <kseeger@samba.org>