krb5: Apply patches to build under FreeBSD

These patches fix the MIT KRB5 on FreeBSD. Some are obtained from
ports/security/krb5-121.

Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Cy Schubert
2025-06-04 19:50:35 -07:00
parent 7f2fe78b9d
commit 55f9c25f17
4 changed files with 20 additions and 0 deletions
@@ -27,6 +27,7 @@
#include "scc.h"
krb5_data client1 = {
0,
#define DATA "client1-comp1"
sizeof(DATA),
DATA,
@@ -34,6 +35,7 @@ krb5_data client1 = {
};
krb5_data client2 = {
0,
#define DATA "client1-comp2"
sizeof(DATA),
DATA,
@@ -41,6 +43,7 @@ krb5_data client2 = {
};
krb5_data server1 = {
0,
#define DATA "server1-comp1"
sizeof(DATA),
DATA,
@@ -48,6 +51,7 @@ krb5_data server1 = {
};
krb5_data server2 = {
0,
#define DATA "server1-comp2"
sizeof(DATA),
DATA,
+10
View File
@@ -176,6 +176,7 @@ printaddr(struct sockaddr *sa)
}
#endif
#if 0
static int
is_loopback_address(struct sockaddr *sa)
{
@@ -192,6 +193,7 @@ is_loopback_address(struct sockaddr *sa)
return 0;
}
}
#endif
#ifdef HAVE_IFADDRS_H
#include <ifaddrs.h>
@@ -449,12 +451,14 @@ foreach_localaddr (/*@null@*/ void *data,
ifp->ifa_flags &= ~IFF_UP;
continue;
}
#if 0
if (is_loopback_address(ifp->ifa_addr)) {
/* Pretend it's not up, so the second pass will skip
it. */
ifp->ifa_flags &= ~IFF_UP;
continue;
}
#endif
/* If this address is a duplicate, punt. */
match = 0;
for (ifp2 = ifp_head; ifp2 && ifp2 != ifp; ifp2 = ifp2->ifa_next) {
@@ -583,11 +587,13 @@ foreach_localaddr (/*@null@*/ void *data,
}
/*@=moduncon@*/
#if 0
/* None of the current callers want loopback addresses. */
if (is_loopback_address((struct sockaddr *)&lifr->lifr_addr)) {
Tprintf ((" loopback\n"));
goto skip;
}
#endif
/* Ignore interfaces that are down. */
if ((lifreq.lifr_flags & IFF_UP) == 0) {
Tprintf ((" down\n"));
@@ -754,11 +760,13 @@ foreach_localaddr (/*@null@*/ void *data,
}
/*@=moduncon@*/
#if 0
/* None of the current callers want loopback addresses. */
if (is_loopback_address(&lifr->iflr_addr)) {
Tprintf ((" loopback\n"));
goto skip;
}
#endif
/* Ignore interfaces that are down. */
if ((lifreq.iflr_flags & IFF_UP) == 0) {
Tprintf ((" down\n"));
@@ -972,11 +980,13 @@ foreach_localaddr (/*@null@*/ void *data,
}
/*@=moduncon@*/
#if 0
/* None of the current callers want loopback addresses. */
if (is_loopback_address(&ifreq.ifr_addr)) {
Tprintf ((" loopback\n"));
goto skip;
}
#endif
/* Ignore interfaces that are down. */
if ((ifreq.ifr_flags & IFF_UP) == 0) {
Tprintf ((" down\n"));
+4
View File
@@ -14,6 +14,9 @@
#include <termios.h>
#include <sys/param.h>
#ifdef __FreeBSD__
#include <edit/readline/readline.h>
#else
#if defined(HAVE_LIBEDIT)
#include <editline/readline.h>
#elif defined(HAVE_READLINE)
@@ -22,6 +25,7 @@
#else
#define NO_READLINE
#endif
#endif
static ss_data *current_info;
static jmp_buf listen_jmpb;
+2
View File
@@ -85,7 +85,9 @@ typedef struct _ss_data { /* init values */
#define ss_current_request(sci_idx,code_ptr) \
(*code_ptr=0,ss_info(sci_idx)->current_request)
void ss_unknown_function();
#ifndef __FreeBSD__
void ss_delete_info_dir();
#endif
char **ss_parse (int, char *, int *);
ss_abbrev_info *ss_abbrev_initialize (char *, int *);
void ss_page_stdin (void);