Commit Graph

89 Commits

Author SHA1 Message Date
Taylor R Campbell
9b61e64c3d krb5/changepw.c: Sprinkle const for global data never changed. 2023-06-20 12:19:48 -05:00
Joseph Sutton
f165d1e942 lib/krb5: Avoid undefined pointer arithmetic
If the AP len is large enough, we might end up computing an address
beyond the end of the 'reply' array, which is undefined behaviour.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
2022-09-16 15:43:44 -04:00
Russ Allbery
7b15a833a3 Set default principal for password change to credential client
The default client principal for krb5_set_password, if the
principal argument were NULL, was krb5_get_default_principal.  But
krb5_set_password requires credentials for the password change service
be passed in, and those credentials are already associated with a
client principal that's much more likely to be the correct choice for
a default.  Use that principal instead of krb5_get_default_principal.
2017-09-25 18:17:01 -05:00
Nicolas Williams
6a0f45c4d7 Use __attribute__ ((__name__)) form
Protect against macros named noreturn and so on.
2017-03-13 18:39:41 -04:00
Nicolas Williams
704a8a1d37 Don't use %zu
Eventually we'll need to make sure that a) libroken's stdint.h defines
the max integer types, b) the libroken *printf()s can handle all the
standard length and conversion specifiers.
2013-10-04 18:58:31 -04:00
Love Hornquist Astrand
50055fe3c4 bound data returned to size of buffer 2012-11-27 21:58:06 -08:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Love Hornquist Astrand
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
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
Asanka C. Herath
ca114a3323 Change function pointer types to match their use 2010-11-24 15:33:12 -05:00
Asanka C. Herath
45002e092c Use rk_socket_t in lib/krb5/changepw.c 2010-11-24 15:32:33 -05: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
a216e42696 deprecated warning 2009-11-22 16:13:37 -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
9b482be4a6 define KRB5_DEPRECATED
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25159 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-04-28 21:09:20 +00:00
Love Hörnquist Åstrand
d6fcbc45f9 spelling
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24902 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-03-22 17:20:28 +00:00
Love Hörnquist Åstrand
33ca6f1a26 dont increment p since its no longer used
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24854 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-27 03:30:19 +00:00
Love Hörnquist Åstrand
d17aa3e8fe drop temp variable
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24851 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-27 03:29:49 +00:00
Love Hörnquist Åstrand
f1a66a04b2 assign array instead of p++
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24850 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-27 03:29:39 +00:00
Love Hörnquist Åstrand
82d096d5a2 remove heimdal smaller, kadm5 needs it
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24538 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-30 16:46:06 +00:00
Love Hörnquist Åstrand
55734b0510 define
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24311 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-11 21:53:34 +00:00
Love Hörnquist Åstrand
04833d6fbe use KRB5_DEPRECATED
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24287 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-11 21:49:42 +00:00
Love Hörnquist Åstrand
785ef0a557 hide find_chpw_proto under HEIMDAL_SMALLER
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23980 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-10-26 18:25:01 +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
4384fb0209 use SOCK_CLOEXEC
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23517 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-08-11 10:01:38 +00:00
Love Hörnquist Åstrand
3c012ef3fc close-on-exec
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23445 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-07-27 12:08:03 +00:00
Love Hörnquist Åstrand
06e2c6e17e Doxygen, deprecate krb5_change_password.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23277 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-06-23 03:25:36 +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
6752ef7fbd simplify
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22860 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-04-07 18:49:44 +00:00
Love Hörnquist Åstrand
ebdac0dcf0 Fix pointer vs strict alias rules.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21505 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-07-12 12:28:38 +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
b15b04eadd If there is a target principal, use the realm of the realm to change
the password with,


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16384 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-12-12 12:48:57 +00:00
Love Hörnquist Åstrand
2c714acde1 Constify password.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16046 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-09-08 11:38:01 +00:00
Love Hörnquist Åstrand
b612b2b0c8 update copyright
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15234 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-25 05:30:42 +00:00
Love Hörnquist Åstrand
223f4ceb07 (change_password_loop): on failing to find a kdc, set result_code to
KRB5_KPASSWD_HARDERROR


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14440 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-01-04 09:39:45 +00:00
Love Hörnquist Åstrand
64f52007a7 make procs static
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14418 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-12-29 01:53:34 +00:00
Love Hörnquist Åstrand
5d57b23ece (process_reply): cast ssize_t to long and print that
From NetBSD via Havard Eidnes.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14038 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-07-14 03:03:21 +00:00
Love Hörnquist Åstrand
36fc0ea221 implement krb5_set_password_using_ccache
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13908 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-06-02 19:21: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
Love Hörnquist Åstrand
de787b6b66 add tcp support to the set protocol, should be cleaned up to enable
sharing code with krb5_sendto


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13661 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-03-31 14:03:38 +00:00
Love Hörnquist Åstrand
601b8fcfa3 (process_reply): log into result_string if something goes bad, return
0 (even on failure), not the KPASSWD protocol error code


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@13420 ec53bebd-3082-4978-b11e-865c3cabbd6b
2004-03-03 22:14:47 +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
9aaf686b2a (setpw_send_request): free ap_req_data on failure
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12942 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-10-02 14:39:22 +00:00
Love Hörnquist Åstrand
68ba8507a5 revert previous
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12333 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-05-26 21:59:54 +00:00
Love Hörnquist Åstrand
cb584f6348 pacify mdoclink
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12331 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-05-26 21:56:28 +00:00
Love Hörnquist Åstrand
3dcad24844 ooops, remove cut and paste error
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12272 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-05-13 12:32:59 +00:00
Love Hörnquist Åstrand
052858243f draft-ietf-cat-kerb-chg-password-02 and rfc3244 share the response packet
sure more constants now that they exists


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12270 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-05-13 11:28:39 +00:00