obnox/samba/samba-obnox.git
10 years agoctdb-tests: CTDB tool should always be invoked as $CTDB instad of ctdb
Amitay Isaacs [Wed, 13 Nov 2013 03:33:31 +0000 (14:33 +1100)]
ctdb-tests: CTDB tool should always be invoked as $CTDB instad of ctdb

$CTDB_TEST_WRAPPER is required only to run test functions or test binaries
on remote nodes.  For running ctdb command, $CTDB is sufficient.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoctdb-tests: No need to run onnode in parallel for single node
Amitay Isaacs [Wed, 13 Nov 2013 03:25:59 +0000 (14:25 +1100)]
ctdb-tests: No need to run onnode in parallel for single node

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoctdb-tests: Remove -q option to try_command_on_node
Amitay Isaacs [Wed, 13 Nov 2013 03:19:43 +0000 (14:19 +1100)]
ctdb-tests: Remove -q option to try_command_on_node

This option is always passed to onnode by default.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agobuild: check linux/fs.h for compression flags
David Disseldorp [Wed, 27 Nov 2013 13:04:34 +0000 (14:04 +0100)]
build: check linux/fs.h for compression flags

Needed for old distributions (e.g. SLES8), which provide a linux/fs.h
without the FS_IOC_GETFLAGS/FS_COMPR_FL defines needed for the btrfs VFS
module.

Reported-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Nov 27 18:44:14 CET 2013 on sn-devel-104

10 years agos3:smb2_server: avoid calling set_current_user_info() for each request
Stefan Metzmacher [Tue, 19 Nov 2013 04:21:05 +0000 (05:21 +0100)]
s3:smb2_server: avoid calling set_current_user_info() for each request

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Nov 27 16:31:44 CET 2013 on sn-devel-104

10 years agos3:smb2_server: generate a header blob for the sendfile path
Stefan Metzmacher [Mon, 14 Oct 2013 12:18:26 +0000 (14:18 +0200)]
s3:smb2_server: generate a header blob for the sendfile path

We need to pass the NBT header, SMB2 header and SMB2 Read header
as header blob to SMB_VFS_SENDFILE(). This allows the usage
of MSG_SEND or other tricks to avoid multiple TCP packets
on the wire.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3:smb2_server: allocate smbd_smb2_request on talloc_tos()
Stefan Metzmacher [Wed, 16 Oct 2013 07:15:12 +0000 (09:15 +0200)]
s3:smb2_server: allocate smbd_smb2_request on talloc_tos()

This matches the behavior for smb1 requests
and avoids an additional malloc() per request.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3:smb2_server: use tevent_req_notify_callback() in smbd_smb2_request_pending_queue()
Stefan Metzmacher [Sat, 12 Oct 2013 00:40:12 +0000 (02:40 +0200)]
s3:smb2_server: use tevent_req_notify_callback() in smbd_smb2_request_pending_queue()

If the request is already done we can avoid one iteration
of tevent_loop_once(), which means we avoids one
talloc_stackframe_pool/talloc_free pair.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3:smb2_server: for performance reasons we use tevent_fd and readv/writev directly
Stefan Metzmacher [Mon, 14 Oct 2013 08:33:57 +0000 (10:33 +0200)]
s3:smb2_server: for performance reasons we use tevent_fd and readv/writev directly

Going via tevent_req_create/talloc_free at multiple layer costs
too much cpu cycles per request.

I tested downloading a 16GB (sparse) file with smbclient -b1 -mNT1,
and -mSMB2_02. Using smb2 max read = 64512, which means smb1 and smb2
will use the same read size.

I build with -O3 -g and compared the results with valgrind --tool=callgrind.

With -mNT1 the server uses about 2.000.000.000 cpu cycles.

This patch reduces the userspace cpu cycles for -mSMB2_02
from about ~ 8.000.000.000 down to ~ 4.000.000.000.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3:smb2_server: fix drain_socket error handling
Stefan Metzmacher [Mon, 14 Oct 2013 14:42:55 +0000 (16:42 +0200)]
s3:smb2_server: fix drain_socket error handling

