Small updates for NetBSD port
This commit is contained in:
parent
da6dd3b898
commit
5e52163ff7
@ -1,11 +1,10 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: mbfile
|
* $Id$
|
||||||
* Purpose ...............: Basic File I/O
|
* Purpose ...............: Basic File I/O
|
||||||
* Last modification date : 29-Oct-2001
|
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -275,7 +274,7 @@ int diskfree(int needed)
|
|||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
if ((fp = fopen((char *)"/etc/mtab", "r")) == 0) {
|
if ((fp = fopen((char *)"/etc/mtab", "r")) == 0) {
|
||||||
WriteError("$Can't open /etc/mtab");
|
WriteError("$Can't open /etc/mtab");
|
||||||
#elif __FreeBSD__
|
#elif __FreeBSD__ || __NetBSD__
|
||||||
if ((fp = fopen((char *)"/etc/fstab", "r")) == 0) {
|
if ((fp = fopen((char *)"/etc/fstab", "r")) == 0) {
|
||||||
WriteError("$Can't open /etc/fstab");
|
WriteError("$Can't open /etc/fstab");
|
||||||
#endif
|
#endif
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
#include "../lib/clcomm.h"
|
#include "../lib/clcomm.h"
|
||||||
|
|
||||||
#ifndef LOCKDIR
|
#ifndef LOCKDIR
|
||||||
#ifdef __FreeBSD__
|
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||||
#define LOCKDIR "/var/spool/lock"
|
#define LOCKDIR "/var/spool/lock"
|
||||||
#else
|
#else
|
||||||
#define LOCKDIR "/var/lock"
|
#define LOCKDIR "/var/lock"
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: mbmon/mbmon.c
|
* $Id$
|
||||||
* Purpose ...............: Monitor Program
|
* Purpose ...............: Monitor Program
|
||||||
* Last modification date : 26-Oct-2001
|
|
||||||
* Todo ..................: Chat with user via server
|
* Todo ..................: Chat with user via server
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -373,6 +372,8 @@ void soft_info(void)
|
|||||||
center_addstr( 6, (char *)"MBSE BBS (Linux)");
|
center_addstr( 6, (char *)"MBSE BBS (Linux)");
|
||||||
#elif __FreeBSD__
|
#elif __FreeBSD__
|
||||||
center_addstr( 6, (char *)"MBSE BBS (FreeBSD)");
|
center_addstr( 6, (char *)"MBSE BBS (FreeBSD)");
|
||||||
|
#elif __NetBSD__
|
||||||
|
center_addstr( 6, (char *)"MBSE BBS (NetBSD)");
|
||||||
#else
|
#else
|
||||||
center_addstr( 6, (char *)"MBSE BBS (Unknown)");
|
center_addstr( 6, (char *)"MBSE BBS (Unknown)");
|
||||||
#endif
|
#endif
|
||||||
|
@ -279,6 +279,8 @@ void Add_Footkludges(int Quote)
|
|||||||
sprintf(temp, "--- MBSE BBS v%s (Linux)", VERSION);
|
sprintf(temp, "--- MBSE BBS v%s (Linux)", VERSION);
|
||||||
#elif __FreeBSD__
|
#elif __FreeBSD__
|
||||||
sprintf(temp, "--- MBSE BBS v%s (FreeBSD)", VERSION);
|
sprintf(temp, "--- MBSE BBS v%s (FreeBSD)", VERSION);
|
||||||
|
#elif __NetBSD__
|
||||||
|
sprintf(temp, "--- MBSE BBS v%s (NetBSD)", VERSION);
|
||||||
#else
|
#else
|
||||||
sprintf(temp, "--- MBSE BBS v%s (Unknown)", VERSION);
|
sprintf(temp, "--- MBSE BBS v%s (Unknown)", VERSION);
|
||||||
#endif
|
#endif
|
||||||
|
@ -95,6 +95,8 @@ void cr(void)
|
|||||||
sprintf(temp, "MBSE Bulletin Board System %s (Linux)", VERSION);
|
sprintf(temp, "MBSE Bulletin Board System %s (Linux)", VERSION);
|
||||||
#elif __FreeBSD__
|
#elif __FreeBSD__
|
||||||
sprintf(temp, "MBSE Bulletin Board System %s (FreeBSD)", VERSION);
|
sprintf(temp, "MBSE Bulletin Board System %s (FreeBSD)", VERSION);
|
||||||
|
#elif __NetBSD__
|
||||||
|
sprintf(temp, "MBSE Bulletin Board System %s (NetBSD)", VERSION);
|
||||||
#else
|
#else
|
||||||
sprintf(temp, "MBSE Bulletin Board System %s (Unknown OS)", VERSION);
|
sprintf(temp, "MBSE Bulletin Board System %s (Unknown OS)", VERSION);
|
||||||
#endif
|
#endif
|
||||||
|
@ -107,6 +107,9 @@ int CountTtyinfo(void)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
sprintf(ttyinfo.tty, "cuaia%d", i);
|
sprintf(ttyinfo.tty, "cuaia%d", i);
|
||||||
|
#endif
|
||||||
|
#ifdef __NetBSD__
|
||||||
|
sprintf(ttyinfo.tty, "ttyi%c", i + 'a'); // NetBSD on a Sparc, how about PC's?
|
||||||
#endif
|
#endif
|
||||||
sprintf(ttyinfo.speed, "64 kbits");
|
sprintf(ttyinfo.speed, "64 kbits");
|
||||||
sprintf(ttyinfo.flags, "XA,X75,CM");
|
sprintf(ttyinfo.flags, "XA,X75,CM");
|
||||||
@ -126,6 +129,9 @@ int CountTtyinfo(void)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__
|
||||||
sprintf(ttyinfo.tty, "cuaa%d", i);
|
sprintf(ttyinfo.tty, "cuaa%d", i);
|
||||||
|
#endif
|
||||||
|
#ifdef __NetBSD__
|
||||||
|
sprintf(ttyinfo.tty, "tty%c", i + 'a'); // NetBSD on a Sparc, how about PC's?
|
||||||
#endif
|
#endif
|
||||||
sprintf(ttyinfo.speed, "33.6 kbits");
|
sprintf(ttyinfo.speed, "33.6 kbits");
|
||||||
sprintf(ttyinfo.flags, "CM,XA,V32B,V42B,V34");
|
sprintf(ttyinfo.flags, "CM,XA,V32B,V42B,V34");
|
||||||
@ -133,7 +139,11 @@ int CountTtyinfo(void)
|
|||||||
ttyinfo.available = FALSE;
|
ttyinfo.available = FALSE;
|
||||||
ttyinfo.callout = TRUE;
|
ttyinfo.callout = TRUE;
|
||||||
ttyinfo.honor_zmh = TRUE;
|
ttyinfo.honor_zmh = TRUE;
|
||||||
|
#ifdef __sparc__
|
||||||
|
ttyinfo.portspeed = 38400; // Safe, ULTRA has a higher maxmimum speed
|
||||||
|
#else
|
||||||
ttyinfo.portspeed = 57600;
|
ttyinfo.portspeed = 57600;
|
||||||
|
#endif
|
||||||
sprintf(ttyinfo.name, "Modem line #%d", i+1);
|
sprintf(ttyinfo.name, "Modem line #%d", i+1);
|
||||||
fwrite(&ttyinfo, sizeof(ttyinfo), 1, fil);
|
fwrite(&ttyinfo, sizeof(ttyinfo), 1, fil);
|
||||||
}
|
}
|
||||||
|
@ -140,6 +140,8 @@ void soft_info(void)
|
|||||||
center_addstr( 6, (char *)"MBSE BBS (Linux)");
|
center_addstr( 6, (char *)"MBSE BBS (Linux)");
|
||||||
#elif __FreeBSD__
|
#elif __FreeBSD__
|
||||||
center_addstr( 6, (char *)"MBSE BBS (FreeBSD)");
|
center_addstr( 6, (char *)"MBSE BBS (FreeBSD)");
|
||||||
|
#elif __NetBSD__
|
||||||
|
center_addstr( 6, (char *)"MBSE BBS (NetBSD)");
|
||||||
#else
|
#else
|
||||||
center_addstr( 6, (char *)"MBSE BBS (Unknown)");
|
center_addstr( 6, (char *)"MBSE BBS (Unknown)");
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: libs.h
|
* $Id$
|
||||||
* Purpose ...............: Libraries include list
|
* Purpose ...............: Libraries include list for mbtask
|
||||||
* Last modification date : 11-Aug-2001
|
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10 Internet: mbse@user.sourceforge.net
|
* Beekmansbos 10 Internet: mbse@user.sourceforge.net
|
||||||
@ -70,7 +69,7 @@
|
|||||||
|
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#ifdef __FreeBSD__
|
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||||
#include <netinet/in_systm.h>
|
#include <netinet/in_systm.h>
|
||||||
#endif
|
#endif
|
||||||
#include <netinet/ip.h>
|
#include <netinet/ip.h>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: MBSE BBS Task Manager
|
* Purpose ...............: MBSE BBS Task Manager
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -870,7 +870,7 @@ void ulocktask(void)
|
|||||||
|
|
||||||
|
|
||||||
/* different names, same thing... be careful, as these are macros... */
|
/* different names, same thing... be careful, as these are macros... */
|
||||||
#ifdef __FreeBSD__
|
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||||
# define icmphdr icmp
|
# define icmphdr icmp
|
||||||
# define iphdr ip
|
# define iphdr ip
|
||||||
# define ip_saddr ip_src.s_addr
|
# define ip_saddr ip_src.s_addr
|
||||||
@ -897,7 +897,7 @@ void ulocktask(void)
|
|||||||
# define icmp_seq un.echo.sequence
|
# define icmp_seq un.echo.sequence
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||||
# define ICMP_DEST_UNREACH ICMP_UNREACH
|
# define ICMP_DEST_UNREACH ICMP_UNREACH
|
||||||
# define ICMP_TIME_EXCEEDED ICMP_TIMXCEED
|
# define ICMP_TIME_EXCEEDED ICMP_TIMXCEED
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Give status of all filesystems
|
* Purpose ...............: Give status of all filesystems
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10 Internet: mbse@user.sourceforge.net
|
* Beekmansbos 10 Internet: mbse@user.sourceforge.net
|
||||||
@ -53,7 +53,7 @@ char *get_diskstat()
|
|||||||
mtab = calloc(PATH_MAX, sizeof(char));
|
mtab = calloc(PATH_MAX, sizeof(char));
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
if ((fp = fopen((char *)"/etc/mtab", "r")) == 0) {
|
if ((fp = fopen((char *)"/etc/mtab", "r")) == 0) {
|
||||||
#elif __FreeBSD__
|
#elif __FreeBSD__ || __NetBSD__
|
||||||
if ((fp = fopen((char *)"/etc/fstab", "r")) == 0) {
|
if ((fp = fopen((char *)"/etc/fstab", "r")) == 0) {
|
||||||
#endif
|
#endif
|
||||||
sprintf(buf, "100:0;");
|
sprintf(buf, "100:0;");
|
||||||
|
@ -117,7 +117,7 @@ static int force; /* Force update of locked passwords */
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FreeBSD__
|
#if !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||||
static void fail_exit(int status)
|
static void fail_exit(int status)
|
||||||
{
|
{
|
||||||
// gr_unlock();
|
// gr_unlock();
|
||||||
@ -239,7 +239,7 @@ void pwd_init(void)
|
|||||||
|
|
||||||
umask(077);
|
umask(077);
|
||||||
}
|
}
|
||||||
#endif /* not FreeBSD */
|
#endif /* not FreeBSD && NetBSD */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -531,7 +531,7 @@ static int new_password(const struct passwd *pw, char *newpasswd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FreeBSD__
|
#if !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||||
|
|
||||||
static void update_noshadow(int shadow_locked)
|
static void update_noshadow(int shadow_locked)
|
||||||
{
|
{
|
||||||
@ -655,7 +655,7 @@ static void update_noshadow(int shadow_locked)
|
|||||||
pw_unlock();
|
pw_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* Not __FreeBSD__ */
|
#endif /* Not __FreeBSD__ && __NetBSD__ */
|
||||||
|
|
||||||
|
|
||||||
#ifdef SHADOW_PASSWORD
|
#ifdef SHADOW_PASSWORD
|
||||||
@ -719,7 +719,7 @@ static void update_shadow(void)
|
|||||||
*/
|
*/
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#ifndef __FreeBSD__
|
#if !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||||
const struct passwd *pw;
|
const struct passwd *pw;
|
||||||
const struct group *gr;
|
const struct group *gr;
|
||||||
#ifdef SHADOW_PASSWORD
|
#ifdef SHADOW_PASSWORD
|
||||||
@ -858,7 +858,7 @@ int main(int argc, char *argv[])
|
|||||||
* to root to protect against unexpected signals. Any
|
* to root to protect against unexpected signals. Any
|
||||||
* keyboard signals are set to be ignored.
|
* keyboard signals are set to be ignored.
|
||||||
*/
|
*/
|
||||||
#ifndef __FreeBSD__
|
#if !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||||
pwd_init();
|
pwd_init();
|
||||||
#else
|
#else
|
||||||
pw_init();
|
pw_init();
|
||||||
@ -871,7 +871,7 @@ int main(int argc, char *argv[])
|
|||||||
exit(E_FAILURE);
|
exit(E_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __FreeBSD__
|
#if !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||||
|
|
||||||
#ifdef HAVE_USERSEC_H
|
#ifdef HAVE_USERSEC_H
|
||||||
update_userpw(pw->pw_passwd);
|
update_userpw(pw->pw_passwd);
|
||||||
@ -885,7 +885,7 @@ int main(int argc, char *argv[])
|
|||||||
update_noshadow(0);
|
update_noshadow(0);
|
||||||
#endif /* !HAVE_USERSEC_H */
|
#endif /* !HAVE_USERSEC_H */
|
||||||
|
|
||||||
#else /* __FreeBSD__ */
|
#else /* __FreeBSD__ && __NetBSD__ */
|
||||||
/*
|
/*
|
||||||
* FreeBSD password change, borrowed from the original FreeBSD sources
|
* FreeBSD password change, borrowed from the original FreeBSD sources
|
||||||
*/
|
*/
|
||||||
|
@ -30,7 +30,7 @@ char *crypt_make_salt(void);
|
|||||||
char *pw_encrypt(const char *, const char *);
|
char *pw_encrypt(const char *, const char *);
|
||||||
int i64c(int);
|
int i64c(int);
|
||||||
char *l64a(long);
|
char *l64a(long);
|
||||||
#ifndef __FreeBSD__
|
#if !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||||
static void fail_exit(int);
|
static void fail_exit(int);
|
||||||
static void oom(void);
|
static void oom(void);
|
||||||
static void update_noshadow(int);
|
static void update_noshadow(int);
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: mbuseradd.c
|
* $Id$
|
||||||
* Purpose ...............: setuid root version of useradd
|
* Purpose ...............: setuid root version of useradd
|
||||||
* Last modification date : 25-Aug-2001
|
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -165,7 +164,7 @@ int main(int argc, char *argv[])
|
|||||||
* Build command to add user entry to the /etc/passwd and /etc/shadow
|
* Build command to add user entry to the /etc/passwd and /etc/shadow
|
||||||
* files. We use the systems own useradd program.
|
* files. We use the systems own useradd program.
|
||||||
*/
|
*/
|
||||||
#ifdef __linux__
|
#if defined(__linux__) || defined(__NetBSD__)
|
||||||
if ((access("/usr/bin/useradd", R_OK)) == 0)
|
if ((access("/usr/bin/useradd", R_OK)) == 0)
|
||||||
strcpy(temp, "/usr/bin/useradd");
|
strcpy(temp, "/usr/bin/useradd");
|
||||||
else if ((access("/bin/useradd", R_OK)) == 0)
|
else if ((access("/bin/useradd", R_OK)) == 0)
|
||||||
@ -194,7 +193,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
sprintf(shell, "%s/bin/mbsebbs", getenv("MBSE_ROOT"));
|
sprintf(shell, "%s/bin/mbsebbs", getenv("MBSE_ROOT"));
|
||||||
|
|
||||||
#ifdef __linux__
|
#if defined(__linux__) || defined(__NetBSD__)
|
||||||
sprintf(PassEnt, "%s -c \"%s\" -d %s/%s -g %s -s %s %s",
|
sprintf(PassEnt, "%s -c \"%s\" -d %s/%s -g %s -s %s %s",
|
||||||
temp, argv[3], argv[4], argv[2], argv[1], shell, argv[2]);
|
temp, argv[3], argv[4], argv[2], argv[1], shell, argv[2]);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* Purpose ...............: FreeBSD password utilities.
|
* Purpose ...............: FreeBSD/NetBSD password utilities.
|
||||||
* Remark ................: Taken from FreeBSD and modified for MBSE BBS.
|
* Remark ................: Taken from FreeBSD and modified for MBSE BBS.
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2002
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -62,7 +62,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#ifdef __FreeBSD__ || __NetBSD__
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/errno.h>
|
#include <sys/errno.h>
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#ifndef _PW_UTIL_H
|
#ifndef _PW_UTIL_H
|
||||||
#define _PW_UTIL_H
|
#define _PW_UTIL_H
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||||
|
|
||||||
void pw_error __P((char *, int, int));
|
void pw_error __P((char *, int, int));
|
||||||
void pw_init __P((void));
|
void pw_init __P((void));
|
||||||
|
11
unix/pwio.c
11
unix/pwio.c
@ -1,13 +1,12 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: mbuseradd/pwio.c
|
* $Id$
|
||||||
* Purpose ...............: MBSE BBS Shadow Password Suite
|
* Purpose ...............: MBSE BBS Shadow Password Suite
|
||||||
* Last modification date : 09-Aug-2001
|
|
||||||
* 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
|
||||||
@ -31,7 +30,7 @@
|
|||||||
* Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#ifndef __FreeBSD__
|
#if !defined(__FreeBSD__) && !defined(__netBSD__)
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -169,7 +168,7 @@ int pw_name(const char *filename)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef __FreeBSD__
|
#if !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||||
int pw_lock(void)
|
int pw_lock(void)
|
||||||
{
|
{
|
||||||
return commonio_lock(&passwd_db);
|
return commonio_lock(&passwd_db);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#ifndef _PWIO_H
|
#ifndef _PWIO_H
|
||||||
#define _PWIO_H
|
#define _PWIO_H
|
||||||
|
|
||||||
#ifndef __FreeBSD__
|
#if !defined(__FreeBSD__) && !defined(__NetBSD__)
|
||||||
|
|
||||||
#ifndef PASSWD_FILE
|
#ifndef PASSWD_FILE
|
||||||
#define PASSWD_FILE "/etc/passwd"
|
#define PASSWD_FILE "/etc/passwd"
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
#include <utmpx.h>
|
#include <utmpx.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#if defined(__FreeBSD__) || defined(__NetBSD__)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <libutil.h>
|
#include <libutil.h>
|
||||||
#endif
|
#endif
|
||||||
@ -389,10 +389,10 @@ void setutmp(const char *name, const char *line, const char *host)
|
|||||||
utent = utline;
|
utent = utline;
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif __FreeBSD__
|
#elif __FreeBSD__ || __NetBSD__
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeBSD version, simple and mean.
|
* FreeBSD/NetBSD version, simple and mean.
|
||||||
*/
|
*/
|
||||||
void setutmp(const char *name, const char *line, const char *host)
|
void setutmp(const char *name, const char *line, const char *host)
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,7 @@ static void updwtmpx(const char *, const struct utmpx *);
|
|||||||
void setutmp(const char *, const char *, const char *);
|
void setutmp(const char *, const char *, const char *);
|
||||||
#elif HAVE_UTMPX_H
|
#elif HAVE_UTMPX_H
|
||||||
void setutmp(const char *, const char *, const char *);
|
void setutmp(const char *, const char *, const char *);
|
||||||
#elif __FreeBSD__
|
#elif __FreeBSD__ || __NetBSD__
|
||||||
void setutmp(const char *, const char *, const char *);
|
void setutmp(const char *, const char *, const char *);
|
||||||
#else /* !SVR4 */
|
#else /* !SVR4 */
|
||||||
void setutmp(const char *, const char *);
|
void setutmp(const char *, const char *);
|
||||||
|
Reference in New Issue
Block a user