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

129 Commits

Author SHA1 Message Date
Günther Deschner
da6e0f4f37 libnetjoin: support kerberized joining/unjoing (fix #5416).
Guenther
2008-08-11 19:52:23 +02:00
Günther Deschner
97f7f9f21f rpc_client: use init_samr_CryptPassword(Ex) in client tools.
Guenther
2008-07-31 13:52:33 +02:00
Tim Prouty
e92faf5996 Enabled domain groups to be added to builtin groups at domain join time
Previously this was done at token creation time if the Administrators and Users
builtins hadn't been created yet.  A major drawback to this approach is that if
a customer is joined to a domain and decides they want to join a different
domain, the domain groups from this new domain will not be added to the
builtins.

It would be ideal if these groups could be added exclusively at domain join
time, but we can't rely solely on that because there are cases where winbindd
must be running to allocate new gids for the builtins.  In the future if there
is a way to allocate gids for builtins without running winbindd, this code
can be removed from create_local_nt_token.

- Made create_builtin_users and create_builtin_administrators non-static so
they can be called from libnet
- Added a new function to libnet_join that will make a best effort to add
domain administrators and domain users to BUILTIN\Administrators and
BUILTIN\Users, respectively.  If the builtins don't exist yet, winbindd must be
running to allocate new gids, but if the builtins already exist, the domain
groups will be added even if winbindd is not running.  In the case of a
failure the error will be logged, but the join will not be failed.
- Plumbed libnet_join_add_dom_rids_to_builtins into the join post processing.
2008-07-30 14:06:36 -07:00
Volker Lendecke
78e9c937ff Refactoring: Change calling conventions for cli_rpc_pipe_open_schannel_with_key
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
2008-07-20 17:37:13 +02:00
Volker Lendecke
a0793cc853 Refactoring: Make get_schannel_session_key return NTSTATUS 2008-07-20 17:37:12 +02:00
Volker Lendecke
9abc9dc4dc Refactoring: Change calling conventions for cli_rpc_pipe_open_noauth
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
2008-07-20 17:37:11 +02:00
Günther Deschner
f1cc39e375 libnetjoin: make libnet_join_rollback() static.
Guenther
2008-07-18 16:42:38 +02:00
Günther Deschner
144d374ad9 libnetjoin: fix Bug #5570.
Thanks to Atte Peltomäki.

Guenther
2008-07-03 12:02:01 +02:00
Günther Deschner
ebf31203e7 libads: use ads_connect_user_creds in some places.
Guenther
2008-06-24 23:37:58 +02:00
Günther Deschner
2870fe50af libnetjoin: add libnet_join_rollback().
This is required now if the join verify failed and we already
modified the local configuration.

Guenther
2008-06-05 19:34:30 +02:00
Günther Deschner
b3d47f0992 libnetjoin: First store configuration and then verify the join.
Jerry, this fixes the issues while joining with "config backend = registry".

Guenther
2008-06-05 19:34:06 +02:00
Günther Deschner
f9e5450c94 libnetjoin: correctly copy returned lsa policy sid.
Guenther
2008-06-04 18:05:15 +02:00
Günther Deschner
6dbed6e7b7 libnetjoin: only close existing policy handles while unjoining.
Guenther
2008-06-04 02:43:41 +02:00
Günther Deschner
d7ba98cc3f libnetjoin: delete possible "realm" leftover parameter.
Guenther
2008-06-04 01:35:44 +02:00
Günther Deschner
452a9ea4af libnetjoin: for informational reasons, report forest_name.
Guenther
2008-05-16 12:16:04 +02:00
Günther Deschner
f3251ba03a Fix Bug #5465 (joining with createcomputer=ou1/ou2/ou3).
Guenther
2008-05-14 23:53:23 +02:00
Günther Deschner
7889516a38 dsgetdcname: use existing messaging_context if possible.
Guenther
2008-05-09 14:59:20 +02:00
Günther Deschner
82cbb3269b Use strip_hostname after dsgetdcname/getdcname calls.
Guenther
2008-05-09 14:59:19 +02:00
Günther Deschner
0cf16e6b47 libnetjoin: identify type of domain early.
This finally enables joining AD using workgroup or realm name.

Guenther
2008-04-22 01:54:49 +02:00
Volker Lendecke
99fc3283c4 Replace cli_rpc_pipe_close by a talloc destructor on rpc_pipe_struct 2008-04-20 14:08:16 +02:00
Volker Lendecke
783afab9c8 Add "desthost" to rpc_pipe_client
This reduces the dependency on cli_state
2008-04-20 00:13:09 +02:00
Günther Deschner
9003881773 libnetjoin/net: Fix lp_config_backend_is_registry() handling.
Thanks obnox, now we can net ads join and net ads leave with zero
configuration changes if "config backend = registry".

Guenther
2008-04-14 23:07:55 +02:00
Günther Deschner
1782e89f33 libnetjoin: delete the workgroup name when requested while unjoining.
Guenther
2008-04-14 22:57:37 +02:00
Günther Deschner
8d3d1c094a libnetjoin: separate out libnet_join_lookup_dc_rpc.
Guenther
2008-04-14 22:56:12 +02:00
Günther Deschner
7fd237c545 libnetjoin: Fix unjoining when no KRB5CCNAME is around.
Guenther
2008-04-14 16:15:18 +02:00
Günther Deschner
db5e0ed186 libnetjoin: Remove machine account if we failed to set password.
Guenther
2008-04-14 14:44:58 +02:00
Günther Deschner
512e6ca0a9 libnetjoin: Fix joining when no KRB5CCNAME is around.
Guenther
2008-04-14 12:33:10 +02:00
Günther Deschner
0970369ca0 Fix NETLOGON credential chain with Windows 2008 all over the place.
In order to avoid receiving NT_STATUS_DOWNGRADE_DETECTED from a w2k8
netr_ServerAuthenticate2 reply, we need to start with the AD netlogon negotiate
flags everywhere (not only when running in security=ads). Only for NT4 we need
to do a downgrade to the returned negotiate flags.

Tested with w2k8, w2ksp4, w2k3r2 and nt4sp6.

Guenther
2008-04-02 11:12:47 +02:00
Günther Deschner
c0be84c96d Support "net ads join" format while joining to a specific ou.
libnetjoin now supports Computers/Servers/Unix as well as
ou=Computers,ou=Servers,ou=Unix,dc=ber,dc=realm,dc=com.

Guenther
2008-03-28 16:43:59 +01:00
Günther Deschner
cc654892c0 Add Support for DOMAIN\DCNAME syntax in libnetjoin.
This format is used by Windows to enforce joining to a specific DC.

Guenther
2008-03-28 14:15:20 +01:00
Michael Adam
96434d9dc7 libsmbconf: add a "path" variable to the conf context.
This is passed to the module init routines.
In case of the registry, this is the path of the
basekey in registry, that is to be used, defaulting
to KEY_SMBCONF (HKLM\software\samba\smbconf), when
NULL is given. This is the only case currently used.

In order to support other keys, registry initialization
for smbconf has to be changed to support different keys.

Michael
2008-03-21 18:19:24 +01:00
Volker Lendecke
120d8c889f Fix Coverity ID 547
Günther, please check. If r->in.ads==NULL, we can't call ads_leave_realm at
all.

Thanks,

Volker
2008-03-21 10:40:40 +01:00
Michael Adam
b3f6920ccb libsmbconf: add backend specific init function.
Hide generic init function taking smbconf_ops argument
from public api.

Michael
2008-03-21 02:25:56 +01:00
Michael Adam
797b26ad3f libsmbconf: rename smbconf_close() to smbconf_shutdown().
Michael
2008-03-21 02:25:56 +01:00
Michael Adam
d7bd9bb8aa libsmbconf: rename smbconf_open() to smbconf_init().
That's more appropriate.

Michael
2008-03-21 02:25:56 +01:00
Michael Adam
097af0309d libsmbconf: rename all occurrences of libnet_conf_ to smbconf_ .
Michael
2008-03-17 18:03:02 +01:00
Günther Deschner
f88910c1e5 Add secure_channel_type to libnetjoin.
Guenther
2008-03-04 19:04:54 +01:00
Günther Deschner
b753087ff7 Use TALLOC_FREE in libnetjoin debugging dump code.
Guenther
2008-03-04 11:07:13 +01:00
Günther Deschner
aa9c0f5877 Make sure we are still able to join Windows 2008.
Guenther
2008-03-01 16:14:39 +01:00
Günther Deschner
bc2d3d5144 libnetjoin: add fallback to level 24 samr setinfo so that libnet can join NT4.
Guenther
2008-02-29 01:27:52 +01:00
Günther Deschner
63894e5c93 libnetjoin: Trying to avoid confusion between acct_flags, acb_info and
access_desired.

Guenther
2008-02-29 01:25:45 +01:00
Günther Deschner
09e6010159 libnetjoin: Merge in comments, debugs and missing code from original join code.
Guenther
2008-02-28 19:49:07 +01:00
Günther Deschner
892b2bc0cf Add some more error handling in libnetjoin.
Guenther
2008-02-28 17:05:38 +01:00
Günther Deschner
b1a4b21f8c Let dsgetdcname() return a struct netr_DsRGetDCNameInfo.
Guenther
2008-02-28 12:40:55 +01:00
Günther Deschner
c4ba68aa94 Store domain_is_ad info as early as possible in libnetjoin.
Guenther
2008-02-28 11:38:01 +01:00
Günther Deschner
95bdf2f23c Check for mandatory domain name in libnetjoin/unjoin.
Guenther
2008-02-28 11:38:01 +01:00
Günther Deschner
0315b8e53d Delete affinity cache entries while unjoining with libnetunjoin.
Guenther
2008-02-28 11:38:01 +01:00
Günther Deschner
23ae67158e Fill in machine account manipulation flags while unjoining in libnetunjoin.
Guenther
2008-02-28 11:38:01 +01:00
Günther Deschner
f0e319a18d Add preliminary libnet_join_post_verify call to libnetjoin.
Guenther
2008-02-28 11:38:01 +01:00
Günther Deschner
be96baeffc Merge all connect ads calls into libnet_join_post_processing_ads().
Guenther
2008-02-28 11:38:01 +01:00