smbd_smb2_request_error_ex() should return NTSTATUS and the caller
will terminate the connection.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agosmbd: Fix a typo
Volker Lendecke [Wed, 27 Nov 2013 10:08:20 +0000 (10:08 +0000)]
smbd: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosmbd: Remove a "set but unused" variable
Volker Lendecke [Wed, 27 Nov 2013 09:13:52 +0000 (09:13 +0000)]
smbd: Remove a "set but unused" variable

This is should have been in a793ac0

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Nov 27 13:30:48 CET 2013 on sn-devel-104

10 years agotorture3: Reproducer for bug 10284
Volker Lendecke [Thu, 21 Nov 2013 15:16:33 +0000 (16:16 +0100)]
torture3: Reproducer for bug 10284

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Nov 26 22:53:04 CET 2013 on sn-devel-104

10 years agosmbd: Fix bug 10284
Volker Lendecke [Thu, 21 Nov 2013 20:05:29 +0000 (21:05 +0100)]
smbd: Fix bug 10284

If we msg_read_send on a nonempty channel, we create one
tevent_immediate. If we directly receive another message and from
within the msg_read_send's tevent_req callback we immediately do
another msg_read_send, we end up with two tevent_immediate events for
msg_channel_trigger with just one incoming message. Test to follow.

This patch simplifies msg_channel.c by removing the explicit immediate
events. Instead, it relies on the implicit immediate event available
via tevent_req_defer_callback. For messages received from tdb with
a msg_read_send req pending, we directly finish that request without
putting the message on the queue.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10284
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agosmbd: Pull mtime handling into open_file_ntcreate
Volker Lendecke [Fri, 22 Nov 2013 16:24:42 +0000 (16:24 +0000)]
smbd: Pull mtime handling into open_file_ntcreate

This is a performance improvement for heavily contended files, in
particular in a cluster. The separate call to get_file_infos makes us
pull the locking.tdb record twice per open. For a contended file this
can be a performance penalty, this gets the # of record accesses for
the open/close cycle down from 3 to 2.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Nov 23 00:40:49 CET 2013 on sn-devel-104

10 years agosmbd: Point reply_open at the correct stat struct
Volker Lendecke [Fri, 22 Nov 2013 16:17:44 +0000 (16:17 +0000)]
smbd: Point reply_open at the correct stat struct

Not sure if anybody will ever notice this these days, but the same is
done in the createfile calls.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agosmbd: Factor out get_share_mode_write_time of get_file_infos
Volker Lendecke [Fri, 22 Nov 2013 14:36:49 +0000 (14:36 +0000)]
smbd: Factor out get_share_mode_write_time of get_file_infos

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotorture: test get/set compression ioctl permissions
David Disseldorp [Mon, 18 Nov 2013 13:54:39 +0000 (14:54 +0100)]
torture: test get/set compression ioctl permissions

Windows Server 2012[r2] exhibits some strange behaviour with regard
to handling the compression fsctls.
[READ/WRITE]_ATTR permissions are not required for the corresponding
get/set compression ioctls. WRITE_DATA is required for set compression.

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): Fri Nov 22 19:57:48 CET 2013 on sn-devel-104

10 years agotorture: split open from test_setup_create_fill
David Disseldorp [Mon, 18 Nov 2013 13:54:38 +0000 (14:54 +0100)]
torture: split open from test_setup_create_fill

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agosmbd/open: disable compression with FILE_NO_COMPRESSION
David Disseldorp [Mon, 18 Nov 2013 13:54:37 +0000 (14:54 +0100)]
smbd/open: disable compression with FILE_NO_COMPRESSION

Files and directories created with FILE_NO_COMPRESSION should not
inherit the compression attribute from their parent directory.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3-smbd: support FILE_ATTRIBUTE_COMPRESSED
David Disseldorp [Mon, 18 Nov 2013 13:54:36 +0000 (14:54 +0100)]
s3-smbd: support FILE_ATTRIBUTE_COMPRESSED

The FILE_ATTRIBUTE_COMPRESSED flag is computed based on whether the
filesystem exposes the FILE_FILE_COMPRESSION capability, and whether
SMB_VFS_GET_COMPRESSION() reports that the file or directory is
currently compressed.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agosmbd: split out dos_mode debug print function
David Disseldorp [Mon, 18 Nov 2013 13:54:35 +0000 (14:54 +0100)]
smbd: split out dos_mode debug print function

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agovfs_btrfs: advertise per-file compression capability
David Disseldorp [Mon, 18 Nov 2013 13:54:34 +0000 (14:54 +0100)]
vfs_btrfs: advertise per-file compression capability

