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

99146 Commits

Author SHA1 Message Date
Douglas Bagnall
a866b70cd7 KCC: improve docstring for KCC.create_connections()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:15 +02:00
Douglas Bagnall
c93c2fcba5 KCC: samba_kcc uses forced_local_dsa in import_ldif
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:15 +02:00
Douglas Bagnall
6328b100a3 KCC move and fix ldif_import_export and graph_utils tests
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:15 +02:00
Douglas Bagnall
e6991d2a07 KCC: remove dead code that depends on SMTP replication
We don't support SMTP replication and probably never will. This code
is never used, untested, and unlikely to be correct.

The remaining little bit of IP transport code is slightly rewritten.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
94094d0c91 KCC: fix KCC.import_ldif() use of forced_local_dsa
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
9f0209a486 KCC: shift tests/ldif_utils.py to tests/kcc/ldif_import_export.py
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
07daef8d85 KCC: shift tests/graph_utils.py to tests/kcc/graph_utils.py
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Garming Sam
a0b0a0f91a kcc: Allow RODC to be included in intersite topology
This creates behaviour not described by ADTS. RODC are now treated as
RED, however they are demoted to the equivalent of WHITE when running
the first half of the algorithm.

The change implies that RED does in fact refer to full-replicas, not
writable replicas.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
7c6a6f2bd8 KCC: remove a condition dependant on non-IP transport
Because it is in a loop that ignores non-IP transports

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
e2eb3f7e9e KCC: Add fake transport EDGE_TYPE_ALL at most once
It was being added in a loop which only ever looped once (because
we only do one transport, IP), so this makes no actual difference
but it is the correct thing.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
7f4b7fed1e KCC: simplify repsfrom pruning in KCC.translate_ntdsconn()
This section is actually quite simple -- we don't want a repsFrom if
there is no DRS connection -- but the existing comments and code had
managed to cause us hours of confusion and much gnashing teeth, the
evidence of which will hopefully have been squashed out of the git
history by the time you read this.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
7e8a1a8ae9 KCC: improve docstring for KCC.plot_all_connections()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
fcd8639581 KCC: improve docstring for KCC.run()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
9b945bdc5b KCC: add multi-site ldif to ldif_import_export test suite
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
a918edced0 KCC: test stub for KCC object
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
eba852cc98 KCC: write dot files in a deterministic, user specified place
We were using randomised tempfile names in /tmp, initially to avoid
overwriting previous runs so as to track progress. Now we hardly ever
care about the old versions, and a user-specified name will be handy
for testing.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
169fcd7add KCC: remove unnecessary debug message in KCC.get_all_bridgeheads()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
bfbb3dc81b KCC: don't generate dot/verify graph edges unless necessary
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
cc375f5f28 KCC: clarify a comment in is_stale_link_connection()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
7ff2861e71 KCC: explicit None check in refresh_failed_links_connections()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
747e0804f4 KCC: remove commented out code in KCC.refresh_failed_links_connections()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
21e276d319 KCC: remove unused method KCC.should_be_present_test()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
2a776d9f8d KCC: remove an unused variable in KCC.remove_unneeded_ntdsconn()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
733d6ea6fa KCC: rename is_repsFrom_implied to get_dsa_for_implied_replica, simplify
KCC.is_repsFrom_implied() did more than it sounded like -- it returned
a tuple of (implied, dsa), where the dsa was None if and only if implied
was False, and a DSA object if implied was True. Thus the implied flag
was strictly reduntant and the only caller really only wanted the DSA.
Now it just gets the DSA, or None.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
fa22921ed4 KCC: tidy up a missed keystroke in a comment
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:14 +02:00
Douglas Bagnall
b08684c402 KCC: remove unused variable from KCC.modify_repsFrom()
It looks as if this update bitfield was meant to be returned. It isn't,
and none of the callers expect it. Good riddance.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
b845e29b26 KCC: move functions used in kcc.graph into kcc.graph
This should have happened when graph.py was split off from kcc_utils,
and we *would* merge it there, but too many things have happened to
these functions in the meantime.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
f1b7007883 KCC: add a warning about side-effects in RepsFromTo.__setattr__
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
c73a571353 KCC: fix combine_repl_info
Previous the supposedly combined repl_info was always the default, all
0x11, repl_info.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
ff7a0902dd KCC: clarify a couple of comments in graph.py
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
cb94863087 KCC: switch samba_kcc over to samba.kcc module
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
c182df9969 KCC: KCC object keeps lp and creds for live pings
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
215f1c2c53 KCC improve docstring for KCC.load_samdb()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
21b792b7ba KCC improve docstring for KCC.construct_intrasite_graph()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
62a7ae5727 KCC improve docstring for update_rodc_connection()
Also make a short-cut early exit visually shorter and earlier.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
257219c836 KCC improve docstring for KCC.create_intersite_connections()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
6aa9240cb8 KCC improve docstring for refresh_failed_links_connections()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
032291f492 KCC: shift samba.ldif_utils to samba.kcc.ldif_import_export
These functions are really only of use for KCC, and they only import and
export rather than be general utils.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
db56d4ae3b KCC: remove remnants of script from samba/kcc/__init__
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
427d05d1ac KCC: shift samba.kcc intersite functions to samba.kcc.graph
So samba.kcc.graph is the place to look for everything intersite.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
b0e6a74362 KCC: split kcc_utils into samba.kcc.{kcc_utils,graph}
graph.py has the intersite graph stuff.
kcc_utils does intrasite, namespace, &cetera.

