Commit Graph

87 Commits

Author SHA1 Message Date
Minsoo Choo
aff90c322e Fix spelling 2024-06-16 23:30:48 -04:00
Taylor R Campbell
e75e549252 Use AI_NUMERICSERV if block_dns, and use local getaddrinfo to audit.
This change has two parts:

1. Provide our own local implementation of numeric-only getaddrinfo
   in auditdns.c used to audit for DNS leaks, rather than deferring
   to dlsym(RTLD_NEXT, "getaddrinfo"), in terms of inet_pton.

   To keep review and implementation simple, this is limited to
   AI_NUMERICHOST _and_ AI_NUMERICSERV -- this requires that we
   arrange to pass AI_NUMERICSERV in callers too.

2. Wherever we implement block_dns, set AI_NUMERICSERV in addition to
   AI_NUMERICHOST as needed by the new auditdns.c getaddrinfo.

   (In principle this might also avoid other network leaks -- POSIX
   guarantees no name resolution service will be invoked, and gives
   NIS+ as an example.)

   One tiny semantic change to avoid tripping over the auditor:
   kadmin(8) now uses the string "749" rather than the string
   "kerberos-adm".  (Currently we don't audit kadmin(8) for DNS leaks
   but let's avoid leaving a rake to step on.)  Every other caller I
   found is already guaranteed to pass a numeric service rather than
   named service to getaddrinfo.

fix https://github.com/heimdal/heimdal/issues/1212
2024-01-09 16:06:32 -06:00
Taylor R Campbell
fd77c4000d Ensure all calls to getaddrinfo are headed by a block_dns check.
If block_dns is set, call getaddrinfo with AI_NUMERICHOST set and
AI_CANONNAME clear.

Some paths may not have set AI_CANONNAME, but it's easier to audit
this way when the getaddrinfo prelude is uniform across call sites,
and the compiler can optimize it away.
2024-01-08 10:22:02 -06:00
Taylor R Campbell
043bb8f27d krb5/addr_families.c: Sprinkle const for global data never changed. 2023-06-20 12:19:48 -05:00
Nicolas Williams
1eda4920c8 krb5: Fix coverity warnings 2022-01-19 23:38:27 -06:00
Jeffrey Altman
041f6d5c7c lib\krb5: krb5_parse_address out of order parameters
fix the order of parameters passed to krb5_eai_to_heim_errno

Change-Id: I31271283f3f31fcb0345dd766bc511825ddd362d
2022-01-16 00:51:22 -05:00
Nicolas Williams
fb553dde1d krb5: Fix warnings 2022-01-14 17:10:16 -06:00
Nicolas Williams
16d6bda3aa krb5: Add _krb5_parse_address_no_lookup() 2021-04-14 19:27:21 -05:00
Viktor Dukhovni
5bbe7c8dc6 Implement forwarding of leaf TGTs to selected realms.
Refactor and enhance TGT forwarding to allow forwarding of leaf
(destination) TGTs for selected destination realms.

Enhance kinit(1) to renew non-origin realm tickets

Document delegate-destination-tgt

Use the newly implemented _krb5_mk_1cred().
2019-10-30 16:20:58 -05:00
Andreas Schneider
122226c3f3 heimdal: Fix size types and array access
This fixes compilation with -Wstrict-overflow=2.

with CFLAGS="-O3 -Werror=strict-overflow -Wstrict-overflow=2"
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.10) gives:

