1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
Commit Graph

138 Commits

Author SHA1 Message Date
Günther Deschner
28099876f9 s3-libnetjoin: Fix bug #5749. Re-set acctflags while joining. fix from metze.
Guenther
2008-11-29 00:16:56 +01:00
Günther Deschner
42adfd1be2 s3-libnetjoin: remove unused md4_trust_password, found by metze.
Guenther
2008-11-29 00:16:46 +01:00
Günther Deschner
4d7485df96 s3-samr: fix init_samr_user_info{23,24} callers.
Guenther
2008-11-28 13:55:38 +01:00
Günther Deschner
98e1dd64ab s3-libnetjoin: fix build warning.
Guenther
2008-11-21 15:57:14 +01:00
Günther Deschner
35ac6236bd s3-libnetjoin: try to show a better error message upon invalid configuration.
Guenther
2008-11-21 14:49:53 +01:00
Jelmer Vernooij
7275952568 Add TALLOC_CTX pointer to generate_random_str(), for consistency with
Samba 4.
2008-10-19 10:05:48 +02:00
Volker Lendecke
f4095b62a8 If name_to_fqdn fails, retry with the dns domain the DC gave us
This is a workaround for the cases where you want to join under a netbios name
that is different from your hostname, i.e. a name that can not be found in
/etc/hosts or dns. In these cases, name_to_fqdn fails or gives invalid results.
2008-10-06 15:23:39 +02:00
Michael Adam
f9a0b1675e libnet_join: streamline logic of libnet_join_post_processing()
Michael
(This used to be commit 81cc1af1e6)
2008-08-29 18:00:51 +02:00
Michael Adam
2d25608a5d libnet: fix join by creating keytab after changing the config.
Michael
(This used to be commit 96d1c780bf)
2008-08-29 18:00:51 +02:00
Günther Deschner
5bea31aa3c libnetjoin: support kerberized joining/unjoing (fix #5416).
Guenther
(This used to be commit da6e0f4f37)
2008-08-11 19:52:23 +02:00
Günther Deschner
9294303943 rpc_client: use init_samr_CryptPassword(Ex) in client tools.
Guenther
(This used to be commit 97f7f9f21f)
2008-07-31 13:52:33 +02:00
Tim Prouty
097b27dbcc 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.
(This used to be commit e92faf5996)
2008-07-30 14:06:36 -07:00
Volker Lendecke
ba2cb35ca5 Refactoring: Change calling conventions for cli_rpc_pipe_open_schannel_with_key
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit 78e9c937ff)
2008-07-20 17:37:13 +02:00
Volker Lendecke
b8fc15be95 Refactoring: Make get_schannel_session_key return NTSTATUS
(This used to be commit a0793cc853)
2008-07-20 17:37:12 +02:00
Volker Lendecke
1335da2a7c Refactoring: Change calling conventions for cli_rpc_pipe_open_noauth
Pass in ndr_syntax_id instead of pipe_idx, return NTSTATUS
(This used to be commit 9abc9dc4dc)
2008-07-20 17:37:11 +02:00
Günther Deschner
88b0b867cb libnetjoin: make libnet_join_rollback() static.
Guenther
(This used to be commit f1cc39e375)
2008-07-18 16:42:38 +02:00
Günther Deschner
2c703ec720 libnetjoin: fix Bug #5570.
Thanks to Atte Peltomäki.

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

Guenther
(This used to be commit 2870fe50af)
2008-06-05 19:34:30 +02:00
Günther Deschner
387706a49d libnetjoin: First store configuration and then verify the join.
Jerry, this fixes the issues while joining with "config backend = registry".

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

Guenther
(This used to be commit 0cf16e6b47)
2008-04-22 01:54:49 +02:00
Volker Lendecke
e73e8297f5 Replace cli_rpc_pipe_close by a talloc destructor on rpc_pipe_struct
(This used to be commit 99fc3283c4)
2008-04-20 14:08:16 +02:00
Volker Lendecke
2a2188591b Add "desthost" to rpc_pipe_client
This reduces the dependency on cli_state
(This used to be commit 783afab9c8)
2008-04-20 00:13:09 +02:00
Günther Deschner
ae1e1085a1 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
(This used to be commit 9003881773)
2008-04-14 23:07:55 +02:00
Günther Deschner
a31281a751 libnetjoin: delete the workgroup name when requested while unjoining.
Guenther
(This used to be commit 1782e89f33)
2008-04-14 22:57:37 +02:00
Günther Deschner
c8d96d57f8 libnetjoin: separate out libnet_join_lookup_dc_rpc.
Guenther
(This used to be commit 8d3d1c094a)
2008-04-14 22:56:12 +02:00
Günther Deschner
cbd07aa047 libnetjoin: Fix unjoining when no KRB5CCNAME is around.
Guenther
(This used to be commit 7fd237c545)
2008-04-14 16:15:18 +02:00
Günther Deschner
a4e0f60c4e libnetjoin: Remove machine account if we failed to set password.
Guenther
(This used to be commit db5e0ed186)
2008-04-14 14:44:58 +02:00
Günther Deschner
e33b13e826 libnetjoin: Fix joining when no KRB5CCNAME is around.
Guenther
(This used to be commit 512e6ca0a9)
2008-04-14 12:33:10 +02:00
Günther Deschner
99d3590455 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
(This used to be commit 0970369ca0)
2008-04-02 11:12:47 +02:00
Günther Deschner
8b29c8f634 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
(This used to be commit c0be84c96d)
2008-03-28 16:43:59 +01:00
Günther Deschner
14b6e9d46b Add Support for DOMAIN\DCNAME syntax in libnetjoin.
This format is used by Windows to enforce joining to a specific DC.

Guenther
(This used to be commit cc654892c0)
2008-03-28 14:15:20 +01:00
Michael Adam
6f7cfeddd6 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
(This used to be commit 96434d9dc7)
2008-03-21 18:19:24 +01:00
Volker Lendecke
c69c5c132a Fix Coverity ID 547
Günther, please check. If r->in.ads==NULL, we can't call ads_leave_realm at
all.

Thanks,

Volker
(This used to be commit 120d8c889f)
2008-03-21 10:40:40 +01:00
Michael Adam
fececde181 libsmbconf: add backend specific init function.
Hide generic init function taking smbconf_ops argument
from public api.

Michael
(This used to be commit b3f6920ccb)
2008-03-21 02:25:56 +01:00
Michael Adam
23b1d721b8 libsmbconf: rename smbconf_close() to smbconf_shutdown().
Michael
(This used to be commit 797b26ad3f)
2008-03-21 02:25:56 +01:00
Michael Adam
adf5bf554c libsmbconf: rename smbconf_open() to smbconf_init().
That's more appropriate.

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

Guenther
(This used to be commit 63894e5c93)
2008-02-29 01:25:45 +01:00