mirror of
git://anongit.mindrot.org/openssh.git
synced 2025-01-03 00:02:05 +00:00
Strip trailing whitespace.
Mechanically strip trailing whitespace on files not synced with OpenBSD (or in the case of bsd-snprint.c, rsync).
This commit is contained in:
parent
30f9bd1c09
commit
c20dccb561
@ -36,7 +36,7 @@ libopenbsd-compat.a: $(COMPAT) $(OPENBSD) $(PORTS)
|
|||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *.a core
|
rm -f *.o *.a core
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f Makefile *~
|
rm -f Makefile *~
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
#ifndef HAVE___B64_NTOP
|
#ifndef HAVE___B64_NTOP
|
||||||
# ifndef HAVE_B64_NTOP
|
# ifndef HAVE_B64_NTOP
|
||||||
int b64_ntop(u_char const *src, size_t srclength, char *target,
|
int b64_ntop(u_char const *src, size_t srclength, char *target,
|
||||||
size_t targsize);
|
size_t targsize);
|
||||||
# endif /* !HAVE_B64_NTOP */
|
# endif /* !HAVE_B64_NTOP */
|
||||||
# define __b64_ntop(a,b,c,d) b64_ntop(a,b,c,d)
|
# define __b64_ntop(a,b,c,d) b64_ntop(a,b,c,d)
|
||||||
|
@ -78,7 +78,7 @@ int asprintf(char **str, const char *fmt, ...)
|
|||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
*str = NULL;
|
*str = NULL;
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
ret = vasprintf(str, fmt, ap);
|
ret = vasprintf(str, fmt, ap);
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* $Id: bsd-cray.c,v 1.17 2007/08/15 09:17:43 dtucker Exp $
|
* $Id: bsd-cray.c,v 1.17 2007/08/15 09:17:43 dtucker Exp $
|
||||||
*
|
*
|
||||||
* bsd-cray.c
|
* bsd-cray.c
|
||||||
*
|
*
|
||||||
* Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>)
|
* Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>)
|
||||||
* Significant portions provided by
|
* Significant portions provided by
|
||||||
* Wayne Schroeder, SDSC <schroeder@sdsc.edu>
|
* Wayne Schroeder, SDSC <schroeder@sdsc.edu>
|
||||||
* William Jones, UTexas <jones@tacc.utexas.edu>
|
* William Jones, UTexas <jones@tacc.utexas.edu>
|
||||||
*
|
*
|
||||||
@ -268,7 +268,7 @@ cray_setup (uid_t uid, char *username, const char *command)
|
|||||||
usent.uname = username;
|
usent.uname = username;
|
||||||
usent.host = hostname;
|
usent.host = hostname;
|
||||||
usent.ttyn = ttyn;
|
usent.ttyn = ttyn;
|
||||||
usent.caller = IA_SSHD;
|
usent.caller = IA_SSHD;
|
||||||
usent.pswdlist = &pwdacm;
|
usent.pswdlist = &pwdacm;
|
||||||
usent.ueptr = &ue;
|
usent.ueptr = &ue;
|
||||||
usent.flags = IA_INTERACTIVE | IA_FFLAG;
|
usent.flags = IA_INTERACTIVE | IA_FFLAG;
|
||||||
@ -352,7 +352,7 @@ cray_setup (uid_t uid, char *username, const char *command)
|
|||||||
/*
|
/*
|
||||||
* These are failed return codes from ia_user()
|
* These are failed return codes from ia_user()
|
||||||
*/
|
*/
|
||||||
switch (ia_rcode)
|
switch (ia_rcode)
|
||||||
{
|
{
|
||||||
case IA_BADAUTH:
|
case IA_BADAUTH:
|
||||||
printf("Bad authorization, access denied.\n");
|
printf("Bad authorization, access denied.\n");
|
||||||
@ -407,7 +407,7 @@ cray_setup (uid_t uid, char *username, const char *command)
|
|||||||
*/
|
*/
|
||||||
ia_failure(&fsent, &fret);
|
ia_failure(&fsent, &fret);
|
||||||
|
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ia_mlsrcode = IA_NORMAL;
|
ia_mlsrcode = IA_NORMAL;
|
||||||
@ -441,7 +441,7 @@ cray_setup (uid_t uid, char *username, const char *command)
|
|||||||
* There is no return because ia_failure exits.
|
* There is no return because ia_failure exits.
|
||||||
*/
|
*/
|
||||||
ia_failure(&fsent,&fret);
|
ia_failure(&fsent,&fret);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Provide login status information */
|
/* Provide login status information */
|
||||||
@ -526,7 +526,7 @@ cray_setup (uid_t uid, char *username, const char *command)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
valid_acct = nam2acid(acct_name);
|
valid_acct = nam2acid(acct_name);
|
||||||
if (valid_acct == -1)
|
if (valid_acct == -1)
|
||||||
printf(
|
printf(
|
||||||
"Account id not found for"
|
"Account id not found for"
|
||||||
" account name \"%s\"\n\n",
|
" account name \"%s\"\n\n",
|
||||||
@ -576,9 +576,9 @@ cray_setup (uid_t uid, char *username, const char *command)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Now set shares, quotas, limits, including CPU time for the
|
* Now set shares, quotas, limits, including CPU time for the
|
||||||
* (interactive) job and process, and set up permissions
|
* (interactive) job and process, and set up permissions
|
||||||
* (for chown etc), etc.
|
* (for chown etc), etc.
|
||||||
*/
|
*/
|
||||||
if (setshares(ue.ue_uid, valid_acct, printf, 0, 0)) {
|
if (setshares(ue.ue_uid, valid_acct, printf, 0, 0)) {
|
||||||
@ -656,7 +656,7 @@ drop_cray_privs()
|
|||||||
usrv.sv_minlvl = sysv.sy_minlvl;
|
usrv.sv_minlvl = sysv.sy_minlvl;
|
||||||
usrv.sv_actlvl = sysv.sy_minlvl;
|
usrv.sv_actlvl = sysv.sy_minlvl;
|
||||||
usrv.sv_maxlvl = sysv.sy_maxlvl;
|
usrv.sv_maxlvl = sysv.sy_maxlvl;
|
||||||
}
|
}
|
||||||
usrv.sv_actcmp = 0;
|
usrv.sv_actcmp = 0;
|
||||||
usrv.sv_valcmp = sysv.sy_valcmp;
|
usrv.sv_valcmp = sysv.sy_valcmp;
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>)
|
* Copyright (c) 2002, Cray Inc. (Wendy Palm <wendyp@cray.com>)
|
||||||
* Significant portions provided by
|
* Significant portions provided by
|
||||||
* Wayne Schroeder, SDSC <schroeder@sdsc.edu>
|
* Wayne Schroeder, SDSC <schroeder@sdsc.edu>
|
||||||
* William Jones, UTexas <jones@tacc.utexas.edu>
|
* William Jones, UTexas <jones@tacc.utexas.edu>
|
||||||
*
|
*
|
||||||
|
@ -39,12 +39,12 @@
|
|||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
binary_open(const char *filename, int flags, ...)
|
binary_open(const char *filename, int flags, ...)
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
mode_t mode;
|
mode_t mode;
|
||||||
|
|
||||||
va_start(ap, flags);
|
va_start(ap, flags);
|
||||||
mode = va_arg(ap, mode_t);
|
mode = va_arg(ap, mode_t);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
@ -70,7 +70,7 @@ int setlogin(const char *name)
|
|||||||
#endif /* !HAVE_SETLOGIN */
|
#endif /* !HAVE_SETLOGIN */
|
||||||
|
|
||||||
#ifndef HAVE_INNETGR
|
#ifndef HAVE_INNETGR
|
||||||
int innetgr(const char *netgroup, const char *host,
|
int innetgr(const char *netgroup, const char *host,
|
||||||
const char *user, const char *domain)
|
const char *user, const char *domain)
|
||||||
{
|
{
|
||||||
return (0);
|
return (0);
|
||||||
@ -96,7 +96,7 @@ const char *strerror(int e)
|
|||||||
{
|
{
|
||||||
extern int sys_nerr;
|
extern int sys_nerr;
|
||||||
extern char *sys_errlist[];
|
extern char *sys_errlist[];
|
||||||
|
|
||||||
if ((e >= 0) && (e < sys_nerr))
|
if ((e >= 0) && (e < sys_nerr))
|
||||||
return (sys_errlist[e]);
|
return (sys_errlist[e]);
|
||||||
|
|
||||||
@ -111,10 +111,10 @@ int utimes(char *filename, struct timeval *tvp)
|
|||||||
|
|
||||||
ub.actime = tvp[0].tv_sec;
|
ub.actime = tvp[0].tv_sec;
|
||||||
ub.modtime = tvp[1].tv_sec;
|
ub.modtime = tvp[1].tv_sec;
|
||||||
|
|
||||||
return (utime(filename, &ub));
|
return (utime(filename, &ub));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_TRUNCATE
|
#ifndef HAVE_TRUNCATE
|
||||||
int truncate(const char *path, off_t length)
|
int truncate(const char *path, off_t length)
|
||||||
@ -149,9 +149,9 @@ int nanosleep(const struct timespec *req, struct timespec *rem)
|
|||||||
saverrno = errno;
|
saverrno = errno;
|
||||||
(void) gettimeofday (&tstop, NULL);
|
(void) gettimeofday (&tstop, NULL);
|
||||||
errno = saverrno;
|
errno = saverrno;
|
||||||
tremain.tv_sec = time2wait.tv_sec -
|
tremain.tv_sec = time2wait.tv_sec -
|
||||||
(tstop.tv_sec - tstart.tv_sec);
|
(tstop.tv_sec - tstart.tv_sec);
|
||||||
tremain.tv_usec = time2wait.tv_usec -
|
tremain.tv_usec = time2wait.tv_usec -
|
||||||
(tstop.tv_usec - tstart.tv_usec);
|
(tstop.tv_usec - tstart.tv_usec);
|
||||||
tremain.tv_sec += tremain.tv_usec / 1000000L;
|
tremain.tv_sec += tremain.tv_usec / 1000000L;
|
||||||
tremain.tv_usec %= 1000000L;
|
tremain.tv_usec %= 1000000L;
|
||||||
|
@ -49,7 +49,7 @@ int setegid(uid_t);
|
|||||||
|
|
||||||
#if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR)
|
#if !defined(HAVE_STRERROR) && defined(HAVE_SYS_ERRLIST) && defined(HAVE_SYS_NERR)
|
||||||
const char *strerror(int);
|
const char *strerror(int);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(HAVE_SETLINEBUF)
|
#if !defined(HAVE_SETLINEBUF)
|
||||||
#define setlinebuf(a) (setvbuf((a), NULL, _IOLBF, 0))
|
#define setlinebuf(a) (setvbuf((a), NULL, _IOLBF, 0))
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include "bsd-nextstep.h"
|
#include "bsd-nextstep.h"
|
||||||
|
|
||||||
pid_t
|
pid_t
|
||||||
posix_wait(int *status)
|
posix_wait(int *status)
|
||||||
{
|
{
|
||||||
union wait statusp;
|
union wait statusp;
|
||||||
|
@ -122,7 +122,7 @@ openpty(int *amaster, int *aslave, char *name, struct termios *termp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Try to push the appropriate streams modules, as described
|
* Try to push the appropriate streams modules, as described
|
||||||
* in Solaris pts(7).
|
* in Solaris pts(7).
|
||||||
*/
|
*/
|
||||||
ioctl(*aslave, I_PUSH, "ptem");
|
ioctl(*aslave, I_PUSH, "ptem");
|
||||||
@ -184,7 +184,7 @@ openpty(int *amaster, int *aslave, char *name, struct termios *termp,
|
|||||||
struct termios tio;
|
struct termios tio;
|
||||||
|
|
||||||
for (i = 0; i < num_ptys; i++) {
|
for (i = 0; i < num_ptys; i++) {
|
||||||
snprintf(ptbuf, sizeof(ptbuf), "/dev/pty%c%c",
|
snprintf(ptbuf, sizeof(ptbuf), "/dev/pty%c%c",
|
||||||
ptymajors[i / num_minors], ptyminors[i % num_minors]);
|
ptymajors[i / num_minors], ptyminors[i % num_minors]);
|
||||||
snprintf(ttbuf, sizeof(ttbuf), "/dev/tty%c%c",
|
snprintf(ttbuf, sizeof(ttbuf), "/dev/tty%c%c",
|
||||||
ptymajors[i / num_minors], ptyminors[i % num_minors]);
|
ptymajors[i / num_minors], ptyminors[i % num_minors]);
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
|
|
||||||
#ifndef HAVE_WAITPID
|
#ifndef HAVE_WAITPID
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include "bsd-waitpid.h"
|
#include "bsd-waitpid.h"
|
||||||
@ -45,9 +45,9 @@ waitpid(int pid, int *stat_loc, int options)
|
|||||||
}
|
}
|
||||||
wait_pid = wait4(pid, &statusp, options, NULL);
|
wait_pid = wait4(pid, &statusp, options, NULL);
|
||||||
if (stat_loc)
|
if (stat_loc)
|
||||||
*stat_loc = (int) statusp.w_status;
|
*stat_loc = (int) statusp.w_status;
|
||||||
|
|
||||||
return (wait_pid);
|
return (wait_pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* !HAVE_WAITPID */
|
#endif /* !HAVE_WAITPID */
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2003 Damien Miller. All rights reserved.
|
* Copyright (C) 2000-2003 Damien Miller. All rights reserved.
|
||||||
* Copyright (C) 1999 WIDE Project. All rights reserved.
|
* Copyright (C) 1999 WIDE Project. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
* are met:
|
* are met:
|
||||||
@ -13,7 +13,7 @@
|
|||||||
* 3. Neither the name of the project nor the names of its contributors
|
* 3. Neither the name of the project nor the names of its contributors
|
||||||
* may be used to endorse or promote products derived from this software
|
* may be used to endorse or promote products derived from this software
|
||||||
* without specific prior written permission.
|
* without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
@ -44,7 +44,7 @@
|
|||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
#ifndef HAVE_GETNAMEINFO
|
#ifndef HAVE_GETNAMEINFO
|
||||||
int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
|
int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
|
||||||
size_t hostlen, char *serv, size_t servlen, int flags)
|
size_t hostlen, char *serv, size_t servlen, int flags)
|
||||||
{
|
{
|
||||||
struct sockaddr_in *sin = (struct sockaddr_in *)sa;
|
struct sockaddr_in *sin = (struct sockaddr_in *)sa;
|
||||||
@ -67,11 +67,11 @@ int getnameinfo(const struct sockaddr *sa, size_t salen, char *host,
|
|||||||
else
|
else
|
||||||
return (0);
|
return (0);
|
||||||
} else {
|
} else {
|
||||||
hp = gethostbyaddr((char *)&sin->sin_addr,
|
hp = gethostbyaddr((char *)&sin->sin_addr,
|
||||||
sizeof(struct in_addr), AF_INET);
|
sizeof(struct in_addr), AF_INET);
|
||||||
if (hp == NULL)
|
if (hp == NULL)
|
||||||
return (EAI_NODATA);
|
return (EAI_NODATA);
|
||||||
|
|
||||||
if (strlcpy(host, hp->h_name, hostlen) >= hostlen)
|
if (strlcpy(host, hp->h_name, hostlen) >= hostlen)
|
||||||
return (EAI_MEMORY);
|
return (EAI_MEMORY);
|
||||||
else
|
else
|
||||||
@ -102,7 +102,7 @@ gai_strerror(int err)
|
|||||||
default:
|
default:
|
||||||
return ("unknown/invalid error.");
|
return ("unknown/invalid error.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_GAI_STRERROR */
|
#endif /* !HAVE_GAI_STRERROR */
|
||||||
|
|
||||||
#ifndef HAVE_FREEADDRINFO
|
#ifndef HAVE_FREEADDRINFO
|
||||||
@ -128,9 +128,9 @@ addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints)
|
|||||||
ai = malloc(sizeof(*ai) + sizeof(struct sockaddr_in));
|
ai = malloc(sizeof(*ai) + sizeof(struct sockaddr_in));
|
||||||
if (ai == NULL)
|
if (ai == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
|
||||||
memset(ai, '\0', sizeof(*ai) + sizeof(struct sockaddr_in));
|
memset(ai, '\0', sizeof(*ai) + sizeof(struct sockaddr_in));
|
||||||
|
|
||||||
ai->ai_addr = (struct sockaddr *)(ai + 1);
|
ai->ai_addr = (struct sockaddr *)(ai + 1);
|
||||||
/* XXX -- ssh doesn't use sa_len */
|
/* XXX -- ssh doesn't use sa_len */
|
||||||
ai->ai_addrlen = sizeof(struct sockaddr_in);
|
ai->ai_addrlen = sizeof(struct sockaddr_in);
|
||||||
@ -138,7 +138,7 @@ addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints)
|
|||||||
|
|
||||||
((struct sockaddr_in *)(ai)->ai_addr)->sin_port = port;
|
((struct sockaddr_in *)(ai)->ai_addr)->sin_port = port;
|
||||||
((struct sockaddr_in *)(ai)->ai_addr)->sin_addr.s_addr = addr;
|
((struct sockaddr_in *)(ai)->ai_addr)->sin_addr.s_addr = addr;
|
||||||
|
|
||||||
/* XXX: the following is not generally correct, but does what we want */
|
/* XXX: the following is not generally correct, but does what we want */
|
||||||
if (hints->ai_socktype)
|
if (hints->ai_socktype)
|
||||||
ai->ai_socktype = hints->ai_socktype;
|
ai->ai_socktype = hints->ai_socktype;
|
||||||
@ -152,7 +152,7 @@ addrinfo *malloc_ai(int port, u_long addr, const struct addrinfo *hints)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
getaddrinfo(const char *hostname, const char *servname,
|
getaddrinfo(const char *hostname, const char *servname,
|
||||||
const struct addrinfo *hints, struct addrinfo **res)
|
const struct addrinfo *hints, struct addrinfo **res)
|
||||||
{
|
{
|
||||||
struct hostent *hp;
|
struct hostent *hp;
|
||||||
@ -183,29 +183,29 @@ getaddrinfo(const char *hostname, const char *servname,
|
|||||||
if (hostname && inet_aton(hostname, &in) != 0)
|
if (hostname && inet_aton(hostname, &in) != 0)
|
||||||
addr = in.s_addr;
|
addr = in.s_addr;
|
||||||
*res = malloc_ai(port, addr, hints);
|
*res = malloc_ai(port, addr, hints);
|
||||||
if (*res == NULL)
|
if (*res == NULL)
|
||||||
return (EAI_MEMORY);
|
return (EAI_MEMORY);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hostname) {
|
if (!hostname) {
|
||||||
*res = malloc_ai(port, htonl(0x7f000001), hints);
|
*res = malloc_ai(port, htonl(0x7f000001), hints);
|
||||||
if (*res == NULL)
|
if (*res == NULL)
|
||||||
return (EAI_MEMORY);
|
return (EAI_MEMORY);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inet_aton(hostname, &in)) {
|
if (inet_aton(hostname, &in)) {
|
||||||
*res = malloc_ai(port, in.s_addr, hints);
|
*res = malloc_ai(port, in.s_addr, hints);
|
||||||
if (*res == NULL)
|
if (*res == NULL)
|
||||||
return (EAI_MEMORY);
|
return (EAI_MEMORY);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't try DNS if AI_NUMERICHOST is set */
|
/* Don't try DNS if AI_NUMERICHOST is set */
|
||||||
if (hints && hints->ai_flags & AI_NUMERICHOST)
|
if (hints && hints->ai_flags & AI_NUMERICHOST)
|
||||||
return (EAI_NONAME);
|
return (EAI_NONAME);
|
||||||
|
|
||||||
hp = gethostbyname(hostname);
|
hp = gethostbyname(hostname);
|
||||||
if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
|
if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
|
||||||
struct addrinfo *cur, *prev;
|
struct addrinfo *cur, *prev;
|
||||||
@ -229,7 +229,7 @@ getaddrinfo(const char *hostname, const char *servname,
|
|||||||
}
|
}
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (EAI_NODATA);
|
return (EAI_NODATA);
|
||||||
}
|
}
|
||||||
#endif /* !HAVE_GETADDRINFO */
|
#endif /* !HAVE_GETADDRINFO */
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2000-2003 Damien Miller. All rights reserved.
|
* Copyright (C) 2000-2003 Damien Miller. All rights reserved.
|
||||||
* Copyright (C) 1999 WIDE Project. All rights reserved.
|
* Copyright (C) 1999 WIDE Project. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
* are met:
|
* are met:
|
||||||
@ -15,7 +15,7 @@
|
|||||||
* 3. Neither the name of the project nor the names of its contributors
|
* 3. Neither the name of the project nor the names of its contributors
|
||||||
* may be used to endorse or promote products derived from this software
|
* may be used to endorse or promote products derived from this software
|
||||||
* without specific prior written permission.
|
* without specific prior written permission.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
* THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||||
@ -47,7 +47,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* First, socket and INET6 related definitions
|
* First, socket and INET6 related definitions
|
||||||
*/
|
*/
|
||||||
#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
|
#ifndef HAVE_STRUCT_SOCKADDR_STORAGE
|
||||||
# define _SS_MAXSIZE 128 /* Implementation specific max size */
|
# define _SS_MAXSIZE 128 /* Implementation specific max size */
|
||||||
@ -154,7 +154,7 @@ struct addrinfo {
|
|||||||
# undef getaddrinfo
|
# undef getaddrinfo
|
||||||
#endif
|
#endif
|
||||||
#define getaddrinfo(a,b,c,d) (ssh_getaddrinfo(a,b,c,d))
|
#define getaddrinfo(a,b,c,d) (ssh_getaddrinfo(a,b,c,d))
|
||||||
int getaddrinfo(const char *, const char *,
|
int getaddrinfo(const char *, const char *,
|
||||||
const struct addrinfo *, struct addrinfo **);
|
const struct addrinfo *, struct addrinfo **);
|
||||||
#endif /* !HAVE_GETADDRINFO */
|
#endif /* !HAVE_GETADDRINFO */
|
||||||
|
|
||||||
@ -170,7 +170,7 @@ void freeaddrinfo(struct addrinfo *);
|
|||||||
|
|
||||||
#ifndef HAVE_GETNAMEINFO
|
#ifndef HAVE_GETNAMEINFO
|
||||||
#define getnameinfo(a,b,c,d,e,f,g) (ssh_getnameinfo(a,b,c,d,e,f,g))
|
#define getnameinfo(a,b,c,d,e,f,g) (ssh_getnameinfo(a,b,c,d,e,f,g))
|
||||||
int getnameinfo(const struct sockaddr *, size_t, char *, size_t,
|
int getnameinfo(const struct sockaddr *, size_t, char *, size_t,
|
||||||
char *, size_t, int);
|
char *, size_t, int);
|
||||||
#endif /* !HAVE_GETNAMEINFO */
|
#endif /* !HAVE_GETNAMEINFO */
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ void closefrom(int);
|
|||||||
|
|
||||||
#ifndef HAVE_GETCWD
|
#ifndef HAVE_GETCWD
|
||||||
char *getcwd(char *pt, size_t size);
|
char *getcwd(char *pt, size_t size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_REALLOCARRAY
|
#ifndef HAVE_REALLOCARRAY
|
||||||
void *reallocarray(void *, size_t, size_t);
|
void *reallocarray(void *, size_t, size_t);
|
||||||
@ -94,7 +94,7 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
|
|||||||
#ifndef HAVE_STRLCAT
|
#ifndef HAVE_STRLCAT
|
||||||
/* #include <sys/types.h> XXX Still needed? */
|
/* #include <sys/types.h> XXX Still needed? */
|
||||||
size_t strlcat(char *dst, const char *src, size_t siz);
|
size_t strlcat(char *dst, const char *src, size_t siz);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_SETENV
|
#ifndef HAVE_SETENV
|
||||||
int setenv(register const char *name, register const char *value, int rewrite);
|
int setenv(register const char *name, register const char *value, int rewrite);
|
||||||
@ -113,11 +113,11 @@ char *strptime(const char *buf, const char *fmt, struct tm *tm);
|
|||||||
int mkstemps(char *path, int slen);
|
int mkstemps(char *path, int slen);
|
||||||
int mkstemp(char *path);
|
int mkstemp(char *path);
|
||||||
char *mkdtemp(char *path);
|
char *mkdtemp(char *path);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_DAEMON
|
#ifndef HAVE_DAEMON
|
||||||
int daemon(int nochdir, int noclose);
|
int daemon(int nochdir, int noclose);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_DIRNAME
|
#ifndef HAVE_DIRNAME
|
||||||
char *dirname(const char *path);
|
char *dirname(const char *path);
|
||||||
@ -142,7 +142,7 @@ const char *inet_ntop(int af, const void *src, char *dst, socklen_t size);
|
|||||||
|
|
||||||
#ifndef HAVE_INET_ATON
|
#ifndef HAVE_INET_ATON
|
||||||
int inet_aton(const char *cp, struct in_addr *addr);
|
int inet_aton(const char *cp, struct in_addr *addr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRSEP
|
#ifndef HAVE_STRSEP
|
||||||
char *strsep(char **stringp, const char *delim);
|
char *strsep(char **stringp, const char *delim);
|
||||||
@ -199,7 +199,7 @@ u_int32_t arc4random_uniform(u_int32_t);
|
|||||||
|
|
||||||
#ifndef HAVE_ASPRINTF
|
#ifndef HAVE_ASPRINTF
|
||||||
int asprintf(char **, const char *, ...);
|
int asprintf(char **, const char *, ...);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_OPENPTY
|
#ifndef HAVE_OPENPTY
|
||||||
# include <sys/ioctl.h> /* for struct winsize */
|
# include <sys/ioctl.h> /* for struct winsize */
|
||||||
@ -210,7 +210,7 @@ int openpty(int *, int *, char *, struct termios *, struct winsize *);
|
|||||||
|
|
||||||
#ifndef HAVE_SNPRINTF
|
#ifndef HAVE_SNPRINTF
|
||||||
int snprintf(char *, size_t, SNPRINTF_CONST char *, ...);
|
int snprintf(char *, size_t, SNPRINTF_CONST char *, ...);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRTOLL
|
#ifndef HAVE_STRTOLL
|
||||||
long long strtoll(const char *, char **, int);
|
long long strtoll(const char *, char **, int);
|
||||||
|
@ -55,7 +55,7 @@ ssh_compatible_openssl(long headerver, long libver)
|
|||||||
mask = 0xfffff00fL; /* major,minor,fix,status */
|
mask = 0xfffff00fL; /* major,minor,fix,status */
|
||||||
return (headerver & mask) == (libver & mask);
|
return (headerver & mask) == (libver & mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For versions >= 1.0.0, major,minor,status must match and library
|
* For versions >= 1.0.0, major,minor,status must match and library
|
||||||
* fix version must be equal to or newer than the header.
|
* fix version must be equal to or newer than the header.
|
||||||
|
@ -179,7 +179,7 @@ sys_auth_passwd(Authctxt *ctxt, const char *password)
|
|||||||
do {
|
do {
|
||||||
result = authenticate((char *)name, (char *)password, &reenter,
|
result = authenticate((char *)name, (char *)password, &reenter,
|
||||||
&authmsg);
|
&authmsg);
|
||||||
aix_remove_embedded_newlines(authmsg);
|
aix_remove_embedded_newlines(authmsg);
|
||||||
debug3("AIX/authenticate result %d, authmsg %.100s", result,
|
debug3("AIX/authenticate result %d, authmsg %.100s", result,
|
||||||
authmsg);
|
authmsg);
|
||||||
} while (reenter);
|
} while (reenter);
|
||||||
@ -337,11 +337,11 @@ aix_setauthdb(const char *user)
|
|||||||
debug3("%s: Could not open userdb to read", __func__);
|
debug3("%s: Could not open userdb to read", __func__);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getuserattr((char *)user, S_REGISTRY, ®istry, SEC_CHAR) == 0) {
|
if (getuserattr((char *)user, S_REGISTRY, ®istry, SEC_CHAR) == 0) {
|
||||||
if (setauthdb(registry, old_registry) == 0)
|
if (setauthdb(registry, old_registry) == 0)
|
||||||
debug3("AIX/setauthdb set registry '%s'", registry);
|
debug3("AIX/setauthdb set registry '%s'", registry);
|
||||||
else
|
else
|
||||||
debug3("AIX/setauthdb set registry '%s' failed: %s",
|
debug3("AIX/setauthdb set registry '%s' failed: %s",
|
||||||
registry, strerror(errno));
|
registry, strerror(errno));
|
||||||
} else
|
} else
|
||||||
|
@ -68,7 +68,7 @@ sys_tun_open(int tun, int mode)
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
bzero(&ifr, sizeof(ifr));
|
bzero(&ifr, sizeof(ifr));
|
||||||
|
|
||||||
if (mode == SSH_TUNMODE_ETHERNET) {
|
if (mode == SSH_TUNMODE_ETHERNET) {
|
||||||
ifr.ifr_flags = IFF_TAP;
|
ifr.ifr_flags = IFF_TAP;
|
||||||
|
@ -76,7 +76,7 @@ compat_init_setproctitle(int argc, char *argv[])
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* NB: This assumes that argv has already been copied out of the
|
* NB: This assumes that argv has already been copied out of the
|
||||||
* way. This is true for sshd, but may not be true for other
|
* way. This is true for sshd, but may not be true for other
|
||||||
* programs. Beware.
|
* programs. Beware.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ compat_init_setproctitle(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Find the last argv string or environment variable within
|
* Find the last argv string or environment variable within
|
||||||
* our process memory area.
|
* our process memory area.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < argc; i++) {
|
for (i = 0; i < argc; i++) {
|
||||||
@ -108,8 +108,8 @@ compat_init_setproctitle(int argc, char *argv[])
|
|||||||
argv_start = argv[0];
|
argv_start = argv[0];
|
||||||
argv_env_len = lastargv - argv[0] - 1;
|
argv_env_len = lastargv - argv[0] - 1;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy environment
|
* Copy environment
|
||||||
* XXX - will truncate env on strdup fail
|
* XXX - will truncate env on strdup fail
|
||||||
*/
|
*/
|
||||||
for (i = 0; envp[i] != NULL; i++)
|
for (i = 0; envp[i] != NULL; i++)
|
||||||
@ -156,7 +156,7 @@ setproctitle(const char *fmt, ...)
|
|||||||
pst.pst_command = ptitle;
|
pst.pst_command = ptitle;
|
||||||
pstat(PSTAT_SETCMD, pst, strlen(ptitle), 0, 0);
|
pstat(PSTAT_SETCMD, pst, strlen(ptitle), 0, 0);
|
||||||
#elif SPT_TYPE == SPT_REUSEARGV
|
#elif SPT_TYPE == SPT_REUSEARGV
|
||||||
/* debug("setproctitle: copy \"%s\" into len %d",
|
/* debug("setproctitle: copy \"%s\" into len %d",
|
||||||
buf, argv_env_len); */
|
buf, argv_env_len); */
|
||||||
len = strlcpy(argv_start, ptitle, argv_env_len);
|
len = strlcpy(argv_start, ptitle, argv_env_len);
|
||||||
for(; len < argv_env_len; len++)
|
for(; len < argv_env_len; len++)
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
# include <sys/security.h>
|
# include <sys/security.h>
|
||||||
# include <sys/audit.h>
|
# include <sys/audit.h>
|
||||||
# include <prot.h>
|
# include <prot.h>
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
|
# if defined(HAVE_SHADOW_H) && !defined(DISABLE_SHADOW)
|
||||||
# include <shadow.h>
|
# include <shadow.h>
|
||||||
@ -121,7 +121,7 @@ xcrypt(const char *password, const char *salt)
|
|||||||
crypted = bigcrypt(password, salt);
|
crypted = bigcrypt(password, salt);
|
||||||
# else
|
# else
|
||||||
crypted = crypt(password, salt);
|
crypted = crypt(password, salt);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
return crypted;
|
return crypted;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2002 Tim Rice. All rights reserved.
|
* Copyright (c) 2002 Tim Rice. All rights reserved.
|
||||||
* MAP_FAILED code by Solar Designer.
|
* MAP_FAILED code by Solar Designer.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
* are met:
|
* are met:
|
||||||
|
Loading…
Reference in New Issue
Block a user