Index: head/security/slush/Makefile =================================================================== --- head/security/slush/Makefile (revision 455270) +++ head/security/slush/Makefile (revision 455271) @@ -1,28 +1,30 @@ # Created by: shipley@dis.org # $FreeBSD$ PORTNAME= slush PORTVERSION= 0.1.1 PORTREVISION= 1 CATEGORIES= security MASTER_SITES= PACKETSTORM/crypt/SSL/slush MAINTAINER= ports@FreeBSD.org COMMENT= Telnet-like application which uses a secure SSL channel LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYRIGHT.GPL GNU_CONFIGURE= yes USES= ssl OPTIONS_DEFINE= DOCS do-install: - ${MKDIR} ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/control.txt ${STAGEDIR}${DOCSDIR} - ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} ${INSTALL_PROGRAM} ${WRKSRC}/slush ${STAGEDIR}${PREFIX}/bin/slush ${INSTALL_PROGRAM} ${WRKSRC}/slushd ${STAGEDIR}${PREFIX}/sbin/slushd + +do-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/control.txt ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR} .include Index: head/security/slush/files/patch-Makefile.in =================================================================== --- head/security/slush/files/patch-Makefile.in (revision 455270) +++ head/security/slush/files/patch-Makefile.in (revision 455271) @@ -1,22 +1,22 @@ ---- Makefile.in.orig Tue Apr 6 01:05:04 1999 -+++ Makefile.in Sat Jan 29 16:23:51 2000 -@@ -9,8 +9,8 @@ +--- Makefile.in.orig 1999-04-06 08:05:04 UTC ++++ Makefile.in +@@ -9,8 +9,8 @@ MANDIR=/usr/man/man8 CC=@CC@ INSTALL=@INSTALL@ -CFLAGS=@CFLAGS@ -Wall -DVERSION=\"$(VERSION)\" -I/usr/local/ssl/include -I/usr/include/ssl -LIBS=@LIBS@ -L/usr/local/ssl/lib -lssl -lcrypto +CFLAGS=@CFLAGS@ -Wall -DVERSION=\"$(VERSION)\" -I$(OPENSSLINC) -I$(OPENSSLINC)/openssl -I$(LOCALBASE)/include +LIBS=@LIBS@ -L$(OPENSSLLIB) -lssl -lcrypto $(EXTRA_SSL_LIBS) -lutil all: slush slushd -@@ -38,7 +38,7 @@ +@@ -38,7 +38,7 @@ $(MANDIR)/slush.8: slush.8 install: $(SBINDIR)/slushd $(MANDIR)/slush.8 cert: - ssleay req -new -x509 -nodes \ + openssl req -new -x509 -nodes \ -out slushd.pem -days 365 -keyout slushd.pem clean: Index: head/security/slush/files/patch-slush.c =================================================================== --- head/security/slush/files/patch-slush.c (revision 455270) +++ head/security/slush/files/patch-slush.c (revision 455271) @@ -1,13 +1,13 @@ ---- slush.c- Mon Oct 27 06:19:50 2003 -+++ slush.c Mon Oct 27 06:21:46 2003 +--- slush.c.orig 1999-05-07 02:24:09 UTC ++++ slush.c @@ -34,7 +34,10 @@ #include #include #include +#include +#if __FreeBSD_version >= 500000 #include +#endif #include #include #include Index: head/security/slush/files/patch-slushd.c =================================================================== --- head/security/slush/files/patch-slushd.c (revision 455270) +++ head/security/slush/files/patch-slushd.c (revision 455271) @@ -1,113 +1,112 @@ ---- slushd.c +--- slushd.c.orig 1999-05-07 02:24:09 UTC +++ slushd.c @@ -40,11 +40,19 @@ #include #include #include +#include +#if __FreeBSD_version >= 500000 #include +#endif #include #include #include +#if __FreeBSD_version >= 900007 +#include +#else #include +#include +#endif #include #include #include -@@ -653,59 +661,42 @@ +@@ -653,59 +661,42 @@ int process_control_word(const char *tok /* exits on error */ void log_uwtmp(struct passwd *pw, struct in_addr *i, char *tty, int is_logout) { - struct utmp ut; - int wtmp; - int lock; - - tty = strrchr(tty, '/'); - if (tty == NULL) - { - syslog(LOG_ERR, "Can't determine basename of tty"); - exit(3); - } - tty++; - - utmpname(_PATH_UTMP); - setutent(); - memset(&ut, 0, sizeof(ut)); +#if __FreeBSD_version >= 900007 + struct utmpx ut; - if (ut.ut_id[0] == 0) - strncpy(ut.ut_id, tty + 3, sizeof(ut.ut_id)); + if (strncmp(tty, "/dev/", 5) == 0) + tty += 5; - if (!is_logout) - strncpy(ut.ut_user, pw->pw_name, sizeof(ut.ut_user)); - - strncpy(ut.ut_line, tty, sizeof(ut.ut_line) - 1); - ut.ut_line[sizeof(ut.ut_line) - 1] = 0; - - ut.ut_time = time(NULL); - ut.ut_type = is_logout?DEAD_PROCESS:USER_PROCESS; - ut.ut_pid = getpid(); -- ++ memset(&ut, 0, sizeof ut); ++ gettimeofday(&ut.ut_tv, NULL); ++ strncpy(ut.ut_id, tty, sizeof ut.ut_id); + - strncpy(ut.ut_host, hostname, sizeof(ut.ut_host) - 1); - ut.ut_host[sizeof(ut.ut_host) - 1] = 0; - - memcpy(&ut.ut_addr, i, sizeof(ut.ut_addr)); -+ memset(&ut, 0, sizeof ut); -+ gettimeofday(&ut.ut_tv, NULL); -+ strncpy(ut.ut_id, tty, sizeof ut.ut_id); -+ + if (is_logout) { + ut.ut_type = DEAD_PROCESS; + } else { + ut.ut_type = USER_PROCESS; + strncpy(ut.ut_line, tty, sizeof ut.ut_line); + strncpy(ut.ut_user, pw->pw_name, sizeof ut.ut_user); + strncpy(ut.ut_host, inet_ntoa(*i), sizeof ut.ut_host); + } + pututxline(&ut); +#else + struct utmp ut; - pututline(&ut); - endutent(); + if (strncmp(tty, "/dev/", 5) == 0) + tty += 5; - lock = open(_PATH_WTMPLOCK, O_CREAT|O_WRONLY, 0660); - if (lock == -1) - ioerror("open"); - - if (flock(lock, LOCK_EX) == -1) - ioerror("flock"); - - wtmp = open(_PATH_WTMP, O_APPEND|O_WRONLY); - if (wtmp == -1) - ioerror("open"); - - write(wtmp, (char *)&ut, sizeof(ut)); - close(wtmp); + if (is_logout) { + logout(tty); + return; + } - flock(lock, LOCK_UN); - close(lock); + strncpy(ut.ut_line, tty, sizeof ut.ut_line); + strncpy(ut.ut_name, pw->pw_name, sizeof ut.ut_name); + strncpy(ut.ut_host, inet_ntoa(*i), sizeof ut.ut_host); + ut.ut_time = time(0); + login(&ut); +#endif } /* Retrieve client X509 certificate and test authentication */