Updates for NetBSD port

This commit is contained in:
Michiel Broek 2002-01-11 21:47:22 +00:00
parent caf2629c8d
commit ae3df4d6dc
5 changed files with 4732 additions and 2297 deletions

View File

@ -68,6 +68,12 @@
/* Defined if you have libutil.h */ /* Defined if you have libutil.h */
#undef HAVE_LIBUTIL_H #undef HAVE_LIBUTIL_H
/* Defined if you have util.h */
#undef HAVE_UTIL_H
/* Defined if you have sys/types.h */
#undef HAVE_SYS_TYPES_H
/* Defined if it includes *Pw functions. */ /* Defined if it includes *Pw functions. */
#undef HAVE_LIBCRACK_PW #undef HAVE_LIBCRACK_PW

6301
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -117,7 +117,9 @@ fi
AC_CHECK_LIB(util,login,result=yes,result=no) AC_CHECK_LIB(util,login,result=yes,result=no)
if test "$result" = "yes"; then if test "$result" = "yes"; then
LIBS="$LIBS -lutil" LIBS="$LIBS -lutil"
AC_CHECK_HEADERS(util.h)
AC_CHECK_HEADERS(libutil.h) AC_CHECK_HEADERS(libutil.h)
AC_CHECK_HEADERS(sys/types.h)
fi fi
dnl Checks for header files. dnl Checks for header files.

View File

@ -73,6 +73,7 @@
#include <syslog.h> #include <syslog.h>
#include <err.h> #include <err.h>
#include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <paths.h> #include <paths.h>
#include <pwd.h> #include <pwd.h>
@ -268,6 +269,7 @@ void pw_copy(int ffd, int tfd, struct passwd *pw)
goto err; goto err;
continue; continue;
} }
#ifdef __FreeBSD__
(void)fprintf(to, "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s\n", (void)fprintf(to, "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s\n",
pw->pw_name, pw->pw_passwd, pw->pw_name, pw->pw_passwd,
pw->pw_fields & _PWF_UID ? uidstr : "", pw->pw_fields & _PWF_UID ? uidstr : "",
@ -276,6 +278,16 @@ void pw_copy(int ffd, int tfd, struct passwd *pw)
pw->pw_fields & _PWF_CHANGE ? chgstr : "", pw->pw_fields & _PWF_CHANGE ? chgstr : "",
pw->pw_fields & _PWF_EXPIRE ? expstr : "", pw->pw_fields & _PWF_EXPIRE ? expstr : "",
pw->pw_gecos, pw->pw_dir, pw->pw_shell); pw->pw_gecos, pw->pw_dir, pw->pw_shell);
#elif __NetBSD__
(void)fprintf(to, "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s\n",
pw->pw_name, pw->pw_passwd,
uidstr, gidstr,
pw->pw_class,
chgstr, expstr,
pw->pw_gecos, pw->pw_dir, pw->pw_shell);
#else
#error "Not FreeBSD or NetBSD - don't know what to do"
#endif
done = 1; done = 1;
if (ferror(to)) if (ferror(to))
goto err; goto err;
@ -289,6 +301,7 @@ void pw_copy(int ffd, int tfd, struct passwd *pw)
pw_error(NULL, 0, 1); pw_error(NULL, 0, 1);
} else } else
#endif /* YP */ #endif /* YP */
#ifdef __FreeBSD__
(void)fprintf(to, "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s\n", (void)fprintf(to, "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s\n",
pw->pw_name, pw->pw_passwd, pw->pw_name, pw->pw_passwd,
pw->pw_fields & _PWF_UID ? uidstr : "", pw->pw_fields & _PWF_UID ? uidstr : "",
@ -297,6 +310,16 @@ void pw_copy(int ffd, int tfd, struct passwd *pw)
pw->pw_fields & _PWF_CHANGE ? chgstr : "", pw->pw_fields & _PWF_CHANGE ? chgstr : "",
pw->pw_fields & _PWF_EXPIRE ? expstr : "", pw->pw_fields & _PWF_EXPIRE ? expstr : "",
pw->pw_gecos, pw->pw_dir, pw->pw_shell); pw->pw_gecos, pw->pw_dir, pw->pw_shell);
#elif __NetBSD__
(void)fprintf(to, "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s\n",
pw->pw_name, pw->pw_passwd,
uidstr, gidstr,
pw->pw_class,
chgstr, expstr,
pw->pw_gecos, pw->pw_dir, pw->pw_shell);
#else
#error "Not FreeBSD or NetBSD - don't know what to do"
#endif
} }
if (ferror(to)) if (ferror(to))

View File

@ -3,10 +3,10 @@
* $Id$ * $Id$
* Purpose ...............: MBSE BBS Shadow Password Suite * Purpose ...............: MBSE BBS Shadow Password Suite
* Original Source .......: Shadow Password Suite * Original Source .......: Shadow Password Suite
* Original Copyrioght ...: Julianne Frances Haugh and others. * Original Copyright ....: Julianne Frances Haugh and others.
* *
***************************************************************************** *****************************************************************************
* Copyright (C) 1997-2001 * Copyright (C) 1997-2002
* *
* Michiel Broek FIDO: 2:280/2802 * Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10 * Beekmansbos 10
@ -38,10 +38,15 @@
#include <utmpx.h> #include <utmpx.h>
#endif #endif
#if defined(__FreeBSD__) || defined(__NetBSD__) #if HAVE_SYS_TYPES_H
#include <sys/types.h> #include <sys/types.h>
#endif
#if HAVE_LIBUTIL_H
#include <libutil.h> #include <libutil.h>
#endif #endif
#if HAVE_UTIL_H
#include <util.h>
#endif
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>