1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-21 12:23:50 +03:00
Commit Graph

91 Commits

Author SHA1 Message Date
Andrew Tridgell
65cf522b5e r13069: adding a hack on instructions from andrew 2007-10-10 13:51:21 -05:00
Andrew Bartlett
88198c4881 r12804: This patch reworks the Samba4 sockets layer to use a socket_address
structure that is more generic than just 'IP/port'.

It now passes make test, and has been reviewed and updated by
metze. (Thankyou *very* much).

This passes 'make test' as well as kerberos use (not currently in the
testsuite).

The original purpose of this patch was to have Samba able to pass a
socket address stucture from the BSD layer into the kerberos routines
and back again.   It also removes nbt_peer_addr, which was being used
for a similar purpose.

It is a large change, but worthwhile I feel.

Andrew Bartlett
2007-10-10 13:49:57 -05:00
Jelmer Vernooij
6391761601 r12696: Reduce the size of include/structs.h 2007-10-10 13:49:40 -05:00
Andrew Bartlett
17e20930ec r12683: Fix declaration and initialisation placement.
Andrew Bartlett
2007-10-10 13:49:37 -05:00
Andrew Bartlett
4e80a557f9 r12682: This patch finally fixes our kpasswdd implementation to be compatible
with clients compiled against the MIT Kerberos implementation.  (Which
checks for address in KRB-PRIV packets, hence my comments on socket
functions earlier today).

It also fixes the 'set password' operation to behave correctly (it was
previously a no-op).

This allows Samba3 to join Samba4.  Some winbindd operations even work,
which I think is a good step forward.  There is naturally a lot of work
to do, but I wanted at least the very basics of Samba3 domain membership
to be available for the tech preview.

Andrew Bartlett
2007-10-10 13:49:37 -05:00
Andrew Bartlett
686fea241b r12681: Allow an entry to have no kerberos keys. This occours when an entry
is new, and has no password.  It may also occour in the future if we
allow PKINIT.  In any case, it shouldn't segfault :-)

Andrew Bartlett
2007-10-10 13:49:37 -05:00
Andrew Bartlett
f282fab611 r12631: Now we have fixed the provision script, we don't need to work around
it here.

