vlendec/samba-autobuild/.git
11 years agospoolss: make spoolss deal with ndr64 ULONG_PTR of devmode_ptr and secdesc_ptr.
Günther Deschner [Tue, 15 Jan 2013 23:04:41 +0000 (00:04 +0100)]
spoolss: make spoolss deal with ndr64 ULONG_PTR of devmode_ptr and secdesc_ptr.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
11 years agodsdb-operational: Avoid doing the ldb_attr_cmp if bypass flag is not set
Matthieu Patou [Thu, 27 Dec 2012 08:01:49 +0000 (00:01 -0800)]
dsdb-operational: Avoid doing the ldb_attr_cmp if bypass flag is not set

Most of the time this flag is not set and so we can avoid the strcasecmp
in ldb_attr_cmp()

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jan 17 17:10:32 CET 2013 on sn-devel-104

11 years agotorture: Fix fsmo test to use correct -H samba-tool syntax
Andrew Bartlett [Sat, 17 Nov 2012 02:49:00 +0000 (13:49 +1100)]
torture: Fix fsmo test to use correct -H samba-tool syntax

However, the test still does not pass.

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agodsdb: Do not hold the transaction over the IRPC call to perform a role transfer
Andrew Bartlett [Mon, 14 Jan 2013 22:56:46 +0000 (09:56 +1100)]
dsdb: Do not hold the transaction over the IRPC call to perform a role transfer

This avoids one samba process locking out another from the DB.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoselftest: also skip raw.search as it also spins
Andrew Bartlett [Sun, 13 Jan 2013 02:03:13 +0000 (13:03 +1100)]
selftest: also skip raw.search as it also spins

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agodrs-fsmo: Improve handling of FSMO role takeover.
Andrew Bartlett [Tue, 20 Nov 2012 03:59:17 +0000 (14:59 +1100)]
drs-fsmo: Improve handling of FSMO role takeover.

This needs to be more async, and give less scary errors.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agodsdb-acl: calculate sDRightsEffective based on "nTSecurityDescriptor"
Stefan Metzmacher [Tue, 8 Jan 2013 14:55:36 +0000 (15:55 +0100)]
dsdb-acl: calculate sDRightsEffective based on "nTSecurityDescriptor"

acl_check_access_on_attribute should never be called with attr=NULL
because we don't check access on an attribute in that case

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Thu Jan 17 11:21:10 CET 2013 on sn-devel-104

11 years agodsdb-acl: add helper variable 'ldb' in acl_sDRightsEffective
Stefan Metzmacher [Tue, 8 Jan 2013 14:54:47 +0000 (15:54 +0100)]
dsdb-acl: add helper variable 'ldb' in acl_sDRightsEffective

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
11 years agolibcli/security: don't look at the inherited type in get_ace_object_type()
Stefan Metzmacher [Fri, 4 Jan 2013 15:03:42 +0000 (16:03 +0100)]
libcli/security: don't look at the inherited type in get_ace_object_type()

The inherited_type is only used to decide if aces should be inherited
effectively or not (INHERIT_ONLY) for the specified object.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
11 years agodsdb-acl: fix the order of special and system checks
Stefan Metzmacher [Thu, 17 Jan 2013 07:51:23 +0000 (08:51 +0100)]
dsdb-acl: fix the order of special and system checks

First we check for a special dn, then for system access.
All allocations happen after this checks in order to avoid
allocations we won't use.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
11 years agodsdb-acl: Do not apply ACL on special DNs to hide attributes that the user shouldn...
Matthieu Patou [Sun, 30 Dec 2012 10:27:25 +0000 (02:27 -0800)]
dsdb-acl: Do not apply ACL on special DNs to hide attributes that the user shouldn't see

