35 Commits

Author SHA1 Message Date
Nicolas Williams
6b2e65592d krb5: Limit AP-REQs to 1MB in krb5_recvauth*() 2023-01-04 02:03:12 -06:00
Nicolas Williams
5f63215d0d Always perform == or != operation on cmp function result
Although not required to address bad code generation in
some versions of gcc 9 and 10, a coding style that requires
explicit comparison of the result to zero before use is
both clearer and would have avoided the generation of bad
code.

This change converts all use of cmp function usage from

```
    if (strcmp(a, b) || !strcmp(c, d)) ...
```

to

```
    if (strcmp(a, b) != 0 || strcmp(c, d)) == 0
```

for all C library cmp functions and related:

 - strcmp(), strncmp()
 - strcasecmp(), strncasecmp()
 - stricmp(), strnicmp()
 - memcmp()

Change-Id: Ic60c15e1e3a07e4faaf10648eefe3adae2543188
2021-11-24 22:30:44 -05:00
Nicolas Williams
e5126ab924 Fix warnings 2016-11-28 17:34:44 -06:00
Roland C. Dowdeswell
f0f07ff408 Use krb5_enomem() more consistently in lib/krb5. 2013-02-13 16:15:00 +08:00
Marco Molteni
894008ab82 Add doxygen and source comments to some functions of the krb5 API
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2012-05-09 08:15:42 +02: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
11024751a5 make compile 2009-07-30 14:25:12 +02:00
Love Hornquist Astrand
dc95a7983d Release ticket on failure [CID-96] 2009-07-30 11:59:15 +02: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
b9bb902b10 N_()ify
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23799 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-07 21:34:22 +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
6c91858ada use krb5_set_error_message
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23306 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-23 03:30:13 +00:00
Love Hörnquist Åstrand
25fc4d469a Set error string.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20306 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-11 11:15:55 +00:00
Love Hörnquist Åstrand
348b5d79c4 Rename u_intXX_t to uintXX_t
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17442 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-05-05 09:31:15 +00:00
Love Hörnquist Åstrand
61b5a1a5df indent
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17206 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-24 10:16:36 +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
Johan Danielsson
b46a52bdfc constify
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10920 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-04-18 09:41:33 +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
7779a4a109 handle new krb5_mk_error
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9767 ec53bebd-3082-4978-b11e-865c3cabbd6b
2001-03-26 01:40:07 +00:00
Johan Danielsson
835f8fc8e0 de-pointerise auth_context parameter to krb5_mk_rep
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9290 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-12-06 21:03:34 +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
Johan Danielsson
eb9b5533bf new function `krb5_recvauth_match_version' that allows more
intelligent matching of the application version


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7036 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-09-27 12:17:35 +00:00
Assar Westerlund
5381567d9b (krb5_recvauth): only look at errno if krb5_net_read actually returns
-1


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6828 ec53bebd-3082-4978-b11e-865c3cabbd6b
1999-08-16 12:46:22 +00:00
Assar Westerlund
c264b952a5 fix calls to krb5_net_{read,write}
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3910 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-11-11 01:37:57 +00:00
Assar Westerlund
e7c1c64676 (krb5_recvauth): Send a KRB-ERROR iff there's an error.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3065 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-08-20 15:41:08 +00:00
Assar Westerlund
5e643f477e Set addresses in auth_context if there aren't any
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2953 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-08-12 15:53:52 +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
Assar Westerlund
64d780ce58 Use krb5_{read,write}_message
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2338 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-16 01:15:03 +00:00
Assar Westerlund
0d38e68dba KRB5_RECVAUTH_IGNORE_VERSION
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1967 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-07-05 01:38:12 +00:00
Assar Westerlund
1b71d5fdd8 comment
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1808 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-06-01 14:38:32 +00:00
Assar Westerlund
c688f33a4b stupid comment
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1578 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-04-13 22:16:19 +00:00
Assar Westerlund
32a4567759 new files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1434 ec53bebd-3082-4978-b11e-865c3cabbd6b
1997-03-16 17:14:53 +00:00