32 Commits

Author SHA1 Message Date
Taylor R Campbell
2db6c29a3e krb5/mk_error.c: Constify and rk_UNCONST a static buffer.
This is almost certainly intended never to be written to, so let's
let the operating system detect that mistake for us by mapping it in
a .rodata segment mapped read-only that will cause SIGSEGV on write.

fix https://github.com/heimdal/heimdal/issues/1136
2023-06-20 12:19:48 -05:00
Stefan Metzmacher
25f3db919f lib/krb5: add krb5_mk_error_ext() helper function
This gives the caller the ability to skip the client_name
and only provide client_realm. This is required for
KDC_ERR_WRONG_REALM messages.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2015-07-31 17:30:23 +12:00
Jeffrey Altman
6850d6a65f avoid uninit variable and unreachable code warnings
most of these warnings are not problems because of ample
use of abort() calls.  However, the large number of warnings
makes it difficult to identify real problems.  Initialize
the variables to shut up the compilers.

Change-Id: I8477c11b17c7b6a7d9074c721fdd2d7303b186a8
2011-05-17 12:02:16 -04: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
Love Hornquist Astrand
687db64c56 Patch from Secure Endpoints/Asanka Herath for windows support 2009-12-21 08:45:28 +01:00
Love Hornquist Astrand
7d6291e128 set pointer before freeing 2009-11-03 23:34:48 -08:00
Love Hornquist Astrand
d639f7d881 use krb5_get_error_message() 2009-11-03 22:25:55 -08: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
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
b1efe15c20 use rk_UNCONST
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15457 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-16 21:16:40 +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
283630104a prefix libasn1 types with heim_
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12439 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-07-15 14:05:49 +00:00
Love Hörnquist Åstrand
f02872a9c1 (krb5_mk_error): pass in a krb5_timestamp to krb5_us_timeofday
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12391 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-06-22 20:47:14 +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
35acfcea24 rename ctime parameter to client_time
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10896 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-03-27 09:29:43 +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
a1e438f351 (krb5_mk_error): allow specifying both ctime and cusec
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9762 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-03-26 00:51:44 +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
ae0bcd7f73 (krb5_mk_error): realloc until you die
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5104 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-07-30 16:12:15 +00:00
Johan Danielsson
131a081871 Verify that error_code is in the range [0,127].
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4640 ec53bebd-3082-4978-b11e-865c3cabbd6b
1998-03-21 22:12:04 +00:00
Assar Westerlund
f93ce02560 free some more memory. check some more return values.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4021 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-11-16 09:49:56 +00:00
Johan Danielsson
0c311e02c1 fix: allow NULL server
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3462 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-09-10 19:20:58 +00:00
Assar Westerlund
6fd5ea4f86 use krb5_timeofday and krb5_us_timeofday
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2927 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-08-11 23:35:31 +00:00
Assar Westerlund
04738fd3c4 (krb5_mk_error): return an error number and not a comerr'd number.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2591 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-24 07:21:27 +00:00
Assar Westerlund
b76abe1162 use gettimeofday
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2502 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-20 14:39:34 +00:00
Johan Danielsson
5a32a5c8e7 Add copyright notice.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2389 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-16 21:40:05 +00:00
Johan Danielsson
884b9012ab Remove non ASN.1 principal code.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2354 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-16 01:37:19 +00:00
Johan Danielsson
8aa792e17d Add more fields.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2343 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-16 01:18:37 +00:00
Johan Danielsson
405d2be7c4 Update to use new decode/encode syntax.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1952 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-01 23:54:55 +00:00
Johan Danielsson
de43cd185b Replace contents with keyvalue. Prepare for use of asn1-types.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1890 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-06-10 14:25:15 +00:00
Johan Danielsson
47e0272106 Make a KRB-ERROR message.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1849 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-06-07 17:36:47 +00:00