1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

275 Commits

Author SHA1 Message Date
Jelmer Vernooij
7e039c7dda source4/auth: Fix prototypes for all functions. 2011-03-19 03:20:05 +01:00
Günther Deschner
3722f65359 librpc: make NDR_KRB5PAC a shared library (libndr-krb5pac.so).
Simo, please check.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Feb 14 18:54:38 CET 2011 on sn-devel-104
2011-02-14 18:54:38 +01:00
Andrew Tridgell
8dc92c8f71 ldb: use #include <ldb.h> for ldb
thi ensures we are using the header corresponding to the version of
ldb we're linking against. Otherwise we could use the system ldb for
link and the in-tree one for include

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-10 06:51:07 +01:00
Andrew Tridgell
e26b1a6968 s4-krb5: authkrb5 should depend on ldb
this fixes the include path to add ldb

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-10 06:51:07 +01:00
Andrew Bartlett
a2ce53c1f5 s4-auth Rework auth subsystem to remove struct auth_serversupplied_info
This changes auth_serversupplied_info into the IDL-defined struct
auth_user_info_dc.  This then in turn contains a struct
auth_user_info, which is the only part of the structure that is
mainted into the struct session_info.

The idea here is to avoid keeping the incomplete results of the
authentication (such as session keys, lists of SID memberships etc) in
a namespace where it may be confused for the finalised results.

Andrew Barltett
2011-02-09 01:11:06 +01:00
Jelmer Vernooij
3b4fd3573e heimdal_build: Add missing dependencies when building with system heimdal.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Jan  1 04:46:35 CET 2011 on sn-devel-104
2011-01-01 04:46:35 +01:00
Matthias Dieter Wallnöfer
3fb5ae600e s4:auth/kerberos/kerberos_pac.c - fix another memory leak regarding the KRB principal
In addition fix a counter type

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Sat Dec  4 15:14:46 CET 2010 on sn-devel-104
2010-12-04 15:14:46 +01:00
Andrew Tridgell
7cb0f95bf2 s4-auth: fixed infinite loop in krb5 auth
we were continually trying the first address returned, instead of
moving to the next address

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Sun Nov 14 04:11:28 UTC 2010 on sn-devel-104
2010-11-14 04:11:28 +00:00
Andrew Tridgell
6582d4739c s4-auth: fixed crash in krb5 auth
remote_addr was used after free
2010-11-14 13:53:29 +11:00
Andrew Bartlett
14f455ba99 s4-kerberos Mention the remote address we fail to contact the KDC on 2010-11-05 23:42:08 +11:00
Andrew Tridgell
003a36eb5e s4-auth: unconditionally set previous_ev
we need the caller to know when the previous_ev was NULL

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-04 20:35:43 +11:00
Jelmer Vernooij
3deece5591 s4: Remove the old perl/m4/make/mk-based build system.
The new waf-based build system now has all the same functionality, and
the old build system has been broken for quite some time.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-31 02:01:44 +00:00
Andrew Tridgell
045e3445a0 s4-auth: make KERBEROS subsystem into authkrb5 private library
this fixes some double linking. The name 'KERBEROS' was also a bit
confusing, as it sounded like a base kerberos library, when it is in
fact part of auth
2010-10-30 23:49:01 +11:00
Jelmer Vernooij
8cf61377aa waf: Remove lib prefix from libraries manually. 2010-10-26 10:17:17 -07:00
Andrew Bartlett
42127cdbb0 s4-credentials Add explicit event context handling to Kerberos calls (only)
By setting the event context to use for this operation (only) onto
the krb5_context just before we call that operation, we can try
and emulate the specification of an event context to the actual send_to_kdc()

This eliminates the specification of an event context to many other
cli_credentials calls, and the last use of event_context_find()

Special care is taken to restore the event context in the event of
nesting in the send_to_kdc function.

