1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-05 21:57:51 +03:00

123 Commits

Author SHA1 Message Date
Gerald Carter
57c705ea63 r14450: Fix more get_md4pw() breakage caused by missing "breaks"
in the switch statement which matched the schannel type
against the account type.
2007-10-10 11:15:30 -05:00
Gerald Carter
a36529535d r14448: * protect against NULL cli_state* pointers in cli_rpc_pipe_open()
* Fix inverted logic check for machine accounts in get_md4pw()
2007-10-10 11:15:30 -05:00
Günther Deschner
c35eb44937 r14443: rework get_md4pw() to ease debugging. The only functional change is that
we now check wheter the sec_channel_type matches the trust account type.

Guenther
2007-10-10 11:15:30 -05:00
Günther Deschner
5b89e8bc24 r13711: * Correctly handle acb_info/acct_flags as uint32 not as uint16.
* Fix a couple of related parsing issues.
* in the info3 reply in a samlogon, return the ACB-flags (instead of
  returning zero)

Guenther
2007-10-10 11:10:25 -05:00
Gerald Carter
6f1afa4acc r13590: * replace all pdb_init_sam[_talloc]() calls with samu_new()
* replace all pdb_{init,fill}_sam_pw() calls with samu_set_unix()
2007-10-10 11:10:16 -05:00
Gerald Carter
19b7593972 r13576: This is the beginnings of moving the SAM_ACCOUNT data structure
to make full use of the new talloc() interface.  Discussed with Volker
and Jeremy.

* remove the internal mem_ctx and simply use the talloc()
  structure as the context.
* replace the internal free_fn() with a talloc_destructor() function
* remove the unnecessary private nested structure
* rename SAM_ACCOUNT to 'struct samu' to indicate the current an
  upcoming changes.  Groups will most likely be replaced with a
  'struct samg' in the future.

Note that there are now passbd API changes.  And for the most
part, the wrapper functions remain the same.

While this code has been tested on tdb and ldap based Samba PDC's
as well as Samba member servers, there are probably still
some bugs.  The code also needs more testing under valgrind to
ensure it's not leaking memory.

