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

64 Commits

Author SHA1 Message Date
Jelmer Vernooij
f7afa1cb77 r17930: Merge noinclude branch:
* Move dlinklist.h, smb.h to subsystem-specific directories
 * Clean up ads.h and move what is left of it to dsdb/
   (only place where it's used)
2007-10-10 14:16:54 -05:00
Andrew Tridgell
09007b0907 r17824: add a wrapper for the common partitions_basedn calculation 2007-10-10 14:16:45 -05:00
Simo Sorce
ad75cf8695 r17516: Change helper function names to make more clear what they are meant to do 2007-10-10 14:15:31 -05:00
Andrew Bartlett
9d42bb4b3d r16964: Remove extra debugs no longer required in a working KDC
Implement the 'DES only' flag.

Andrew Bartlett
2007-10-10 14:10:03 -05:00
Andrew Bartlett
f661dafe4e r16237: Use an appropriate basedn for these searches, so they occour into the
correct partition.

Andrew Bartlett
2007-10-10 14:09:07 -05:00
Andrew Bartlett
ae2913898c r16056: Fix errors found by trying to use our kpasswd server and the Apple client.
Andrew Bartlett
2007-10-10 14:08:54 -05:00
Jim McDonough
eef117e445 r15883: Make sure timegm() prototype is available (on systems where we've had to
replace it)
2007-10-10 14:08:37 -05:00
Andrew Tridgell
6b4c085b86 r15853: started the process of removing the warnings now that
talloc_set_destructor() is type safe. The end result will be lots less
use of void*, and less calls to talloc_get_type()
2007-10-10 14:08:32 -05:00
Andrew Tridgell
cc290ece92 r15830: fixed two kdc memory leaks 2007-10-10 14:08:30 -05:00
Jelmer Vernooij
aa6d66fda6 r15573: Fix build of systems that have iconv headers in non-standard locations
Split of system/locale.h header from system/iconv.h

Previously, iconv wasn't being used on these systems
2007-10-10 14:05:58 -05:00
Andrew Bartlett
afaee0a6b7 r15497: I'm not really sure this is correct in terms of how we should be responding to
krbtgt/MY.REALM@MY.REALM

TGS ticket requests, but for the moment, these are still marked as
'server' requests by the kerberos5.c caller.

Andrew Bartlett
2007-10-10 14:05:42 -05:00
Andrew Bartlett
ef5604b877 r15481: Update heimdal/ to match current lorikeet-heimdal.
This includes many useful upstream changes, many of which should
reduce warnings in our compile.

It also includes a change to the HDB interface, which removes the need
for Samba4/lorikeet-heimdal to deviate from upstream for hdb_fetch().
The new flags replace the old entry type enum.

(This required the rework in hdb-ldb.c included in this commit)

Andrew Bartlett
2007-10-10 14:05:39 -05:00
Andrew Bartlett
d72fafc1f0 r15480: Patch from lha, to ensure we don't leave a free()'ed element in the
principal on strdup failure.

Andrew Bartlett
2007-10-10 14:05:39 -05:00
Andrew Tridgell
8ca4681861 r14427: don't reference short_princ after it is freed 2007-10-10 13:57:22 -05:00
Jelmer Vernooij
1228358767 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
2007-10-10 13:52:24 -05:00
Andrew Bartlett
c530ab5dc6 r13910: Fix the 'your password has expired' on every login. We now consider
if the 'password does not expire' flag has been set, filling in the
PAC and netlogon reply correctly if so.

Andrew Bartlett
2007-10-10 13:52:22 -05:00
Andrew Bartlett
c6eb74f429 r13252: Cleanup, both in code, comments and talloc use:
In particular, I've used the --leak-report-full option to smbd to
track down memory that shouldn't be on a long-term context.  This is
now talloc_free()ed much earlier.

Andrew Bartlett
2007-10-10 13:51:38 -05:00
Andrew Bartlett
b0b150d08a r13207: Use the new API for using/not using kerbeors in hdb-ldb.c
Update the rootdse module to use the new schema.

Andrew Bartlett
2007-10-10 13:51:34 -05:00
Andrew Bartlett
849500d1aa r13107: Follow the lead of Heimdal's kpasswdd and use the HDB (hdb-ldb in our
case) as the keytab.

This avoids issues in replicated setups, as we will replicate the
kpasswd key correctly (including from windows, which is why I care at
the moment).

Andrew Bartlett
2007-10-10 13:51:26 -05:00
Andrew Tridgell
65cf522b5e r13069: adding a hack on instructions from andrew 2007-10-10 13:51:21 -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
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
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
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
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
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
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
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
Andrew Bartlett
6aef275efd r9931: Make use of new 'norealm' parsing functions rather than strchr(p '@').
Merge these norealm functions from lorikeet-heimdal.

Andrew Bartlett
2007-10-10 13:36:23 -05:00
Jelmer Vernooij
200a8f6652 r9792: Rename StrCaseCmp -> strcasecmp_m. All these years I was thinking
StrCaseCmp was sys_strcasecmp, while it is in fact strcasecmp_m!
2007-10-10 13:35:01 -05:00
Simo Sorce
31c69d0655 r9392: Fix ldb_dn_compose to make build farm happy
Add ldb_dn_string_compose so that you can build a dn starting from a
struct ldb_dn base and a set of parameters to be composed in a format
string with the same syntax of printf
2007-10-10 13:33:33 -05:00
Simo Sorce
692e35b779 r9391: Convert all the code to use struct ldb_dn to ohandle ldap like distinguished names
Provide more functions to handle DNs in this form
2007-10-10 13:33:32 -05:00
Steve French
3b707b9289 r9310: Add two missing return statements after null pointer checks to fix potential oops in kdc code.
Found by coverity.
2007-10-10 13:33:23 -05:00
Andrew Bartlett
cf8bf1e9f3 r9235: Remove attribute search we no longer reference.
Andrew Bartlett
2007-10-10 13:31:35 -05:00
Stefan Metzmacher
232b04bf3e r9170: fix crash bug
metze
2007-10-10 13:31:27 -05:00
Andrew Tridgell
a58ea6b385 r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the
automatic builds.

The main fixes are:

 - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats

 - use of NULL format statements to perform dn searches.

 - assumption that sizeof() returns an int
2007-10-10 13:29:34 -05:00