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

101379 Commits

Author SHA1 Message Date
Jelmer Vernooij
68a3576629 tdb: Only set public headers field when installing as a public library.
Signed-Off-By: Jelmer Vernooij <Jelmer@samba.org>
2016-01-13 04:43:22 +01:00
Jelmer Vernooij
48ebeaa4aa Add private_headers flag to SAMBA_*() functions.
While this argument is correctly ignored, it does mean that we can
associate private headers with specific subsystems/libraries.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-By: Stefan Metzmacher <metze@samba.org>
2016-01-13 04:43:22 +01:00
Jelmer Vernooij
2cba4918db tevent: Only set public headers field when installing as a public library.
Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk>
2016-01-13 04:43:22 +01:00
Jelmer Vernooij
fddca39f19 samdb: Add explicit dependency on ldb.
This is needed to pull in the right -I flags.

Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
2016-01-13 04:43:22 +01:00
Jelmer Vernooij
3123e2c66a Simplify handling of dependencies on external libraries in test_headers.
Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk>
2016-01-13 04:43:22 +01:00
Jelmer Vernooij
4ab7a00ac4 Use full path to dlinklist.h in includes.
Signed-off-by: Jelmer Vernooij <jelmer@jelmer.uk>
2016-01-13 04:43:22 +01:00
Christof Schmitt
6f3656c47d Revert "winbind: Retry after SESSION_EXPIRED error in ping-dc"
This reverts commit a2670f15de.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11670

cm_connect_netlogon now handles the retry for an expired session.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 13 03:35:57 CET 2016 on sn-devel-144
2016-01-13 03:35:57 +01:00
Christof Schmitt
aa3883eae6 winbindd: Retry on expired session in cm_connect_netlogon
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11670

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-01-13 00:26:16 +01:00
Christof Schmitt
276d604aa5 winbindd: Retry on expired session in cm_connect_sam
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11670

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-01-13 00:26:16 +01:00
Christof Schmitt
3b6b545642 winbindd: Retry on expired session in cm_connect_lsa
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11670

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-01-13 00:26:16 +01:00
Christof Schmitt
4c6804e414 winbindd: Remove double retry from some ADS methods
The retry through the new reconnect_ads layer is enough. This structure
also makes the distinction between retry layer and actual methods call a
bit clearer.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11670

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-01-13 00:26:16 +01:00
Christof Schmitt
e4adf55e24 winbindd: Add retry also for ADS method calls
RPC calls can return IO_DEVICE_ERROR on expired SMB2 sessions. Retrying
on a new connection avoids surfacing this error to winbindd clients.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11670

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-01-13 00:26:16 +01:00
Christof Schmitt
fb5b0cec3c winbindd: Reset connection for expired session before reconnecting
A RPC call on a expired SMB2 session returns IO_DEVICE_ERROR. In this
case, reset the connection before issuing the same call
again.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11670

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-01-13 00:26:16 +01:00
Martin Schwenke
3ac2d4b59e ctdb-tests: Fix some incorrect memory allocations
These allocate enough memory but things get confusing if they're used
as a guide when updating the code.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jan 12 22:19:16 CET 2016 on sn-devel-144
2016-01-12 22:19:16 +01:00
Martin Schwenke
a7ce00cc03 ctdb-scripts: Use more unique temporary file names
Consider this sequence of events:

1. Instance of script running update_tickles() hangs
2. Script debugging is launched asynchronously
3. New instance of script is launched, creates temporary file(s)
4. Original hung script makes progress before asynchronous script
   debugging kills it, so it removes temporary file(s)
5. New instance of script produces error due to missing files(s)

This is obviously rare.

Use more unique filenames to avoid step (4) removing the file(s)
belonging to other instances of the script.

This requires some extra cleanup to avoid too many temporary files
(which is why unique filenames were not originally usd).  It is
sufficient to remove files modified at least 10 minutes ago.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-12 19:16:18 +01:00
Martin Schwenke
4afe822397 ctdb-scripts: Don't remove temporary files before use
They will be clobbered by the redirect anyway.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-12 19:16:18 +01:00
Martin Schwenke
20838833f3 ctdb-scripts: Superficial clean-ups to 10.interface
Whitespace and indentation improvements.