addr_families.c: In function ‘krb5_sockaddr2address’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:851:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_sockaddr2address (krb5_context context,
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_sockaddr2port’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:879:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_sockaddr2port (krb5_context context,
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_addr2sockaddr’:
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:914:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_addr2sockaddr (krb5_context context,
 ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_max_sockaddr_size’:
addr_families.c:955:2: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
  for(a = at; a < at + num_addrs; ++a)
  ^
addr_families.c:950:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_max_sockaddr_size (void)
 ^
addr_families.c:955:2: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
  for(a = at; a < at + num_addrs; ++a)
  ^
addr_families.c:955:2: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c:955:2: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_sockaddr_uninteresting’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:974:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_sockaddr_uninteresting(const struct sockaddr *sa)
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_sockaddr_is_loopback’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:983:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_sockaddr_is_loopback(const struct sockaddr *sa)
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_h_addr2sockaddr’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1011:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_h_addr2sockaddr (krb5_context context,
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_h_addr2addr’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1042:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_h_addr2addr (krb5_context context,
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_anyaddr’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1073:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_anyaddr (krb5_context context,
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_print_address’:
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1108:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_print_address (const krb5_address *addr,
 ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_address_order’:
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1238:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_address_order(krb5_context context,
 ^
addr_families.c:1238:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c: In function ‘krb5_free_address’:
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1333:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_free_address(krb5_context context,
 ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_copy_address’:
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1383:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_copy_address(krb5_context context,
 ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:820:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
addr_families.c: In function ‘krb5_address_prefixlen_boundary’:
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:1537:1: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
 krb5_address_prefixlen_boundary(krb5_context context,
 ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
     for (a = at; a < at + num_addrs; ++a)
     ^
addr_families.c:831:5: warning: assuming pointer wraparound does not occur when comparing P +- C1 with P +- C2 [-Wstrict-overflow]
  CC       libkrb5_la-config_file.lo

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(Similar to Samba commit aa17db1f4061920512396032fcd3c7c8a4a8f38f)
2018-12-20 12:52:12 +11:00
Rok Papež, ARNES
59b8f4ff84 ipv6 loopbacks fix for GNU libc getaddrinfo()
On any OS with a properly implemented getaddrinfo() this change is a
no-op. Passing NULL for the hint is supposed to be the same as an
addrinfo structure with all fields set to 0. There is no need to set
ai_family to AF_UNSPEC because that value is already 0.

GNU libc doesn't follow standard behaviour. Quoting from
http://man7.org/linux/man-pages/man3/getaddrinfo.3.html :

  "Specifying hints as NULL is equivalent to setting ai_socktype and
  ai_protocol to 0; ai_family to AF_UNSPEC; and ai_flags to
  (AI_V4MAPPED | AI_ADDRCONFIG). (POSIX specifies different defaults for
  ai_flags; see NOTES.)"

The NOTES section says:

  "According to POSIX.1-2001, specifying hints as NULL should cause
  ai_flags to be assumed as 0. The GNU C library instead assumes a value
  of (AI_V4MAPPED | AI_ADDRCONFIG) for this case, since this value is
  considered an improvement on the specification."

The patch makes sure that krb5_parse_address works consistently on both
GNU libc and systems that follow POSIX.1-2001 to the letter. Some
incorrect Fedora 17 patches managed to break IPv6 connectivity and were
later backed out (see discussion at https://bugzilla.redhat.com/808147).
This patch resolves the incompatibility.

Signed-off-by: Ken Dreyer <ktdreyer@ktdreyer.com>
2015-01-25 13:51:41 -07:00
Roland C. Dowdeswell
f0f07ff408 Use krb5_enomem() more consistently in lib/krb5. 2013-02-13 16:15:00 +08:00
Roland C. Dowdeswell
c2ea171a9c Fix a typo: ai should have been a. 2012-07-04 20:07:45 +01:00
Roland C. Dowdeswell
cc47c8fa7b Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues.
We turn on a few extra warnings and fix the fallout that occurs
when building with --enable-developer.  Note that we get different
warnings on different machines and so this will be a work in
progress.  So far, we have built on NetBSD/amd64 5.99.64 (which
uses gcc 4.5.3) and Ubuntu 10.04.3 LTS (which uses gcc 4.4.3).

Notably, we fixed

	1.  a lot of missing structure initialisers,

	2.  unchecked return values for functions that glibc
	    marks as __attribute__((warn-unused-result)),

	3.  made minor modifications to slc and asn1_compile
	    which can generate code which generates warnings,
	    and

	4.  a few stragglers here and there.

We turned off the extended warnings for many programs in appl/ as
they are nearing the end of their useful lifetime, e.g.  rsh, rcp,
popper, ftp and telnet.

Interestingly, glibc's strncmp() macro needed to be worked around
whereas the function calls did not.

We have not yet tried this on 32 bit platforms, so there will be
a few more warnings when we do.
2012-02-20 19:45:41 +00:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -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
Love Hornquist Astrand
f632c5239e one element per line 2011-04-14 12:54:16 -07:00
Love Hornquist Astrand
f1718af272 make work again after adding loopback addresses 2011-04-07 07:15:27 -07:00
Nicolas Williams
e7672a71aa Patch to include non-loopback addresses from loopback interfaces.
Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
2011-04-04 22:45:33 -07:00
Love Hornquist Astrand
687db64c56 Patch from Secure Endpoints/Asanka Herath for windows support 2009-12-21 08:45:28 +01: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
269ddbd09e dont increment p since its no longer used
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24853 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-02-27 03:30:09 +00:00
Love Hörnquist Åstrand
a45c993c88 make sure all addresses are added
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24158 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 05:09:38 +00:00
Love Hörnquist Åstrand
ecdf7c3d88 plug memory leak when we find a dup adress
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24153 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 05:08:47 +00:00
Love Hörnquist Åstrand
f9120fced8 check return value, cid#62
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24143 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 05:07:04 +00:00
Love Hörnquist Åstrand
fc1e83044e RANGE: is not small
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23988 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-10-26 18:26:28 +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
f505cc2b8a update (c)
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22039 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-11-10 11:47:35 +00:00
Love Hörnquist Åstrand
04e78ccc37 doxygen documentation
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22038 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-11-10 10:50:38 +00:00
Love Hörnquist Åstrand
4505c1fee6 (arange_free): Try to not leak memory.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18805 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-22 06:54:00 +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
03f05a7a6e (krb5_make_addrport): clear return value on error, found by IBM checker.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16955 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-04-02 02:17:31 +00:00
Love Hörnquist Åstrand
08687cb067 (krb5_free_addresses): reset val,len in address when free-ing.
Fixes Coverity NetBSD bug #2605
(krb5_parse_address): reset val,len before possibly return errors
Fixes Coverity NetBSD bug #2605


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16793 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-03-17 22:12:13 +00:00
Love Hörnquist Åstrand
31a2c01297 use rk_UNCONST to silence const warning
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15444 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-16 20:16:12 +00:00
Love Hörnquist Åstrand
38f3241d93 rename sin to sin4
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15443 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-06-16 20:10:34 +00:00
Love Hörnquist Åstrand
e84fad2e0e zero out content of all krb5_free_x_content like functions to make sure data doesnt get reused, idea from Wynn Wilkes <wwilkes@vintela.com>
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15167 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-18 04:21:57 +00:00
Love Hörnquist Åstrand
db171a26fd (krb5_print_address): catch when the custom print v6-adresss don't fit
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@15098 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-05-07 07:50:24 +00:00
Love Hörnquist Åstrand
e869931f80 catch two more snprintf problems
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14877 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-21 06:37:36 +00:00
Love Hörnquist Åstrand
a76ce26d04 check return values from snprintf and clean up semantics of ret_len
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14853 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-19 18:43:12 +00:00
Love Hörnquist Åstrand
8663e85292 (krb5_address_prefixlen_boundary,krb5_free_address): use find_atype
when we are dealing with a kerberos address type


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14726 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-04-04 12:04:41 +00:00
Love Hörnquist Åstrand
1fffb1a13a implement mask boundary for IPv6
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14703 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-03-31 00:11:14 +00:00
Love Hörnquist Åstrand
90fff550fa make RANGE parse prefixlen style addresses too, fix printing of RANGE
addresses, add krb5_address_prefixlen_boundary


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14690 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-03-28 19:16:43 +00:00
Love Hörnquist Åstrand
69a18af8ac (krb5_parse_address): filter out dup addresses from getaddrinfo
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14479 ec53bebd-3082-4978-b11e-865c3cabbd6b
2005-01-05 17:36:11 +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
006f2206ef (krb5_print_address): make sure print_addr is defined for the given
address type; make addrports printable


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11911 ec53bebd-3082-4978-b11e-865c3cabbd6b
2003-03-25 12:37:02 +00:00