Commit Graph

65 Commits

Author SHA1 Message Date
Viktor Dukhovni
5bbe7c8dc6 Implement forwarding of leaf TGTs to selected realms.
Refactor and enhance TGT forwarding to allow forwarding of leaf
(destination) TGTs for selected destination realms.

Enhance kinit(1) to renew non-origin realm tickets

Document delegate-destination-tgt

Use the newly implemented _krb5_mk_1cred().
2019-10-30 16:20:58 -05:00
Jeffrey Altman
6f3ab01c75 check return copy_Realm, copy_PrincipalName, copy_EncryptionKey
The ASN.1 functions copy_Realm(), copy_PrincipalName() and
copy_EncryptionKey() can fail.  Check the return and perform error
handling as appropriate.

Change-Id: I2b3629d19db96eb41d1cd554cef1dca99745e753
2017-04-29 15:24:42 -04:00
Roland C. Dowdeswell
f0f07ff408 Use krb5_enomem() more consistently in lib/krb5. 2013-02-13 16:15:00 +08:00
Love Hörnquist Åstrand
8060a561db switch to KRB5_ENCTYPE 2011-07-24 16:02:22 -07:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Love Hornquist Astrand
687db64c56 Patch from Secure Endpoints/Asanka Herath for windows support 2009-12-21 08:45:28 +01:00
Love Hornquist Astrand
b0f73165a7 use krb5_make_principal 2009-10-04 11:29:54 -07:00
Love Hörnquist Åstrand
942a821fab remove RCSID
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25171 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-04 06:17:40 +00:00
Love Hörnquist Åstrand
03babea1e3 switch to krb5_clear_error_message
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23911 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-10-14 02:55:39 +00:00
Love Hörnquist Åstrand
6937d41a02 remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
e172367898 switch to utf8 encoding of all files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +00:00
Love Hörnquist Åstrand
09051342a3 N_()ify
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23761 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-07 21:17:42 +00:00
Love Hörnquist Åstrand
7fcd266fdd use krb5_set_error_message
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23316 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-23 04:32:32 +00:00
Love Hörnquist Åstrand
e6c2a43608 use krb5_set_error_message
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23282 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-23 03:26:38 +00:00
Love Hörnquist Åstrand
be80c8d405 Use on variable less.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22504 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-01-21 15:49:58 +00:00
Love Hörnquist Åstrand
fe0304143f Try to handle ticket full and ticketless tickets better.
Add doxygen comments while here.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22498 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-01-21 15:30:35 +00:00
Love Hörnquist Åstrand
494ca3d6a8 (krb5_get_forwarded_creds): in_creds->client should always be set, assume so.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17036 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-10 09:28:15 +00:00
Love Hörnquist Åstrand
ac1c623242 (add_addrs): handle the case where addr->len == 0 and n == 0, then
realloc might return NULL.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16788 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-03-07 19:38:09 +00:00
Love Hörnquist Åstrand
1bb5af8ef5 (krb5_get_forwarded_creds): Use [appdefault]no-addresses before
checking if the krbtgt is address-less, use KRB5_ADDRESSLESS_DEFAULT.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16687 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-02-03 11:37:29 +00:00
Love Hörnquist Åstrand
d3d5392e05 (krb5_get_forwarded_creds): use session key for delegated credentials
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16300 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-11-28 20:43:02 +00:00
Love Hörnquist Åstrand
2872371a33 (krb5_get_forwarded_creds): rename two of the local `realm' to srealm
to avoid shadowing


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15388 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-15 02:44:36 +00:00
Love Hörnquist Åstrand
2dd7796261 (krb5_get_forwarded_creds): honor
KRB5_AUTH_CONTEXT_CLEAR_FORWARDED_CRED and create unencrypted
(ENCTYPE_NULL) credentials. for use with old mit server and java based
ones as they can't handle encrypted KRB-CRED. Note that the option
needs to turned on because if the consumer sends the KRB-CRED in clear
bad things will happen.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15150 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-17 08:12:29 +00:00
Johan Danielsson
7b6c14da59 (krb5_get_forwarded_creds): if the krbtgt is without addresses,
default to not sending our own addrport


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14005 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-06-27 15:40:09 +00:00
Love Hörnquist Åstrand
91351971f7 add KRB5_LIB_FUNCTION to all exported functions
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13863 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-05-25 21:46:46 +00:00
Love Hörnquist Åstrand
dd1875d0a5 (add_addrs): don't add same address multiple times
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13257 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-01-05 15:17:25 +00:00
Love Hörnquist Åstrand
85575388c3 (krb5_get_forwarded_creds): try to handle errors better for previous commit
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13256 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-01-05 15:00:50 +00:00
Love Hörnquist Åstrand
f342516288 (krb5_get_forwarded_creds): If tickets are address-less, forward
address-less tickets.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13255 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-01-05 14:44:34 +00:00
Love Hörnquist Åstrand
fd226be1f3 (krb5_get_forwarded_creds): use KRB5_AUTH_CONTEXT_DO_TIME if we want
timestamp in forwarded krb-cred


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13191 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-12-07 17:17:50 +00:00
Johan Danielsson
744bd74233 krb5_princ_realm -> krb5_principal_get_realm
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13022 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-10-20 16:14:02 +00:00
Love Hörnquist Åstrand
a453cdbddc (add_addrs): don't increase addr->len until in contains interesting
data, use right iteration counter when clearing the addresses


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12842 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-09-18 00:21:00 +00:00
Love Hörnquist Åstrand
4b37d153b9 (krb5_get_forwarded_creds): pass in a krb5_timestamp to krb5_us_timeofday
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12392 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-06-22 20:49:49 +00:00
Johan Danielsson
ddc308c36f use ASN1_MALLOC_ENCODE
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11372 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-09-04 16:26:05 +00:00
Johan Danielsson
d9a1ec3c10 (krb5_get_forwarded_creds): don't blindly use the local subkey
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11348 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-09-03 19:59:48 +00:00
Assar Westerlund
044ce97ca0 (krb5_get_forwarded_creds): handle ports giving for the remote address
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10869 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-03-10 23:12:23 +00:00
Assar Westerlund
7494f8e02a (krb5_fwd_tgt_creds): make it behave the same way as the MIT function
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10373 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-07-19 17:33:22 +00:00
Assar Westerlund
56493b2986 (krb5_get_forwarded_creds): if no_addresses is set, do not add any
local addresses to KRB_CRED


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10208 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-06-29 19:49:06 +00:00
Assar Westerlund
1f31dd74e9 update to new krb5_eai_to_heim_errno
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9951 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-05-14 22:49:56 +00:00
Assar Westerlund
d27aa3b62e add some krb5_{set,clear}_error_string
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9937 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-05-14 06:14:52 +00:00
Assar Westerlund
7f672b1580 *** empty log message ***
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8976 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-08-18 06:51:10 +00:00
Johan Danielsson
5d9b607c1a use krb5_eai_to_heim_errno
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8587 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-08 13:06:07 +00:00
Assar Westerlund
23490da719 be more compatible with MIT code. From Daniel Kouril
<kouril@ics.muni.cz>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8428 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-06-21 02:20:04 +00:00
Assar Westerlund
06a019e167 (add_addrs): fix
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8380 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-06-11 01:23:57 +00:00
Assar Westerlund
8acc0cf003 (add_addrs): ignore addresses of unknown type
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8379 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-06-11 00:59:32 +00:00
Assar Westerlund
1a14865e39 (add_addrs): zero memory before starting to copy memory
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8378 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-06-11 00:52:08 +00:00
Assar Westerlund
b11d86b36c use getaddrinfo instead of getnodebyname{,2}
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7628 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-12-20 00:57:37 +00:00
Johan Danielsson
c5b916ca6f remove advertising clause
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7464 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-12-02 17:05:13 +00:00
Assar Westerlund
a504bebc76 (krb5_fwd_tgs_creds): set forwarded in flags. From Miroslav Ruda
<ruda@ics.muni.cz>


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6727 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-08-04 17:19:40 +00:00
Assar Westerlund
3e3591b1a0 (krb5_get_forwarded_creds): get the local and remote address and add
them to the krb-cred packet


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6374 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-06-24 17:18:24 +00:00
Assar Westerlund
795e179109 (krb5_fwd_tgs_creds): compat function
(krb5_get_forwarded_creds): correct freeing of out_creds


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5999 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-04-19 13:29:45 +00:00
Johan Danielsson
e735a97698 (krb5_get_forwarded_creds): use ALLOC_SEQ
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5964 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-04-15 15:48:04 +00:00