The wildcard imports are tidied up, so samba_kcc imports unix2nttime
directly rather than letting it fall out of kcc_utils.

Intersite graph functions samba/kcc/__init__.py are also shifted into
graph.py.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
8d6f256f38 KCC: rearrange 3 functions in samba.kcc __init__
This module still isn't actually used.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
7cd35051c8 KCC: split and shift samba.graph_utils -> samba.kcc.{graph_utils,debug}
The debug module contains debug functions and colours.

Graph_utils keeps the DOT file generation and graph verification code.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
f37b89c157 KCC: Reduce brokenness of samba.kcc module
This module is still not being used, and is being fixed slowly to make
it clear what is happening. Here we remove references to globals in
the samba_kcc script (notably opts), and instead add the various
options as KCC.__init__ arguments.

There is more to come.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Douglas Bagnall
94b1258501 KCC: Copy KCC core out of samba_kcc into samba.kcc module
The "module" is not actually used at this point, which is just as well
as it would be utterly broken. This copy is just to show that the
eventual move is really a move and not a complete rewrite.

Note that if this file is not executable (and it really shouldn't be),
this commit causes the samba.tests.source test to fail with "Files
with shebang line that are not executable".

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-12 06:57:13 +02:00
Volker Lendecke
6e473c526a messaging: Init server_id_db after clustering
server_id_db_init references our pid, which got changed by the clustering
initialization just a line above. So far names.tdb is just local, but
we should register our clustered id with vnn.pid instead of just the
pid nevertheless.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jose A. Rivera <jarrpa@samba.org>

Autobuild-User(master): José A. Rivera <jarrpa@samba.org>
Autobuild-Date(master): Fri Jun 12 02:27:41 CEST 2015 on sn-devel-104
2015-06-12 02:27:40 +02:00
Jeremy Allison
4c5fefe072 winbindd: winbindd_raw_kerberos_login - ensure logon_info exists in PAC.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun 11 07:30:38 CEST 2015 on sn-devel-104
2015-06-11 07:30:36 +02:00
Noel Power
efadcb3121 kerberos auth info3 should contain resource group ids available from pac_logon
successful pam auth (e.g. from ssh) will cache group sids (but not any
resource group sids)) The subsequent cached entry used for groups lookups
can be missing those resource groups

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-06-11 04:42:10 +02:00
Christof Schmitt
b51ad15618 smbd: Use new debug macros in kill-client-ip
Mainly to have the new macros actually used in the code.

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): Thu Jun 11 04:34:50 CEST 2015 on sn-devel-104
2015-06-11 04:34:50 +02:00
Christof Schmitt
70b10f8f20 debug: Change syslog priority mapping to match new log level macros
This changes the mapping of internal log levels to syslog priorities to
match the previously defined helper macros. The idea is that this better
maps to the actual use of log levels in the Samba code.

unchanged
 log level     | priority
 0             | ERROR
 1             | WARNING
 2             | NOTICE

before
 log level     | priority
 3             | INFO
 4 and higher  | DEBUG

after
 log level     | priority
 3 to 5        | NOTICE
 6 to 9        | INFO
 10 and higher | DEBUG

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-06-11 01:45:22 +02:00