This fix frequent reindexing when using python script with a
user that is not system.
The reindexing is caused by ACL module hidding (removing) attributes in
the search request for all attributes in dn=@ATTRIBUTES and because
dsdb_schema_set_indices_and_attributes checks that the list of
attributes that it just calculated from the schema is the same as the
list written in @ATTRIBUTES, if not the list is replaced and a
reindexing is triggered.

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agodsdb-acl: talloc_free the private context when we pass to the next module
Stefan Metzmacher [Thu, 17 Jan 2013 07:37:58 +0000 (08:37 +0100)]
dsdb-acl: talloc_free the private context when we pass to the next module

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
11 years agodsdb-acl: don't call dsdb_user_password_support() if we don't use the result
Stefan Metzmacher [Thu, 17 Jan 2013 07:37:12 +0000 (08:37 +0100)]
dsdb-acl: don't call dsdb_user_password_support() if we don't use the result

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Matthieu Patou <mat@matws.net>
11 years agosmb2_ioctl: copychunk request max output validation
David Disseldorp [Tue, 15 Jan 2013 16:23:12 +0000 (17:23 +0100)]
smb2_ioctl: copychunk request max output validation

Check that the copychunk ioctl request maximum output specified by the
client is large enough to hold copychunk response data.

Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jan 17 00:59:44 CET 2013 on sn-devel-104

11 years agosmb2_ioctl: track copychunk response output state
David Disseldorp [Tue, 15 Jan 2013 16:23:11 +0000 (17:23 +0100)]
smb2_ioctl: track copychunk response output state

Treat the response data independent to the status.

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agosmb2_ioctl: copychunk CHECK_READ and CHECK_WRITE
David Disseldorp [Tue, 15 Jan 2013 16:23:10 +0000 (17:23 +0100)]
smb2_ioctl: copychunk CHECK_READ and CHECK_WRITE

[MS-SMB2] 3.3.5.15.6 Handling a Server-Side Data Copy Request, specifies
that the copychunk destination file handle be granted FILE_WRITE_DATA
and FILE_READ_DATA access.

FILE_READ_DATA access must also be granted on the copychunk source file,
which may be done implicitly with execute permission.

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agotorture: copychunk test suite improvements
David Disseldorp [Tue, 15 Jan 2013 16:23:09 +0000 (17:23 +0100)]
torture: copychunk test suite improvements

Allow for large files in test_setup_copy_chunk():
  Write test data in 1M IOs, rather than attempting to do the whole
  thing in one go.

Add copychunk bad resume key test:
  Send a copy chunk request with an intentionally bogus resume key
  (source key handle).

Add copychunk src=dest test:
  Test copychunk requests where the source and destination handles refer
  to the same file.

Add copychunk src=dest overlap test.

Add desired access args to test_setup_copy_chunk().

Add copychunk_bad_access test:
  Open the copychunk source and destination files with differing
  desired_access values. Confirm copychunk response matches 2k8 and 2k12
  behaviour.

Add copy_chunk_src_exceed test:
  Attempts to copy more data than is present in the copychunk source
  file.

Add copy_chunk_src_exceed_multi test:
  Test whether the first chunk in a multi-chunk copychunk request is
  written to disk, where the second chunk is invalid due to src file
  overrun.

Add copy_chunk_sparse_dest test:
  Issue a request where the target offset exceeds the file size, resulting
  in a sparse region.

Add copy_chunk_max_output_sz test.

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agosmb2_ioctl: only pass through to VFS on a valid fsp
David Disseldorp [Tue, 15 Jan 2013 16:23:08 +0000 (17:23 +0100)]
smb2_ioctl: only pass through to VFS on a valid fsp

A null fsp is dereferenced on VFS call.

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agotorture: replace ioctl failure returns with helper calls
David Disseldorp [Tue, 15 Jan 2013 16:23:07 +0000 (17:23 +0100)]
torture: replace ioctl failure returns with helper calls

Also change test_ioctl_get_shadow_copy() to use torture_skip(), and
clean up test output.

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agotorture: add locking tests for copychunk
David Disseldorp [Tue, 15 Jan 2013 16:23:06 +0000 (17:23 +0100)]
torture: add locking tests for copychunk

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agosmb2_ioctl: perform locking around copychunk requests
David Disseldorp [Tue, 15 Jan 2013 16:23:05 +0000 (17:23 +0100)]
smb2_ioctl: perform locking around copychunk requests

For each chunk in a copychunk request, take a read and write lock on
the source and destination files respectively.

Also change the resume key format to use a combination of the persistent
and volatile handles. Thanks to Metze for his help on this.

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agosmbd: split out file_fsp_get from file_fsp_smb2
David Disseldorp [Tue, 15 Jan 2013 16:23:04 +0000 (17:23 +0100)]
smbd: split out file_fsp_get from file_fsp_smb2