But it's a start......
2007-10-10 11:10:15 -05:00
Gerald Carter
b65be8874a r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
2007-10-10 11:10:14 -05:00
Jeremy Allison
4877f336b2 r13557: (Hopefully) get the creds store/restore key right from
the correct part of the netlogon and schannel packets.
Jeremy.
2007-10-10 11:10:13 -05:00
Jeremy Allison
fd84d9703e r13556: Ensure that any potential creds operation are protected
by schannel if "server schannel = true" was set.
Jeremy.
2007-10-10 11:10:13 -05:00
Jeremy Allison
ea82958349 r13553: Fix all our warnings at -O6 on an x86_64 box.
Jeremy.
2007-10-10 11:10:13 -05:00
Jeremy Allison
43f095a38d r13548: Always use the get_remote_macinhe_name() as the key
for the creds store. This should fix the problems
Jerry reported (but I have still to run tests :-).
Jeremy.
2007-10-10 11:10:13 -05:00
Volker Lendecke
a95d7d7222 r13544: -O1 janitor work :-) 2007-10-10 11:10:12 -05:00
Jeremy Allison
a2fb436fc5 r13539: Add 128 bit creds processing client and server. Thanks to Andrew Bartlett's
Samba4 code.
Jeremy.
2007-10-10 11:10:11 -05:00
Jeremy Allison
80f4868944 r13519: Fix the credentials chaining across netlogon pipe disconnects.
I mean it this time :-).
Jeremy.
2007-10-10 11:10:09 -05:00
Jeremy Allison
a9e1d0f3b4 r13449: Ensure we don't crash if no dc struct on pipe.
Jeremy.
2007-10-10 11:10:04 -05:00
Jeremy Allison
a164cfab42 r13447: Added LSA_LOOKUPSIDS2 and LSA_LOOKUPSIDS3.
Jeremy.
2007-10-10 11:10:03 -05:00
Jeremy Allison
9437ffc84f r13439: Fix NET_SAM_LOGON_EX.
Jeremy.
2007-10-10 11:10:02 -05:00
Jeremy Allison
f58d0ebf74 r13436: Add in NET_SAM_LOGON_EX. Still needs testing.
Jeremy
2007-10-10 11:10:02 -05:00
Jeremy Allison
58544eb3c8 r13434: Add stub for NET_SAM_LOGON_EX.
Jeremy.
2007-10-10 11:10:02 -05:00
Jeremy Allison
5b3c2e63c7 r13407: Change the credentials code to be more like the Samba4 structure,
makes fixes much easier to port. Fix the size of dc->sess_key to
be 16 bytes, not 8 bytes - only store 8 bytes in the inter-smbd
store in secrets.tdb though. Should fix some uses of the dc->sess_key
where we where assuming we could read 16 bytes.
Jeremy.
2007-10-10 11:09:59 -05:00
Jeremy Allison
8ae70122b7 r13399: Get closer to passing RPC-SCHANNEL test.
Jeremy.
2007-10-10 11:09:59 -05:00
Gerald Carter
17e63ac4ed r13316: Let the carnage begin....
Sync with trunk as off r13315
2007-10-10 11:06:23 -05:00
Jeremy Allison
47178b1b5a r13147: Raise creds_server_step fail log messages to debug level 2.
These can happen in normal operation (I think - not 100%
sure) and don't want to alarm admins. Jerry please add this
to 3.0.21b.
Jeremy.
2007-10-10 11:06:15 -05:00
Volker Lendecke
ae4ffc1cfb r11917: Move nt_token_to_group_list to srv_netlog_nt.c. srv_util.c is empty now.
Volker
2007-10-10 11:05:35 -05:00
Gerald Carter
37d2bf02f3 r11617: fix typo 2007-10-10 11:05:22 -05:00
Jeremy Allison
d1caef8663 r11573: Adding Andrew Bartlett's patch to make machine account
logons work if the client gives the MSV1_0_ALLOW_SERVER_TRUST_ACCOUNT
or MSV1_0_ALLOW_WORKSTATION_TRUST_ACCOUNT flags. This changes
the auth module interface to 2 (from 1). The effect of this is
that clients can access resources as a machine account if they
set these flags. This is the same as Windows (think of a VPN
where the vpn client authenticates itself to a VPN server
using machine account credentials - the vpn server checks
that the machine password was valid by performing a machine
account check with the PDC in the same was as it would a
user account check. I may add in a restriction (parameter)
to allow this behaviour to be turned off (as it was previously).
That may be on by default.
Andrew Bartlett please review this change carefully.
Jeremy.
2007-10-10 11:05:20 -05:00
Jeremy Allison
d720867a78 r11137: Compile with only 2 warnings (I'm still working on that code) on a gcc4
x86_64 box.
Jeremy.
2007-10-10 11:05:02 -05:00
Jeremy Allison
a6d8a4b1ff r10792: Fix the "schannel not stored across client disconnects" problem.
Based on the Samba4 solution - stores data in
$samba/private/schannel_store.tdb.
This tdb is not left open but open and closed on demand.
Jeremy.
2007-10-10 11:04:54 -05:00
Jeremy Allison
86ffef8162 r10724: Got a little ahead of myself...
Jeremy.
2007-10-10 11:04:51 -05:00
Jeremy Allison
47269b5c71 r10722: Remove unused BOOL in struct dcinfo.
Ensure that the mach_acct and remote machine entries are
set correctly in struct dcinfo - we'll need this as a key
for a persistent schannel state later.
Jeremy.
2007-10-10 11:04:51 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Jeremy Allison
e1c9813d63 r10269: Server-side fix for creds change - revert jcmd's change.
Jeremy.
2007-10-10 11:03:40 -05:00
Jim McDonough
d522277b86 r9261: Fix #2976: windows member servers wouldn't alloc connections from users
defined locally because if we didn't find them as a DC we were marking
the response as authoritative.  Now if it's not a domain we know, we
mark the response non-authoritative.

Fix from jpjanosi@us.ibm.com
2007-10-10 11:00:29 -05:00
Jim McDonough
4deb918b68 r9242: Fix my fix for #2953. I'd moved too much code until after we verify the user,
causing netlogon to return an invalid response for failed interactive logons.
2007-10-10 11:00:28 -05:00
Jim McDonough
b01a3a4111 r9112: Fix #2953 - credentials chain on DC gets out of sync with client when
NT_STATUS_NO_USER returned.  We were moving to the next step in the
chain when the client wasn't.  Only update when the user logs on.
2007-10-10 11:00:26 -05:00
Jim McDonough
0446319a3b r8432: Fix #2077 - login to trusted domain doesn't allow home drive map and login
scripts to be executed.

We were filling in our name as the server which processed the login, even
when it was done by a trusted DC.

Thanks to John Janosik <jpjanosi@us.ibm.com> for the fix.
2007-10-10 11:00:05 -05:00
Volker Lendecke
c25b4afda2 r7217: Only allow schannel connections if a successful Auth2 has been done
before. Things tested: Domain join and subsequent interactive and network
logon to NT4, W2kSP and XPSP2 workstations and a NT4 domain trusting us. Right
now I've got problems with my W2k3 domain trusts. So this needs testing,
although I'm really confident that this does not break.

Volker
2007-10-10 10:57:05 -05:00
Gerald Carter
9727d05241 r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1 2007-10-10 10:57:02 -05:00
Herb Lewis
efea76ac71 r6225: get rid of warnings from my compiler about nested externs 2007-10-10 10:56:30 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Andrew Bartlett
1833d0ab72 r2761: Print the decrypted, not encrypted key.
Andrew Bartlett
2007-10-10 10:52:51 -05:00
Andrew Bartlett
1ad1317a81 r2137: This is a patch I've been running at Hawker for a while.
The purpose of this patch is to avoid changing the machine account
password, when it has 'already been changed'.  This occours in
situations where the secure channel between the workstation and the DC
breaks down, such as occoured in the MS04-11 security patch.  This
avoids LDAP replication load issues, due to the client changing the
password repeatedly.

We also now set the LM password to NULL explicitly, rather than the NT
password value, as this is what we get out of a vampire, or when a
long password is set (as XP seems to do these days).

Andrew Bartlett
2007-10-10 10:52:33 -05:00
Andrew Bartlett
36741d3cf5 r1492: Rework our random number generation system.
On systems with /dev/urandom, this avoids a change to secrets.tdb for every fork().

For other systems, we now only re-seed after a fork, and on startup.
No need to do it per-operation.  This removes the 'need_reseed'
parameter from generate_random_buffer().

Andrew Bartlett
2007-10-10 10:52:13 -05:00
Gerald Carter
e9f109d1b3 r991: Allow winbindd to use the domain trust account password
for setting up an schannel connection.  This solves the problem
of a Samba DC running winbind, trusting a native mode AD domain,
and needing to enumerate AD users via wbinfo -u.
2007-10-10 10:51:53 -05:00
Gerald Carter
911a28361b r196: merging struct uuid from trunk 2007-10-10 10:51:13 -05:00
Andrew Bartlett
724e8d3f33 r69: Global rename of 'nt_session_key' -> 'user_session_key'. The session key could
be anything, and may not be based on anything 'NT'.  This is also what microsoft
calls it.
2007-10-10 10:51:06 -05:00
Volker Lendecke
d01cb00aad Fix sambaUserWorkstations for network samlogons against us as DC. Strip
the \\ off the workstation.

Volker
-
Andrew Bartlett
f3bbc87b0d Changes all over the shop, but all towards:
- NTLM2 support in the server
 - KEY_EXCH support in the server
 - variable length session keys.

In detail:

 - NTLM2 is an extension of NTLMv1, that is compatible with existing
domain controllers (unlike NTLMv2, which requires a DC upgrade).

 * This is known as 'NTLMv2 session security' *

(This is not yet implemented on the RPC pipes however, so there may
well still be issues for PDC setups, particuarly around password
changes.  We do not fully understand the sign/seal implications of
NTLM2 on RPC pipes.)

This requires modifications to our authentication subsystem, as we
must handle the 'challege' input into the challenge-response algorithm
being changed.  This also needs to be turned off for
'security=server', which does not support this.

- KEY_EXCH is another 'security' mechanism, whereby the session key
actually used by the server is sent by the client, rather than being
the shared-secret directly or indirectly.

- As both these methods change the session key, the auth subsystem
needed to be changed, to 'override' session keys provided by the
backend.

- There has also been a major overhaul of the NTLMSSP subsystem, to merge the 'client' and 'server' functions, so they both operate on a single structure.  This should help the SPNEGO implementation.

- The 'names blob' in NTLMSSP is always in unicode - never in ascii.
Don't make an ascii version ever.

- The other big change is to allow variable length session keys.  We
have always assumed that session keys are 16 bytes long - and padded
to this length if shorter.  However, Kerberos session keys are 8 bytes
long, when the krb5 login uses DES.

 * This fix allows SMB signging on machines not yet running MIT KRB5 1.3.1. *

- Add better DEBUG() messages to ntlm_auth, warning administrators of
misconfigurations that prevent access to the privileged pipe.  This
should help reduce some of the 'it just doesn't work' issues.

- Fix data_blob_talloc() to behave the same way data_blob() does when
passed a NULL data pointer.  (just allocate)


REMEMBER to make clean after this commit - I have changed plenty of data structures...
-
Andrew Bartlett
256b85802e Remove compleatly wrong comments. (There were correct, 2 years ago...)
Andrew Bartlett
-
Tim Potter
6a9bfcd3b8 Typo in comment. -