Andrew Bartlett
2010-10-11 13:02:16 +00:00
Andrew Bartlett
baeaa17986 s4-kerberos Remove unused parameter 2010-10-11 13:02:15 +00:00
Andrew Bartlett
1ef59ea9db s4-kerberos Remove unsued variable 2010-10-11 13:02:15 +00:00
Jelmer Vernooij
d74e0adb30 credentials: Split up into several subsystems. 2010-10-11 02:06:03 +00:00
Jelmer Vernooij
c5ae099152 kerberos_util: Put into separate subsystem.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Mon Oct 11 00:34:56 UTC 2010 on sn-devel-104
2010-10-11 00:34:56 +00:00
Jelmer Vernooij
5548d3d41e Add missing dependencies for com_err. 2010-10-05 00:38:35 +02:00
Jelmer Vernooij
9eab95bd08 heimdal: Fix name of hx509 library. 2010-10-05 00:38:34 +02:00
Andrew Bartlett
87698dc2a1 s4-kerberos Don't regenerate key values for each alias in keytab
Instead, store the same key value under the multiple alias names.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Oct  2 00:16:52 UTC 2010 on sn-devel-104
2010-10-02 00:16:52 +00:00
Andrew Bartlett
a82e3abc70 s4-auth Add make_server_info_pac() to include 'resource domain' groups
Previously, our PAC code didn't include these groups into the
server_info from which we would eventually calculate the full
list of tokenGroups.

Andrew Bartlett
2010-10-02 09:11:37 +10:00
Andrew Tridgell
0adc1645e2 s4-auth: fixed a vagrind error when creating keytabs
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-01 13:08:23 -07:00
Andrew Bartlett
0b5a556b76 s4-kerberos Don't segfault if the password isn't specified in keytab generation
Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Sep 26 03:29:34 UTC 2010 on sn-devel-104
2010-09-26 03:29:34 +00:00
Andrew Bartlett
c9b19d9b69 s4-kerberos Rework keytab handling to export servicePrincipalName entries
This creates keytab entries with all the servicePrincipalNames listed
in the secrets.ldb entry.

Andrew Bartlett
2010-09-24 15:07:56 +10:00
Andrew Bartlett
f03913e2cc s4-kerberos Move 'set key into keytab' code out of credentials.
This code never really belonged in the credentials layer, and
is easier done with direct access to the ldb_message that is
in secrets.ldb.

Andrew Bartlett
2010-09-24 09:25:44 +10:00
Andrew Bartlett
f9698cfc97 s4-kerberos Fix kerberos_enctype_bitmap_to_enctypes()
The previous code never worked

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-09-24 09:25:43 +10:00
Andrew Tridgell
89827af525 s4-kerberos: obey the credentials setting for forwardable tickets
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-16 16:08:46 +10:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Andrew Bartlett
5167b97ff2 s4:kerberos Add functions to convert msDS-SupportedEncryptionTypes
This will allow us to interpret this attibute broadly in Samba.

Andrew Bartlett
2010-06-29 16:59:30 +10:00
Andrew Bartlett
94637e5fe4 s4:provision Add an msDS-SupportedEncryptionTypes entry to our DC
This ensures that our DC will use all the available encyption types.

(The KDC reads this entry to determine what the server supports)

Andrew Bartlett
2010-06-29 16:59:22 +10:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Andrew Bartlett
44e7ea6927 s4:credentials Make the CCACHE in credentials depend on the things that built it
This means that we consider the ccache only as reliable as the least
specified of the inputs we used.

This means that we will regenerate the ccache if any of the inputs change.

Andrew Bartlett
2010-05-02 06:54:23 +10:00
Andrew Bartlett
aecaddfa1b s4:credentials Add the functions needed to do S4U2Self with cli_credentials
A torture test to demonstrate will be added soon.

