kai/samba-autobuild/.git
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>
11 years agoselftest: show that Samba honours "write list" and valid users
Andrew Bartlett [Thu, 20 Dec 2012 12:05:55 +0000 (23:05 +1100)]
selftest: show that Samba honours "write list" and valid users

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoFixup the change_to_user_by_session() case as called from become_user_by_session()
Jeremy Allison [Tue, 8 Jan 2013 19:02:16 +0000 (11:02 -0800)]
Fixup the change_to_user_by_session() case as called from become_user_by_session()

Use inside source3/printing/nt_printing.c:get_correct_cversion().

Allow check_user_ok() to be called with vuid==UID_FIELD_INVALID.
All this should do is throw away one entry in the vuid cache.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agosmbd: Remove some ()
Volker Lendecke [Sun, 6 Jan 2013 13:50:33 +0000 (14:50 +0100)]
smbd: Remove some ()

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agosmbd: Simplify an if-expression
Volker Lendecke [Sun, 6 Jan 2013 13:41:24 +0000 (14:41 +0100)]
smbd: Simplify an if-expression

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agosmbd: Fix a typo
Volker Lendecke [Sun, 6 Jan 2013 13:39:07 +0000 (14:39 +0100)]
smbd: Fix a typo

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoMove create_share_access_mask() from smbd/service.c to smbd/uid.c.
Jeremy Allison [Fri, 4 Jan 2013 22:42:23 +0000 (14:42 -0800)]
Move create_share_access_mask() from smbd/service.c to smbd/uid.c.

Make it static. Only called from uid.c now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoFix bug #9518 - conn->share_access appears not be be reset between users.
Jeremy Allison [Fri, 4 Jan 2013 22:40:05 +0000 (14:40 -0800)]
Fix bug #9518 - conn->share_access appears not be be reset between users.

Ensure make_connection_snum() uses the same logic as
check_user_ok() to decide if a user can access a share.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoFactor code out of check_user_ok() into a call to check_user_share_access().
Jeremy Allison [Fri, 4 Jan 2013 22:35:46 +0000 (14:35 -0800)]
Factor code out of check_user_ok() into a call to check_user_share_access().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoInitialize stack variables. Prelude to factoring out calls to check_user_share_access().
Jeremy Allison [Fri, 4 Jan 2013 00:06:40 +0000 (16:06 -0800)]
Initialize stack variables. Prelude to factoring out calls to check_user_share_access().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoAdd check_user_share_access() which factors out the share security and read_only...
Jeremy Allison [Fri, 4 Jan 2013 22:27:18 +0000 (14:27 -0800)]
Add check_user_share_access() which factors out the share security and read_only flag setting code.

Allows this to be called from both make_connection_snum() as well as check_user_ok().
Gives a consistent share security check function.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoCorrectly setup the conn->share_access based on the current user token.
Jeremy Allison [Fri, 4 Jan 2013 22:25:55 +0000 (14:25 -0800)]
Correctly setup the conn->share_access based on the current user token.

Also use this to set conn->read_only. Cache the share_access in the
struct vuid_cache_entry struct so we only evaluate this once per new
user access on this share.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoChange API for create_share_access_mask() - remove conn struct.
Jeremy Allison [Fri, 4 Jan 2013 22:24:13 +0000 (14:24 -0800)]
Change API for create_share_access_mask() - remove conn struct.

Eventually this will be indepentent of conn, just pass in the
readonly flag.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoChange API for create_share_access_mask() to pass in the token.
Jeremy Allison [Fri, 4 Jan 2013 19:43:10 +0000 (11:43 -0800)]
Change API for create_share_access_mask() to pass in the token.

Don't automatically use the one from conn->session_info->security_token.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoFix API for create_share_access_mask().
Jeremy Allison [Fri, 21 Dec 2012 17:45:03 +0000 (09:45 -0800)]
Fix API for create_share_access_mask().

Return the uint32_t share_access rather than directly
changing the conn struct.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoRemove static from create_share_access_mask().
Jeremy Allison [Fri, 21 Dec 2012 17:35:31 +0000 (09:35 -0800)]
Remove static from create_share_access_mask().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoAdd uint32_t share_access to vuid_cache_entry.
Jeremy Allison [Fri, 21 Dec 2012 17:22:16 +0000 (09:22 -0800)]
Add uint32_t share_access to vuid_cache_entry.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoClean up struct connection_struct, make struct vuid_cache a pointer not inline.
Jeremy Allison [Thu, 20 Dec 2012 22:42:55 +0000 (14:42 -0800)]
Clean up struct connection_struct, make struct vuid_cache a pointer not inline.

Change VFS ABI to 31 for 4.1.0.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoRemove unneeded variable "const struct auth_session_info *session_info"
Jeremy Allison [Thu, 20 Dec 2012 19:55:09 +0000 (11:55 -0800)]
Remove unneeded variable "const struct auth_session_info *session_info"

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoRemove dead code now vuser can no longer be NULL.
Jeremy Allison [Thu, 20 Dec 2012 19:54:07 +0000 (11:54 -0800)]
Remove dead code now vuser can no longer be NULL.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoRemove the second set of {} braces, no longer needed.
Jeremy Allison [Thu, 20 Dec 2012 19:53:11 +0000 (11:53 -0800)]
Remove the second set of {} braces, no longer needed.

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
11 years agoRemove one set of enclosing {} braces, no longer needed.
Jeremy Allison [Thu, 20 Dec 2012 19:52:27 +0000 (11:52 -0800)]
Remove one set of enclosing {} braces, no longer needed.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoMove the definition of struct vuid_cache_entry *ent outside blocks.
Jeremy Allison [Thu, 20 Dec 2012 19:51:55 +0000 (11:51 -0800)]
Move the definition of struct vuid_cache_entry *ent outside blocks.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoStart to tidy-up check_user_ok().
Jeremy Allison [Thu, 20 Dec 2012 19:50:25 +0000 (11:50 -0800)]
Start to tidy-up check_user_ok().