Obtain the files_struct from smb2req, persistent_id and
volatile_id.

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agotorture: skip FSCTL_SRV_ENUM_SNAPS test when not supported
David Disseldorp [Tue, 15 Jan 2013 16:23:03 +0000 (17:23 +0100)]
torture: skip FSCTL_SRV_ENUM_SNAPS test when not supported

If FSCTL_SRV_ENUM_SNAPS fails with NT_STATUS_NOT_SUPPORTED then skip the
test, this means we can run the full ioctl test suite as part of
autobuild.

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agoselftest: enable samba3.smb2.ioctl tests against s3fs
David Disseldorp [Tue, 15 Jan 2013 16:23:02 +0000 (17:23 +0100)]
selftest: enable samba3.smb2.ioctl tests against s3fs

These tests are now expected to pass with copy-chunk support now
implemented.

This effectively reverts 632b1042aed94a71d810613fcdbbfecf615a25fa.

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agosmb2_ioctl: remove ioctl error response assumptions
David Disseldorp [Tue, 15 Jan 2013 16:23:01 +0000 (17:23 +0100)]
smb2_ioctl: remove ioctl error response assumptions

MS-SMB2 3.3.4.4 documents cases where a ntstatus indicating an error
should not be considered a failure. In such a case the output data
buffer should be sent to the client rather than an error response
packet.

Add a new fsctl copy_chunk test to confirm field limits are sent back
in response to an oversize chunk request.

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agosmb2_ioctl: add support for FSCTL_SRV_COPYCHUNK
David Disseldorp [Tue, 15 Jan 2013 16:23:00 +0000 (17:23 +0100)]
smb2_ioctl: add support for FSCTL_SRV_COPYCHUNK

SMB2 clients can issue FSCTL_SRV_COPYCHUNK requests in order to copy
data between files on the server side only, rather than reading data
then writing back from the client. FSCTL_SRV_COPYCHUNK is used by
default for Explorer SMB2 file copies on Windows Server 2012.

2.2.32.1 SRV_COPYCHUNK_RESPONSE in [MS-SMB2] describes the requirement
for the server to provide maximum copychunk request size limits in ioctl
responses carrying STATUS_INVALID_PARAMETER.

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agos3-vfs: add copy_chunk vfs hooks
David Disseldorp [Tue, 15 Jan 2013 16:22:59 +0000 (17:22 +0100)]
s3-vfs: add copy_chunk vfs hooks

copy_chunk copies n bytes from a source file at a specific offset to a
destination file at a given offset. This interface will be used in
handling smb2 FSCTL_SRV_COPYCHUNK ioctl requests.

Use a pread/pwrite loop in vfs_default, so that requests referring to
the same src and dest file are possible.

Provide send and receive hooks for copy chunk VFS interface, allowing
asynchronous behaviour.

Check whether the request source offset + length exceeds the current
size. Return STATUS_INVALID_VIEW_SIZE under such a condition, matching
Windows server behaviour.

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agosmb2_ioctl: add FSCTL_SRV_REQUEST_RESUME_KEY support
David Disseldorp [Tue, 15 Jan 2013 16:22:58 +0000 (17:22 +0100)]
smb2_ioctl: add FSCTL_SRV_REQUEST_RESUME_KEY support

Use existing ioctl IDL infrastructure for marshalling. Support for this
ioctl is a prerequisite for FSCTL_SRV_COPYCHUNK handling.
The client-opaque resume key is constructed using the server side
dev/inode file identifier.

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agosmb2_ioctl: split ioctl handler code on device type
David Disseldorp [Tue, 15 Jan 2013 16:22:57 +0000 (17:22 +0100)]
smb2_ioctl: split ioctl handler code on device type

Add per device type ioctl handler source files for FSCTL_DFS,
FSCTL_FILESYSTEM, FSCTL_NAMED_PIPE and FSCTL_NETWORK_FILESYSTEM.

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agosmb2_ioctl: split ioctl handlers into separate funtions
David Disseldorp [Tue, 15 Jan 2013 16:22:56 +0000 (17:22 +0100)]
smb2_ioctl: split ioctl handlers into separate funtions

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agobuild(waf): fix the abi_match for the pdb library
Michael Adam [Tue, 15 Jan 2013 14:35:09 +0000 (15:35 +0100)]
build(waf): fix the abi_match for the pdb library