Plumb into the get_fs_capabilities code path to advertise the
FILE_FILE_COMPRESSION attribute.

Also, document file compression support in the VFS btrfs man page.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agovfs_btrfs: fix copy-chunk dest unlock args
David Disseldorp [Mon, 18 Nov 2013 13:54:33 +0000 (14:54 +0100)]
vfs_btrfs: fix copy-chunk dest unlock args

src_fsp used instead of dest_fsp for unlock.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agovfs_btrfs: add [GET/SET]_COMPRESSION handlers
David Disseldorp [Mon, 18 Nov 2013 13:54:32 +0000 (14:54 +0100)]
vfs_btrfs: add [GET/SET]_COMPRESSION handlers

Translate such requests into FS_IOC_GETFLAGS and FS_IOC_SETFLAGS ioctls
respectively. The module makes no distinction between compression types,
only whether or not compression is enabled.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agosmb2/ioctl: add support for FSCTL_[GET/SET]_COMPRESSION
David Disseldorp [Mon, 18 Nov 2013 13:54:31 +0000 (14:54 +0100)]
smb2/ioctl: add support for FSCTL_[GET/SET]_COMPRESSION

In line with MS-FSCC 2.3.47, the FSCTL_SET_COMPRESSION ioctl allows
remote SMB2 clients to enable and disable compression on a
per-file or per-directory basis.
Compression state can be retrieved using the FSCTL_GET_COMPRESSION
request.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agovfs: add [GET/SET]_COMPRESSION hooks
David Disseldorp [Mon, 18 Nov 2013 13:54:30 +0000 (14:54 +0100)]
vfs: add [GET/SET]_COMPRESSION hooks

The VFS interfaces are sychronous, as the operations only modify
meta-data.
These hooks are dependent on support for transparent compression by the
underlying filesystem - vfs_default returns INVALID_DEVICE_REQUEST.
Support for other filesystems providing transparent comression, such as
Btrfs and ZFS, can be added in future.

The get_compression function takes fsp and smb_fname arguments. The
smb_fname argument is needed due to the current dosmode() code-path.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotorture: attempt to set compression via SetInfo
David Disseldorp [Mon, 18 Nov 2013 13:54:29 +0000 (14:54 +0100)]
torture: attempt to set compression via SetInfo

Doing so should give a successful SetInfo response, however the
attribute should not be set in subsequent GetInfo / ioctl responses.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotorture: test dir non-inherit in compress_inherit_disable
David Disseldorp [Mon, 18 Nov 2013 13:54:28 +0000 (14:54 +0100)]
torture: test dir non-inherit in compress_inherit_disable

Also add a note reguarding Windows 2008GM copy-chunk note:
Windows 2008GM (non-R2) fails the copy-chunk src=dest overlap test, as
it appears to use a different chunk copy algorithm to 208R2.
Takeaway advice is to avoid using copy-chunk when the source and
destination ranges overlap in the same file.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoselftest/s3: run smb2.ioctl against FS specific share
David Disseldorp [Mon, 18 Nov 2013 13:54:27 +0000 (14:54 +0100)]
selftest/s3: run smb2.ioctl against FS specific share

Run the smb2.ioctl tests against the filesystem specific share.
This adds ~12s to the selftest runtime on my SSD+Btrfs setup.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoselftest/s3: expose share with FS applicable config
David Disseldorp [Mon, 18 Nov 2013 13:54:26 +0000 (14:54 +0100)]
selftest/s3: expose share with FS applicable config

Attempt to determine the underlying test share filesystem using statfs.
If the filesystem is detected and an applicable configuration is
available, then apply it to a new filesystem specific share.
Btrfs is currently the only VFS module to utilize this logic.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoRename the profile enums with a SAMBA_ prefix to avoid conflict with system files.
Jeremy Allison [Fri, 22 Nov 2013 05:33:33 +0000 (21:33 -0800)]
Rename the profile enums with a SAMBA_ prefix to avoid conflict with system files.