Now we have removed "security=share" we cannot be
called with vuid == UID_FIELD_INVALID.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agotorture/vfstest.c: Always use create_conn_struct(). Don't hand create connection...
Jeremy Allison [Tue, 8 Jan 2013 22:18:55 +0000 (14:18 -0800)]
torture/vfstest.c: Always use create_conn_struct(). Don't hand create connection structs.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agosource3/smbd/pysmbd.c: Always use create_conn_struct(). Don't hand create connection...
Jeremy Allison [Tue, 8 Jan 2013 22:18:27 +0000 (14:18 -0800)]
source3/smbd/pysmbd.c: Always use create_conn_struct(). Don't hand create connection structs.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agosmbd/posix_acls.c: Use create_conn_struct(). Don't hand-create connection structs.
Jeremy Allison [Tue, 8 Jan 2013 22:17:51 +0000 (14:17 -0800)]
smbd/posix_acls.c: Use create_conn_struct(). Don't hand-create connection structs.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agoAllow create_conn_struct() to be called with snum == -1.
Jeremy Allison [Wed, 9 Jan 2013 00:26:50 +0000 (16:26 -0800)]
Allow create_conn_struct() to be called with snum == -1.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
11 years agosmbd: Rework create_conn_struct to use conn_new()
Andrew Bartlett [Tue, 8 Jan 2013 21:02:23 +0000 (08:02 +1100)]
smbd: Rework create_conn_struct to use conn_new()

This avoids issues with required structure elements not being initialised.

In particular, once conn->vuid_cache becomes a pointer, this ensures
that it is initalised in all cases.

Andrew Bartlett

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

11 years agosmbd: Fix bug 9549 -- Memleak in the async echo handler
Volker Lendecke [Tue, 8 Jan 2013 14:34:19 +0000 (15:34 +0100)]
smbd: Fix bug 9549 -- Memleak in the async echo handler

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

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan  8 23:30:41 CET 2013 on sn-devel-104

11 years agosamba-tool Add --service argument to samba-tool ntacl get/set
Andrew Bartlett [Sat, 15 Dec 2012 10:24:26 +0000 (21:24 +1100)]
samba-tool Add --service argument to samba-tool ntacl get/set

This also ensures a VFS connect is done to the correct service.

Andrew Bartlett

Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan  8 03:39:21 CET 2013 on sn-devel-104

11 years agopysmbd: Change to keyword based arguments
Andrew Bartlett [Sat, 15 Dec 2012 10:17:30 +0000 (21:17 +1100)]
pysmbd: Change to keyword based arguments

Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agoscripting-provision: Set sysvol ACLs on the sysvol share
Andrew Bartlett [Fri, 14 Dec 2012 11:17:23 +0000 (22:17 +1100)]
scripting-provision: Set sysvol ACLs on the sysvol share

This allows us to correctly load any modules that have been specified
by the smb.conf for [sysvol] and issue a VFS connect operation which
may be required by some VFS modules.

Andrew Bartlett

Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agoscripting-ntacls: Optionally allow the service to be specified.
Andrew Bartlett [Fri, 14 Dec 2012 11:09:18 +0000 (22:09 +1100)]
scripting-ntacls: Optionally allow the service to be specified.

Providing a service allows a VFS connect to be issued on the correct
service, and so ensures that the correct modules are loaded rather
than just what is specified in [globals].

Andrew Bartlett

Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agopysmbd: Convert pysmbd to take an optional service to connect to
Andrew Bartlett [Wed, 10 Oct 2012 02:48:27 +0000 (13:48 +1100)]
pysmbd: Convert pysmbd to take an optional service to connect to

This uses create_conn_struct to correctly call VFS_CONNECT(), but only
if a service has been specified.

Andrew Bartlett

Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Fix calls to create_conn_struct_cwd to be correctly indented.
Andrew Bartlett [Mon, 7 Jan 2013 22:29:48 +0000 (09:29 +1100)]
smbd: Fix calls to create_conn_struct_cwd to be correctly indented.

These are whitespace changes only, left out of the previous commit to preserve clarity.

Andrew Bartlett.

Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Split create_conn_struct into a fn that does not change the working dir
Andrew Bartlett [Wed, 10 Oct 2012 02:47:49 +0000 (13:47 +1100)]
smbd: Split create_conn_struct into a fn that does not change the working dir

The python bindings do not want the current working directory changed
during operations, so we provide two functions, one providing the
original behaviour, and other providing the python bindings with just
the memory allocation and initilisation stuff.

Andrew Bartlett

Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agospoolss: add stubs for new JobNamedProperty dcerpc calls.
Günther Deschner [Mon, 7 Jan 2013 14:15:21 +0000 (15:15 +0100)]
spoolss: add stubs for new JobNamedProperty dcerpc calls.

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): Mon Jan  7 19:06:25 CET 2013 on sn-devel-104