1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-27 08:23:49 +03:00
Commit Graph

57 Commits

Author SHA1 Message Date
Günther Deschner
f21871c6d6 No need to re-establish AD connection all the time.
Guenther
2008-01-15 11:02:56 +01:00
Günther Deschner
1a5b72daa3 Use dsgetdcname() to find a dc when unjoining in libnetjoin.
Guenther
2008-01-15 11:02:56 +01:00
Günther Deschner
99e3e4b0dd Re-arrange pre- and postprocessing code in libnetjoin.
Guenther
2008-01-15 11:02:56 +01:00
Michael Adam
aed01fd28c Make use of the new libnet_conf_delete_global_parameter() function.
Michael
2008-01-13 23:20:51 +01:00
Michael Adam
c2a9346faa Introduce a libnet_conf context created by libnet_conf_open().
The libnet_conf_ctx stores the information necessary to interoperate
with the configuration. It is created by calling libnet_conf_open()
and destroyed by calling libnet_conf_close(). The context is passed
to all the libnet_conf functions. It currently stores the token to
access the registry. Later, it could store more data, e.g. the server
to connect to, credentials, and so on. For support of other backends
than registry or support of remote configuration, only the open
function will have to be changed.

In net_conf, the calls to the actual net_conf functions is wrapped
into a function that calls libnet_conf_open()/_close(). Thus an
individual variant of net_conf_runfunction2() and functable2 is
used to cope with functions being called by the wrapper with the
additional libnet_conf_ctx argument.

Michael
2008-01-13 02:14:34 +01:00
Günther Deschner
57368f883f Fix some indents.
Guenther
2008-01-12 02:26:08 +01:00
Günther Deschner
40e8caa2d8 Call dsgetdcname when we have no specific dc defined for joining.
Guenther
2008-01-12 02:25:57 +01:00
Günther Deschner
8af80976a3 Fix some error strings in libnet_join.
Guenther
2008-01-12 02:25:47 +01:00
Günther Deschner
4a7acf4a23 Add appropriate error code when pre-creating accounts in ous isnt supported by DC.
Guenther
2008-01-12 02:25:37 +01:00
Günther Deschner
a9b76c9e2d For libnet_join error string functions, make sure not to overwrite last status string.
Guenther
2008-01-12 02:25:25 +01:00
Günther Deschner
b76250f1cf Merge all ads related calls in libnet_join_post_processing_ads().
Guenther
2008-01-12 02:25:15 +01:00
Günther Deschner
48f638a455 Use WITH_ADS define in libnet_join, hopefully not breaking the build.
Guenther
2008-01-12 02:10:17 +01:00
Günther Deschner
82bd6322b6 Use domain_is_ad one more time in libnetjoin.
Guenther
2008-01-12 01:35:51 +01:00
Günther Deschner
9cc0d874f6 Remove '\n' from error strings in libnet_join context.
Guenther
2008-01-11 15:10:29 +01:00
Günther Deschner
01690f85bc Set error string when ads_leave_realm() has failed in libnetjoin.
Guenther
2008-01-11 15:10:21 +01:00
Günther Deschner
2e2d058b7e Ignore result of libnet_conf_delete_parameter here, as realm may be not there.
Guenther
2008-01-11 15:09:20 +01:00
Günther Deschner
ed4960bacc Remove some more references to global_myname() in libnet_join.
Guenther
2008-01-11 15:09:01 +01:00
Günther Deschner
9707a5eb00 Use domain_is_ad bool.
Guenther
2008-01-11 15:08:52 +01:00
Michael Adam
829de79051 Try to fix the build on hosts that HAVE_LDAP but don't HAVE_KRB5.
Michael
2008-01-09 23:15:56 +01:00
Günther Deschner
e73e3da772 Another attempt to fix builds w/o ldap and/or krb5.
Guenther
2008-01-09 12:48:08 +01:00
Günther Deschner
95129a28cf Add libnet_join_derive_salting_principal().
Guenther
2008-01-09 10:20:44 +01:00
Günther Deschner
045a69c59c Fix define check s/WITH_LDAP/HAVE_LDAP/ in libnet_join.
Guenther
2008-01-08 14:07:09 +01:00
Günther Deschner
7f51583f68 When unjoining fails (e.g. missing creds) make sure we still correct config.
Guenther
2008-01-08 11:59:01 +01:00
Günther Deschner
079f2eba81 Trying to make the buildfarm w/o krb5 happy.
Guenther
2008-01-07 20:56:34 +01:00
Günther Deschner
83ed37023c There is no LDAP in some corners of this world. Fix the build...
Guenther
2008-01-07 20:41:55 +01:00
Günther Deschner
1436670854 Finally use libnet_join_set_* functions in libnetjoin.
Guenther
2008-01-07 20:21:02 +01:00
Günther Deschner
3e816d7555 Merge remaining post-AD-join functions from net into libnet_join.
Guenther
2008-01-07 20:17:47 +01:00
Günther Deschner
f550ed02ff Add libnet_join_find_machine_acct().
Guenther
2008-01-07 19:39:35 +01:00
Günther Deschner
ed164b523e Honor the WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE flag when unjoining from AD.
Guenther
2008-01-07 19:39:21 +01:00
Günther Deschner
18ae858042 Rearrange libnet join code and add support for account pre-creation in AD.
Guenther
2008-01-07 19:39:11 +01:00
Günther Deschner
985d452069 Add ADS_STRUCTs to libnetjoin and -unjoin, with talloc destructors.
Guenther
2008-01-07 19:38:59 +01:00
Günther Deschner
4f9985bb33 Add error_string to libnetjoin and libnetunjoin structures incl. set functions.
Guenther
2008-01-07 19:38:48 +01:00
Günther Deschner
bc025a3860 Only create machine account in libnetjoin when requested to.
Guenther
2008-01-07 12:48:21 +01:00
Günther Deschner
ff5e15b1ba Rename server_name to dc_name in libnet join structures.
Guenther
2008-01-04 17:43:15 +01:00
Günther Deschner
b59ca2d9c3 Separate out storing and removing secrets in libnet_join/unjoin.
Guenther
2008-01-04 17:43:09 +01:00
Günther Deschner
d88bb94f0e In libnet_join finally separate the admin from the machine pwd entirely.
Guenther
2008-01-04 17:43:02 +01:00
Günther Deschner
d7f01d940f Robustness fix for libnet join when unjoining.
Guenther
2008-01-04 11:55:00 +01:00
Michael Adam
4c404d627c Use GLOBAL_NAME constant.
Michael
2008-01-03 14:17:49 +01:00
Michael Adam
a559533c0c Rename libnet_smbconf_set_global_param() to libnet_conf_set_global_parameter().
Now all functions are converted to the consistent naming scheme.