Andrew Bartlett
2010-04-10 21:40:58 +10:00
Andrew Tridgell
b690fedef5 s4-waf: removed the AUTOGENERATED markers
we won't be using the mk -> wscript generator again
2010-04-06 20:27:16 +10:00
Andrew Tridgell
f9eae32f4b s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them 2010-04-06 20:27:11 +10:00
Andrew Tridgell
845e0cbe6f build: commit all the waf build files in the tree 2010-04-06 20:26:48 +10:00
Matthias Dieter Wallnöfer
bdc0372f8a s4:auth/kerberos/kerberos.c - fix also here a memory leak
The options need to be freed also on this error case.
2010-03-16 17:11:48 +01:00
Andrew Tridgell
781ad038c9 s4-krb5: propogate errors from a lot more kerberos functions
We need to be able to give sensible error messages when a kerberos
calls fails. This propogates the kerberos error up the stack to the
caller.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-02-26 13:59:16 +11:00
Simo Sorce
f77714c887 s4:kdc streamline context initialization
Allow other plugins to init the context without having it try to grab sockets
or set samba specific logging.
2010-01-31 13:30:31 -05:00
Simo Sorce
61a4ab36d9 cleanup: remove trailing spaces and tabs 2010-01-28 02:05:05 -05:00
Andrew Tridgell
29d08bfe26 s4-kerberos: raise the general kerberos debug level to 3
level 2 for every krb request is a bit much
2010-01-16 18:30:22 +11:00
Simo Sorce
3d184399a5 Strip trailing spaces 2010-01-12 13:50:24 -05:00
Matthias Dieter Wallnöfer
e9686985cb s4: Changes the old occurences of "lp_realm" in "lp_dnsdomain" where needed
For KERBEROS applications the realm should be upcase (function "lp_realm") but
for DNS ones it should be used lowcase (function "lp_dnsdomain"). This patch
implements the use of both in the right way.
2009-10-14 10:50:43 +02:00
Andrew Bartlett
29ef1b2325 s4:kerberos Use MIT compatible names for these enc types
This is a small start on (ie, the only trivial part of) the work shown in:
http://k5wiki.kerberos.org/wiki/Projects/Samba4_Port#Samba.27s_use_of_Heimdal_symbols.2C_with_MIT_differences
(a table of all Kerberos symbols used in Samba4, and notes on where
they differ from those provided with MIT Kerberos)

Andrew Bartlett
2009-08-21 17:50:49 +10:00
Andrew Bartlett
47a7a2e442 s4:kerberos Add 'net export keytab' command for wireshark decryption
It is much easier to do decryption with wireshark when the keytab is
available for every host in the domain.  Running 'net export keytab
<keytab name>' will export the current (as pointed to by the supplied
smb.conf) local Samba4 doamin.

(This uses Heimdal's 'hdb' keytab and then the existing hdb-samba4,
and so has a good chance of keeping working in the long term).

Andrew Bartlett
2009-07-28 08:52:43 +10:00
Stefan Metzmacher
b7c003c09c Revert "s4:kerberos Add 'net export keytab' command for wireshark decryption"
This reverts commit a40ce5d0d9.

This breaks the build...

Andrew, please repush it, when it's fixed:-)

metze
2009-07-27 17:41:11 +02:00
Andrew Bartlett
a40ce5d0d9 s4:kerberos Add 'net export keytab' command for wireshark decryption
It is much easier to do decryption with wireshark when the keytab is
available for every host in the domain.  Running 'net export keytab
<keytab name>' will export the current (as pointed to by the supplied
smb.conf) local Samba4 doamin.

(This uses Heimdal's 'hdb' keytab and then the existing hdb-samba4,
and so has a good chance of keeping working in the long term).

Andrew Bartlett
2009-07-27 22:41:42 +10:00
Don Davis
9aff7b0b59 Rework the kerberos-notes.txt in order and format
This reworks the notes file to be less stream-of-consciousness and more
task for porting, with a very particular focus on a potential port of
Samba4 to use MIT Kerberos.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2009-06-30 18:12:02 +10:00