8836e6a39d
lib/krb5: krb5_vset_error_message is no-op if no krb5_context
...
Refactor krb5_vset_error_message() to remove the many conditional
tests on the existence of krb5_context. If there is no krb5_context
then _krb5_debug() is a no-op. Therefore, there is no point in
performing any of the other work.
Change-Id: Ib88b592a542a195f27e352a80ced0a98a6f85300
2022-01-20 09:09:27 -05:00
cf19a0f8e3
krb5: Context must be optional for error functions
...
We pass a NULL context to error functions in CCAPI (lib/krb5/acache.c)
code paths.
2022-01-19 23:33:44 -06:00
e8441212d1
Move error functions from krb5 to base
2020-04-24 16:02:35 -05:00
e2d435cf2f
Move lib/krb5/error_string.c to lib/base/
...
This commit contains only renames.
2020-04-24 16:02:35 -05:00
6a0f45c4d7
Use __attribute__ ((__name__)) form
...
Protect against macros named noreturn and so on.
2017-03-13 18:39:41 -04:00
c80816f9c3
krb5_context: embed mutex in structure
...
Instead of allocating a separate mutex object on the heap,
include the HEIMDAL_MUTEX in the krb5_context structure.
Change-Id: If6db484177410487176985e43e3b43e0f2166518
2016-04-10 17:05:07 -05:00
472141be03
log each error message that is on a very high debug level
2012-03-10 10:23:57 -08:00
cbf126bede
Permit NULL context to krb5_get_error_message()
...
Application developers have a tendency to use krb5_get_error_message()
as a drop in replacement for error_message() and under various
circumstances they pass in a NULL context. This method works fine
for MIT's implementation which ignores the context but in Heimdal
passing in a NULL context would dump core.
This patch set modifies krb5_get_error_message() in order to
permit the passing of a NULL context. First, if the context
is NULL, an attempt will be made to allocate one locally for
the purpose of evaluating the error code. Second, if a local
context cannot be allocated, fall back on calling error_message().
If error_message() fails to return a string, then generate an
"unknown error" response.
Only if all of the above fails is NULL returned.
Change-Id: If4baf7d6c428cf0baf11c044b8dfd5c2b3cdf7e4
2011-09-27 14:26:26 -04:00
d3f85af92c
move deprecated function to deprecated.c
2011-09-25 19:03:11 +02:00
4bff0fbb31
check for NULL as argument to krb5_{prepend,set}_error_message functions
2011-07-23 12:06:01 -07:00
305596d9ad
Rename subsystem_DEPRECATED to subsystem_DEPRECATED_FUNCTION(X)
...
Start to explain what the replacement function is.
Generate the #define/#undef logic in generated header files.
Use gcc style where the deprecation warning is after the prototype.
2011-05-17 23:12:51 -07:00
0f853405fe
Add missing export and calling convention annotations
2010-11-24 15:32:49 -05:00
df45fec393
plug memory leak
2010-05-30 15:39:12 -07:00
0b2b9d9834
catch error from as.*printf
2010-05-30 14:12:39 -07:00
788189805c
catch error from as.*printf
2010-05-30 13:28:49 -07:00
72848585cd
KRB5_DEPRECATED needs to be prefixed to the declaration on Windows
2009-11-25 12:43:16 -05:00
b1063ea8fc
Initial Windows port
2009-11-24 10:11:14 -08:00
b22c42947c
make krb5_prepend_error_message prepend
2009-11-22 14:58:20 -08:00
560f10033c
move back krb5_get_err_text to error_string.c for now
2009-11-04 22:33:14 -08:00
8d16484f17
less const warnings for com_right_r
2009-11-03 23:59:38 -08:00
de84fec5a3
spelling
2009-11-03 23:37:40 -08:00
80daa7681a
remove unused variable
2009-11-03 22:22:40 -08:00
f064547294
Use com_right_r().
2009-10-12 10:55:12 -07:00
1857a8b41c
add krb5_?prepend_error_message()
2009-10-12 10:23:14 -07:00
59213e8673
remove trailer after #undef token
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25178 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-06 19:00:58 +00:00
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
86393faf30
move krb5_set_error_string() and friend to deprecated.c
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25162 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-28 21:09:49 +00:00
fdae09119b
use KRB5_DEPRECATED
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24341 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-25 00:28:09 +00:00
0246db1c26
add back __attribute__
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24292 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-11 21:50:30 +00:00
2ac46110b6
use KRB5_DEPRECATED
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24291 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-11 21:50:20 +00:00
b49b5696f6
return Success instead of unknown error: 0
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24246 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-11 21:43:02 +00:00
418ed391ec
move deprecated
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23974 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-10-26 18:23:55 +00:00
51124e047e
document krb5_clear_error_string
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23919 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-10-14 02:57:12 +00:00
290236e471
add krb5_clear_error_message
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23907 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-10-14 02:54:49 +00:00
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
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
3d5dfddd91
strings should be i18n
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23768 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-07 21:20:55 +00:00
b5e0b4121e
deprecated functions
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23586 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-17 14:09:11 +00:00
e9639f8fbc
HEIMDAL_SMALLER includes no v4 compat functions.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23274 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-23 03:25:08 +00:00
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
7f9e3a7256
(krb5_free_error_message): unconst to avoid warning
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23203 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-05-29 02:12:56 +00:00
3dbe9c96df
(krb5_free_error_message): constify
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23202 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-05-29 02:12:42 +00:00
286895a962
Add krb5_get_error_message().
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23195 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-05-29 02:10:50 +00:00
35f21109ee
Cast krb5_error_code to int to avoid warning.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22988 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-15 15:55:09 +00:00
4854adc216
Make krb5_get_error_string return an allocated string to make the
...
function indempotent. From Zeqing (Fred) Xia.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22142 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-12-04 16:56:02 +00:00
8757ea7ba8
Doxygen documentation.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22026 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-11-10 10:36:37 +00:00
e4531fd61d
Change indentation, update (c)
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16746 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-02-16 07:49:23 +00:00
4ecc7c1493
Revert previous commit.
...
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16697 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-02-03 12:50:37 +00:00
07bb0509dd
(krb5_get_error_message): peek inside the context and make a copy of
...
the error string.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16696 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-02-03 12:47:01 +00:00
7b20682f7b
(krb5_get_error_message): new function, and combination of
...
krb5_get_error_string and krb5_get_err_text
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16693 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-02-03 12:36:45 +00:00