Remove comments describing events, since the README covers that much
better.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-12 19:16:18 +01:00
Martin Schwenke
c23744c61d ctdb-scripts: Clarify logic for success of interface monitoring
The current code uses so many shell idioms that it is difficult to
follow.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-12 19:16:18 +01:00
Martin Schwenke
d8e4c5a468 ctdb-scripts: Fix regression in updateip code
Regression introduced in commit
6471541d6d.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-12 19:16:17 +01:00
Martin Schwenke
18b0aeaae0 ctdb-ipalloc: Fix a memory leak
Commit cfa0ffe780 introduced a memory
leak.  Never assume...

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-12 19:16:17 +01:00
Martin Schwenke
24160ee6a4 ctdb-daemon: Don't leak memory if not using recovery lock
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-12 19:16:17 +01:00
Martin Schwenke
56ce230de7 ctdb-recoverd: Fix some uninitialised memory issues
The first element of these structures is a 32-bit PNN.  On 64-bit
systems this field can be followed by 32-bits of padding.  When the
structures are copied this can cause uninitialised memory to be
copied.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-12 19:16:17 +01:00
Martin Schwenke
8f73ae03cc ctdb-daemon: Drop the "schedule for deletion" messages to DEBUG level
Thousands of these can be generated each second, rendering INFO level
debugging useless.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-12 19:16:17 +01:00
Karolin Seeger
9790abd6a4 ctdb/web: Fix typo.
assinged -> assigned

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Jan 11 21:40:36 CET 2016 on sn-devel-144
2016-01-11 21:40:36 +01:00
Martin Schwenke
7c4d802370 talloc: Fix a documentation typo
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): Mon Jan 11 18:34:53 CET 2016 on sn-devel-144
2016-01-11 18:34:53 +01:00
Michael Adam
7cec3092ff nss_wrapper: bump version to 1.1.2
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Jan 11 15:30:49 CET 2016 on sn-devel-144
2016-01-11 15:30:49 +01:00
Andreas Schneider
da292b6062 nwrap: Fix segfaults while reloading hosts file
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-11 12:25:32 +01:00
Andreas Schneider
19b2dcbeb2 nwrap: Don't fail if we want to add an existing entry
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2016-01-11 12:25:32 +01:00
Andreas Schneider
9b7902090d nwrap: Fix the build on Solaris
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-11 12:25:32 +01:00
Andreas Schneider
5f621977fd nwrap: Don't leak memory from gethostbyname*() functions
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-11 12:25:32 +01:00
Andreas Schneider
b54bbb2b83 nwrap: Fix the build on FreeBSD
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-11 12:25:32 +01:00
Michael Adam
766e795518 nwrap: fix a copy and paste error in the destructor.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:32 +01:00
Andreas Schneider
554963d887 nwrap: Cleanup shadow getspnam() memory
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
2016-01-11 12:25:32 +01:00
Michael Adam
159fdb0185 nwrap: fix leaking the entlists
Track the list heads in a vector in the newrap_he_global
struct and free the structures upon nwrap_he_unload.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:32 +01:00
Michael Adam
bf496153bc nwrap: catch error to add item to vector in nwrap_he_parse_line()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:32 +01:00
Michael Adam
736fa61a95 nwrap: rename nwrap_he.entdata to nwrap_he.entries
That's what is is the list of entries. In the guise
nwrap_entdata structures but the code reads more
naturally this way.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:32 +01:00
Michael Adam
e94a7c5a56 nwrap: remove unused member list from struct nwrap_he
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:31 +01:00
Robin Hack
16b71aecab nwrap: Small code shift in nwrap_ed_inventarize_add_to_existing()
Allocate memory only when necessary.

Signed-off-by: Robin Hack <hack.robin@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:31 +01:00
Andreas Schneider
db0ef5cc9e nwrap: Cast max_hostents to avoid warnings
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-11 12:25:31 +01:00
Andreas Schneider
8fad97bc34 nwrap: Fix initialization of e entry
This fixes a compiler warning.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2016-01-11 12:25:31 +01:00
Michael Adam
f1acb0e296 nwrap: remove ai_tail argument from nwrap_files_getaddrinfo()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:31 +01:00
Michael Adam
d198cdaefd nwrap: rewrite the loop for duplication ai entries if socktype not given
This loop reads much more naturally now. It inserts the
duplicated entry right after the entrie that is being
duplicated. It does not need a ai_tail any more.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:31 +01:00
Michael Adam
ab2f41bed6 nwrap: add an explaining comment for the ai duplicating loop
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:31 +01:00
Michael Adam
062c97be19 nwrap: move setting of ai_{flags|socktype|protocol} into nwrap_convert_he_ai
This makes the code in nwrap_getaddrinfo() more readable
and also treats all ai stuctures in the linked list, not
just the first one!

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:31 +01:00
Michael Adam
a66606cd02 nwrap: use symbols IPPROTO_TCP and IPPROTO_UDP
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:31 +01:00
Michael Adam
bf65160ed2 nwrap: rename _ai -> ai_new in nwrap_files_getaddrinfo()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:31 +01:00
Michael Adam
a42f6589c7 nwrap: fix a memleak in nwrap_files_getaddrinfo()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:31 +01:00
Michael Adam
07b6925242 nwrap: rename ai_prev -> ai_cur in nwrap_files_getaddrinfo()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:31 +01:00
Michael Adam
b996f0a60c nwrap: Fix inventarization of IPs when loading hosts
Use nwrap_ed_inventarize() instead of nwrap_add_ai().

This not only removes code duplication, but also
more correctly adds more than one line for a given
IP address in a list behind this address.

The original code would only have inventarized
the first line for an IP found.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:31 +01:00
Michael Adam
07f1bef632 nwrap: refactor nwrap_add_hname_* into one nwrap_ed_inventarize.
This reduces code duplication and abstracts the logic out.
It was not special to hname or hname_alias.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2016-01-11 12:25:31 +01:00