mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-29 16:54:51 +02:00
- Merged more Solaris compability from Marc G. Fournier
<marc.fournier@acadiau.ca> - Wrote autoconf tests for __progname symbol
This commit is contained in:
parent
c6d5ce86a9
commit
3f905872b0
@ -23,6 +23,9 @@
|
|||||||
[sshconnect.c] disconnect if getpeername() fails
|
[sshconnect.c] disconnect if getpeername() fails
|
||||||
- OpenBSD's changes to sshd.c broke the PAM stuff, re-merged it.
|
- OpenBSD's changes to sshd.c broke the PAM stuff, re-merged it.
|
||||||
- Various small cleanups to bring diff (against OpenBSD) size down.
|
- Various small cleanups to bring diff (against OpenBSD) size down.
|
||||||
|
- Merged more Solaris compability from Marc G. Fournier
|
||||||
|
<marc.fournier@acadiau.ca>
|
||||||
|
- Wrote autoconf tests for __progname symbol
|
||||||
|
|
||||||
19991114
|
19991114
|
||||||
- Solaris compilation fixes (still imcomplete)
|
- Solaris compilation fixes (still imcomplete)
|
||||||
|
45
acconfig.h
45
acconfig.h
@ -3,7 +3,10 @@
|
|||||||
/* SSL directory. */
|
/* SSL directory. */
|
||||||
#undef ssldir
|
#undef ssldir
|
||||||
|
|
||||||
/* Random number pool */
|
/* Location of lastlog file */
|
||||||
|
#undef LASTLOG_LOCATION
|
||||||
|
|
||||||
|
/* Location of random number pool */
|
||||||
#undef RANDOM_POOL
|
#undef RANDOM_POOL
|
||||||
|
|
||||||
/* Are we using the Entropy gathering daemon */
|
/* Are we using the Entropy gathering daemon */
|
||||||
@ -21,9 +24,12 @@
|
|||||||
/* Define is libutil has login() function */
|
/* Define is libutil has login() function */
|
||||||
#undef HAVE_LIBUTIL_LOGIN
|
#undef HAVE_LIBUTIL_LOGIN
|
||||||
|
|
||||||
/* Define if you *don't* want to use an external ssh-askpass */
|
/* Define if you want external askpass support */
|
||||||
#undef USE_EXTERNAL_ASKPASS
|
#undef USE_EXTERNAL_ASKPASS
|
||||||
|
|
||||||
|
/* Define if libc defines __progname */
|
||||||
|
#undef HAVE___PROGNAME
|
||||||
|
|
||||||
@BOTTOM@
|
@BOTTOM@
|
||||||
|
|
||||||
/* ******************* Shouldn't need to edit below this line ************** */
|
/* ******************* Shouldn't need to edit below this line ************** */
|
||||||
@ -40,6 +46,9 @@ enum
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <sys/types.h> /* For u_intXX_t */
|
||||||
|
#include <paths.h> /* For _PATH_XXX */
|
||||||
|
|
||||||
#if !defined(u_int32_t) && defined(uint32_t)
|
#if !defined(u_int32_t) && defined(uint32_t)
|
||||||
#define u_int32_t uint32_t
|
#define u_int32_t uint32_t
|
||||||
#endif
|
#endif
|
||||||
@ -47,3 +56,35 @@ enum
|
|||||||
#if !defined(u_int16_t) && defined(uint16_t)
|
#if !defined(u_int16_t) && defined(uint16_t)
|
||||||
#define u_int16_t uint16_t
|
#define u_int16_t uint16_t
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _PATH_LASTLOG
|
||||||
|
# ifdef LASTLOG_LOCATION
|
||||||
|
# define _PATH_LASTLOG LASTLOG_LOCATION
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _PATH_UTMP
|
||||||
|
# ifdef UTMP_FILE
|
||||||
|
# define _PATH_UTMP UTMP_FILE
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _PATH_WTMP
|
||||||
|
# ifdef WTMP_FILE
|
||||||
|
# define _PATH_WTMP WTMP_FILE
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _PATH_BSHELL
|
||||||
|
# define _PATH_BSHELL "/bin/sh"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _PATH_STDPATH
|
||||||
|
# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin:"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef _PATH_MAILDIR
|
||||||
|
# ifdef MAILDIR
|
||||||
|
# define _PATH_MAILDIR MAILDIR
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
38
configure.in
38
configure.in
@ -55,14 +55,7 @@ AC_CHECK_LIB(dl, dlopen, , )
|
|||||||
AC_CHECK_LIB(pam, pam_authenticate, , )
|
AC_CHECK_LIB(pam, pam_authenticate, , )
|
||||||
|
|
||||||
dnl Checks for header files.
|
dnl Checks for header files.
|
||||||
AC_CHECK_HEADERS(pty.h endian.h paths.h lastlog.h shadow.h netgroup.h)
|
AC_CHECK_HEADERS(pty.h endian.h paths.h lastlog.h shadow.h netgroup.h maillock.h)
|
||||||
|
|
||||||
dnl Check for ut_host field in utmp
|
|
||||||
AC_MSG_CHECKING([whether utmp.h has ut_host field])
|
|
||||||
AC_EGREP_HEADER(ut_host, utmp.h,
|
|
||||||
[AC_DEFINE(HAVE_HOST_IN_UTMP) AC_MSG_RESULT(yes); ],
|
|
||||||
[AC_MSG_RESULT(no)]
|
|
||||||
)
|
|
||||||
|
|
||||||
dnl Checks for library functions.
|
dnl Checks for library functions.
|
||||||
AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle setlogin)
|
AC_CHECK_FUNCS(openpty strlcpy mkdtemp arc4random setproctitle setlogin)
|
||||||
@ -144,4 +137,33 @@ if test -z "$RANDOM_POOL" -a -z "$EGD_POOL"; then
|
|||||||
AC_MSG_ERROR([No random device found, and no EGD random pool specified])
|
AC_MSG_ERROR([No random device found, and no EGD random pool specified])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
dnl Check for ut_host field in utmp
|
||||||
|
AC_MSG_CHECKING([whether utmp.h has ut_host field])
|
||||||
|
AC_EGREP_HEADER(ut_host, utmp.h,
|
||||||
|
[AC_DEFINE(HAVE_HOST_IN_UTMP) AC_MSG_RESULT(yes); ],
|
||||||
|
[AC_MSG_RESULT(no)]
|
||||||
|
)
|
||||||
|
|
||||||
|
dnl Look for lastlog location
|
||||||
|
AC_MSG_CHECKING([location of lastlog file])
|
||||||
|
for lastlog in /var/log/lastlog /var/adm/lastlog /etc/security/lastlog ; do
|
||||||
|
if test -f $lastlog ; then
|
||||||
|
AC_MSG_RESULT($lastlog)
|
||||||
|
AC_DEFINE_UNQUOTED(LASTLOG_LOCATION, "$lastlog")
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether libc defines __progname])
|
||||||
|
AC_TRY_LINK([],
|
||||||
|
[extern char *__progname;],
|
||||||
|
[
|
||||||
|
AC_DEFINE(HAVE___PROGNAME)
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
AC_OUTPUT(Makefile)
|
AC_OUTPUT(Makefile)
|
||||||
|
@ -15,13 +15,19 @@ to the system log.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$Id: log-server.c,v 1.3 1999/11/15 04:25:10 damien Exp $");
|
RCSID("$Id: log-server.c,v 1.4 1999/11/15 06:10:57 damien Exp $");
|
||||||
|
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include "packet.h"
|
#include "packet.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
|
|
||||||
|
#ifdef HAVE___PROGNAME
|
||||||
|
extern char *__progname;
|
||||||
|
#else /* HAVE___PROGNAME */
|
||||||
|
const char *__progname = "sshd";
|
||||||
|
#endif /* HAVE___PROGNAME */
|
||||||
|
|
||||||
static LogLevel log_level = SYSLOG_LEVEL_INFO;
|
static LogLevel log_level = SYSLOG_LEVEL_INFO;
|
||||||
static int log_on_stderr = 0;
|
static int log_on_stderr = 0;
|
||||||
static int log_facility = LOG_AUTH;
|
static int log_facility = LOG_AUTH;
|
||||||
@ -104,7 +110,6 @@ do_log(LogLevel level, const char *fmt, va_list args)
|
|||||||
char fmtbuf[MSGBUFSIZE];
|
char fmtbuf[MSGBUFSIZE];
|
||||||
char *txt = NULL;
|
char *txt = NULL;
|
||||||
int pri = LOG_INFO;
|
int pri = LOG_INFO;
|
||||||
extern char *__progname;
|
|
||||||
|
|
||||||
if (level > log_level)
|
if (level > log_level)
|
||||||
return;
|
return;
|
||||||
|
@ -14,7 +14,7 @@ Adds an identity to the authentication server, or removes an identity.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$Id: ssh-add.c,v 1.7 1999/11/15 03:25:30 damien Exp $");
|
RCSID("$Id: ssh-add.c,v 1.8 1999/11/15 06:10:57 damien Exp $");
|
||||||
|
|
||||||
#include "rsa.h"
|
#include "rsa.h"
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
@ -25,6 +25,12 @@ RCSID("$Id: ssh-add.c,v 1.7 1999/11/15 03:25:30 damien Exp $");
|
|||||||
int askpass(const char *filename, RSA *key, const char *saved_comment, char **comment);
|
int askpass(const char *filename, RSA *key, const char *saved_comment, char **comment);
|
||||||
#endif /* USE_EXTERNAL_ASKPASS */
|
#endif /* USE_EXTERNAL_ASKPASS */
|
||||||
|
|
||||||
|
#ifdef HAVE___PROGNAME
|
||||||
|
extern char *__progname;
|
||||||
|
#else /* HAVE___PROGNAME */
|
||||||
|
const char *__progname = "ssh-add";
|
||||||
|
#endif /* HAVE___PROGNAME */
|
||||||
|
|
||||||
void
|
void
|
||||||
delete_file(AuthenticationConnection *ac, const char *filename)
|
delete_file(AuthenticationConnection *ac, const char *filename)
|
||||||
{
|
{
|
||||||
@ -175,7 +181,6 @@ main(int argc, char **argv)
|
|||||||
|
|
||||||
/* check if RSA support exists */
|
/* check if RSA support exists */
|
||||||
if (rsa_alive() == 0) {
|
if (rsa_alive() == 0) {
|
||||||
extern char *__progname;
|
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"%s: no RSA support in libssl and libcrypto. See ssl(8).\n",
|
"%s: no RSA support in libssl and libcrypto. See ssl(8).\n",
|
||||||
|
@ -35,6 +35,12 @@ RCSID("$OpenBSD: ssh-agent.c,v 1.17 1999/11/02 19:42:36 markus Exp $");
|
|||||||
#include <ssl/md5.h>
|
#include <ssl/md5.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE___PROGNAME
|
||||||
|
extern char *__progname;
|
||||||
|
#else /* HAVE___PROGNAME */
|
||||||
|
const char *__progname = "ssh-agent";
|
||||||
|
#endif /* HAVE___PROGNAME */
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
@ -505,8 +511,6 @@ cleanup_exit(int i)
|
|||||||
void
|
void
|
||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
extern char *__progname;
|
|
||||||
|
|
||||||
fprintf(stderr, "ssh-agent version %s\n", SSH_VERSION);
|
fprintf(stderr, "ssh-agent version %s\n", SSH_VERSION);
|
||||||
fprintf(stderr, "Usage: %s [-c | -s] [-k] [command {args...]]\n",
|
fprintf(stderr, "Usage: %s [-c | -s] [-k] [command {args...]]\n",
|
||||||
__progname);
|
__progname);
|
||||||
@ -524,7 +528,6 @@ main(int ac, char **av)
|
|||||||
|
|
||||||
/* check if RSA support exists */
|
/* check if RSA support exists */
|
||||||
if (rsa_alive() == 0) {
|
if (rsa_alive() == 0) {
|
||||||
extern char *__progname;
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"%s: no RSA support in libssl and libcrypto. See ssl(8).\n",
|
"%s: no RSA support in libssl and libcrypto. See ssl(8).\n",
|
||||||
__progname);
|
__progname);
|
||||||
|
@ -14,12 +14,18 @@ Identity and host key generation and maintenance.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$Id: ssh-keygen.c,v 1.3 1999/11/12 04:19:27 damien Exp $");
|
RCSID("$Id: ssh-keygen.c,v 1.4 1999/11/15 06:10:57 damien Exp $");
|
||||||
|
|
||||||
#include "rsa.h"
|
#include "rsa.h"
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
|
|
||||||
|
#ifdef HAVE___PROGNAME
|
||||||
|
extern char *__progname;
|
||||||
|
#else /* HAVE___PROGNAME */
|
||||||
|
const char *__progname = "ssh-keygen";
|
||||||
|
#endif /* HAVE___PROGNAME */
|
||||||
|
|
||||||
/* Generated private key. */
|
/* Generated private key. */
|
||||||
RSA *private_key;
|
RSA *private_key;
|
||||||
|
|
||||||
@ -317,7 +323,6 @@ main(int ac, char **av)
|
|||||||
|
|
||||||
/* check if RSA support exists */
|
/* check if RSA support exists */
|
||||||
if (rsa_alive() == 0) {
|
if (rsa_alive() == 0) {
|
||||||
extern char *__progname;
|
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"%s: no RSA support in libssl and libcrypto. See ssl(8).\n",
|
"%s: no RSA support in libssl and libcrypto. See ssl(8).\n",
|
||||||
|
9
ssh.c
9
ssh.c
@ -18,7 +18,7 @@ Modified to work with SSL by Niels Provos <provos@citi.umich.edu> in Canada.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$Id: ssh.c,v 1.8 1999/11/15 04:25:10 damien Exp $");
|
RCSID("$Id: ssh.c,v 1.9 1999/11/15 06:10:57 damien Exp $");
|
||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
@ -28,6 +28,12 @@ RCSID("$Id: ssh.c,v 1.8 1999/11/15 04:25:10 damien Exp $");
|
|||||||
#include "readconf.h"
|
#include "readconf.h"
|
||||||
#include "uidswap.h"
|
#include "uidswap.h"
|
||||||
|
|
||||||
|
#ifdef HAVE___PROGNAME
|
||||||
|
extern char *__progname;
|
||||||
|
#else /* HAVE___PROGNAME */
|
||||||
|
const char *__progname = "ssh";
|
||||||
|
#endif /* HAVE___PROGNAME */
|
||||||
|
|
||||||
/* Flag indicating whether debug mode is on. This can be set on the
|
/* Flag indicating whether debug mode is on. This can be set on the
|
||||||
command line. */
|
command line. */
|
||||||
int debug_flag = 0;
|
int debug_flag = 0;
|
||||||
@ -399,7 +405,6 @@ main(int ac, char **av)
|
|||||||
|
|
||||||
/* check if RSA support exists */
|
/* check if RSA support exists */
|
||||||
if (rsa_alive() == 0) {
|
if (rsa_alive() == 0) {
|
||||||
extern char *__progname;
|
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"%s: no RSA support in libssl and libcrypto. See ssl(8).\n",
|
"%s: no RSA support in libssl and libcrypto. See ssl(8).\n",
|
||||||
|
6
sshd.c
6
sshd.c
@ -18,7 +18,7 @@ agent connections.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$Id: sshd.c,v 1.19 1999/11/15 04:40:55 damien Exp $");
|
RCSID("$Id: sshd.c,v 1.20 1999/11/15 06:10:57 damien Exp $");
|
||||||
|
|
||||||
#include "xmalloc.h"
|
#include "xmalloc.h"
|
||||||
#include "rsa.h"
|
#include "rsa.h"
|
||||||
@ -32,6 +32,10 @@ RCSID("$Id: sshd.c,v 1.19 1999/11/15 04:40:55 damien Exp $");
|
|||||||
#include "uidswap.h"
|
#include "uidswap.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_MAILLOCK_H
|
||||||
|
# include <maillock.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef LIBWRAP
|
#ifdef LIBWRAP
|
||||||
#include <tcpd.h>
|
#include <tcpd.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user