1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

3487 Commits

Author SHA1 Message Date
Christian Ambach
35b4ba0193 lib/ldb fix compiler warnings
about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-12 14:21:27 -08:00
Christian Ambach
9784ed9fb7 lib/ldb fix compiler warnings
about potentially uninitialized variables

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-12 14:21:27 -08:00
Christian Ambach
f1acab1643 lib/ldb-samba: fix a compiler warning
about macro redefinition

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-12 14:21:27 -08:00
Christian Ambach
094747aaf3 lib/compression: fix a compiler warnings
about set but unused variable

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-12 14:21:26 -08:00
Volker Lendecke
b2dfd57669 lib-util: add functions to get elapsed from given timespec structs
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-12-12 12:50:21 -08:00
Stefan Metzmacher
e26736dcc2 tevent: version 0.9.20
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
2013-12-12 00:39:35 +01:00
Stefan Metzmacher
4b330ba0a8 tevent: give the user the chance to ask for TEVENT_NUM_SIGNALS and 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>
2013-12-11 22:46:09 +01:00
Stefan Metzmacher
cbb93f5442 tevent: change TEVENT_SA_INFO_QUEUE_COUNT from 64 to 256
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>
2013-12-11 22:46:09 +01:00
Stefan Metzmacher
36345d44c8 tevent: tevent_epoll_set_panic_fallback() can be a void function
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>
2013-12-11 22:46:09 +01:00
Stefan Metzmacher
4cc02d7c84 tevent: make use of talloc_get_type_abort() in tevent_epoll.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-12-11 22:46:09 +01:00
Stefan Metzmacher
7bf5e6b181 tevent: make use of talloc_get_type_abort() in tevent_signal.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-12-11 22:46:09 +01:00
Stefan Metzmacher
fbdaf7481b tevent: make use of talloc_get_type_abort() in tevent_select.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-12-11 22:46:09 +01:00
Stefan Metzmacher
99910b67d2 tevent: make use of talloc_get_type_abort() in tevent_req.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-12-11 22:46:09 +01:00
Stefan Metzmacher
982bf3c082 tevent: make use of talloc_get_type_abort() in tevent_queue.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-12-11 22:46:09 +01:00
Stefan Metzmacher
fb06f0e3d3 tevent: use talloc_get_type_abort() in the documentation examples
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-12-11 22:46:09 +01:00
Gregor Beck
8e44c2f963 tevent: add tevent_queue_wait_send/recv()
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>
2013-12-11 22:46:09 +01:00
Stefan Metzmacher
7a97d4c4c3 tevent: tevent_req_create() already uses ZERO_STRUCT(req)
There's no need to zero individual members.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2013-12-11 22:46:09 +01:00
Stefan Metzmacher
39888fd4a3 tevent: let tevent_req_received() clear the private_cancel function
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>
2013-12-11 22:46:09 +01:00
Stefan Metzmacher
577afba8b3 tevent: cancel the timeout timer when the request is finished
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>
2013-12-11 22:46:09 +01:00
Michael Adam
5aade722cc lib:util: fix a comment typo
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-12-11 17:54:21 +01:00
Stefan Metzmacher
94b2641a53 CVE-2013-4408:async_sock: add some overflow detection to read_packet_handler()
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>
2013-12-09 07:05:45 +01:00
Christian Ambach
5390ff5a26 lib/ntdb optimize includes in ntdb tools
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
2013-12-07 18:38:21 +01:00
Christian Ambach
0f41792dc5 lib/ntdb optimize includes in ntdb tests
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>
2013-12-07 16:45:15 +01:00
Christian Ambach
7be0e91dde lib/ntdb correct includes in private header
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>
2013-12-07 16:45:15 +01:00
Christian Ambach
794db9ea31 lib/ntdb fix compilation 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>
2013-12-07 16:45:15 +01:00
Christian Ambach
100f324fcd lib/socket_wrapper fix compilation when libreplace is not around
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2013-12-07 16:45:15 +01:00
Jeremy Allison
966667abbe ldb: bad if test in ldb_comparison_fold()
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
2013-12-07 11:10:47 +01:00
Jelmer Vernooij
43c021512c pyntdb: Add tests for Python API.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-12-06 05:21:03 +01:00
Jelmer Vernooij
9a67bfa834 pyntdb: Don't segfault when passing in None as filename (for memory db)
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-12-06 05:21:03 +01:00
Jelmer Vernooij
4111f31eac pyntdb: Don't allow access after a database is closed.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-12-06 05:21:03 +01:00
Jelmer Vernooij
28b5b7e28e tdb tests: Remove custom code for "tdb2", which has been split out into ntdb.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-12-06 05:21:03 +01:00
Andreas Schneider
5f92c81fb6 krb5_wrap: Move function declaration outside the function.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-06 01:14:09 +01:00
Christian Ambach
de55856745 lib/replace remove orphaned code
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
2013-12-04 22:55:12 +01:00
Pavel Reichl
4b637c367f ldb: use of NULL pointer bugfix
Autobuild-User(master): Simo Sorce <idra@samba.org>
Autobuild-Date(master): Tue Dec  3 21:13:53 CET 2013 on sn-devel-104
2013-12-03 21:13:53 +01:00
David Disseldorp
fb042b35ed replace: fix typo in variable name
13550a2b5e 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
2013-11-28 18:16:27 +01:00
Volker Lendecke
13550a2b5e replace: Don't run over dst in strlcat
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>
2013-11-28 12:33:10 +01:00
Jelmer Vernooij
91c1053413 Add a basic guide on pytalloc.
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
2013-11-28 02:24:45 +01:00
Andrew Bartlett
e665fc3940 lib/param: Consolidate code to enable smb signing on the server, always 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
2013-11-22 13:13:03 +01:00
Christian Ambach
4ea92841b7 lib/util: use proper include for struct stat
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
2013-11-21 22:12:45 +01:00
Andreas Schneider
979d9dbbb7 replace: Fix developer build on BSD.
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
2013-11-21 03:37:59 +01:00
Günther Deschner
e003650f5c docs: remove duplicate mention of "ntdbtool" in ntdbtool manpage.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-11-19 09:52:39 +01:00
Jelmer Vernooij
c0d897e2eb Release ntdb 1.0.
Autobuild-User(master): Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date(master): Sat Nov 16 19:06:59 CET 2013 on sn-devel-104
2013-11-16 19:06:59 +01:00
Andreas Schneider
af69cb2a78 util: Remove 32bit macros breaking strict aliasing.
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
2013-11-14 23:16:45 +01:00
Volker Lendecke
d2731ad5aa ldb: Fix CID 241329 Array compared against 0
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>
2013-11-11 21:04:09 +01:00
Volker Lendecke
43ac7e81ec iniparser: Fix CID 241908 Copy into fixed size buffer
strcpy is never a good idea....

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
2013-11-11 21:04:08 +01:00
Björn Baumbach
63d98ed904 CVE-2013-4476: lib-util: split out file_save_mode() from file_save()
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>
2013-11-11 11:14:36 +01:00
Björn Baumbach
8eae8d28bc CVE-2013-4476: lib-util: add file_check_permissions()
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>
2013-11-11 11:14:36 +01:00
Björn Jacke
374b2cfde7 xattr: fix listing EAs on *BSD for non-root users
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
2013-11-08 20:43:29 +01:00
Volker Lendecke
4e06c61b41 ldb: Fix CID 240798 Uninitialized pointer read
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
2013-10-22 03:28:20 +02:00
Andrew Bartlett
aca475b6bc lib/param: Add documentation on how loadparm works
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
2013-10-16 11:39:41 +02:00