summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-09-01smbd: Properly initialize mangle_hashVolker Lendecke1-0/+4
[Bug 10782] mangle_hash() can fail to initialize charset (smbd crash). https://bugzilla.samba.org/show_bug.cgi?id=10782 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Aug 26 01:30:38 CEST 2014 on sn-devel-104
2014-09-01Don't discard result of checking grouptypeRoel van Meer1-2/+0
The pdb_samba_dsdb_getgrfilter() function first determines the security type of a group and sets map->sid_name_use accordingly. A little later, this variable is set again, undoing the previous work. https://bugzilla.samba.org/show_bug.cgi?id=10777 Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Aug 23 02:48:52 CEST 2014 on sn-devel-104
2014-09-01docs: Fix typos in smb.conf (inherit acls)Marc Muehlfeld1-3/+3
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10761 Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Thu Aug 7 00:52:42 CEST 2014 on sn-devel-104 (cherry picked from commit 4639f6d7bab9d8d6ee46bf5c65ff73a17a56cb17)
2014-09-01samba: Retain case sensitivity of cifs clientShirish Pargaonkar1-1/+2
When a client supports extended security but server does not, and that client, in Flags2 field of smb header indicates that - it supports extended security negotiation - it does not support security signatures - it does not require security signatures Samba server treats a client as a Vista client. That turns off case sensitivity and that is a problem for cifs vfs client. So include remote cifs client along with remote samba client to not do so otherwise. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10755 Signed-off-by: Shirish Pargaonkar <spargaonkar@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Aug 1 16:11:43 CEST 2014 on sn-devel-104 (cherry picked from commit a0583976da2ba09da0fd94f739ed4f5851e2a858)
2014-09-01lib: strings: Simplify strcasecmpVolker Lendecke1-35/+13
This makes us fallback to strcasecmp early if any INVALID_CODEPOINT appears. Without this patch we just continue to compare if both strings happen to have an INVALID_CODEPOINT in the same spot. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Bug: https://bugzilla.samba.org/show_bug.cgi?id=10716 smbd constantly crashes when filename contains non-ascii character
2014-09-01s4: tests: Added local.charset test for Bug 10716 - smbd constantly crashes ↵Jeremy Allison1-0/+12
when filename contains non-ascii character https://bugzilla.samba.org/show_bug.cgi?id=10716 Signed-off-by: Jeremy Allison <jra@samba.org>
2014-09-01lib: strings: Fix the behavior of strncasecmp_m_handle() in the face of bad ↵Jeremy Allison1-2/+27
conversions. When either string has a bad conversion, we fall back to doing raw ascii byte comparisons using strcasecmp(). This is wrong - we should fall back to strncasecmp. The problem is we've already stepped past the character that failed the conversion, so we're not re-testing those characters for comparison. This can have the effect of causing strncasecmp_m_handle() to report that two strings are identical when they are not, if the failed conversion takes place at the end of the string. The correct behavior is to step back to the point of the string(s) that failed the conversion, and continue the test from there. This is a litle trickier than the previous fix, as it requires converting the incoming n variable from remaining characters to compare to remaining bytes to compare. As bytes are always the smallest character size (1 byte) then it's safe to convert the remaining characters to check by decrementing the source string by the last character length (in bytes) and incrementing the remaining bytes to scan by the same value, then calling strncasecmp() with the stepped back strings remaining. Signed-off-by: Jeremy Allison <jra@samba.org>
2014-09-01lib: strings: Fix the behavior of strcasecmp_m_handle() in the face of bad ↵Jeremy Allison1-1/+11
conversions. When either string has a bad conversion, we fall back to doing raw ascii byte comparisons using strcasecmp(). The problem is we've already stepped past the character that failed the conversion, so we're not re-testing those characters for comparison. This can have the effect of causing strcasecmp_m_handle() to report that two strings are identical when they are not, if the failed conversion takes place at the end of the string. The correct behavior is to step back to the point of the string(s) that failed the conversion, and continue the test from there. Found by <lev@zadarastorage.com> when investigating bug 10716 - smbd constantly crashes when filename contains non-ascii character. Given the normal character set of utf-8, and an on disk filename of ISO-8859-1 of file-é on disk hex value: 66 69 6c 65 2d e9, an incoming open given the correct utf8 name of file-é will collide when it should not. Fixes: Bug 10716 - smbd constantly crashes when filename contains non-ascii character https://bugzilla.samba.org/show_bug.cgi?id=10716 Signed-off-by: Jeremy Allison <jra@samba.org>
2014-09-01printing: reload printer shares on OpenPrinterDavid Disseldorp1-1/+11
The printer share inventory should be reloaded on open _and_ enumeration, as there are some clients, such as cupsaddsmb, that do not perform an enumeration prior to access. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Aug 8 16:33:50 CEST 2014 on sn-devel-104 (cherry picked from commit 1ad71f79eb473822d36d9629cf52c2fca4c53752)
2014-09-01smbd: split printer reload processingDavid Disseldorp2-47/+104
All printer inventory updates are currently done via delete_and_reload_printers(), which handles registry.tdb updates for added or removed printers, AD printer unpublishing on removal, as well as share service creation and deletion. This change splits this functionality into two functions such that per-client smbd processes do not perform registry.tdb updates or printer unpublishing. This is now only performed by the process that performs the printcap cache update. This change is similar to ac6604868d1325dd4c872dc0f6ab056d10ebaecf from the 3.6 branch. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 2706af4d78fc9a47a4ac45b373edf276e3a9b354)
2014-09-01server: remove duplicate snum_is_shared_printer()David Disseldorp3-10/+2
Only keep a single definition in server_reload.c Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 2685df1177ffd39b1af34eb116bd7b24d4b12974)
2014-09-01smbd: only reprocess printer_list.tdb if it changedDavid Disseldorp1-0/+21
The per-client smbd printer share inventory is currently updated from printer_list.tdb when a client enumerates printers, via EnumPrinters or NetShareEnum. printer_list.tdb is populated by the background print process, based on the latest printcap values retrieved from the printing backend (e.g. CUPS) at regular intervals. This change ensures that per-client smbd processes don't reparse printer_list.tdb if it hasn't been updated since the last enumeration. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652 Suggested-by: Volker Lendecke <vl@samba.org> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit a2182e03a061de6c1f111ce083cb5f668fe75e4e)
2014-09-01printing: return last change time with pcap_cache_loaded()David Disseldorp5-7/+13
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 30ce835670a6aeca6fb960ea7c4fe1b982bdd5b0)
2014-09-01printing: remove pcap_cache_add()David Disseldorp2-11/+6
All print list updates are now done via pcap_cache_replace(), which can call into the print_list code directly. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 6d75e20ca8acf1a55838694ac77940e21e9a1e6a)
2014-09-01printing: reload printer_list.tdb from in memory listDavid Disseldorp6-34/+52
This will allow in future for a single atomic printer_list.tdb update. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit e5e6e2c796f026ee6b04f99b327941d57b9bd026)
2014-09-01printing: only reload printer shares on client enumDavid Disseldorp5-50/+17
Currently, automatic printer share updates are handled in the following way: - Background printer process (BPP) forked on startup - Parent smbd and per-client children await MSG_PRINTER_PCAP messages - BPP periodically polls the printing backend for printcap data - printcap data written to printer_list.tdb - MSG_PRINTER_PCAP sent to all smbd processes following update - smbd processes all read the latest printer_list.tdb data, and update their share listings This procedure is not scalable, as all smbd processes hit printer_list.tdb in parallel, resulting in a large spike in CPU usage. This change sees smbd processes only update their printer share lists only when a client asks for this information, e.g. via NetShareEnum or EnumPrinters. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652 Suggested-by: Volker Lendecke <vl@samba.org> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 4f4501ac1f35ab15f25d207c0d33e7c4d1abdf38)
2014-09-01printing: traverse_read the printer list for share updatesDavid Disseldorp5-12/+17
The printcap update procedure involves the background printer process obtaining the printcap information from the printing backend, writing this to printer_list.tdb, and then notifying all smbd processes of the new list. The processes then all attempt to simultaneously traverse printer_list.tdb, in order to update their local share lists. With a large number of printers, and a large number of per-client smbd processes, this traversal results in significant lock contention, mostly due to the fact that the traversal is unnecessarily done with an exclusive (write) lock on the printer_list.tdb database. This commit changes the share update code path to perform a read-only traversal. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10652 Reported-by: Alex K <korobkin+samba@gmail.com> Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit 1e83435eac2cef03fccb4cf69ef5e0bfbd710410)
2014-09-01s3: smbd : SMB2 - fix SMB2_SEARCH when searching non wildcard string with a ↵Jeremy Allison1-3/+34
case-canonicalized share. We need to go through filename_convert() in order for the filename canonicalization to be done on a non-wildcard search string (as is done in the SMB1 findfirst code path). Fixes Bug #10650 - "case sensitive = True" option doesn't work with "max protocol = SMB2" or higher in large directories. https://bugzilla.samba.org/show_bug.cgi?id=10650 Signed-off-by: Jeremy Allison <jra@samba.org>
2014-09-01s3: smbd - SMB[2|3]. Ensure a \ or / can't be found anywhere in a search ↵Jeremy Allison1-2/+2
path, not just at the start. Signed-off-by: Jeremy Allison <jra@samba.org>
2014-09-01s3: enforce a positive allocation_file_size for non-empty files (bug #10543)Björn Baumbach1-0/+12
Some file systems do not allocate a block for very small files. But for non-empty file should report a positive size. Pair-Programmed-With: Michael Adam <obnox@samba.org> Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sat Apr 5 03:09:00 CEST 2014 on sn-devel-104 (cherry picked from commit c35b31f45244a8339684c3b83a7d86eefb80e0da)
2014-09-01passdb: fix NT_STATUS_NO_SUCH_GROUPArvid Requate1-2/+2
Share options like "force group" and "valid users = @group1" triggered a NT_STATUS_NO_SUCH_GROUP. While the group was found in the SAM backend, its objectclass was not retrived. This fix also revealed a talloc access after free in the group branch of pdb_samba_dsdb_getgrfilter. [Bug 9570] Access failure for shares with "force group" or "valid users = @group" https://bugzilla.samba.org/show_bug.cgi?id=9570 Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2014-09-01s3:libsmb: Set a max charge for SMB2 connectionsRoss Lagerwall1-0/+5
Set a max charge for SMB2 connections so that larger request sizes can be used and more requests can be in flight. Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Aug 21 17:31:11 CEST 2014 on sn-devel-104 Bug: https://bugzilla.samba.org/show_bug.cgi?id=10778 libsmbclient with SMB2 doesn't pipeline or use large blocks
2014-09-01s3: smbd: POSIX ACLs. Remove incorrect check for SECINFO_PROTECTED_DACL in ↵Jeremy Allison1-5/+1
incoming security_information flags in posix_get_nt_acl_common(). Tidy-up of code obsoleted by fixes for bug #10773 (SECINFO_PROTECTED_DACL is not ignored). We now never pass SECINFO_PROTECTED_DACL in security_information flags to this layer. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10773 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): Fri Aug 22 11:26:57 CEST 2014 on sn-devel-104
2014-09-01libcli/security: add better detection of SECINFO_[UN]PROTECTED_[D|S]ACL in ↵Stefan Metzmacher1-16/+20
get_sec_info() Bug: https://bugzilla.samba.org/show_bug.cgi?id=10773 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Aug 22 02:52:50 CEST 2014 on sn-devel-104
2014-09-01s3:smbd: mask security_information input values with SMB_SUPPORTED_SECINFO_FLAGSStefan Metzmacher4-5/+12
Sometimes Windows clients doesn't filter SECINFO_[UN]PROTECTED_[D|S]ACL flags before sending the security_information to the server. security_information = SECINFO_PROTECTED_DACL| SECINFO_DACL results in a NULL dacl being returned from an GetSecurityDecriptor request. This happens because posix_get_nt_acl_common() has the following logic: if ((security_info & SECINFO_DACL) && !(security_info & SECINFO_PROTECTED_DACL)) { ... create DACL ... } I'm not sure if the logic is correct or wrong in this place (I guess it's wrong...). But what I know is that the SMB server should filter the given security_information flags before passing to the filesystem. [MS-SMB2] 3.3.5.20.3 Handling SMB2_0_INFO_SECURITY ... The server MUST ignore any flag value in the AdditionalInformation field that is not specified in section 2.2.37. Section 2.2.37 lists: OWNER_SECURITY_INFORMATION GROUP_SECURITY_INFORMATION DACL_SECURITY_INFORMATION SACL_SECURITY_INFORMATION LABEL_SECURITY_INFORMATION ATTRIBUTE_SECURITY_INFORMATION SCOPE_SECURITY_INFORMATION BACKUP_SECURITY_INFORMATION Bug: https://bugzilla.samba.org/show_bug.cgi?id=10773 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2014-09-01security.idl: add SMB_SUPPORTED_SECINFO_FLAGSStefan Metzmacher1-0/+18
A SMB server should only care about specific SECINFO flags and ignore others e.g. SECINFO_PROTECTED_DACL. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10773 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
2014-09-01Fixed a memory leak in cli_set_mntpoint().Har Gagan Sahai1-2/+4
Fixes bug #10759 - Memory leak in libsmbclient in cli_set_mntpoint function https://bugzilla.samba.org/show_bug.cgi?id=10759 Signed-off-by: Har Gagan Sahai <SHarGagan@novell.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Wed Aug 13 04:36:50 CEST 2014 on sn-devel-104
2014-09-01lib: Remove unused nstrcpyVolker Lendecke1-5/+0
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Bug: https://bugzilla.samba.org/show_bug.cgi?id=10758 Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Mon Aug 4 09:58:16 CEST 2014 on sn-devel-104 Signed-off-by: Volker Lendecke <vl@samba.org>
2014-09-01build: fix configure to honour --without-dmapiMichael Adam1-28/+44
Previously, --without-dmapi would still autodetect and link a useable dmapi library. This change allows to build without dmapi support even when a dmapi library is found. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10369 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 2afacf940f21759c08bcc4a6e906428595966a19)
2014-08-07tests: dnsserver: Add a update test with name set to '.'Amitay Isaacs1-1/+40
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Tue Jul 29 19:33:19 CEST 2014 on sn-devel-104 (cherry picked from commit 6d104182d9667e4f996439d24cfa052f34098ce4) Bug: https://bugzilla.samba.org/show_bug.cgi?id=10742 samba-tool dns add 172.31.9.161 s4xdom.base . NS mydns.org. => NO_MEMORY Autobuild-User(v4-1-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-1-test): Thu Aug 7 18:54:28 CEST 2014 on sn-devel-104
2014-08-07s4-rpc: dnsserver: Allow . to be specified for @ recordAmitay Isaacs1-1/+3
Windows allow both . and @ to be specified with modifying @ record. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10742 Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 4b4e30b780345c74f9983ba77f04c616b3d034b7)
2014-08-07s3: net time - fix usage and core dump.Jeremy Allison1-10/+20
Bug 10728 - 'net time system' segfaults https://bugzilla.samba.org/show_bug.cgi?id=10728 Signed-off-by: Jeremy Allison <jra@samba.org>
2014-08-07s3: xml-docs. Ensure users of 'net time' know the remote server must be ↵Jeremy Allison1-4/+11
specified with -S. Bug 10728 - 'net time system' segfaults https://bugzilla.samba.org/show_bug.cgi?id=10728 Signed-off-by: Jeremy Allison <jra@samba.org>
2014-08-07s3: remove stat_ex.vfs_private completelyMichael Adam3-23/+0
It is not used any more. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Jul 24 14:23:11 CEST 2014 on sn-devel-104 (cherry picked from commit cd95937369b1729e2417d78f3c903bce5d32da93) BUG: https://bugzilla.samba.org/show_bug.cgi?id=10741
2014-08-07s3:vfs:gpfs: remove a block and reduce indentation in gpfs_is_offline()Michael Adam1-8/+6
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> (cherry picked from commit eb0577dca04a2fde4691094a006954d417d1cf22) BUG: https://bugzilla.samba.org/show_bug.cgi?id=10741
2014-08-07s3:vfs:gpfs: remove all writing uses of stat_ex.vfs_private from vfs_gpfs.Michael Adam1-7/+0
Now that the vfs_private cache is never read in vfs_gpfs, there is no need any more to write it. With this change, vfs_gpfs does not use vfs_private any more. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> (cherry picked from commit d87d13f4c2a77c03bbffcd0fe4fc9464d9024cae) BUG: https://bugzilla.samba.org/show_bug.cgi?id=10741
2014-08-07s3:vfs:gpfs: Remove all reading uses of stat_ex.vfs_private from vfs_gfs.Michael Adam1-21/+20
This was used as a cache for offline-info in the stat buffer. But as the implementation of gpfs_is_offline() showed, this cache does not always carry valid information when the stat itself is valid (since at least one call goes to fstatat() directly, circumventing the vfs). So the correct thing is to always call SMB_VFS_IS_OFFLINE() when checking whether a file is offline. For the pread and pwrite calls, we need to call IS_OFFLINE before the actual read and check afterwards if the file was offline before (as a basis whether to send notifications). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> (cherry picked from commit 16a040f8ef7f2f594505ef07e6f9b77df8f1d725) Conflicts: source3/modules/vfs_gpfs.c BUG: https://bugzilla.samba.org/show_bug.cgi?id=10741
2014-08-07s3:vfs:gpfs: fix flapping offline: always get winAttrs from gpfs for is_offlineMichael Adam1-3/+1
There is a problem of flapping offline due to uninitialized stat buffers. Due to a optimization in vfswrap_readdir which directly calling fastatat (i.e. not through vfs), marking the stat buffer valid, there is nothing this module can do about it and hence can not currently not rely on the vaildity of the stat buffer. By always calling out to GPFS even when the stat buffer is flagged valid, we can always return correct offline information, thereby sacrificing the readdir optimization. Pair-Programmed-With: Volker Lendecke <vl@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> (cherry picked from commit 31e67507144aae8d5a8ec49587ac89d2d94636f0) BUG: https://bugzilla.samba.org/show_bug.cgi?id=10741
2014-08-07s3:vfs:gpfs: store the winAttrs in the struct_ex when we got them in ↵Michael Adam1-0/+1
vfs_gpfs_fstat() This may (e.g.) have lead to some occurrences of flapping offline bits. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org> (cherry picked from commit 573ca6ef6b8376800d8fc988d67909e103b74656) BUG: https://bugzilla.samba.org/show_bug.cgi?id=10741
2014-08-07s3:idmap: don't log missing range config if range checking not requestedMichael Adam1-2/+2
idmap_init_domain() is called with check_range == false from idmap_passdb_domain(). In this case, we usually don't have an idmap range at all, and we don't want to level 1 debug messages complaining about the fact are irritating at least. This patch removes the debug in the case of check_range == false. BUG: https://bugzilla.samba.org/show_bug.cgi?id=10737 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 3c6ec8908a697ac95536b35d242ccd64e524a0a5)
2014-08-07sys_poll_intr: fix timeout arithmeticDaniel Kobras1-2/+12
Callers of sys_poll_intr() assume timeout to be in milliseconds like poll(2) expects, but implementation used nanosecond units. Also make sure timeout doesn't become infinite by mistake during time arithmetic. Signed-off-by: Daniel Kobras <d.kobras@science-computing.de> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Bug: https://bugzilla.samba.org/show_bug.cgi?id=10731 Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Jul 22 00:12:24 CEST 2014 on sn-devel-104
2014-08-07s4:torture/rpc: add rpc.netlogon.ServerReqChallengeGlobalStefan Metzmacher1-0/+73
This demonstrates that the challenge table should be global. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10723 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sat Jul 19 12:51:39 CEST 2014 on sn-devel-104 (cherry picked from commit d90f3323ee001080645dcd25da8b8ce1367b1377)
2014-08-07s4:rpc_server/netlogon: keep a global challenge tableStefan Metzmacher1-4/+87
Some clients call netr_ServerReqChallenge() and netr_ServerAuthenticate3() on different connections. This works against Windows DCs as they have a global challenge table. A VMware provisioning task for Windows VMs seemy to rely on this behavior. As a fallback we're storing the challenge in a global memcache with a fixed size. This should allow these strange clients to work against a Samba AD DC. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10723 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (similar to commit 321ebc99b5a00f82265aee741a48aa84b214d6e8)
2014-08-07lib/util: move memcache.[ch] to the toplevel 'samba-util' libraryStefan Metzmacher18-16/+16
This is generic enough that it could be used in all code. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Fri Jul 18 15:43:33 CEST 2014 on sn-devel-104 (cherry picked from commit 45807028d478c082fef6f3a3d5a142d96d63fb50)
2014-08-07s3:lib/memcache: only include the required header filesStefan Metzmacher2-3/+6
We don't need the full "includes.h". Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit b560fac7f78b761ee279d8e87a749125665eb5d1)
2014-08-07s3:lib/memcache: make use of talloc for memcache_elementsStefan Metzmacher1-6/+5
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit 91105d1057c29c5878f50678baeb1bd1a6f1abe3)
2014-08-07s3:lib/memcache: use uint8_t instead of uint8Stefan Metzmacher1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> (cherry picked from commit d7cbc63dc7537fc9562da985b77f6d62dc41fd84)
2014-08-07s4:torture/rpc: add invalidAuthenticate2Stefan Metzmacher1-14/+74
This add 'rpc.netlogon.netlogon.invalidAuthenticate2' as new test it demonstrates the STATUS_BUFFER_OVERFLOW on computer names larger than 15 characters. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Jan 22 19:07:12 CET 2014 on sn-devel-104 (cherry picked from commit 38f8788d6bf7fac509dcf492214a66a8bb3ac3fc)
2014-08-07selftest/knownfail: add ^samba4.rpc.netlogon.*.invalidAuthenticate2 for v4-1-*Stefan Metzmacher1-0/+1
This works in master (>= 4.2), but not in 4.1.x. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2014-08-07libcli/auth: also set secure channel type in netlogon_creds_client_init().Günther Deschner8-0/+12
Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> (cherry picked from commit a9d5b2fdf03a25e7669258de6c83288be3335cef)