Jeffrey Altman
ef8e4da010
only perform dir separator normalization for file paths
...
Commit ad7e54d698
introduced the use
of _krb5_expand_path_tokens() to expand tokens (and on Windows convert
path delimiters) within credential cache names. This is safe to do
for the path based credential cache types FILE, DIR and SCC but on
Windows is unsafe for the non-path types.
For example on Windows, the API credential cache names are often based
on the principal name and the principal name is parsed from the ccname.
This practice was introduced with the version v2 ccapi when there was
no method of enumerating the caches from the krb5 library.
This change adds a "filepath" boolean parameter to _krb5_expand_path_tokens()
which is set to TRUE (non-zero) when the input is a file path and FALSE
(zero) when the input is not a file path. _krb5_expand_path_tokens() will
only perform directory separator normalization on Windows when the
"filepath" parameter is TRUE.
This change is not the preferred solution because it requires that the
library be aware of all credential cache types that use path based
residuals. The preferred solution would require that the credential cache
implementation indicate whether or not it uses a path based residual.
This change has been implemented using a prefix test and not a change to
struct krb5_cc_ops because existing ccache plugins will not know how to
advertise their use of path based residuals and that path expansion is
safe.
Change-Id: I8135991e8ce69fc5273d381ea9c2078bc2bcd19a
2015-01-07 14:43:19 -05:00
Jeffrey Altman
5f138a16ef
libkrb5: Add missing KRB5_LIB_FUNCTION/KRB5_LIB_CALL
...
KRB5_LIB_FUNCTION and KRB5_LIB_CALL are necessary even on private
functions that are exported.
Change-Id: Iccd0cfe87ff0a9d851e29890e9cb55b3ae517ce1
2013-06-22 21:17:32 -04:00
Roland C. Dowdeswell
f0f07ff408
Use krb5_enomem() more consistently in lib/krb5.
2013-02-13 16:15:00 +08:00
Nicolas Williams
ad7e54d698
Generalize token expansion to allow for context-specific tokens
2011-12-08 13:33:37 -06:00
Nicolas Williams
6aec02f979
Make krb5_kuserok() pluggable and add features (including MIT config compat)
2011-12-08 13:33:36 -06:00
Love Hornquist Astrand
0879b9831a
remove trailing whitespace
2011-05-21 11:57:31 -07:00
Love Hornquist Astrand
f5f9014c90
Warning fixes from Christos Zoulas
...
- shadowed variables
- signed/unsigned confusion
- const lossage
- incomplete structure initializations
- unused code
2011-04-29 20:25:05 -07:00
Asanka Herath
e8e56defaf
Don't rely on non-CCAPI v3 exports
...
krb5_ipc_client_set_target_uid() and krb5_ipc_client_clear_target()
may not be present in CCAPI plug-in. Don't rely on their existence.
2010-09-14 08:04:12 -04:00
Asanka Herath
5dcc605f6b
Fix calling conventions for Windows
2010-08-20 13:14:10 -04:00
Love Hornquist Astrand
788189805c
catch error from as.*printf
2010-05-30 13:28:49 -07:00
Asanka Herath
5c0f3f99c6
Use path tokens when locating plug-in .dlls
2010-05-26 10:38:44 -04:00
Love Hornquist Astrand
7aba6f94bd
poke hole into the underlaying mach code, allow NULL krb5_context
2009-11-22 12:33:53 -08:00
Love Hörnquist Åstrand
9f46439d78
remove unused stuff
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25251 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-28 01:20:47 +00: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
998d22462c
plugs leaks
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25020 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-03 03:59:43 +00:00
Love Hörnquist Åstrand
83595c6202
Add support for setting and getting kdc offset
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24910 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-03-22 17:21:50 +00:00
Love Hörnquist Åstrand
ef088ee696
error never read again, just drop it
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24846 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-27 03:28:59 +00:00
Love Hörnquist Åstrand
91f2ef3f76
dont leak addr on error, cid#81
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24120 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 05:03:07 +00:00
Love Hörnquist Åstrand
230ddb5707
fix N_() arguments, From metze
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23996 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-10-30 06:45:25 +00:00
Love Hörnquist Åstrand
7811db9c1f
add lastmodified
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23923 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-10-18 21:14:54 +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
4f023f744b
provide i18n hooks and renew krb5_create_checksum_iov from comments from metze
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23733 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-07 21:06:34 +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
854ef9a202
switch to krb5_set_error_message
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23273 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-23 03:25:00 +00:00
Love Hörnquist Åstrand
3b7ff465c1
Add declspec for Windows
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23026 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-17 10:02:03 +00:00
Love Hörnquist Åstrand
96ece475a2
get_version returns an int, update
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22985 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-15 15:54:57 +00:00
Love Hörnquist Åstrand
7a47e167d9
Use unsigned where appropriate.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22892 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-07 18:52:06 +00:00
Love Hörnquist Åstrand
331b920fdc
Add version number to krb5_cc_ops
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22845 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-07 11:48:51 +00:00
Love Hörnquist Åstrand
21abe2d75e
Implement set_default.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22838 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-07 11:48:15 +00:00
Love Hörnquist Åstrand
972ea571f3
Translate ccErrInvalidCCache.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22824 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-07 11:47:18 +00:00
Love Hörnquist Åstrand
2e62b79c07
Only release context if its in use.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22818 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-07 11:46:51 +00:00
Love Hörnquist Åstrand
aff5c9adc4
Create a new credential cache is ->get_name is called, make
...
acc_initialize() reset the existing credential cache if needed.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22669 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-03-09 23:39:25 +00:00
Love Hörnquist Åstrand
32809668a9
(acc_get_name): just return the cache_name directly instead of trying
...
to resolve it.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22667 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-03-09 23:08:32 +00:00
Love Hörnquist Åstrand
bdb625ddf0
Free context when done, implement krb5_cc_ops->default_name.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22099 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-12-03 17:14:34 +00:00
Love Hörnquist Åstrand
759bf557e0
Implement the move operation. Avoid using cc_set_principal() since it
...
broken on Mac OS X 10.5.0.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22091 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-12-03 12:38:53 +00:00
Love Hörnquist Åstrand
d0bd78d2a6
use krb5_free_cred_contents
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22059 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-11-11 15:27:59 +00:00
Love Hörnquist Åstrand
4ff5635c57
doxygen documentation
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22029 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-11-10 10:38:04 +00:00
Love Hörnquist Åstrand
8d40c2994b
check return value of alloc functions, from Charles Longeau
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21745 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-31 16:11:25 +00:00
Love Hörnquist Åstrand
f3b06c771d
(loadlib): pass RTLD_LAZY to dlopen, without it linux is unhappy.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19764 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-01-08 15:31:01 +00:00
Love Hörnquist Åstrand
f733fb5e22
Does function typecasts instead of void * type-casts.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18598 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-19 11:41:38 +00:00
Love Hörnquist Åstrand
d275b39ee1
Use ticket flags definition, might fix Mac OS X Kerberos.app problems.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16825 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-03-27 04:22:23 +00:00
Love Hörnquist Åstrand
1b5f2b7362
(init_ccapi): return kerberos errors, callers expect it
...
(acc_get_cache_first): don't leak memory or abort on malloc failure
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16120 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-10-03 08:44:18 +00:00
Love Hörnquist Åstrand
02a6d6bf99
Return KRB5_CC_NOSUPP for ccErrServerUnavailable.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16113 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-10-01 03:37:12 +00:00
Love Hörnquist Åstrand
5ddc2e0774
Implement the cache iteration functions.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16108 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-09-30 10:10:09 +00:00
Love Hörnquist Åstrand
2679e4770f
use HAVE_DLOPEN around cc_handle
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15432 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-16 19:32:44 +00:00
Love Hörnquist Åstrand
1da385e5b6
(acc_gen_new): remove debug printf
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14946 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-24 21:54:01 +00:00
Love Hörnquist Åstrand
050cc7b7f3
(acc_resolve): if open_default_ccache failed with ccErrCCacheNotFound
...
try again with create_default_ccache, this fixes the problem where the
security server apperenly haven't started yet on Mac OS X
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14832 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-18 19:19:04 +00:00
Love Hörnquist Åstrand
01d4d3ef29
Argument to create_new_ccache is a principal, not a credential cache name.
...
Clean up lossage related to this problem.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14730 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-04 14:17:00 +00:00