summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* s3: smbd: leases - new torture test shows stat opens can get leases.Jeremy Allison2015-02-191-7/+4
| | | | | | | | | Can also issue breaks on these leases. https://bugzilla.samba.org/show_bug.cgi?id=11102 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
* s3: smbd: signing. Ensure we respond correctly to an SMB2 negprot with ↵Jeremy Allison2015-02-192-2/+5
| | | | | | | | | | | SMB2_NEGOTIATE_SIGNING_REQUIRED. Bug 11103: - Samba does not set the required flags in the SMB2/SMB3 Negotiate Protocol Response when signing required by client https://bugzilla.samba.org/show_bug.cgi?id=11103 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Steve French <smfrench@gmail.com>
* regedit: Rename variable to fix compile warningChristof Schmitt2015-02-191-4/+4
| | | | | | | | | | | | | | | | | With --picky-developer this warning is turned into an error: cc1: warnings being treated as errors ../source3/utils/regedit_treeview.c: In function ‘tree_node_load_children’: ../source3/utils/regedit_treeview.c:256: error: declaration of ‘key_name’ shadows a global declaration /usr/include/ncurses.h:1419: error: shadowed declaration is here Fix this by renaming the local variable. Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Feb 19 01:31:44 CET 2015 on sn-devel-104
* s3/vfs: bump interface version number to 33David Disseldorp2015-02-181-1/+2
| | | | | | | | | The SMB_VFS_DISK_FREE() small_query parameter removal cleanup will not be merged for Samba 4.2, so the master SMB_VFS_INTERFACE_VERSION number should be bumped above what's currently present in the 4.2 branch. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* spoolss: retrieve published printer GUID if not in registryAndreas Schneider2015-02-181-2/+22
| | | | | | | | | | | | | | | | | | | | | When a printer is published, the GUID for the published DN is retrieved from the domain controller and stored in the registry. When handling a spoolss GetPrinter(level=7) request, the same GUID is obtained from the registry and returned to the client. This change sees the spoolss server query the DC for the published printer GUID if it is not present in the registry when handling a spoolss GetPrinter(level=7) request. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11018 Pair-Programmed-With: David Disseldorp <ddiss@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> 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 Feb 18 12:43:44 CET 2015 on sn-devel-104
* printing: rework nt_printer_guid_store to return errorsAndreas Schneider2015-02-182-17/+35
| | | | | | | | | | | Callers can now choose whether or not to ignore errors. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11018 Pair-programmed-with: David Disseldorp <ddiss@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* printing: add nt_printer_guid_retrieve() helperDavid Disseldorp2015-02-182-0/+61
| | | | | | | | | | | | This function connects to the domain controller and retrieves the GUID for the corresponding printer DN. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11018 Pair-programmed-with: Andreas Schneider <asn@samba.org> Signed-off-by: David Disseldorp <ddiss@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* printing: split out printer DN and GUID retrievalDavid Disseldorp2015-02-181-72/+137
| | | | | | | | | | | This functions are used for printer publishing. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11018 Pair-programmed-with: Andreas Schneider <asn@samba.org> Signed-off-by: David Disseldorp <ddiss@samba.org> Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* ctdb-scripts: Improve messages about invalid tunables during "setup"Martin Schwenke2015-02-182-5/+12
| | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Wed Feb 18 08:03:33 CET 2015 on sn-devel-104
* ctdb-tool: Print a warning when setting an obsolete tunable variableMartin Schwenke2015-02-183-0/+7
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-client: Return a value of 1 when setting obsolete tunable variableMartin Schwenke2015-02-182-2/+3
| | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-tests: New tests for 00.ctdb "setup" event - set tunables from configMartin Schwenke2015-02-187-0/+109
| | | | | | | Unit test infrastructure tweaks to support. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb-scripts: Fix tunable setup code by making it shell-agnosticMartin Schwenke2015-02-181-3/+3
| | | | | | | | | | | | | | | | | | All tunables set in configuration are currently set to 0 on system where /bin/sh is dash (and perhaps other non-bash shells). dash puts single quotes around all values in the output of the "set" builtin command, whereas bash only puts them around values when something needs to be quoted. Tunables always have a simple integer value so dash will quote them and bash won't. The setup code currently passes the raw value, including any quotes to "ctdb setvar ...". This command does no error checking on the input, so "'1'" is converted to 0. Change the code so that the value is determined from the shell variable and is independent of the "set" output. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb: Change default debug level to NOTICE (2)Martin Schwenke2015-02-185-10/+8
| | | | | | | | | | | This was true for the daemon until commit b4589b954e1090a934fafd3f8e3c2cf1ed785c61. Defaulting to ERR in the ctdb CLI tool encourages logging notices at ERR level, so default to NOTICE instead. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* lib: texpect. Fix the build on Solaris.Tom Schulz2015-02-172-1/+6
| | | | | | | | | | | | | Bug 11092 - texpect requires routines err and errx https://bugzilla.samba.org/show_bug.cgi?id=11092 Signed-off-by: Tom Schulz <schulz@adi.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Tue Feb 17 18:09:52 CET 2015 on sn-devel-104
* group.py: Fix wrong example option, remove wrong comment lineMarc Muehlfeld2015-02-171-2/+1
| | | | | | | | | Replaced "--gid" with the correct "--gid-number" in Example 3. Additionally removed the first comment line in group.py, which was wrong in that file. Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* buildtools: Use separate storage for each function in runoncePetr Viktorin2015-02-171-1/+1
| | | | | | | | | | | | | The runonce decorator used shared storage for all functions, and dispatched only on arguments, so a call would be eliminated if a different runonce function had already been called with the same arguments. Use separate storage for each decorated function. Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Simo Sorce <simo@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Force rebuild of ldb if pyldb-util is not available.Jelmer Vernooij2015-02-171-4/+4
| | | | | | | | | This is necessary since pyldb-util uses ldb_private.h, so we want to build against the same source ldb. Change-Id: I802974b9eef7deb102fea15b67ec5f87e8e353bd Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* wscript: Expand tabs.Jelmer Vernooij2015-02-171-1/+1
| | | | | | | Change-Id: I2746f775accceeb2eeb02679f2c91b02085560b6 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* rpc_talloc: Update instructions to use standard unittest runner.Jelmer Vernooij2015-02-171-1/+1
| | | | | | | Change-Id: Id90541b01073f1156ccba562ba750245aad091c2 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Remove documentation for testsuite-count subunit extension, which is no ↵Jelmer Vernooij2015-02-171-6/+0
| | | | | | | | | longer used. Change-Id: Ie7f671fdac4f878e1eea157ee7e300977a68deb0 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Update selftest README to point at upstream subunit repository for protocol ↵Jelmer Vernooij2015-02-171-16/+17
| | | | | | | | | description. Change-Id: I50c2a5e9847d269486cb5157357592004779704a Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* rpcclient: Fix and enhance rpcclient outputRobin Hack2015-02-171-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11085 When rpcclient is called like: $ rpcclient -c "getdata . Osversion" at end of output is added one nonsense line OsVersion: Osversion: This patch removes this line and adds more human friendly ouput: OsMajor: num OsMinor: num OsBuild: num for OsVersion query. For OsVersionEx two more lines are added: OsMajor: num OsMinor: num OsBuild: num ServicePackMajor: num ServicePackMinor: num Signed-off-by: Robin Hack <hack.robin@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
* lib/crypto: Document what crypto code is used for, and if GnuTLS supports itAndrew Bartlett2015-02-171-0/+97
| | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Feb 17 11:45:15 CET 2015 on sn-devel-104
* s3/vfs: remove unused SMB_VFS_DISK_FREE() small_query parameterDavid Disseldorp2015-02-1719-97/+75
| | | | | | | | | | | | | | | The small_query parameter for SMB_VFS_DISK_FREE() was, prior to the previous commit, used to obtain 16-bit wide free-space information for the deprecated dskattr SMB_COM_QUERY_INFORMATION_DISK command. With the dskattr handler now performing the 16-bit collapse directly, the small_query parameter can be removed from the entire code path. 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): Tue Feb 17 05:37:20 CET 2015 on sn-devel-104
* smbd/reply: convert free space to 16bit in dskattr handlerDavid Disseldorp2015-02-171-1/+20
| | | | | | | | | | | | | | | | | | The deprecated Core Protocol dskattr SMB_COM_QUERY_INFORMATION_DISK command provides free space information in the form of 16-bit words. Until now, this has been handled by passing the dskattr specific small_query boolean through to disk_norm() via the SMB_VFS_DISK_FREE VFS hook. disk_norm(small_query=true) then modifies the block size and free space values such that they fit in the 16-bit field. This change adds the command specific logic to the dskattr handler, so that it can be removed from the SMB_VFS_DISK_FREE()->disk_norm() code path. In doing so, it fixes dskattr request handling against opaque VFS backends that don't call disk_norm(), such as vfs_glusterfs. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* vfs_ceph: fix disk_free_fn callbackYan, Zheng2015-02-161-2/+3
| | | | | | | | | | | | Free space and available space should be in unit of block size. Besides, we should call disk_norm() to adjust the returned values. Signed-off-by: Yan, Zheng <zyan@redhat.com> Reviewed-by: Ira Cooper <ira@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Ira Cooper <ira@samba.org> Autobuild-Date(master): Mon Feb 16 18:14:02 CET 2015 on sn-devel-104
* s4-messaging: Unify list of possible messages into messaging.idlAndrew Bartlett2015-02-162-17/+17
| | | | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Feb 16 14:48:41 CET 2015 on sn-devel-104
* librpc: Move messaging.idl to the top levelAndrew Bartlett2015-02-165-6/+11
| | | | | | | Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4-messaging: Remove unused struct imessaging_recAndrew Bartlett2015-02-161-19/+0
| | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Volker Lendecke <vl@samba.org>
* debug: Set close-on-exec for the main log file FDAndrew Bartlett2015-02-162-1/+4
| | | | | | | | | | | | | | | | This does not change the properties of dup2() of the fd as STDERR, however this is closed before we start smbd or winbindd as child processes. This is needed otherwise the logfile remains open in the child process, and logfile rotation can mean this old log remains on disk indefinatly. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11100 Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Feb 16 11:42:47 CET 2015 on sn-devel-104
* Add Solaris ports as a tevent backend.Jeremy Allison2015-02-156-1/+798
| | | | | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Sun Feb 15 23:25:07 CET 2015 on sn-devel-104
* messaging4: Enable POOL_USAGEVolker Lendecke2015-02-144-2/+24
| | | | | | | | | | | | | | With this you can watch "samba"'s talloc hierarchy live using smbcontrol <pid> pool-usage Enjoy :-) 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): Sat Feb 14 01:59:19 CET 2015 on sn-devel-104
* lib: Use talloc_report_strVolker Lendecke2015-02-132-76/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib: Add talloc_report_str()Volker Lendecke2015-02-133-0/+208
| | | | | | | | This creates a talloc report into a string and will replace the code used in source3/lib/tallocmsg.c Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Use messages_dgmVolker Lendecke2015-02-133-338/+108
| | | | | | | | | | | | | This replaces the transport mechanism in source4 with calls to the messages_dgm code. It is supposed to enable "smbcontrol samba pool-usage" as an example without having to rewrite smbcontrol using the source4 based messaging subsystem. This moves the source3 based names.tdb (which is unused so far) to the lock directory, source4 does not have a cache directory. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging3: Use message_hdr_[put|get]Volker Lendecke2015-02-132-32/+17
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging: Define a binary format for message headersVolker Lendecke2015-02-133-0/+79
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib: Add server_id marshallingVolker Lendecke2015-02-132-0/+19
| | | | | | | | Will be used soon to make source3 and source4 messaging-protocol compatible. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb: server_id_get->server_id_fetchVolker Lendecke2015-02-131-3/+3
| | | | | | | | | | server_id_get with the next patch will be a global parsing function. I've decided to rename this here in ctdb, as it's only a static function in ctdb_client.c and apparently not intended for wider use. Please speak up if you don't like this :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging3: Use messaging_dgm_refVolker Lendecke2015-02-131-11/+15
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib: Add messages_dgm_ref.[ch]Volker Lendecke2015-02-133-1/+159
| | | | | | | | | | | | | | | We only have one messaging_dgm context per process. But we will use this from two completely independent messaging subsystems which are independently initialized. We need to coordinate creation and destruction, do this via talloc. I know this looks like a step back, but when in the future we have really just one messaging subsystem, this can go again. My immediate goal is to make source3 and source4 transport-compatible, and this looks like a quick way towards that goal. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messages_dgm: Make it an independent libVolker Lendecke2015-02-131-1/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messages_dgm: Add a few #includesVolker Lendecke2015-02-131-0/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* unix_msg: remove cookie from unix_msg_initVolker Lendecke2015-02-136-16/+9
| | | | | | | | | | | | "pid" and "sock" are sufficient I guess as randomizers to distinguish messages. In theory, a pid could be recycled very quickly, which might mix up in-flight messages. But once a few messages have passed, "cookie" would be incremented as another indicator of a fresh message. Why? Remove messages_dgm dependency on samba-util Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messages_dgm: Move directory handling upVolker Lendecke2015-02-133-104/+98
| | | | | | | | | | | | | When we want to use messages_dgm in source4, we need to find better places for the lock and socket directories. Source4 does not have the concept of a cache directory. So I chose "private dir"/sock and "lock dir"/msg as subdirectories. This moves directory creation from messages_dgm.c to messages.c, source4/lib/messaging will have its own way of doing this. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messages_dgm: Only pass "unique" to messaging_dgm_initVolker Lendecke2015-02-133-8/+8
| | | | | | | | We have only one context per pid, so messaging_dgm_init can do getpid() itself. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* messaging4: Use server_id_dbVolker Lendecke2015-02-132-126/+30
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Remove an unused function call.Richard Sharpe2015-02-132-18/+0
| | | | | | | | Signed-off-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Feb 13 23:29:54 CET 2015 on sn-devel-104
* selftest: re-enable nss_winbind via nss_wrapper in the test-envs.Günther Deschner2015-02-132-0/+10
| | | | | | | | | | | | | | | | | | | | | Without exporting these new variables, we can never access or test nss_winbind from the selftest environments. This shows that our posixacl test probably needs fixing since now two subtests fail against plugin_s4_dc:local. This env was just not complete without winbind in nsswitch. The test failure is probably due to the strangeness of the AD/DC setup that the domain administrator uses the same uid as the root user, which in the selftest case is overridden to be the calling user. Guenther Signed-off-by: Günther Deschner <gd@samba.org> Pair-Programmed-With: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Fri Feb 13 20:57:12 CET 2015 on sn-devel-104