The global wildcard match is automatically added by the parsing code
if the global match list is empty. Specifying an explicit '*' as the only
global match lets the parsing code add a second '*' to the local list,
which is an error tolerated on my linux by ld (the GNU linker), but
not by the stricter GNU ELF linker "gold".

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Alexander Bokovoy <ab@samba.org>
Autobuild-Date(master): Wed Jan 16 21:31:00 CET 2013 on sn-devel-104

11 years agos4-torture: add ndr64 spoolss openprinterex to ndr test.
Günther Deschner [Tue, 15 Jan 2013 16:05:10 +0000 (17:05 +0100)]
s4-torture: add ndr64 spoolss openprinterex to ndr test.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jan 16 13:26:53 CET 2013 on sn-devel-104

11 years agos4-torture: allow to do ndr tests with flags, not only ndr_flags.
Günther Deschner [Tue, 15 Jan 2013 16:04:08 +0000 (17:04 +0100)]
s4-torture: allow to do ndr tests with flags, not only ndr_flags.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agospoolss: Make OpenPrinterEx work with NDR64 by using UserInfo Container.
Günther Deschner [Mon, 14 Jan 2013 16:26:31 +0000 (17:26 +0100)]
spoolss: Make OpenPrinterEx work with NDR64 by using UserInfo Container.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
11 years agotest: dbwrap_tool requires --persistent for the registry now
Volker Lendecke [Tue, 15 Jan 2013 10:22:49 +0000 (11:22 +0100)]
test: dbwrap_tool requires --persistent for the registry now

Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jan 15 16:31:35 CET 2013 on sn-devel-104

11 years agodocs: document the "--persistent" option in dbwrap_tool(1)
Michael Adam [Mon, 14 Jan 2013 16:22:05 +0000 (17:22 +0100)]
docs: document the "--persistent" option in dbwrap_tool(1)

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agos3:dbwrap_tool: add --persistent switch and mode for non-persistent DBs
Michael Adam [Wed, 2 Jan 2013 00:12:58 +0000 (01:12 +0100)]
s3:dbwrap_tool: add --persistent switch and mode for non-persistent DBs

This changes the default for dbwrap_tool to open a DB as non-persistent.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agodbwrap: add dbwrap_is_persistent()
Michael Adam [Wed, 2 Jan 2013 00:02:56 +0000 (01:02 +0100)]
dbwrap: add dbwrap_is_persistent()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agodocs: document the command line options in dbwrap_tool(1)
Michael Adam [Mon, 14 Jan 2013 16:15:08 +0000 (17:15 +0100)]
docs: document the command line options in dbwrap_tool(1)

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agodocs: use the popt.common.samba.client entity in samba-tool(8)
Michael Adam [Mon, 14 Jan 2013 16:55:51 +0000 (17:55 +0100)]
docs: use the popt.common.samba.client entity in samba-tool(8)

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agodocs: use the entities popt.common.samba.server and stdarg.help in samba(8)
Michael Adam [Mon, 14 Jan 2013 16:23:37 +0000 (17:23 +0100)]
docs: use the entities popt.common.samba.server and stdarg.help in samba(8)

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agodocs: add popt.common.samba.server and popt.common.samba.client entities
Michael Adam [Mon, 14 Jan 2013 16:08:30 +0000 (17:08 +0100)]
docs: add popt.common.samba.server and popt.common.samba.client entities

These are comprised by the popt.common.samba entity and the stdarg.server.debug
or the stdarg.client.debut entity, respectively.
The difference is only in the default value of the debug level setting.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agodocs: fix the stdarg.configfile entity to print a "=" sign after the long option
Michael Adam [Mon, 14 Jan 2013 16:12:51 +0000 (17:12 +0100)]
docs: fix the stdarg.configfile entity to print a "=" sign after the long option