WRITE_FLUSH is defined in fs.h in Linux.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agolib/param: Consolidate code to enable smb signing on the server, always enable on...
Andrew Bartlett [Mon, 14 Oct 2013 00:45:42 +0000 (13:45 +1300)]
lib/param: Consolidate code to enable smb signing on the server, always enable on AD DC

This uses the code from the source4/ SMB server (the NTVFS smb server)
in common, to force SMB Signing to be on when we are an AD DC.

Andrew Bartlett

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Nov 22 13:13:05 CET 2013 on sn-devel-104

10 years agos3-winbind: Pass the group name to fillup_pw_field().
Andreas Schneider [Mon, 18 Nov 2013 13:58:14 +0000 (14:58 +0100)]
s3-winbind: Pass the group name to fillup_pw_field().

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Nov 22 02:04:54 CET 2013 on sn-devel-104

10 years agos3-lib: Add grpname to talloc_sub_specified().
Andreas Schneider [Mon, 18 Nov 2013 13:58:04 +0000 (14:58 +0100)]
s3-lib: Add grpname to talloc_sub_specified().

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agolib/util: use proper include for struct stat
Christian Ambach [Mon, 18 Nov 2013 19:02:41 +0000 (20:02 +0100)]
lib/util: use proper include for struct stat

use <sys/stat.h> instead of forward declaring it
This fixes the build on AIX

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

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Thu Nov 21 22:12:45 CET 2013 on sn-devel-104

10 years agotorture: test printing using "XPS_PASS" datatype
Arvid Requate [Thu, 21 Nov 2013 11:40:15 +0000 (12:40 +0100)]
torture: test printing using "XPS_PASS" datatype

The "XPS_PASS" datatype is used by Windows 8.

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

Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Nov 21 15:01:30 CET 2013 on sn-devel-104

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>
10 years agoreplace: Fix developer build on BSD.
Andreas Schneider [Tue, 19 Nov 2013 17:14:24 +0000 (18:14 +0100)]
replace: Fix developer build on BSD.

This fixes bsd_attr_list() calling geteuid().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Nov 21 03:37:59 CET 2013 on sn-devel-104

10 years agodocs: Add winbindd to destination parameter in smbcontrol manpage
Christof Schmitt [Wed, 20 Nov 2013 23:19:37 +0000 (16:19 -0700)]
docs: Add winbindd to destination parameter in smbcontrol manpage

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotestparm: don't warn for TCP_NODELAY in socket options.
Michael Adam [Wed, 20 Nov 2013 06:03:15 +0000 (07:03 +0100)]
testparm: don't warn for TCP_NODELAY in socket options.

TCP_NODELAY is set by default, so we should not warn.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agohandle later iniparser version assigning a zero length string value for 'key='
Noel Power [Tue, 5 Nov 2013 17:24:46 +0000 (17:24 +0000)]
handle later iniparser version assigning a zero length string value for 'key='

older iniparser versions ( like that used in upstream samba ) ignore 'key='
entries, the key is not entered into the dictionary at all. Later
versions of iniparse specifically handle the following special cases

* key=
* key=;
* key=#

by assigning a value of "" ( a zero length string ) to the key
in the dictionary.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Nov 20 16:12:13 CET 2013 on sn-devel-104

10 years agotestparm: Warnings should not cause failure
Martin Schwenke [Mon, 4 Nov 2013 19:31:29 +0000 (06:31 +1100)]
testparm: Warnings should not cause failure

Remove the return code of 1 associated with some warnings.  Warnings
should not cause failure.  If any of these cases should cause a
failure then they should be changed to errors.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-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 20 12:19:59 CET 2013 on sn-devel-104

10 years agodebug: remove unused sys_adminlog
David Disseldorp [Tue, 19 Nov 2013 23:31:27 +0000 (00:31 +0100)]
debug: remove unused sys_adminlog

printing.c was the last user of this syslog wrapper.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Nov 20 10:19:32 CET 2013 on sn-devel-104

10 years agoprinting: use DEBUG instead of sys_adminlog
David Disseldorp [Tue, 19 Nov 2013 23:20:40 +0000 (00:20 +0100)]
printing: use DEBUG instead of sys_adminlog

