summaryrefslogtreecommitdiffstats
path: root/source3
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* 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>
* s3/vfs: remove unused SMB_VFS_DISK_FREE() small_query parameterDavid Disseldorp2015-02-1717-93/+72
| | | | | | | | | | | | | | | 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
* librpc: Move messaging.idl to the top levelAndrew Bartlett2015-02-163-142/+1
| | | | | | | 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>
* 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>
* messaging4: Use messages_dgmVolker Lendecke2015-02-131-1/+1
| | | | | | | | | | | | | 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>
* 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>
* 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
* s3-passdb: lift annoying debug message level.Günther Deschner2015-02-131-1/+1
| | | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Fri Feb 13 15:54:18 CET 2015 on sn-devel-104
* vfs_prealloc: Remove call to gpfs_preallocChristof Schmitt2015-02-111-9/+0
| | | | | | | | | | | | | | | Calling gpfs_prealloc changes the actual size of the file, and this should not be done implicitly. Also this code does not compile due to the missing dependency to the gpfs library. The best way solution here is probably removing the call to gpfs_prealloc. The vfs_gpfs module already implements the call to gpfs_prelloc when this can be done safely. 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): Wed Feb 11 02:03:09 CET 2015 on sn-devel-104
* lib: Fix a typoVolker Lendecke2015-02-101-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3: smbclient: Allinfo leaves the file handle open.Jeremy Allison2015-02-101-0/+1
| | | | | | | | | | https://bugzilla.samba.org/show_bug.cgi?id=11094 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Tue Feb 10 23:28:46 CET 2015 on sn-devel-104
* smbd: Fix a typoVolker Lendecke2015-02-101-1/+1
| | | | | | | | 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): Tue Feb 10 20:27:32 CET 2015 on sn-devel-104
* smbd: Fix a typoVolker Lendecke2015-02-101-1/+1
| | | | | | | | http://www.oxfordlearnersdictionaries.com/definition/english/veto_2 says it's vetoed, not vetod Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* smbd: Make "check_veto_path" staticVolker Lendecke2015-02-102-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* Update mailing list references to point at lists.samba.orgAndrew Bartlett2015-02-102-2/+2
| | | | | | | | | | | | The mailing lists are on lists.samba.org, but there are many references that use the shorthand of samba.org Some references to samba@ have been changed to samba-technical@ where this make more sense. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Feb 10 07:08:28 CET 2015 on sn-devel-104
* printing/cups: pack requested-attributes with IPP_TAG_KEYWORDDavid Disseldorp2015-02-101-1/+1
| | | | | | | | | | | | | | | | | | The CUPS IPP_GET_JOBS requested-attributes array indicates which job attributes the caller would like in the cupsd response. Until now, Samba has packed these attributes with a IPP_TAG_NAME format tag. In recent versions of CUPS, this results in the IPP_GET_JOBS response only including the job-id and job-printer-uri fields, even with JobPrivateValues=none configured. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10808 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 10 01:38:58 CET 2015 on sn-devel-104
* gencache: don't fail gencache_stabilize if there were records to delete.Michael Adam2015-02-091-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* nfs4: Fix a confusing debug messageVolker Lendecke2015-02-091-1/+1
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Mon Feb 9 12:25:06 CET 2015 on sn-devel-104
* s3:smb2_server: protect against integer wrap with "smb2 max credits = 65535"Stefan Metzmacher2015-01-291-0/+3
| | | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=9702 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Jan 29 14:58:40 CET 2015 on sn-devel-104
* s3:smb2_server: always try to grant the credits the client just consumedStefan Metzmacher2015-01-291-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | It turns out that the effective credits_requested is always at least 1, even if the client sends credits_requested == 0. This means the client is not able to reduce the amount of credits itself. Without this fix a client (e.g. Windows7) would reach the case where it has been granted all credits it asked for. When copying a large file with a lot of parallel requests, all these requests have credits_requested == 0. This means the amount of granted credits where reduced by each request and only when the granted credits reached 0, the server granted one credit to allow the client to go on. The client might require more than one credit ([MS-SMB2] says Windows clients require at least 4 credits) and freezes with just 1 credit. Bug: https://bugzilla.samba.org/show_bug.cgi?id=9702 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* Fix a couple of DEBUG statements that were copied from elsewhere. Removed ↵Richard Sharpe2015-01-251-4/+2
| | | | | | | | | | the misleading function name since the DEBUG message will print out the function name anyway. Signed-of-by: Richard Sharpe <rsharpe@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Sun Jan 25 12:58:08 CET 2015 on sn-devel-104
* vfs_glusterfs: Add comments to the pipe(2) code.Ira Cooper2015-01-231-0/+17
| | | | | | | | | | | The guarantees around read(2) and write(2) and pipes are critical to understanding this code. Hopefully these comments will help. Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Jan 23 20:58:51 CET 2015 on sn-devel-104
* s3-pam_smbpass: Correctly initialize variables.Andreas Schneider2015-01-221-2/+2
| | | | | | | | | | This fixes a coverity warning. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Jan 22 22:51:59 CET 2015 on sn-devel-104
* s3-pam_smbpass: Remove superfluous NULL check for pam functions.Andreas Schneider2015-01-221-3/+0
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-pam_smbpass: Make sure PAM_MAXTRIES can be returned.Andreas Schneider2015-01-221-1/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-pam_smbpass: Check the return code of secrets_init().Andreas Schneider2015-01-221-1/+5
| | | | | | | This fixes a coverity warning. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-pam_smbpass: Fix set_ctrl() return value.Andreas Schneider2015-01-222-2/+5
| | | | | | | This fixes a cppcheck warning. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-pam_smbpass: Make sure variables are initialized.Andreas Schneider2015-01-221-3/+3
| | | | | | | This fixes cppcheck warnings. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3-smbspool: Use strtol() instead of atoi().Andreas Schneider2015-01-221-1/+8
| | | | | | | This fixes a coverity warning. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* winbind: Fix idmap initializationVolker Lendecke2015-01-221-6/+8
| | | | | | | | | | | | | | | | | | The fix is in the sscanf line: %u in the sscanf format mandates the use of a pointer to an "unsigned". idmap_domain->[low|high]_id are uint32_t. On little endian 64-bit this might at least put the correct values into low_id and high_id, but might overwrite the read_only bit set earlier, depending on structure alignment and packing. On big endian 64-bit, this will just fail. Automatic conversion to uint32_t will happen only at assignment, not when you take a pointer of such a thing. 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): Thu Jan 22 17:58:16 CET 2015 on sn-devel-104
* s3-pam_smbpass: Fix memory leak in pam_sm_authenticate().Andreas Schneider2015-01-221-2/+9
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=11066 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* vfs: Fix a typoVolker Lendecke2015-01-221-1/+1
| | | | | | | | 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): Thu Jan 22 13:14:38 CET 2015 on sn-devel-104
* Remove use of the "staticforward" macroPetr Viktorin2015-01-221-3/+3
| | | | | | | | | | This macro was used for compatibility with broken compilers. Since Python 2.3, it is always defined as `static`, and only exists "for source compatibility with old C extensions". Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>