summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* lib-util: add functions to get elapsed from given timespec structsVolker Lendecke2013-12-122-0/+28
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* tevent: version 0.9.20Stefan Metzmacher2013-12-122-1/+88
| | | | | | | | | | | | | | This adds the following new features: - tevent_queue_wait_send/recv() - tevent_num_signals() - tevent_sa_info_queue_count() 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): Thu Dec 12 00:39:35 CET 2013 on sn-devel-104
* tevent: give the user the chance to ask for TEVENT_NUM_SIGNALS and ↵Stefan Metzmacher2013-12-111-0/+10
| | | | | | | | | | | TEVENT_SA_INFO_QUEUE_COUNT This way the caller can change use the supported limits without using hardcoded values. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10214 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: change TEVENT_SA_INFO_QUEUE_COUNT from 64 to 256Stefan Metzmacher2013-12-111-1/+1
| | | | | | | | | | | There are some existing callers which assume the old SA_INFO_QUEUE_COUNT 100 value. 256 should give room for the future. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10214 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: tevent_epoll_set_panic_fallback() can be a void functionStefan Metzmacher2013-12-113-6/+3
| | | | | | | There's no case where this could return an error. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: make use of talloc_get_type_abort() in tevent_epoll.cStefan Metzmacher2013-12-111-15/+11
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: make use of talloc_get_type_abort() in tevent_signal.cStefan Metzmacher2013-12-111-6/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: make use of talloc_get_type_abort() in tevent_select.cStefan Metzmacher2013-12-111-6/+8
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: make use of talloc_get_type_abort() in tevent_req.cStefan Metzmacher2013-12-111-4/+6
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: make use of talloc_get_type_abort() in tevent_queue.cStefan Metzmacher2013-12-111-2/+3
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: use talloc_get_type_abort() in the documentation examplesStefan Metzmacher2013-12-111-2/+2
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: add tevent_queue_wait_send/recv()Gregor Beck2013-12-112-0/+85
| | | | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Gregor Beck <gbeck@sernet.de> Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: tevent_req_create() already uses ZERO_STRUCT(req)Stefan Metzmacher2013-12-111-2/+0
| | | | | | | There's no need to zero individual members. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: let tevent_req_received() clear the private_cancel functionStefan Metzmacher2013-12-111-0/+1
| | | | | | | This makes sure it's not called when the private state is already gone. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* tevent: cancel the timeout timer when the request is finishedStefan Metzmacher2013-12-111-0/+6
| | | | | | | | As we might defer the callback with tevent_req_defer_callback() when calling tevent_req_done(), we should cancel the timeout directly. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* lib:util: fix a comment typoMichael Adam2013-12-111-1/+1
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* CVE-2013-4408:async_sock: add some overflow detection to read_packet_handler()Stefan Metzmacher2013-12-091-0/+5
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10185 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* lib/ntdb optimize includes in ntdb toolsChristian Ambach2013-12-077-61/+5
| | | | | | | | | | | use the private header (which will use libreplace or system headers) instead of direct includes of system includes Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Rusty Russell <rusty@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Sat Dec 7 18:38:21 CET 2013 on sn-devel-104
* lib/ntdb optimize includes in ntdb testsChristian Ambach2013-12-0727-97/+20
| | | | | | | | use the private header (which will use libreplace or system headers) instead of direct includes of system includes Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Rusty Russell <rusty@samba.org>
* lib/ntdb correct includes in private headerChristian Ambach2013-12-071-0/+5
| | | | | | | | include all necessary headers when libreplace is not around Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Rusty Russell <rusty@samba.org>
* lib/ntdb fix compilation when libreplace is not aroundChristian Ambach2013-12-072-1/+10
| | | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Rusty Russell <rusty@samba.org>
* lib/socket_wrapper fix compilation when libreplace is not aroundChristian Ambach2013-12-071-0/+20
| | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
* ldb: bad if test in ldb_comparison_fold()Jeremy Allison2013-12-071-1/+1
| | | | | | | | | | | | Found by David Binderman <dcb314@hotmail.com> BUG: https://bugzilla.samba.org/show_bug.cgi?id=10305 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Sat Dec 7 11:10:47 CET 2013 on sn-devel-104
* pyntdb: Add tests for Python API.Jelmer Vernooij2013-12-062-2/+156
| | | | | | Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyntdb: Don't segfault when passing in None as filename (for memory db)Jelmer Vernooij2013-12-061-1/+1
| | | | | | Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* pyntdb: Don't allow access after a database is closed.Jelmer Vernooij2013-12-062-6/+77
| | | | | | Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* tdb tests: Remove custom code for "tdb2", which has been split out into ntdb.Jelmer Vernooij2013-12-061-43/+22
| | | | | | Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* krb5_wrap: Move function declaration outside the function.Andreas Schneider2013-12-061-8/+9
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* lib/replace remove orphaned codeChristian Ambach2013-12-042-349/+0
| | | | | | | | | | this is not compiled and used anymore Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-By: Jelmer Vernooij <jelmer@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Wed Dec 4 22:55:12 CET 2013 on sn-devel-104
* ldb: use of NULL pointer bugfixPavel Reichl2013-12-031-2/+2
| | | | | Autobuild-User(master): Simo Sorce <idra@samba.org> Autobuild-Date(master): Tue Dec 3 21:13:53 CET 2013 on sn-devel-104
* replace: fix typo in variable nameDavid Disseldorp2013-11-281-1/+1
| | | | | | | | | | | 13550a2b5eed57084a5d9671d9493a9a2e08d7e3 added a typo causing compilation failure. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Thu Nov 28 18:16:27 CET 2013 on sn-devel-104
* replace: Don't run over dst in strlcatVolker Lendecke2013-11-281-1/+1
| | | | | | | | | If "d" is not 0-terminated, the pure strlen will read beyond the end of the given bufsize. strlcat in libbsd deliberately avoids this, so we should do the same. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* Add a basic guide on pytalloc.Jelmer Vernooij2013-11-282-0/+156
| | | | | | | | Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-By: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Thu Nov 28 02:24:45 CET 2013 on sn-devel-104
* lib/param: Consolidate code to enable smb signing on the server, always ↵Andrew Bartlett2013-11-221-0/+42
| | | | | | | | | | | | | | | enable on AD DC This uses the code from the source4/ SMB server (the NTVFS smb server) in common, to force SMB Signing to be on when we are an AD DC. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Nov 22 13:13:05 CET 2013 on sn-devel-104
* lib/util: use proper include for struct statChristian Ambach2013-11-211-1/+3
| | | | | | | | | | | | | use <sys/stat.h> instead of forward declaring it This fixes the build on AIX Bug: https://bugzilla.samba.org/show_bug.cgi?id=10276 Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Christian Ambach <ambi@samba.org> Autobuild-Date(master): Thu Nov 21 22:12:45 CET 2013 on sn-devel-104
* replace: Fix developer build on BSD.Andreas Schneider2013-11-211-0/+1
| | | | | | | | | | This fixes bsd_attr_list() calling geteuid(). 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 Nov 21 03:37:59 CET 2013 on sn-devel-104
* docs: remove duplicate mention of "ntdbtool" in ntdbtool manpage.Günther Deschner2013-11-191-4/+0
| | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* Release ntdb 1.0.Jelmer Vernooij2013-11-162-1/+39
| | | | | Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org> Autobuild-Date(master): Sat Nov 16 19:06:59 CET 2013 on sn-devel-104
* util: Remove 32bit macros breaking strict aliasing.Andreas Schneider2013-11-141-50/+2
| | | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10269 These macros might have worked but they break strict aliasing in the meantime and so the compiler is not able to optimize the relevant code. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Volker Lendecke <vl@samba.org> Autobuild-Date(master): Thu Nov 14 23:16:45 CET 2013 on sn-devel-104
* ldb: Fix CID 241329 Array compared against 0Volker Lendecke2013-11-111-1/+1
| | | | | | | u.generate.remote_names is an array, not a pointer Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* iniparser: Fix CID 241908 Copy into fixed size bufferVolker Lendecke2013-11-111-3/+5
| | | | | | | strcpy is never a good idea.... Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Ira Cooper <ira@samba.org>
* CVE-2013-4476: lib-util: split out file_save_mode() from file_save()Björn Baumbach2013-11-112-5/+13
| | | | | | | | | file_save_mode() writes files with specified mode. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* CVE-2013-4476: lib-util: add file_check_permissions()Björn Baumbach2013-11-112-0/+53
| | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* xattr: fix listing EAs on *BSD for non-root usersBjörn Jacke2013-11-081-0/+4
| | | | | | | | | | | | Thanks to Stefan Rompf for reporting. This fixes bug #10247 Signed-off-by: Bjoern Jacke <bj@sernet.de> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Nov 8 20:43:30 CET 2013 on sn-devel-104
* ldb: Fix CID 240798 Uninitialized pointer readVolker Lendecke2013-10-221-1/+1
| | | | | | | | | | | Not called right now, because nobody tries multiple sort attributes. But if someone did, build_response would have looked at the uninitialized controls. 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 Oct 22 03:28:20 CEST 2013 on sn-devel-104
* lib/param: Add documentation on how loadparm worksAndrew Bartlett2013-10-161-0/+69
| | | | | | | | | Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Wed Oct 16 11:39:41 CEST 2013 on sn-devel-104
* param: Autogenerate s3 lp_ctx glue tableAndrew Bartlett2013-10-161-0/+1
| | | | | | | | This allows us to use more lpcfg_ functions without adding them manually. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib/param: Do not attempt to access the s3 function for allocated and subbed ↵Andrew Bartlett2013-10-161-11/+10
| | | | | | | | | | | | | string parameters This allows us not to generate array entries for these, which in turn allows us to avoid initialising them. The issue is that we do not have the % macro sub context nor a talloc context handy (yet). Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* lib/param: lp_magicchar takes a const struct share_params *p so should be ↵Andrew Bartlett2013-10-162-2/+2
| | | | | | | | | | | FN_LOCAL_PARM_CHAR This was found when trying to autogenerate prototypes for lp_ functions again. Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* talloc: Add a warning to talloc_reference() documentation.Andreas Schneider2013-10-141-0/+8
| | | | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Kai Blin <kai@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Oct 14 23:05:54 CEST 2013 on sn-devel-104