samba.git
10 years agos4-lsa: Fix a user after free in dcesrv_lsa_lookup_name().
Andreas Schneider [Thu, 7 Nov 2013 14:55:29 +0000 (15:55 +0100)]
s4-lsa: Fix a user after free in dcesrv_lsa_lookup_name().

Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
10 years agotest_smbclient_tarmode.pl: remove unneccesary arg defaults
David Disseldorp [Tue, 29 Oct 2013 11:08:57 +0000 (12:08 +0100)]
test_smbclient_tarmode.pl: remove unneccesary arg defaults

The host, share and localpath arguments should not take default values.
Check that these required arguments are specified.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
Autobuild-User(master): Jim McDonough <jmcd@samba.org>
Autobuild-Date(master): Tue Nov  5 16:40:20 CET 2013 on sn-devel-104

10 years agotest_smbclient_tarmode.pl: depend only on perl v5.10
Aurélien Aptel [Mon, 12 Aug 2013 14:29:41 +0000 (16:29 +0200)]
test_smbclient_tarmode.pl: depend only on perl v5.10

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: remove all ./ prefix when dealing with remote files
Aurélien Aptel [Mon, 5 Aug 2013 16:58:39 +0000 (18:58 +0200)]
test_smbclient_tarmode.pl: remove all ./ prefix when dealing with remote files

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: sanitize $DIR + whitespace
Aurélien Aptel [Mon, 5 Aug 2013 16:57:54 +0000 (18:57 +0200)]
test_smbclient_tarmode.pl: sanitize $DIR + whitespace

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: use -n flag for specifiying hostname (was ambiguous with...
Aurélien Aptel [Mon, 5 Aug 2013 16:56:04 +0000 (18:56 +0200)]
test_smbclient_tarmode.pl: use -n flag for specifiying hostname (was ambiguous with help)

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: enable create with exclude tests
Aurélien Aptel [Mon, 28 Oct 2013 17:07:25 +0000 (18:07 +0100)]
test_smbclient_tarmode.pl: enable create with exclude tests

[ddiss@samba.org: split from clitar implementation commit]
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add subunit output flag
Aurélien Aptel [Mon, 5 Aug 2013 16:55:25 +0000 (18:55 +0200)]
test_smbclient_tarmode.pl: add subunit output flag

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add test for interactive session
Aurélien Aptel [Wed, 24 Jul 2013 14:49:06 +0000 (16:49 +0200)]
test_smbclient_tarmode.pl: add test for interactive session

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add extraction regex tests, verbose flag
Aurélien Aptel [Mon, 22 Jul 2013 16:49:51 +0000 (18:49 +0200)]
test_smbclient_tarmode.pl: add extraction regex tests, verbose flag

* reset_remote() now removes the whole share content
* verbose flag to control stdout of each test
* extraction with regex test

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: test regex flag behaviour
Aurélien Aptel [Fri, 25 Oct 2013 13:12:27 +0000 (15:12 +0200)]
test_smbclient_tarmode.pl: test regex flag behaviour

[ddiss@samba.org: split from clitar implementation commit]
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add large file and long path tests
Aurélien Aptel [Wed, 17 Jul 2013 16:54:07 +0000 (18:54 +0200)]
test_smbclient_tarmode.pl: add large file and long path tests

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add simple wildcard test
Aurélien Aptel [Wed, 17 Jul 2013 14:27:01 +0000 (16:27 +0200)]
test_smbclient_tarmode.pl: add simple wildcard test

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: test interactive command
Aurélien Aptel [Fri, 25 Oct 2013 12:55:47 +0000 (14:55 +0200)]
test_smbclient_tarmode.pl: test interactive command

[ddiss@samba.org: split from clitar implementation commit]
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: whitespace
Aurélien Aptel [Tue, 16 Jul 2013 13:52:51 +0000 (15:52 +0200)]
test_smbclient_tarmode.pl: whitespace

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: let --test run multiple tests
Aurélien Aptel [Tue, 16 Jul 2013 12:46:02 +0000 (14:46 +0200)]
test_smbclient_tarmode.pl: let --test run multiple tests

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: sanitize input, use File::Temp instead of hardcoding temp dir
Aurélien Aptel [Mon, 15 Jul 2013 22:34:41 +0000 (00:34 +0200)]
test_smbclient_tarmode.pl: sanitize input, use File::Temp instead of hardcoding temp dir

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: cosmetic changes
Aurélien Aptel [Mon, 15 Jul 2013 22:10:09 +0000 (00:10 +0200)]
test_smbclient_tarmode.pl: cosmetic changes

- Add whitespace around paren in if/for/while/... blocks
- Don't split if/elsif/else cascade

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add copyright header
Aurélien Aptel [Mon, 15 Jul 2013 21:41:15 +0000 (23:41 +0200)]
test_smbclient_tarmode.pl: add copyright header

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: samba 3.6.9 can print a empty attribute string
Aurélien Aptel [Mon, 15 Jul 2013 17:04:43 +0000 (19:04 +0200)]
test_smbclient_tarmode.pl: samba 3.6.9 can print a empty attribute string

While changing my setup, I discovered that for some unknown reasons
samba (serv/client) doesn't print any attributes for normal files.

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: disable failing tests for now
Aurélien Aptel [Mon, 15 Jul 2013 17:04:07 +0000 (19:04 +0200)]
test_smbclient_tarmode.pl: disable failing tests for now

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: make script work on older Perl (now only need 5.14)
Aurélien Aptel [Mon, 15 Jul 2013 17:01:58 +0000 (19:01 +0200)]
test_smbclient_tarmode.pl: make script work on older Perl (now only need 5.14)

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: fix a few minor typos
David Disseldorp [Sun, 14 Jul 2013 13:22:36 +0000 (15:22 +0200)]
test_smbclient_tarmode.pl: fix a few minor typos

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: refactor, cleanup and document in POD
Aurélien Aptel [Thu, 4 Jul 2013 15:54:43 +0000 (17:54 +0200)]
test_smbclient_tarmode.pl: refactor, cleanup and document in POD

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add tests for wildcard pattern (cI, cX, cF, xF).
Aurélien Aptel [Wed, 3 Jul 2013 14:09:03 +0000 (16:09 +0200)]
test_smbclient_tarmode.pl: add tests for wildcard pattern (cI, cX, cF, xF).

* add some test for wildcard pattern and r switch, when possible (-r
  is very buggy)
* change default DIR to "tar_test_dir"
* add tests for attributes (nohidden, nosystem which are undocumented)

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add a first simple wildcard test
Aurélien Aptel [Tue, 2 Jul 2013 21:22:24 +0000 (23:22 +0200)]
test_smbclient_tarmode.pl: add a first simple wildcard test

* File::list() now takes an absolute path
* check_remote() now takes the dir to check
* added an optional File destructor
* added cleanpath() to remove unecessary slashes
* File::new_remote() can take an absolute path
* File->{dir} is now absolute from the localpath

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add a clean option to erase the local path
Aurélien Aptel [Tue, 2 Jul 2013 21:20:53 +0000 (23:20 +0200)]
test_smbclient_tarmode.pl: add a clean option to erase the local path

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add test for xF
Aurélien Aptel [Tue, 2 Jul 2013 09:16:13 +0000 (11:16 +0200)]
test_smbclient_tarmode.pl: add test for xF

Add test for extracting from a file list.

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add test for creation w/ filelist
Aurélien Aptel [Mon, 1 Jul 2013 16:01:50 +0000 (18:01 +0200)]
test_smbclient_tarmode.pl: add test for creation w/ filelist

* add test_creation_list()
* add parameter to File::new_local() to provide file content

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add extraction test for I and X.
Aurélien Aptel [Mon, 1 Jul 2013 15:44:54 +0000 (17:44 +0200)]
test_smbclient_tarmode.pl: add extraction test for I and X.

* add test for xI and xX
* fix bug in check_remote(): print filename instead of ref
* replace hash by list in test_extraction_normal()

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add tests for X and I.
Aurélien Aptel [Mon, 1 Jul 2013 15:25:29 +0000 (17:25 +0200)]
test_smbclient_tarmode.pl: add tests for X and I.

Found a bug while doing so. X doesn't exclude file path.

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add option to choose and run a single test
Aurélien Aptel [Fri, 28 Jun 2013 16:36:22 +0000 (18:36 +0200)]
test_smbclient_tarmode.pl: add option to choose and run a single test

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add first extraction test
Aurélien Aptel [Fri, 28 Jun 2013 16:10:56 +0000 (18:10 +0200)]
test_smbclient_tarmode.pl: add first extraction test

* add normal extraction test
* add (or bring back)
  - File::list() -- return list of File in a path
  - File::tree() -- same but recursive
  - File::walk() -- high order function to iterate on a File hierarchy
* compute md5 sum when not cached
* add check_remote(), will be useful for all extraction tests
* fix consecutive slashes bug in some File::xxxpath()

At this point, the script can replace the old
test_smbclient_tarmode.sh in terms of features.

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: remove unused functions
Aurélien Aptel [Fri, 28 Jun 2013 01:35:21 +0000 (03:35 +0200)]
test_smbclient_tarmode.pl: remove unused functions

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add nested dirs test
Aurélien Aptel [Fri, 28 Jun 2013 01:30:06 +0000 (03:30 +0200)]
test_smbclient_tarmode.pl: add nested dirs test

add a test to check that the backup handles nested directories.

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: refactored file related function to a File package
Aurélien Aptel [Fri, 28 Jun 2013 01:16:29 +0000 (03:16 +0200)]
test_smbclient_tarmode.pl: refactored file related function to a File package

all the localpath(), remotepath() and all file related functions were
getting out of hand. The tests are now simpler to write.

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add test for "newer than" (`N` flag)
Aurélien Aptel [Thu, 27 Jun 2013 18:30:44 +0000 (20:30 +0200)]
test_smbclient_tarmode.pl: add test for "newer than" (`N` flag)

add test for the N FILE flag which makes smbclient only backup files
newer or as new as FILE.

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add test for reset mode
Aurélien Aptel [Thu, 27 Jun 2013 16:53:34 +0000 (18:53 +0200)]
test_smbclient_tarmode.pl: add test for reset mode

add a new test for the reset mode which can be triggered via `-a` or
`tarmode reset`.

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: improve incremental test
Aurélien Aptel [Thu, 27 Jun 2013 13:07:42 +0000 (15:07 +0200)]
test_smbclient_tarmode.pl: improve incremental test

instead of using archived and non-archived files for the test, use
archive and various flags (system, hidden, readonly).

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agotest_smbclient_tarmode.pl: add proper argument parsing for configuration.
Aurélien Aptel [Thu, 27 Jun 2013 13:00:24 +0000 (15:00 +0200)]
test_smbclient_tarmode.pl: add proper argument parsing for configuration.

documentation is included in the script in POD format.

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agoinitial commit of the new tarmode test script.
Aurélien Aptel [Wed, 26 Jun 2013 18:41:22 +0000 (20:41 +0200)]
initial commit of the new tarmode test script.

This script will hopefully replace and improve test_smbclient_tarmode.sh.
Right now it only does normal and incremental tests.

Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jim McDonough <jmcd@samba.org>
10 years agoAdd regression test for bug #10229 - No access check verification on stream files.
Jeremy Allison [Tue, 29 Oct 2013 22:57:01 +0000 (15:57 -0700)]
Add regression test for bug #10229 - No access check verification on stream files.

Checks against a file with attribute READONLY, and
a security descriptor denying WRITE_DATA access.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Nov  4 23:10:10 CET 2013 on sn-devel-104

10 years agoFix bug #10229 - No access check verification on stream files.
Jeremy Allison [Mon, 28 Oct 2013 23:59:20 +0000 (16:59 -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>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: David Disseldorp <ddiss@suse.de>
10 years agotorture: Add smb2.rename.rename_dir_bench
Volker Lendecke [Thu, 31 Oct 2013 11:37:36 +0000 (12:37 +0100)]
torture: Add smb2.rename.rename_dir_bench

This is a little benchmark test excercising parallel directory renames. With
lots of open files directory renames get pretty slow against some SMB server
implementations.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agotestparm: Add warning for socket options.
Andreas Schneider [Mon, 4 Nov 2013 11:32:46 +0000 (12:32 +0100)]
testparm: Add warning for socket options.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Mon Nov  4 16:52:25 CET 2013 on sn-devel-104

10 years agotestparm: Reformat text and add a newline.
Andreas Schneider [Mon, 4 Nov 2013 11:32:45 +0000 (12:32 +0100)]
testparm: Reformat text and add a newline.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agovfs: Fix some build warnings in glusterfs.
Andreas Schneider [Mon, 4 Nov 2013 11:32:05 +0000 (12:32 +0100)]
vfs: Fix some build warnings in glusterfs.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agovfs: Fix building the glusterfs module.
Andreas Schneider [Mon, 4 Nov 2013 11:32:04 +0000 (12:32 +0100)]
vfs: Fix building the glusterfs module.

Using calloc directly throws an error. This fixes building the glusterfs
module.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agos3:rpc_server: rpc_create_tcpip_sockets() may leak talloc_stackframe on failure
Gregor Beck [Fri, 1 Nov 2013 08:02:48 +0000 (09:02 +0100)]
s3:rpc_server: rpc_create_tcpip_sockets() may leak talloc_stackframe on failure

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

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Nov  4 12:30:27 CET 2013 on sn-devel-104

10 years agos3:rpcclient: fix a leaked talloc_stackframe in cmd_epmapper
Gregor Beck [Fri, 1 Nov 2013 07:59:53 +0000 (08:59 +0100)]
s3:rpcclient: fix a leaked talloc_stackframe in cmd_epmapper

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

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos3:rpc_client: fix a leaked talloc_stackframe
Gregor Beck [Fri, 1 Nov 2013 07:54:27 +0000 (08:54 +0100)]
s3:rpc_client: fix a leaked talloc_stackframe

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

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agosmbd: Invalidate the session correctly.
Jeremy Allison [Mon, 23 Sep 2013 21:10:27 +0000 (14:10 -0700)]
smbd: Invalidate the session correctly.

When a session is invalidated then we must also ensure it isn't used in
any pending requests being processed.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agos4-dsdb: instanceType NC_HEAD is only allowed combined with WRITE for an originating...
Nadezhda Ivanova [Tue, 29 Oct 2013 16:17:27 +0000 (18:17 +0200)]
s4-dsdb: instanceType NC_HEAD is only allowed combined with WRITE for an originating add operation

As described in MS-ATDS 3.1.1.5.2.8.

Signed-off-by: Nadezhda Ivanova <nivanova@symas.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Nadezhda Ivanova <nivanova@samba.org>
Autobuild-Date(master): Sun Nov  3 16:17:30 CET 2013 on sn-devel-104

10 years agodoc/msdfs proxy: extend example for multi target config
Björn Jacke [Thu, 31 Oct 2013 11:01:22 +0000 (12:01 +0100)]
doc/msdfs proxy: extend example for multi target config

Signed-off-by: Björn Jacke <bj@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Nov  1 00:12:19 CET 2013 on sn-devel-104

10 years agosmbd: Support multiple dfs targets for msdfs proxy shares
Volker Lendecke [Wed, 30 Oct 2013 13:22:05 +0000 (13:22 +0000)]
smbd: Support multiple dfs targets for msdfs proxy shares

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Björn Jacke <bj@sernet.de>
10 years agolibcli/smb: fix smb2cli_ioctl*() against Windows 2008.
Stefan Metzmacher [Mon, 28 Oct 2013 14:43:03 +0000 (15:43 +0100)]
libcli/smb: fix smb2cli_ioctl*() against Windows 2008.

The subsections of [MS-SMB2] "3.2.5.14 Receiving an SMB2 IOCTL Response"
say the client should ignore the InputOffset/InputCount.

We do that only if we ask for max_input_length = 0.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct 31 01:16:10 CET 2013 on sn-devel-104

10 years agos3:libsmb: SMBC_getatr() if no method worked, try all methods again on next attempt
Gregor Beck [Fri, 18 Oct 2013 13:32:55 +0000 (15:32 +0200)]
s3:libsmb: SMBC_getatr() if no method worked, try all methods again on next attempt

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoclient: use cli_qpathinfo3 for allinfo
Gregor Beck [Mon, 14 Oct 2013 09:44:36 +0000 (11:44 +0200)]
client: use cli_qpathinfo3 for allinfo

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb: cli_qpathinfo3 use cli_qpathinfo2 for smb2
Gregor Beck [Mon, 14 Oct 2013 09:43:45 +0000 (11:43 +0200)]
s3:libsmb: cli_qpathinfo3 use cli_qpathinfo2 for smb2

cli_qpathinfo3 only works (and is only needed as fallback so far) for smb1.
Use cli_qpathinfo2 in the smb2 case to make it universally usable.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoclient: remove a write only variable
Gregor Beck [Fri, 11 Oct 2013 09:05:06 +0000 (11:05 +0200)]
client: remove a write only variable

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb: SMBC_getatr use pathinfo3 for second try
Gregor Beck [Fri, 11 Oct 2013 09:02:24 +0000 (11:02 +0200)]
s3:libsmb: SMBC_getatr use pathinfo3 for second try

The pathinfo2 call might fail against NetApp because it is sending broken
packages.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb: SMBC_getatr do not let ino undefined on success
Gregor Beck [Fri, 11 Oct 2013 09:00:48 +0000 (11:00 +0200)]
s3:libsmb: SMBC_getatr do not let ino undefined on success

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb: SMBC_getatr try pathinfo2 only once
Gregor Beck [Fri, 11 Oct 2013 08:59:59 +0000 (10:59 +0200)]
s3:libsmb: SMBC_getatr try pathinfo2 only once

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb: add function cli_qpathinfo3()
Gregor Beck [Fri, 11 Oct 2013 08:53:45 +0000 (10:53 +0200)]
s3:libsmb: add function cli_qpathinfo3()

This is a reimplemantation of cli_qpathinfo2 without the use of info level
SMB_QFILEINFO_ALL_INFO which leads to broken responses from NetApp.

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb: add function cli_qpathinfo_standard()
Gregor Beck [Fri, 11 Oct 2013 08:52:21 +0000 (10:52 +0200)]
s3:libsmb: add function cli_qpathinfo_standard()

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:libsmb: pass creation or birth time in cli_qpathinfo_basic()
Gregor Beck [Fri, 11 Oct 2013 08:50:39 +0000 (10:50 +0200)]
s3:libsmb: pass creation or birth time in cli_qpathinfo_basic()

Signed-off-by: Gregor Beck <gbeck@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agos3:modules: nfs4_acls ACLs with zero entries are fine.
Alexander Werth [Thu, 22 Aug 2013 13:01:17 +0000 (15:01 +0200)]
s3:modules: nfs4_acls ACLs with zero entries are fine.

Signed-off-by: Alexander Werth <alexander.werth@de.ibm.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Oct 30 20:31:42 CET 2013 on sn-devel-104

10 years agos3:modules: Fix realloc with zero sized ACLs
Alexander Werth [Tue, 29 Oct 2013 15:20:04 +0000 (16:20 +0100)]
s3:modules: Fix realloc with zero sized ACLs

A realloc with size zero is similar to a free.
Since we return the number of acls that's not an error.

Signed-off-by: Alexander Werth <alexander.werth@de.ibm.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agorpc_server: Fix a typo
Volker Lendecke [Tue, 29 Oct 2013 08:50:01 +0000 (08:50 +0000)]
rpc_server: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
10 years agolibrpc-idl: change the drsuapi_DsBindInfoCtr so that it match what is on the wire...
Matthieu Patou [Sun, 20 Oct 2013 20:37:17 +0000 (13:37 -0700)]
librpc-idl: change the drsuapi_DsBindInfoCtr so that it match what is on the wire both in NDR32 and NDR64.

Previous implementation had a problem with NDR64 with uint32 and
uint3264 being in the wrong order

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Oct 30 10:16:02 CET 2013 on sn-devel-104

10 years agos3-rpc_client: Make data pointer const in trans_send().
Andreas Schneider [Thu, 24 Oct 2013 09:49:53 +0000 (11:49 +0200)]
s3-rpc_client: Make data pointer const in trans_send().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Oct 30 01:32:08 CET 2013 on sn-devel-104

10 years agos3-rpc_server: Remove obsolete make_internal_rpc_pipe().
Andreas Schneider [Thu, 24 Oct 2013 08:32:17 +0000 (10:32 +0200)]
s3-rpc_server: Remove obsolete make_internal_rpc_pipe().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Remove obsolete FAKE_FILE_TYPE_NAMED_PIPE handling.
Andreas Schneider [Wed, 23 Oct 2013 15:16:10 +0000 (17:16 +0200)]
s3-rpc_server: Remove obsolete FAKE_FILE_TYPE_NAMED_PIPE handling.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Use make_internal_rpc_pipe_socketpair().
Andreas Schneider [Wed, 23 Oct 2013 15:04:12 +0000 (17:04 +0200)]
s3-rpc_server: Use make_internal_rpc_pipe_socketpair().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Pass the server event context to np_open().
Andreas Schneider [Wed, 23 Oct 2013 15:03:37 +0000 (17:03 +0200)]
s3-rpc_server: Pass the server event context to np_open().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Add make_internal_rpc_pipe_socketpair().
Andreas Schneider [Wed, 25 Sep 2013 09:35:41 +0000 (11:35 +0200)]
s3-rpc_server: Add make_internal_rpc_pipe_socketpair().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-smbd: Do not declare change_to_root_user() twice.
Andreas Schneider [Wed, 23 Oct 2013 09:07:38 +0000 (11:07 +0200)]
s3-smbd: Do not declare change_to_root_user() twice.

This is already in include/proto.h for smbd_shim.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-smbd_shim: Add become_authenticated_pipe_user().
Andreas Schneider [Wed, 23 Oct 2013 09:02:39 +0000 (11:02 +0200)]
s3-smbd_shim: Add become_authenticated_pipe_user().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Add named_pipe_client_init() function.
Andreas Schneider [Wed, 25 Sep 2013 09:34:56 +0000 (11:34 +0200)]
s3-rpc_server: Add named_pipe_client_init() function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Make named_pipe_packet_process a shared functiion.
Andreas Schneider [Wed, 25 Sep 2013 08:25:39 +0000 (10:25 +0200)]
s3-rpc_server: Make named_pipe_packet_process a shared functiion.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Make make_server_pipes_struct a shared function.
Andreas Schneider [Wed, 25 Sep 2013 14:33:00 +0000 (16:33 +0200)]
s3-rpc_server: Make make_server_pipes_struct a shared function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-waf: Create a target for RPC_SOCK_HELPER.
Andreas Schneider [Wed, 23 Oct 2013 08:36:57 +0000 (10:36 +0200)]
s3-waf: Create a target for RPC_SOCK_HELPER.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-waf: Seperate rpc_server and rpc_service.
Andreas Schneider [Wed, 23 Oct 2013 08:24:13 +0000 (10:24 +0200)]
s3-waf: Seperate rpc_server and rpc_service.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-waf: Reorder rpc_server wscript_build file.
Andreas Schneider [Wed, 23 Oct 2013 08:14:01 +0000 (10:14 +0200)]
s3-waf: Reorder rpc_server wscript_build file.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Use new rpc named pipe functions.
Andreas Schneider [Tue, 24 Sep 2013 13:03:48 +0000 (15:03 +0200)]
s3-rpc_server: Use new rpc named pipe functions.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Add make_internal_rpc_pipe().
Andreas Schneider [Tue, 24 Sep 2013 09:28:39 +0000 (11:28 +0200)]
s3-rpc_server: Add make_internal_rpc_pipe().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Add make_external_rpc_pipe() function.
Andreas Schneider [Tue, 24 Sep 2013 09:28:29 +0000 (11:28 +0200)]
s3-rpc_server: Add make_external_rpc_pipe() function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agos3-rpc_server: Add npa_state_init() function.
Andreas Schneider [Tue, 24 Sep 2013 09:27:35 +0000 (11:27 +0200)]
s3-rpc_server: Add npa_state_init() function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agolibcli: Add tstream_npa_socketpair() function.
Andreas Schneider [Thu, 19 Sep 2013 12:52:22 +0000 (14:52 +0200)]
libcli: Add tstream_npa_socketpair() function.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agorpc_server: Fix a memleak on error exit
Volker Lendecke [Sun, 27 Oct 2013 14:31:44 +0000 (15:31 +0100)]
rpc_server: Fix a memleak on error exit

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Oct 28 10:20:35 CET 2013 on sn-devel-104

10 years agorpc_server: Remove rpc_ep_register_state->mem_ctx
Volker Lendecke [Sun, 27 Oct 2013 14:29:43 +0000 (15:29 +0100)]
rpc_server: Remove rpc_ep_register_state->mem_ctx

We can use the state directly as a parent

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agorpc_server: Fix some uses of tevent_req_nomem
Volker Lendecke [Sun, 27 Oct 2013 14:27:45 +0000 (15:27 +0100)]
rpc_server: Fix some uses of tevent_req_nomem

tevent_req_nomem is to be used in a sequence of async actions where we
have one main request. This is a completely independent loop without one
central tevent_req. tevent_req_nomem is used as a simple way to signal
an out of memory condition to the main request representing the async
sequence. If we don't have such a tevent_req, we need to directly check
for NULL.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agorpc_server: fix a typo
Volker Lendecke [Sun, 27 Oct 2013 14:19:09 +0000 (15:19 +0100)]
rpc_server: fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoauth-kerberos: add the credentials.h so that enum credentials_obtained is defined
Matthieu Patou [Tue, 15 Oct 2013 22:06:57 +0000 (15:06 -0700)]
auth-kerberos: add the credentials.h so that enum credentials_obtained is defined

We had a warning about the enum being defined in the parameter list:
warning: ‘enum credentials_obtained’ declared inside parameter list

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlet <abartlet@samba.org>
Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Sun Oct 27 02:25:47 CET 2013 on sn-devel-104

10 years agolibrpc-idl: replace int32 by uint32 as the values are always > 0
Stefan Metzmacher [Mon, 21 Oct 2013 06:40:28 +0000 (08:40 +0200)]
librpc-idl: replace int32 by uint32 as the values are always > 0

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agolibrpc-idl: replace int32 by the enumeration as it's the type that we use in union...
Matthieu Patou [Mon, 21 Oct 2013 03:16:27 +0000 (20:16 -0700)]
librpc-idl: replace int32 by the enumeration as it's the type that we use in union's switch drsuapi_DsGetDCInfoCtrLevels

Signed-off-by: Matthieu Patou <mat@matws.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agotorture: add FSCTL_SRV_COPYCHUNK_WRITE access test
David Disseldorp [Sat, 19 Oct 2013 01:47:07 +0000 (03:47 +0200)]
torture: add FSCTL_SRV_COPYCHUNK_WRITE access test

Check that FSCTL_SRV_COPYCHUNK_WRITE succeeds when the copy-chunk target
is opened with SEC_RIGHTS_FILE_WRITE only.

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 Oct 25 22:48:59 CEST 2013 on sn-devel-104

10 years agosmb2_ioctl: add support for FSCTL_SRV_COPYCHUNK_WRITE
David Disseldorp [Sat, 19 Oct 2013 01:47:06 +0000 (03:47 +0200)]
smb2_ioctl: add support for FSCTL_SRV_COPYCHUNK_WRITE

FSCTL_SRV_COPYCHUNK can only be used when the client has the copy-chunk
target file open with FILE_WRITE_DATA and FILE_READ_DATA.
FSCTL_SRV_COPYCHUNK_WRITE requires only FILE_WRITE_DATA access on the
target, and is therefore suitable for cp --reflink, which opens the
target file O_WRONLY.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
10 years agoRevert "smbd: Move oplock/sharemode ops into one place"
Volker Lendecke [Thu, 24 Oct 2013 18:53:36 +0000 (20:53 +0200)]
Revert "smbd: Move oplock/sharemode ops into one place"

This reverts commit 7b70fa18734d9ceb020fe3e5d4cc0c26cd27a484.

This is a change in behaviour which needs much further investigation
and testing.

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): Fri Oct 25 14:22:20 CEST 2013 on sn-devel-104

10 years agoRevert "smbd: Move oplock handling together"
Volker Lendecke [Thu, 24 Oct 2013 18:53:32 +0000 (20:53 +0200)]
Revert "smbd: Move oplock handling together"

This reverts commit e689b7d51e6ffd848ab10e160dca2c3a03fc750b.

This is a change in behaviour which needs much further investigation
and testing.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>