This makes the appearance equal to the other options like --debuglevel or
--log-basename.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agodocs: use the stdarg.option entity in the popt.common.samba entity
Michael Adam [Mon, 14 Jan 2013 16:06:03 +0000 (17:06 +0100)]
docs: use the stdarg.option entity in the popt.common.samba entity

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agodocs: add an entity stdarg.option for the "--option" command line parameter
Michael Adam [Mon, 14 Jan 2013 16:05:05 +0000 (17:05 +0100)]
docs: add an entity stdarg.option for the "--option" command line parameter

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agowafsamba: use additional xml catalog file (bug #9512)
Björn Baumbach [Thu, 20 Dec 2012 09:01:43 +0000 (10:01 +0100)]
wafsamba: use additional xml catalog file (bug #9512)

Add additional "/usr/local/share/xml/catalog" catalog file
platforms (used by freebsd).
Fix manual page build on freebsd.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agosmb.conf(5): client min protocol: add hint at list of available protocols
Björn Baumbach [Tue, 16 Oct 2012 08:14:55 +0000 (10:14 +0200)]
smb.conf(5): client min protocol: add hint at list of available protocols

And fix the format.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agosmb.conf(5): server min protocol: add hint at list of available protocols
Björn Baumbach [Tue, 11 Dec 2012 12:46:38 +0000 (13:46 +0100)]
smb.conf(5): server min protocol: add hint at list of available protocols

And fix the format.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agobuild(waf)-libreplace: remove redundant check for flistea function
Björn Baumbach [Mon, 10 Dec 2012 10:52:08 +0000 (11:52 +0100)]
build(waf)-libreplace: remove redundant check for flistea function

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agontlm_auth(1): fix many format issues and and make examples visible
Björn Baumbach [Tue, 4 Dec 2012 09:54:05 +0000 (10:54 +0100)]
ntlm_auth(1): fix many format issues and and make examples visible

"<example>" is no child of "<para>". So these examples were not visible.
Using a varlist instead may be not the best way but it does look nice.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agobuild(waf): docs-xml: build new dbwrap_tool.8 manual page
Björn Baumbach [Mon, 15 Oct 2012 15:20:07 +0000 (17:20 +0200)]
build(waf): docs-xml: build new dbwrap_tool.8 manual page

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agodocs-xml: add dbwrap_tool.1 manual page
Björn Baumbach [Mon, 15 Oct 2012 15:17:29 +0000 (17:17 +0200)]
docs-xml: add dbwrap_tool.1 manual page

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agodsdb: Add test for modification of two attributes, one permitted, one denied (bug...
Andrew Bartlett [Wed, 9 Jan 2013 22:30:38 +0000 (09:30 +1100)]
dsdb: Add test for modification of two attributes, one permitted, one denied (bug #9554 - CVE-2013-0172)

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

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan 15 14:03:47 CET 2013 on sn-devel-104

11 years agodsdb-acl: Run sec_access_check_ds on each attribute proposed to modify (bug #9554...
Andrew Bartlett [Wed, 9 Jan 2013 05:59:18 +0000 (16:59 +1100)]
dsdb-acl: Run sec_access_check_ds on each attribute proposed to modify (bug #9554 - CVE-2013-0172)

This seems inefficient, but is needed for correctness.  The
alternative might be to have the sec_access_check_ds code confirm that
*all* of the nodes in the object tree have been cleared to
node->remaining_bits == 0.

Otherwise, I fear that write access to one attribute will become write
access to all attributes.

Andrew Bartlett

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

11 years agolibcli/security: Ensure to fill in remaining_access for the initial case (bug #9554...
Andrew Bartlett [Thu, 3 Jan 2013 09:39:23 +0000 (20:39 +1100)]
libcli/security: Ensure to fill in remaining_access for the initial case (bug #9554 - CVE-2013-0172)

It is critically important that we initialise this element as otherwise
all access is permitted.

Andrew Bartlett

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

11 years agotevent: Fix bug 9550 - sigprocmask does not work on FreeBSD to stop further signals...
Jeremy Allison [Mon, 14 Jan 2013 23:22:11 +0000 (15:22 -0800)]
tevent: Fix bug 9550 - sigprocmask does not work on FreeBSD to stop further signals in a signal handler

Mask off signals the correct way from the signal handler.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jan 15 12:13:43 CET 2013 on sn-devel-104

11 years agolib/replace: Include sys/ucontext.h if available.
Jeremy Allison [Mon, 14 Jan 2013 23:21:52 +0000 (15:21 -0800)]
lib/replace: Include sys/ucontext.h if available.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agolib/replace: Add ucontext configure autoconf checks.
Jeremy Allison [Mon, 14 Jan 2013 23:21:35 +0000 (15:21 -0800)]
lib/replace: Add ucontext configure autoconf checks.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agolib/replace: Add ucontext configure waf checks.
Jeremy Allison [Mon, 14 Jan 2013 23:21:12 +0000 (15:21 -0800)]
lib/replace: Add ucontext configure waf checks.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agolib/replace: Add missing check for sys/wait.h
Jeremy Allison [Mon, 14 Jan 2013 23:06:12 +0000 (15:06 -0800)]
lib/replace: Add missing check for sys/wait.h

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agosmbd: Fix bug 9544, part 2
Volker Lendecke [Mon, 14 Jan 2013 20:37:52 +0000 (21:37 +0100)]
smbd: Fix bug 9544, part 2

Plug in async pwrite

Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan 15 00:55:51 CET 2013 on sn-devel-104

11 years agosmbd: Fix bug 9544, part 1
Volker Lendecke [Mon, 14 Jan 2013 20:36:51 +0000 (21:36 +0100)]
smbd: Fix bug 9544, part 1

Adapt the sync function names

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agosmbd: Always compile vfs_commit
Volker Lendecke [Mon, 14 Jan 2013 20:14:20 +0000 (21:14 +0100)]
smbd: Always compile vfs_commit

There's no reason not to

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agoconfigure: Fix bug 9546, aio_suspend detection on FreeBSD
Volker Lendecke [Mon, 7 Jan 2013 20:53:27 +0000 (12:53 -0800)]
configure: Fix bug 9546, aio_suspend detection on FreeBSD

NULL is not defined without some includes

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agoFix bug 9548: Correctly detect O_DIRECT
Volker Lendecke [Sat, 12 Jan 2013 15:08:07 +0000 (16:08 +0100)]
Fix bug 9548: Correctly detect O_DIRECT

Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jan 14 21:16:23 CET 2013 on sn-devel-104

11 years agosamr: Make use of posix_openpt
Volker Lendecke [Fri, 11 Jan 2013 09:36:04 +0000 (10:36 +0100)]
samr: Make use of posix_openpt

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agosamr: Split up an assignment from an if condition
Volker Lendecke [Fri, 11 Jan 2013 09:31:42 +0000 (10:31 +0100)]
samr: Split up an assignment from an if condition

Reviewed by: Jeremy Allison <jra@samba.org>

11 years agoldb: Move doxygen comments for ldb_connect to the right place
Stephen Gallagher [Wed, 2 Jan 2013 16:22:16 +0000 (11:22 -0500)]
ldb: Move doxygen comments for ldb_connect to the right place

Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jan 14 16:21:02 CET 2013 on sn-devel-104

11 years agodsdb: Make linked_attributes module GUID based for renames
Andrew Bartlett [Fri, 11 Jan 2013 05:42:41 +0000 (16:42 +1100)]
dsdb: Make linked_attributes module GUID based for renames

This ensures that when we have the backlink out of sync with the forward link (perhaps due
to another operation that has put the backlink handling in an end-of-transaction
TODO list in repl_meta_data) that we do not error out, we just cope as well as we can.

The GUID is the unique identifier, not the DN.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Jan 12 12:52:28 CET 2013 on sn-devel-104

11 years agoselftest: skip base.dir2 tests as they just spin on modern ext4
Andrew Bartlett [Thu, 10 Jan 2013 21:26:07 +0000 (08:26 +1100)]
selftest: skip base.dir2 tests as they just spin on modern ext4

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agos4-resolve: Fix parsing of IPv6/AAAA in dns_lookup (bug #9555)
Arvid Requate [Fri, 11 Jan 2013 13:17:06 +0000 (14:17 +0100)]
s4-resolve: Fix parsing of IPv6/AAAA in dns_lookup (bug #9555)

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agowinbind: Fix some missing NULL checks
Volker Lendecke [Fri, 11 Jan 2013 13:51:42 +0000 (14:51 +0100)]
winbind: Fix some missing NULL checks

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jan 11 18:55:41 CET 2013 on sn-devel-104

11 years agowinbind: Fix error check in unpack_tdc_domains
Volker Lendecke [Fri, 11 Jan 2013 13:02:52 +0000 (14:02 +0100)]
winbind: Fix error check in unpack_tdc_domains

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agodbwrap: Use INCOMPATIBLE_HASH for dbwrap_watchers.tdb
Volker Lendecke [Fri, 11 Jan 2013 16:04:39 +0000 (17:04 +0100)]
dbwrap: Use INCOMPATIBLE_HASH for dbwrap_watchers.tdb

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoscripting/samba_upgradedns: Only look for IPv4/IPv6 addresses if we actually them
Andrew Bartlett [Thu, 27 Dec 2012 23:05:40 +0000 (10:05 +1100)]
scripting/samba_upgradedns: Only look for IPv4/IPv6 addresses if we actually them

This allows the script to be used to create/remove the samba-specific dns-SERVER account
when we do not need to create the in-directory partition.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jan 10 20:56:50 CET 2013 on sn-devel-104

11 years agosamba-tool classicupgrade: Do not print the admin password during upgrade
Andrew Bartlett [Fri, 21 Dec 2012 22:28:05 +0000 (09:28 +1100)]
samba-tool classicupgrade: Do not print the admin password during upgrade

This changes the code to only set and show a new password if no admin
user is found during the upgrade.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jan 10 16:55:23 CET 2013 on sn-devel-104

11 years agos4-idmap: Remove requirement that posixAccount or posixGroup be set for rfc2307
Andrew Bartlett [Wed, 26 Dec 2012 09:48:12 +0000 (20:48 +1100)]
s4-idmap: Remove requirement that posixAccount or posixGroup be set for rfc2307

This change matches the source3/idmap/idmap_ad.c code, and allows this
feature to work with only the setting of the UID/GID in Active
Directory Users and Computers.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoselftest: Add test for rfc2307 mapping handling
Andrew Bartlett [Fri, 28 Dec 2012 01:36:06 +0000 (12:36 +1100)]
selftest: Add test for rfc2307 mapping handling

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agodsdb-acl: give error string if we can not obtain the schema
Andrew Bartlett [Thu, 3 Jan 2013 10:31:22 +0000 (21:31 +1100)]
dsdb-acl: give error string if we can not obtain the schema

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agos4-dbcheck: Allow forcing an override of an old @MODULES record
Andrew Bartlett [Thu, 23 Aug 2012 05:18:13 +0000 (15:18 +1000)]
s4-dbcheck: Allow forcing an override of an old @MODULES record

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agobuild: Set LD_LIBRARY_PATH in install_with_python.sh
Andrew Bartlett [Thu, 10 Jan 2013 01:00:03 +0000 (12:00 +1100)]
build: Set LD_LIBRARY_PATH in install_with_python.sh

This ensures that the python install finishes correctly.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jan 10 14:00:13 CET 2013 on sn-devel-104

11 years agobuild: Make install_with_python.sh more portable
Andrew Bartlett [Wed, 9 Jan 2013 22:00:37 +0000 (09:00 +1100)]
build: Make install_with_python.sh more portable

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agobuild: In install_with_python.sh force using the python from the install we just...
Andrew Bartlett [Wed, 9 Jan 2013 21:51:34 +0000 (08:51 +1100)]
build: In install_with_python.sh force using the python from the install we just made

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agobuild: Make install_with_python.sh executable
Andrew Bartlett [Wed, 9 Jan 2013 21:50:53 +0000 (08:50 +1100)]
build: Make install_with_python.sh executable

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoswat: move russian swat files alongside ja and tr
Andrew Bartlett [Thu, 20 Dec 2012 07:36:40 +0000 (18:36 +1100)]
swat: move russian swat files alongside ja and tr

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agopassdb: Add discard_const_p() to pdb_samba_dsdb
Andrew Bartlett [Wed, 12 Dec 2012 23:33:04 +0000 (10:33 +1100)]
passdb: Add discard_const_p() to pdb_samba_dsdb

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agovfs: Fix compilation of solaris ACL module
Andrew Bartlett [Sat, 5 Jan 2013 03:53:13 +0000 (14:53 +1100)]
vfs: Fix compilation of solaris ACL module

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agobuild: Remove bashism from SAMBAMANPAGES rule
Andrew Bartlett [Tue, 8 Jan 2013 22:39:59 +0000 (09:39 +1100)]
build: Remove bashism from SAMBAMANPAGES rule

In sh, you must assign the variable, then export it.

Andrew Bartlett

Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agosmb.conf(5): update list of available protocols (bug #9552)
Björn Baumbach [Tue, 11 Dec 2012 12:39:11 +0000 (13:39 +0100)]
smb.conf(5): update list of available protocols (bug #9552)

Update protocol listing in variable substitution list.

Signed-off-by: Bjoern Baumbach <bb@sernet.de>
Reviewed by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan  9 21:22:18 CET 2013 on sn-devel-104

11 years agos3-lib: Use new strict directory create function in create_pipe_sock().
Andreas Schneider [Wed, 9 Jan 2013 08:02:54 +0000 (09:02 +0100)]
s3-lib: Use new strict directory create function in create_pipe_sock().

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jan  9 10:55:23 CET 2013 on sn-devel-104

11 years agoUse the new directory_create_or_exist_strict() function.
Andreas Schneider [Tue, 8 Jan 2013 13:21:23 +0000 (14:21 +0100)]
Use the new directory_create_or_exist_strict() function.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoutil: Add a strict directory_create_or_exist function.
Andreas Schneider [Tue, 8 Jan 2013 13:21:00 +0000 (14:21 +0100)]
util: Add a strict directory_create_or_exist function.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos3:smb2_negprot: set the 'remote_proto' value
Stefan Metzmacher [Thu, 13 Dec 2012 09:44:07 +0000 (10:44 +0100)]
s3:smb2_negprot: set the 'remote_proto' value

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agosamba_dnsupdate: set KRB5_CONFIG for nsupdate command
Björn Baumbach [Thu, 20 Dec 2012 14:57:43 +0000 (15:57 +0100)]
samba_dnsupdate: set KRB5_CONFIG for nsupdate command

Let nslookup use krb5.conf, which is set in our KRB5_CONFIG.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agos4:lib/messaging: terminate the irpc_servers_byname() result with server_id_set_disco...
Stefan Metzmacher [Fri, 4 Jan 2013 12:27:26 +0000 (13:27 +0100)]
s4:lib/messaging: terminate the irpc_servers_byname() result with server_id_set_disconnected() (bug #9540)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agolibnet-vampire: reports Exops as they rather than sync on some partitions
Matthieu Patou [Mon, 31 Dec 2012 23:38:50 +0000 (15:38 -0800)]
libnet-vampire: reports Exops as they rather than sync on some partitions

Instead of showing:
Partition[CN=RODC,OU=Domain Controllers,DC=samba,DC=example,DC=com]
objects[1] linked_values[8]
Report a exop based on CN=RODC,OU=Domain Controllers,DC=samba,DC=example,DC=com
as
Exop on CN=RODC,OU=Domain Controllers,DC=samba,DC=example,DC=com, ...

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Wed Jan  9 09:01:30 CET 2013 on sn-devel-104

11 years agoscript: Add a script to display testsuite runtime sorted
Matthieu Patou [Wed, 2 Jan 2013 04:56:16 +0000 (20:56 -0800)]
script: Add a script to display testsuite runtime sorted

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
11 years agolibnet: set the invocation_id earlier in order to avoid annoying messages
Matthieu Patou [Mon, 31 Dec 2012 10:12:23 +0000 (02:12 -0800)]
libnet: set the invocation_id earlier in order to avoid annoying messages

At that moment we have all the information to set the invocation id so
let's set it, it will avoid useless messages about missing invocation
id.

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
11 years agoreplace: Fix compilation of rep_mkstemp
Jesper Larsen [Fri, 4 Jan 2013 12:03:58 +0000 (13:03 +0100)]
replace: Fix compilation of rep_mkstemp

Commit 1fbc185 removed the variable 'p'.
Use the equivalent variable 'template' instead.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jan  9 07:18:33 CET 2013 on sn-devel-104

11 years agos3: Fix vfs_zfsacl to compile.
Ira Cooper [Thu, 27 Dec 2012 19:57:14 +0000 (19:57 +0000)]
s3: Fix vfs_zfsacl to compile.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>