sys_adminlog() is another syslog wrapper. Use DEBUG(0, ...) instead,
which offers the same syslog(LOG_ERR) behaviour.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agoprinting: fix double space in debug statement
David Disseldorp [Sun, 20 Oct 2013 19:18:23 +0000 (21:18 +0200)]
printing: fix double space in debug statement

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agoloadparm: use lp_printername ctx param instead of tos
David Disseldorp [Wed, 16 Oct 2013 19:52:29 +0000 (21:52 +0200)]
loadparm: use lp_printername ctx param instead of tos

lp_printername() takes a TALLOC_CTX argument, but proceeds to use
talloc_tos() in a subsequent lp__printername call. Fix it to use the
parameter - most callers use talloc_tos() as the argument, the others
have a temporary context around.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agomessaging: use local talloc ctx instead of talloc_tos
David Disseldorp [Wed, 16 Oct 2013 16:31:17 +0000 (18:31 +0200)]
messaging: use local talloc ctx instead of talloc_tos

messaging_tdb_send() allocates a stackframe and stores it in a local
variable, subsequent allocations should use the variable instead of
calling talloc_tos().

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agoprinting: return WERROR from print_access_check
David Disseldorp [Thu, 26 Sep 2013 11:24:15 +0000 (13:24 +0200)]
printing: return WERROR from print_access_check

print_access_check() currently returns a bool based on whether access is
granted or denied. Errno is set on failure, but none of the callers use
it.
This change converts print_access_check() to return a WERROR.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agosmbd: Fix a talloc hierarchy problem in msg_channel
Volker Lendecke [Thu, 14 Nov 2013 20:30:49 +0000 (21:30 +0100)]
smbd: Fix a talloc hierarchy problem in msg_channel

When tearing down a watch_send with an open tevent_immediate, we
talloc_free the msg_channel while the tevent_immediate still references
it. Don't make the tevent_immediate outlive the msg_channel.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=10250
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Nov 20 00:13:51 CET 2013 on sn-devel-104

10 years agonetapi: Add support for info level 502 in NetShareAdd.
Hans Leidekker [Mon, 18 Nov 2013 17:32:41 +0000 (18:32 +0100)]
netapi: Add support for info level 502 in NetShareAdd.

Signed-off-by: Hans Leidekker <hans@meelstraat.net>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Nov 19 21:48:17 CET 2013 on sn-devel-104

10 years agosvcctl: Fix IDL for svcctl_OpenServiceA().
Hans Leidekker [Mon, 18 Nov 2013 17:39:57 +0000 (18:39 +0100)]
svcctl: Fix IDL for svcctl_OpenServiceA().

Signed-off-by: Hans Leidekker <hans@meelstraat.net>
Reviewed-by: Guenther Deschner <gd@samba.org>
10 years agoctdb-tests: Coverity fixes
Amitay Isaacs [Mon, 11 Nov 2013 01:41:17 +0000 (12:41 +1100)]
ctdb-tests: Coverity fixes

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Nov 19 19:06:51 CET 2013 on sn-devel-104

10 years agoctdb-tcp: Coverity fixes
Amitay Isaacs [Mon, 11 Nov 2013 01:41:00 +0000 (12:41 +1100)]
ctdb-tcp: Coverity fixes

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoctdb-tools/ctdb: Coverity fixes
Amitay Isaacs [Mon, 11 Nov 2013 01:40:44 +0000 (12:40 +1100)]
ctdb-tools/ctdb: Coverity fixes

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoctdb-common: Coverity fixes
Amitay Isaacs [Mon, 11 Nov 2013 01:40:28 +0000 (12:40 +1100)]
ctdb-common: Coverity fixes

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoctdb-client: Coverity fixes
Amitay Isaacs [Mon, 11 Nov 2013 01:39:48 +0000 (12:39 +1100)]
ctdb-client: Coverity fixes

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoctdb-server: Coverity fixes
Amitay Isaacs [Mon, 11 Nov 2013 01:39:27 +0000 (12:39 +1100)]
ctdb-server: Coverity fixes

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agodocs: remove duplicate "used" from smb.conf manpage.
Günther Deschner [Tue, 19 Nov 2013 11:36:53 +0000 (12:36 +0100)]
docs: remove duplicate "used" from smb.conf manpage.

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): Tue Nov 19 14:40:40 CET 2013 on sn-devel-104