Andrew Bartlett
2007-10-10 13:49:10 -05:00
Andrew Bartlett
e902274321 r12599: This new LDB module (and associated changes) allows Samba4 to operate
using pre-calculated passwords for all kerberos key types.
(Previously we could only use these for the NT# type).

The module handles all of the hash/string2key tasks for all parts of
Samba, which was previously in the rpc_server/samr/samr_password.c
code.  We also update the msDS-KeyVersionNumber, and the password
history.  This new module can be called at provision time, which
ensures we start with a database that is consistent in this respect.

By ensuring that the krb5key attribute is the only one we need to
retrieve, this also simplifies the run-time KDC logic.  (Each value of
the multi-valued attribute is encoded as a 'Key' in ASN.1, using the
definition from Heimdal's HDB.  This simplfies the KDC code.).

It is hoped that this will speed up the KDC enough that it can again
operate under valgrind.
2007-10-10 13:49:01 -05:00
Jelmer Vernooij
0aca5fd513 r12542: Move some more prototypes out to seperate headers 2007-10-10 13:47:55 -05:00
Jelmer Vernooij
b24f2583ed r12498: Eliminate INIT_OBJ_FILES and ADD_OBJ_FILES. We were not using
the difference between these at all, and in the future the
fact that INIT_OBJ_FILES include smb_build.h will be sufficient to
have recompiles at the right time.
2007-10-10 13:47:45 -05:00
Andrew Bartlett
e48464c884 r12383: Fixes for Apple's AD client. Don't segfualt in the KDC, and they
require the isSynchronized flag in the rootDSE.

Andrew Bartlett
2007-10-10 13:47:33 -05:00
Andrew Bartlett
5770409dcd r12362: Along with a cracknames change in the previous commit, this should
allow Win2000 machines to again use kerberos with Samba4.

Andrew Bartlett
2007-10-10 13:47:31 -05:00
Andrew Bartlett
96e124b7bb r12327: ENT_TYPE_ANY isn't used anywhere in Samba4, so don't implement it in hdb-ldb.
Andrew Bartlett
2007-10-10 13:47:30 -05:00
Andrew Bartlett
8fd5224c6b r12269: Update to current lorikeet-heimdal. This changed the way the hdb
interface worked, so hdb-ldb.c and the glue have been updated.

Andrew Bartlett
2007-10-10 13:47:26 -05:00
Andrew Bartlett
5f9dddd02c r12179: Allow our KDC to use LDAP to get to the backend database.
To avoid a circular depenency, it is not allowed to use Krb5 as an
authentication mechanism, so this must be removed from the list.  An
extension to the credentials system allows this function.

Also remove proto.h use for any of the KDC, and use NTSTATUS returns
in more places.

Andrew Bartlett
2007-10-10 13:47:16 -05:00
Stefan Metzmacher
2fe8a643d3 r12121: remove some dublicate code
metze
2007-10-10 13:47:11 -05:00
Andrew Bartlett
0c4ea6f641 r12036: Fix more KDC memory leaks (and there are probably still more...).
Andrew Bartlett
2007-10-10 13:47:01 -05:00
Andrew Bartlett
b60531b109 r12035: Fix memory leaks in the KDC.
Andrew Bartlett
2007-10-10 13:47:01 -05:00
Andrew Bartlett
05334e98fb r11987: Clarify the accountExpires behaviour in the KDC.
Andrew Bartlett
2007-10-10 13:46:55 -05:00
Tim Potter
d479f2d760 r11968: More warning fixes. We're on track to getting to double digits for
the number of warnings generated now.
2007-10-10 13:46:52 -05:00
Andrew Bartlett
328fa186f2 r11930: Add socket/packet handling code for kpasswdd
Allow ticket requests with only a netbios name to be considered 'null'
addresses, and therefore allowed by default.

Use the netbios address as the workstation name for the allowed
workstations check with krb5.

Andrew Bartlett
2007-10-10 13:46:48 -05:00
Andrew Tridgell
6a47cd65a8 r11713: separate out the setting of the fde in the packet context from the
enabling of packet serialisation
2007-10-10 13:46:17 -05:00
Andrew Tridgell
6ab8082234 r11621: some minor fixes from comments by metze 2007-10-10 13:45:59 -05:00
Andrew Tridgell
24f20eed0e r11619: use the 32 bit length helper in the kdc. 2007-10-10 13:45:59 -05:00
Andrew Tridgell
2cbcc8a919 r11608: switched the kdc to use the generic packet send code 2007-10-10 13:45:58 -05:00
Andrew Tridgell
0a797712fb r11604: converted the kdc code to use the new packet lib. Andrew, I'm not sure
how to test this, can you have a look and see if it works for you? Is
there some hidden switch to kinit to use tcp?
2007-10-10 13:45:57 -05:00
Andrew Bartlett
5575a1443b r11572: Add support for accountExpires and password expiry (should cause the
ticket to be reduced in validity).

Andrew Bartlett
2007-10-10 13:45:54 -05:00
Simo Sorce
22c8c97e6f r11567: Ldb API change patch.
This patch changes the way lsb_search is called and the meaning of the returned integer.
The last argument of ldb_search is changed from struct ldb_message to struct ldb_result
which contains a pointer to a struct ldb_message list and a count of the number of messages.
The return is not the count of messages anymore but instead it is an ldb error value.

I tryed to keep the patch as tiny as possible bu as you can guess I had to change a good
amount of places. I also tried to double check all my changes being sure that the calling
functions would still behave as before. But this patch is big enough that I fear some bug
may have been introduced anyway even if it passes the test suite. So if you are currently
working on any file being touched please give it a deep look and blame me for any error.

Simo.
2007-10-10 13:45:53 -05:00
Andrew Bartlett
c4a9d025d6 r11544: Allow delegation in a Samba4 realm.
Andrew Bartlett
2007-10-10 13:45:52 -05:00
Andrew Bartlett
36973b1eef r11543: A major upgrade to our KDC and PAC handling.
We now put the PAC in the AS-REP, so that the client has it in the
TGT.  We then validate it (and re-sign it) on a TGS-REQ, ie when the
client wants a ticket.

This should also allow us to interop with windows KDCs.

If we get an invalid PAC at the TGS stage, we just drop it.

I'm slowly trying to move the application logic out of hdb-ldb.c, and
back in with the rest of Samba's auth system, for consistancy.  This
continues that trend.

Andrew Bartlett
2007-10-10 13:45:52 -05:00
Andrew Bartlett
6d439cae98 r11540: Some notes to myself on RFC complience.
Andrew Bartlett
2007-10-10 13:45:51 -05:00
Andrew Bartlett
4315836cd8 r11536: Add a hook for client-principal access control to hdb-ldb, re-using
the code in auth/auth_sam.c for consistancy.  This will also allow us
to have one place for a backend directory hook.

I will use a very similar hook to add the PAC.

Andrew Bartlett
2007-10-10 13:45:50 -05:00
Andrew Bartlett
da38bcefa7 r11525: Move lookups (including the attribute search) for users from
kdc/hdb-ldb.c to share the routines used for auth/

This will require keeping the attribute list in sync, but I think it
is worth it for the next steps (sharing the server_info generation).

Andrew Bartlett
2007-10-10 13:45:48 -05:00
Andrew Bartlett
4395d087e1 r11524: More work on our hdb backend in the KDC.
The aim here is to restructure the queries to match the queries we do
in auth, then to share the code that does the actual query (at least
for user logins).

Then we can generate the PAC from that shared query, rather than a
seperate query.

Andrew Bartlett
2007-10-10 13:45:48 -05:00
Andrew Bartlett
64b9ea642b r11437: Fix (valid!) use of uninitialised value warnings.
Andrew Bartlett
2007-10-10 13:45:37 -05:00
Jelmer Vernooij
875eb8f4cc r11382: Require number of required M4 macros
Make MODULE handling a bit more like BINARY, LIBRARY and SUBSYSTEM
Add some more PUBLIC_HEADERS
2007-10-10 13:45:29 -05:00
Andrew Bartlett
f71149c88d r11333: Push service principal lookups into the cracknames code, rather than
in the hdb-ldb code.

Andrew Bartlett
2007-10-10 13:45:20 -05:00
Andrew Bartlett
cf67af4216 r11322: Start moving towards using the cracknames code in the KDC.
Andrew Bartlett
2007-10-10 13:45:19 -05:00
Andrew Bartlett
81f020d3a4 r11321: Fix typos in warnings.
Andrew Bartlett
2007-10-10 13:45:19 -05:00
Andrew Bartlett
c9d5d8e45d r11270: Move the core CrackNames code from rpc_server/drsuapi to dsdb/samdb.
I'm sure this will not be the final resting place, but it will do for
now.

Use the cracknames code in auth/ for creating a server_info given a
principal name only (should avoid assumtions about spliting a
user@realm principal).

Andrew Bartlett
2007-10-10 13:45:11 -05:00
Jelmer Vernooij
24e1030090 r11244: Relative path names in .mk files 2007-10-10 13:45:06 -05:00
Stefan Metzmacher
4f999625a1 r11241: - fix compiler warning
- fix comment

metze
2007-10-10 13:45:06 -05:00
Andrew Bartlett
ab5dbbe10a r11239: Use ${REALM} for the realm in rootdse.ldif
Add the kpasswd server to our KDC, implementing the 'original' and
Microsoft versions of the protocol.

This works with the Heimdal kpasswd client, but not with MIT, I think
due to ordering issues.  It may not be worth the pain to have this
code go via GENSEC, as it is very, very tied to krb5.

This gets us one step closer to joins from Apple, Samba3 and other
similar implementations.

Andrew Bartlett
2007-10-10 13:45:06 -05:00
Jelmer Vernooij
7fffc5c917 r11214: Remove scons files (see http://lists.samba.org/archive/samba-technical/2005-October/043443.html) 2007-10-10 13:45:03 -05:00
Andrew Bartlett
3b6c9c7cbc r11206: It appears to me that any account may operate as a server.
Andrew Bartlett
2007-10-10 13:45:02 -05:00
Andrew Bartlett
84d6118e87 r11106: Make the KDC handler plugable, as I want to drop kpasswdd into exactly
the same spot (it has identical TCP sementics).

Andrew Bartlett
2007-10-10 13:44:50 -05:00
Stefan Metzmacher
4c4f19cc23 r10987: add support for tcp kdc requests
metze
2007-10-10 13:39:51 -05:00
Andrew Bartlett
fd7203789a r10810: This adds the hooks required to communicate the current user from the
authenticated session down into LDB.  This associates a session info
structure with the open LDB, allowing a future ldb_ntacl module to
allow/deny operations on that basis.

Along the way, I cleaned up a few things, and added new helper functions
to assist.  In particular the LSA pipe uses simpler queries for some of
the setup.

In ldap_server, I have removed the 'ldasrv:hacked' module, which hasn't
been worked on (other than making it continue to compile) since January,
and I think the features of this module are being put into ldb anyway.

I have also changed the partitions in ldap_server to be initialised
after the connection, with the private pointer used to associate the ldb
with the incoming session.

Andrew Bartlett
2007-10-10 13:39:32 -05:00
Jelmer Vernooij
b53313dc51 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
2007-10-10 13:39:08 -05:00
Andrew Bartlett
0600202067 r10562: Ensure we initalise the error table with hdb errors. This ensures we
get good text error strings.

Andrew Bartlett
2007-10-10 13:39:04 -05:00