summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* torture: add torture_assert_u64_not_equal()Michael Adam2014-10-031-0/+11
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* torture: add torture_assert_int_not_equalMichael Adam2014-10-031-0/+10
| | | | Signed-off-by: Michael Adam <obnox@samba.org>
* swrap: Bump version to 1.1.2.Andreas Schneider2014-10-021-1/+1
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Matthieu Patou <mat@matws.net> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Thu Oct 2 12:00:14 CEST 2014 on sn-devel-104
* swrap: Add support for eventfd with unsigned count variable.Andreas Schneider2014-10-021-0/+4
| | | | | | | The prototype in glibc 2.20.90 changed. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Add a trace message for swrap_socket().Andreas Schneider2014-10-021-0/+5
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Implement fcntl() to catch F_DUPFD.Andreas Schneider2014-10-021-1/+86
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Include the function name in the debug output.Andreas Schneider2014-10-021-12/+14
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Silence alignment warnings.Andreas Schneider2014-10-021-16/+16
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Fix type punning warnings when loading functions.Andreas Schneider2014-10-021-1/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Fix access to struct members in log messages.Andreas Schneider2014-10-021-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Fix whitespace errors.Andreas Schneider2014-10-021-16/+16
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Update copyright notice.Andreas Schneider2014-10-021-3/+3
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Wrap fopen to detect stale file descriptors.Andreas Schneider2014-10-021-0/+31
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Use swrap_address in swrap_accept().Andreas Schneider2014-10-021-28/+23
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Remove unused sockaddr_dup() function.Andreas Schneider2014-10-021-7/+0
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Use swrap_address in the socket_info struct.Andreas Schneider2014-10-021-107/+109
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Use a sockaddr_un for the unix path in socket_info.Andreas Schneider2014-10-021-5/+7
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Rename swrap_pcap_dump_packet().Andreas Schneider2014-10-021-29/+29
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Rename swrap_pcap_get_fd().Andreas Schneider2014-10-021-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Rename swrap_marshall_packet().Andreas Schneider2014-10-021-8/+13
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Rename swrap_packet_init().Andreas Schneider2014-10-021-15/+22
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Rename socket_wrapper_pcap_file().Andreas Schneider2014-10-021-2/+2
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* swrap: Fix type punning warnings.Andreas Schneider2014-10-021-75/+127
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Provide a compatible declaration of CMSG_ALIGNJakub Hrozek2014-10-021-1/+1
| | | | | | | | | Some platforms (like OSX) do support some of the CMGS macros, but don't have a CMSG_ALIGN macro of their own. Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* SO_PROTOCOL is platform-dependentJakub Hrozek2014-10-021-0/+3
| | | | | | | | | SO_PROTOCOL is not defined on all platforms. In particular, OSX doesn't include it and so far I haven't found any compatible declaration. Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* swrap: fix another discard const warning in swrap_bind()Michael Adam2014-10-021-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* swrap: fix discard const warning in swrap_bind()Michael Adam2014-10-021-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* swrap: fix discard const warning in swrap_remove_stale()Michael Adam2014-10-021-2/+2
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* swrap: fix build when neither HAVE_STRUCT_IN_PKTINFO nor IP_RECVDSTADDR is ↵Michael Adam2014-10-021-2/+1
| | | | | | | defined Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* loadparm//init_copymap: Add braces around if/for blocks to match coding styleKamen Mazdrashki2014-10-011-3/+5
| | | | | | | | Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Oct 1 13:47:22 CEST 2014 on sn-devel-104
* loadparm: Allocate service->copymap in service memory contextKamen Mazdrashki2014-10-011-1/+5
| | | | | | | | | | | This patch adds a restriction that target service structure must be a valid TALLOC_CTX memory context. I have traced all call paths and at the moment this is the case, pservice parameter layways gets allocated on TALLOC_CTX. Signed-off-by: Kamen Mazdrashki <kamenim@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* tdb: Fix a commentVolker Lendecke2014-09-301-1/+1
| | | | | | | | 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 Sep 30 23:08:07 CEST 2014 on sn-devel-104
* lib: util [ctdb]: Signal handling - change CatchChild() and ↵Jeremy Allison2014-09-302-6/+6
| | | | | | | | | | | CatchChildLeaveStatus() to return the previous handler. Bug #10831 - SIGCLD Signal handler not correctly reinstalled on old library code use - smbrun etc. https://bugzilla.samba.org/show_bug.cgi?id=10831 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* tevent: version 0.9.22tevent-0.9.22Stefan Metzmacher2014-09-302-1/+89
| | | | | | | | | | | * pkgconfig fixes * Bug #10640 - smbd is not responding - tevent_common_signal_handler() increments non-atomic variables. https://bugzilla.samba.org/show_bug.cgi?id=10640 * Minor compile fixes Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* tevent: remove unused exit_code in tevent_select.cStefan Metzmacher2014-09-301-4/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* tevent: remove unused exit_code in tevent_poll.cStefan Metzmacher2014-09-301-3/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* winbindd: Change value of "ldap sasl wrapping" to signAndrew Bartlett2014-09-301-0/+2
| | | | | | | | This is to disrupt MITM attacks between us and our DC 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>
* ldb: fix a typo in the comment, LDB_FLAGS_MOD_xxx -> LDB_FLAG_MOD_xxxMatthieu Patou2014-09-301-2/+2
| | | | | | | | | Change-Id: I99ac6e272aa0f54a2720c58f630ae472068f255b Signed-off-by: Matthieu Patou <mat@matws.net> Reviewed-by: Kamen Mazdrashki <kamenim@samba.org> Autobuild-User(master): Matthieu Patou <mat@samba.org> Autobuild-Date(master): Tue Sep 30 08:19:55 CEST 2014 on sn-devel-104
* lib/param: set the kccsrv:samba_kcc option to false by defaultStefan Metzmacher2014-09-291-1/+1
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10697 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* lib: util: asn1 tests. Check every asn1 return.Jeremy Allison2014-09-261-5/+9
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
* lib: util: asn1 fixes - check all returns.Jeremy Allison2014-09-261-11/+15
| | | | | Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
* tdb: Improve wording in a commentVolker Lendecke2014-09-251-1/+1
| | | | | | | | 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): Thu Sep 25 00:59:16 CEST 2014 on sn-devel-104
* lib/util: Drop unnecessary use of talloc_tos()Volker Lendecke2014-09-201-6/+4
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net>
* lib/util: Return some functions to util_str.cMartin Schwenke2014-09-192-55/+55
| | | | | | | | | | | These were moved in commit 8e704e4107b284bfc1e43f4c698ac0e6c5ae1800 when util_str.c was not shared. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Fri Sep 19 20:34:05 CEST 2014 on sn-devel-104
* lib/util: Move next_token* functions to util_str.cMartin Schwenke2014-09-192-146/+145
| | | | | | | | | | | | | | | This is part of an attempt to untangle charset from util.c. Most of this was moved from util_str.c in commit 55903e6f9120f1ec58a8554813229975c3028a09. next_token() was moved from charset to util.c in commit 4be643d4ce33d5ce2bf9deacc3f6d0fde90cf626 so that it would be alongside next_token_talloc(). Now that util_str.c is in shared lib/util it is no longer necessary to have these in util.c. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* lib/util: Move idr_get_new_random() to new source file idtree_random.cMartin Schwenke2014-09-196-63/+176
| | | | | | | | | | | This function depends on genrand.c, which depends on lib/crypto. This way the other IDR tree code can be used without lib/crypto. While doing this, create idtree.h and idtree_random.h and clean up the includes. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* debug: Standalone compile without includes.hMartin Schwenke2014-09-192-3/+14
| | | | | | | | | | | | | Compiling utilities with includes.h is confusing because includes.h could come from source3, source4 or ctdb. Utilities should be independent of such things. Add a minimal set of fined-grained includes that attempts to avoid the catch-all samba_util.h. A comment indicates what is used from samba_util.h so that future clean-ups are easier. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb_wrap: Standalone compile without includes.hMartin Schwenke2014-09-192-4/+5
| | | | | | | | | | | Compiling this generic code is confusing because it uses includes.h, which could come from source3, source4 or ctdb. Generic code should be independent of such things. Drop include of param.h since nothing from that file is used. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb_wrap: tdb_wrap.h doesn't need struct loadparm_contextMartin Schwenke2014-09-191-2/+0
| | | | | | | Not since commit d6db35d7a564ee556b74131ef4c3a3cdb8097e14. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
* tdb: tdb.h needs bool typeMartin Schwenke2014-09-191-0/+1
| | | | | | | Due to introduction of tdb_runtime_check_for_robust_mutexes(). Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>