10 years agodocs: remove duplicate "line" from smb.conf manpage.
Günther Deschner [Tue, 19 Nov 2013 11:34:54 +0000 (12:34 +0100)]
docs: remove duplicate "line" from smb.conf manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: remove duplicate "must" from smb.conf manpage.
Günther Deschner [Tue, 19 Nov 2013 11:34:33 +0000 (12:34 +0100)]
docs: remove duplicate "must" from smb.conf manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: remove duplicate "on" from smb.conf manpage.
Günther Deschner [Tue, 19 Nov 2013 11:34:05 +0000 (12:34 +0100)]
docs: remove duplicate "on" from smb.conf manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: remove duplicate "or" from smb.conf manpage.
Günther Deschner [Tue, 19 Nov 2013 11:33:33 +0000 (12:33 +0100)]
docs: remove duplicate "or" from smb.conf manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: remove duplicate "not" from smb.conf manpage.
Günther Deschner [Tue, 19 Nov 2013 11:20:12 +0000 (12:20 +0100)]
docs: remove duplicate "not" from smb.conf manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: remove duplicate "to" from smb.conf manpage.
Günther Deschner [Tue, 19 Nov 2013 11:18:57 +0000 (12:18 +0100)]
docs: remove duplicate "to" from smb.conf manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: remove duplicate "the" from smb.conf manpage.
Günther Deschner [Tue, 19 Nov 2013 11:17:19 +0000 (12:17 +0100)]
docs: remove duplicate "the" from smb.conf manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: remove duplicate "a" from vfs_cacheprime manpage.
Günther Deschner [Tue, 19 Nov 2013 11:14:45 +0000 (12:14 +0100)]
docs: remove duplicate "a" from vfs_cacheprime manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: document remaining undocumented options in net manpage.
Günther Deschner [Mon, 18 Nov 2013 16:26:28 +0000 (17:26 +0100)]
docs: document remaining undocumented options in net manpage.

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): Tue Nov 19 12:05:56 CET 2013 on sn-devel-104