Michael
2008-01-03 14:17:49 +01:00
Michael Adam
073eeca51e Rename libnet_smbconf_delparm() to libnet_conf_delete_parameter().
Michael
2008-01-03 14:17:49 +01:00
Günther Deschner
5b2eec21c2 In libnetjoin don't mix admin password with machine account pwd.
Guenther
2008-01-03 13:17:49 +01:00
Michael Adam
be985d8d0c Remove now unneeded talloc ctx parameter from do_JoinConfig().
Michael
2007-12-25 03:41:34 +01:00
Michael Adam
f8823ae123 Remove now unneeded talloc ctx parameter from do_join_modify_vals_config().
Michael
2007-12-25 03:40:35 +01:00
Michael Adam
92b8e5ea4b Remove now unneeded talloc ctx parameter from do_UnjoinConfig().
Michael
2007-12-25 03:39:31 +01:00
Michael Adam
4f7375a110 Remove now unneeded talloc ctx parameter from do_unjoin_modify_vals_config().
Michael
2007-12-25 03:38:06 +01:00
Michael Adam
16f1373938 Remove talloc context parameter from libnet_smbconf_delparm().
Make use of talloc stackframe internally.
This removes talloc contxt from net_conf_delparm.

Michael
2007-12-25 03:34:04 +01:00
Michael Adam
efaffefc43 Remove talloc context parameter from libnet_smbconf_setparm().
Make use of talloc stackframe internally.
This removes talloc contxt from net_conf_setparm.

Michael
2007-12-25 03:29:05 +01:00
Michael Adam
81b9f1301d Remove occurrences of registry_key from libnet_join.c
Replace duplicated logic by calls of libnet_smbconf_set_global_param()
from libnet_conf.c, pushing logic from do_JoinConfig() and do_UnjoinConfig()
to do_join_modify_vals_config() and do_unjoin_modify_vals_config()
respectively.

Only the net_conf api functions should be exported by libnet_conf.c, not
the lower level registry access functions.

Michael
2007-12-23 04:10:31 +01:00
Michael Adam
415fc0a526 Replace direct deletion of registry value by use of libnet_smbconf_delparm().
Michael
2007-12-23 04:10:31 +01:00
Günther Deschner
c890ebc3ca Fix uninitialized error code in do_unjoin_modify_vals_config().
Guenther
2007-12-22 00:13:24 +01:00