summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* lib: Add close_low_fdVolker Lendecke2014-08-012-0/+48
| | | | | | | | This factors out the essential code from close_low_fds for one file descriptor: Redirect a fd to /dev/null Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* fix unstrcpyVolker Lendecke2014-08-011-1/+1
| | | | | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Bug: https://bugzilla.samba.org/show_bug.cgi?id=10735 CVE-2014-3560: unstrcpy macro length is invalid Autobuild-User(master): Ira Cooper <ira@samba.org> Autobuild-Date(master): Fri Aug 1 22:10:23 CEST 2014 on sn-devel-104
* samba: Retain case sensitivity of cifs clientShirish Pargaonkar2014-08-011-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
* winbindd-irpc: Ensure not to call irpc_send_reply twice on errorAndrew Bartlett2014-08-011-0/+1
| | | | | | | | | | | | | | | As found during investigation of the previous commit, when the RPC call fails totally, we must only try and send one error reply. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Stefan Metzmacher <metze@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Aug 1 12:11:29 CEST 2014 on sn-devel-104
* libcli/auth: Ensure that the dns_names in/out parameter is preservedAndrew Bartlett2014-08-011-1/+8
| | | | | | | | | | | | | | | This is in dcerpc_netr_DsrUpdateReadOnlyServerDnsRecords, which has status variables filled in by the server and placed in this in/out array. This showed up as a segfault in winbindd during RODC DNS update. Andrew Bartlett Signed-off-by: Garming Sam <garming@catalyst.net.nz> Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
* waf: socket_wrapper should check for HAVE_FUNCTION_ATTRIBUTE_FORMAT.Andreas Schneider2014-07-311-0/+12
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Jul 31 21:12:07 CEST 2014 on sn-devel-104
* uwrap: Support dropping all supplemetary groups with setgroups()Jakub Hrozek2014-07-311-2/+12
| | | | | | | | | | Dropping all supplementary groups is a common practice when changing UIDs. This patch adds support for dropping all supplementary groups when setgroups is called with size=0. Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* uwrap: Add logging if uwrap is enabled correctly.Andreas Schneider2014-07-311-0/+8
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* uwrap: Log error if we are out of memory.Andreas Schneider2014-07-311-0/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* uwrap: Add a better logging function.Andreas Schneider2014-07-311-8/+67
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* uwrap: Check for HAVE_FUNCTION_ATTRIBUTE_FORMAT.Andreas Schneider2014-07-312-0/+19
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* uwrap: Fall back to RTLD_NEXT if we can't find libc.Andreas Schneider2014-07-311-4/+4
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* uwrap: Add mutex in uwrap_destructor().Andreas Schneider2014-07-311-0/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* uwrap: Fix memory leak on error.Andreas Schneider2014-07-311-0/+1
| | | | | | | Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* debug: Avoid dependency on str_list_makeVolker Lendecke2014-07-311-41/+29
| | | | | | | strtok_r just also does the job and is available in libc Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Fix blank line endingsVolker Lendecke2014-07-311-3/+3
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Increase maximum header lengthVolker Lendecke2014-07-311-1/+1
| | | | | | | With function names it can become quite long Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: In dbghdrclass, don't call strlen repeatedlyVolker Lendecke2014-07-311-20/+40
| | | | | | | Also properly protect against header_str overflow Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Fix a typoVolker Lendecke2014-07-311-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Simplify debug_parse_levelsVolker Lendecke2014-07-311-6/+6
| | | | | | | Just some minimal refactoring Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Simplify Debug1() -- no va_argsVolker Lendecke2014-07-311-34/+18
| | | | | | | | | | | All callers just have "%s" as format string now, so we don't need to vasprintf anymore. This could speed up DEBUG a bit, we don't do a separate copy and the printf logic Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Remove an "else"Volker Lendecke2014-07-311-1/+3
| | | | | | | No else necessary, we just did a "goto done:" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Remove two pointless assignmentsVolker Lendecke2014-07-311-2/+0
| | | | | | | "goto done:" jumps to that exact assignment :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Only call Debug1 once in dbghdrclassVolker Lendecke2014-07-311-6/+9
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Move adding timeval and loglevelVolker Lendecke2014-07-311-12/+11
| | | | | | | | The whole routine incrementally creates the hdr_string, do it for the time string and the debuglevel as well Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: slprintf->snprintfVolker Lendecke2014-07-311-6/+7
| | | | | | | snprintf does not need the -1 in sizeof(buf)-1 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Use timeval_str_buf in dbghdrclassVolker Lendecke2014-07-311-12/+11
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Simplify dbghdrclass with an early returnVolker Lendecke2014-07-311-41/+43
| | | | | | | No code change, visible with "git diff -w" Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib: Create time_basic.[ch]Volker Lendecke2014-07-316-66/+130
| | | | | | | | | Make the two functions that debug.c needs a subsystem of their own. The goal is to put debug.c on a diet. Anybody who wants to use it should not be forced to pull in half of Samba :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib: Use timeval_str_buf in timeval_stringVolker Lendecke2014-07-311-38/+17
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib: Add timeval_str_bufVolker Lendecke2014-07-312-0/+51
| | | | | | | Similarly to server_id_str_buf it does not do any allocation Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Statically allocate format_bufrVolker Lendecke2014-07-311-10/+2
| | | | | | | | Everybody needs this, so there's no point talloc'ing it. The side effect is that it removes a dependency on smb_panic() Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Fix debug_parse_paramsVolker Lendecke2014-07-311-1/+1
| | | | | | | | | | | | | | The additional check this patch removes potentially drops some debuglevel class settings. While not documented, it is possible to add a debug class like for example "tdb:10" multiple times with multiple values. Later settings overwrite earlier ones, but only if the overall number of settings does not exceed the total number of available debug classes. This patch changes our behaviour, but I can't imagine a situation where someone relies on this check. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Make Debug1 staticVolker Lendecke2014-07-312-2/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* nmbd: Call DEBUGADD instead of Debug1Volker Lendecke2014-07-311-10/+7
| | | | | | | | These were the only external callers of Debug1. To be honest, I don't really care if these debug messages now look a bit differently :-) Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Remove a dependency on charconvVolker Lendecke2014-07-311-1/+1
| | | | | | | | | | | | | | | | util_str has: /* characters below 0x3F are guaranteed to not appear in non-initial position in multi-byte charsets */ if ((c & 0xC0) == 0) { return strrchr(s, c); } '/' is 0x2f, so there's no point in calling strrchr_m and thus pulling in a whole lot of stuff Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Add some readability to debug_logtypeVolker Lendecke2014-07-311-1/+8
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Factor out debug_parse_param()Volker Lendecke2014-07-311-8/+31
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Move variables where they are usedVolker Lendecke2014-07-311-2/+2
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* debug: Fix indentation in debug_parse_paramsVolker Lendecke2014-07-311-5/+6
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib: Remove unused serverid_register_msg_flags()Volker Lendecke2014-07-312-61/+0
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* libcli: Fix a typoVolker Lendecke2014-07-311-1/+1
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* param: remove a redundant (and wrong) comment frop lpcfg_service_ok()Michael Adam2014-07-311-1/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* s3:param: remove unused function lp_string_set()Michael Adam2014-07-312-5/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib/param: change the default for "winbind expand groups" to "0"Stefan Metzmacher2014-07-313-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Expanding groups requires the usage of SAMR, which is often not possible with the trust account credentials. This has caused a lot of trouble in the past, as this is the only operation which requires a member to contact a dc of a trusted domain directly, which is not always possible. With this changed default, it should only be required to contact a dc of our own domain. This is the correct behavior for a domain member. As expanding groups is mostly cosmetic, we should avoid it. This is similar to "winbind enum users" and "winbind enum groups", which are also off by default. Only some broken applications calculate the group memberships of users by traversing groups, such applications will require "winbind expand groups = 1". Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Björn Jacke <bj@sernet.de> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Thu Jul 31 18:48:36 CEST 2014 on sn-devel-104
* debug: Remove thread-related code from debug.cVolker Lendecke2014-07-312-88/+0
| | | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Jul 31 16:20:53 CEST 2014 on sn-devel-104
* smbd4: Remove process_model_threadVolker Lendecke2014-07-312-585/+0
| | | | | | | | | | | | | | | | | | | | This code has not seen any use or development for a while. While probably being a good source of inspiration, it will inevitably bit-rot. To really get to a multi-threaded process model, many of the Samba libraries have to be made thread-safe. Why this patch? Right now I am trying to clean up our debug system, and process_thread.c is the only reference to the _suspicious_ functions in debug.c. The alternative would be to factor those out of debug, but as this code is unused for so long, the alternative approach is to just remove it. If someone wants to restart development on a threaded process model, the code is still around in the git history and can be resurrected easily. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* ctdb-eventscripts: Remove special case for virtio_netMartin Schwenke2014-07-311-5/+0
| | | | | | | | | | | | | | | | | | | The current check is incorrect in 2 ways: * Commit be71a84565e9e7532a77c175732b764d1f42c1cd contained a thinko that stops virtio_net interfaces from simply being marked up * virtio_net interfaces can actually be down virtio_net has supported ethtool since Linux 2.6.29, so just remove the special case. This means that testing CTDB on very old virtual machines is not supported. 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): Thu Jul 31 13:08:47 CEST 2014 on sn-devel-104
* param: Add errors for when an s3 context is used incorrectlyGarming Sam2014-07-311-0/+9
| | | | | | | | | | Change-Id: I176b4413769f41739639875ab874a3e340b6a184 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Jul 31 10:41:58 CEST 2014 on sn-devel-104
* param: get rid of unnecessary get_default_loadparm_service pointerGarming Sam2014-07-313-5/+0
| | | | | | | Change-Id: I9f512be671e5cd738c43fd97c9c3e0b4ee7a2736 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>