10 years agodocs: add net registry import specific options in net manpage.
Günther Deschner [Mon, 18 Nov 2013 16:15:57 +0000 (17:15 +0100)]
docs: add net registry import specific options in net manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: add net rpc registry check specific options in net manpage.
Günther Deschner [Mon, 18 Nov 2013 16:11:31 +0000 (17:11 +0100)]
docs: add net rpc registry check specific options in net manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: add net groupmap set specific options in net manpage.
Günther Deschner [Mon, 18 Nov 2013 15:28:10 +0000 (16:28 +0100)]
docs: add net groupmap set specific options in net manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: add net rpc share migrate specific options in net manpage.
Günther Deschner [Mon, 18 Nov 2013 15:22:52 +0000 (16:22 +0100)]
docs: add net rpc share migrate specific options in net manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: add net idmap specific options in net manpage.
Günther Deschner [Mon, 18 Nov 2013 15:17:32 +0000 (16:17 +0100)]
docs: add net idmap specific options in net manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: add net rpc vampire specific options in net manpage.
Günther Deschner [Mon, 18 Nov 2013 15:08:19 +0000 (16:08 +0100)]
docs: add net rpc vampire specific options in net manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: mention more options in net manpage.
Günther Deschner [Mon, 18 Nov 2013 15:00:39 +0000 (16:00 +0100)]
docs: mention more options in net manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: use popt.autohelp entity in samba.8 manpage.
Günther Deschner [Mon, 18 Nov 2013 14:53:49 +0000 (15:53 +0100)]
docs: use popt.autohelp entity in samba.8 manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: use popt.autohelp entity in smbd manpage.
Günther Deschner [Mon, 18 Nov 2013 14:53:29 +0000 (15:53 +0100)]
docs: use popt.autohelp entity in smbd manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: use popt.autohelp entity in winbindd manpage.
Günther Deschner [Mon, 18 Nov 2013 14:53:08 +0000 (15:53 +0100)]
docs: use popt.autohelp entity in winbindd manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: use popt.autohelp entity in nmbd manpage.
Günther Deschner [Mon, 18 Nov 2013 14:52:35 +0000 (15:52 +0100)]
docs: use popt.autohelp entity in nmbd manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: fix ntlm_auth manpage.
Günther Deschner [Mon, 18 Nov 2013 13:45:51 +0000 (14:45 +0100)]
docs: fix ntlm_auth manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: fix smbcontrol manpage.
Günther Deschner [Mon, 18 Nov 2013 12:52:59 +0000 (13:52 +0100)]
docs: fix smbcontrol manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: use &popt.autohelp entity in pdbedit manpage.
Günther Deschner [Mon, 18 Nov 2013 12:46:06 +0000 (13:46 +0100)]
docs: use &popt.autohelp entity in pdbedit manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: fix testparm manpage.
Günther Deschner [Mon, 18 Nov 2013 12:45:38 +0000 (13:45 +0100)]
docs: fix testparm manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: use popt.autohelp entity in dbwrap-tools manpage.
Günther Deschner [Mon, 18 Nov 2013 11:55:02 +0000 (12:55 +0100)]
docs: use popt.autohelp entity in dbwrap-tools manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: document all long option names in nmblookup manpage.
Günther Deschner [Mon, 18 Nov 2013 11:51:42 +0000 (12:51 +0100)]
docs: document all long option names in nmblookup manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: remove unsupported -h option and use popt.autohelp entity in rpcclient manpage.
Günther Deschner [Mon, 18 Nov 2013 11:39:00 +0000 (12:39 +0100)]
docs: remove unsupported -h option and use popt.autohelp entity in rpcclient manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: mention --sddl and --domain-sid in smbcacls manpage.
Günther Deschner [Mon, 18 Nov 2013 11:35:16 +0000 (12:35 +0100)]
docs: mention --sddl and --domain-sid in smbcacls manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: mention --query-security-info|--set-security-info in smbcacls manpage.
Günther Deschner [Mon, 18 Nov 2013 11:25:12 +0000 (12:25 +0100)]
docs: mention --query-security-info|--set-security-info in smbcacls manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: remove duplicate -e option from smbcacls manpage.
Günther Deschner [Mon, 18 Nov 2013 11:21:24 +0000 (12:21 +0100)]
docs: remove duplicate -e option from smbcacls manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: use popt.autohelp entity in smbcacls manpage.
Günther Deschner [Mon, 18 Nov 2013 11:18:34 +0000 (12:18 +0100)]
docs: use popt.autohelp entity in smbcacls manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: remove unsupported -h option from smbcacls manpage.
Günther Deschner [Mon, 18 Nov 2013 11:17:36 +0000 (12:17 +0100)]
docs: remove unsupported -h option from smbcacls manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: use popt.autohelp and remove duplicate -e option from smbclient manpage.
Günther Deschner [Mon, 18 Nov 2013 11:16:00 +0000 (12:16 +0100)]
docs: use popt.autohelp and remove duplicate -e option from smbclient manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: better document -e|--encrypt option globally.
Günther Deschner [Mon, 18 Nov 2013 11:12:23 +0000 (12:12 +0100)]
docs: better document -e|--encrypt option globally.

This is taken from smbclient manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: mention -B|--browse to smbclient manpage.
Günther Deschner [Mon, 18 Nov 2013 11:10:29 +0000 (12:10 +0100)]
docs: mention -B|--browse to smbclient manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: mention more long option names in smbcquotas manpage.
Günther Deschner [Mon, 18 Nov 2013 10:59:54 +0000 (11:59 +0100)]
docs: mention more long option names in smbcquotas manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: mention --update and --encrypt in smbget manpage.
Günther Deschner [Mon, 18 Nov 2013 10:51:55 +0000 (11:51 +0100)]
docs: mention --update and --encrypt in smbget manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: use popt.autohelp in smbtree manpage.
Günther Deschner [Mon, 18 Nov 2013 10:44:28 +0000 (11:44 +0100)]
docs: use popt.autohelp in smbtree manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: use popt.samba.common entity in profiles manpage.
Günther Deschner [Mon, 18 Nov 2013 10:41:00 +0000 (11:41 +0100)]
docs: use popt.samba.common entity in profiles manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: mention --change-sid|--new-sid in profiles manpage.
Günther Deschner [Mon, 18 Nov 2013 10:40:35 +0000 (11:40 +0100)]
docs: mention --change-sid|--new-sid in profiles manpage.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agodocs: add new popt.autohelp entity.
Günther Deschner [Fri, 15 Nov 2013 15:57:52 +0000 (16:57 +0100)]
docs: add new popt.autohelp entity.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>