From 1a71f31ac430772b7da4c500f8f5627e0aacca55 Mon Sep 17 00:00:00 2001 From: Trevor Johnson Date: Sun, 22 Oct 2000 15:36:25 +0000 Subject: new port of vlock 1.3, a utility to lock a console until a password is entered PR: 21834 Submitted by: George Reid --- security/Makefile | 1 + security/vlock/Makefile | 18 +++++++++++++++++ security/vlock/distinfo | 1 + security/vlock/files/patch-aa | 36 +++++++++++++++++++++++++++++++++ security/vlock/files/patch-ab | 11 +++++++++++ security/vlock/files/patch-ac | 11 +++++++++++ security/vlock/files/patch-ad | 46 +++++++++++++++++++++++++++++++++++++++++++ security/vlock/files/patch-ae | 11 +++++++++++ security/vlock/pkg-comment | 1 + security/vlock/pkg-descr | 5 +++++ security/vlock/pkg-plist | 1 + 11 files changed, 142 insertions(+) create mode 100644 security/vlock/Makefile create mode 100644 security/vlock/distinfo create mode 100644 security/vlock/files/patch-aa create mode 100644 security/vlock/files/patch-ab create mode 100644 security/vlock/files/patch-ac create mode 100644 security/vlock/files/patch-ad create mode 100644 security/vlock/files/patch-ae create mode 100644 security/vlock/pkg-comment create mode 100644 security/vlock/pkg-descr create mode 100644 security/vlock/pkg-plist diff --git a/security/Makefile b/security/Makefile index 80b66cfb8d12..5e10c5ade446 100644 --- a/security/Makefile +++ b/security/Makefile @@ -114,6 +114,7 @@ SUBDIR += tripwire SUBDIR += tripwire-131 SUBDIR += uvscan-dat + SUBDIR += vlock SUBDIR += vscan SUBDIR += whisker SUBDIR += xinetd diff --git a/security/vlock/Makefile b/security/vlock/Makefile new file mode 100644 index 000000000000..514176df05a8 --- /dev/null +++ b/security/vlock/Makefile @@ -0,0 +1,18 @@ +# New ports collection makefile for: vlock +# Date created: 08 Oct 2000 +# Whom: George Reid +# +# $FreeBSD$ +# + +PORTNAME= vlock +PORTVERSION= 1.3 +CATEGORIES= security +MASTER_SITES= ${MASTER_SITE_SUNSITE} +MASTER_SITE_SUBDIR= utils/console + +MAINTAINER= services@nevernet.net + +MAN1= vlock.1 + +.include diff --git a/security/vlock/distinfo b/security/vlock/distinfo new file mode 100644 index 000000000000..c9fd1e9c8854 --- /dev/null +++ b/security/vlock/distinfo @@ -0,0 +1 @@ +MD5 (vlock-1.3.tar.gz) = d04076f9c5f12aadc4d5fbbabf8a0c12 diff --git a/security/vlock/files/patch-aa b/security/vlock/files/patch-aa new file mode 100644 index 000000000000..506bc528bf29 --- /dev/null +++ b/security/vlock/files/patch-aa @@ -0,0 +1,36 @@ +--- Makefile.orig Sun Oct 8 18:03:19 2000 ++++ Makefile Sun Oct 8 18:03:24 2000 +@@ -1,24 +1,19 @@ + # vlock makefile + +-CC = gcc +-# remove the -DUSE_PAM, -ldl, and -lpam if you aren't using PAM +-RPM_OPT_FLAGS=-O2 +-CFLAGS = $(RPM_OPT_FLAGS) -DUSE_PAM +-LDFLAGS = -ldl -lpam -lpam_misc ++CFLAGS += -DUSE_PAM ++LDFLAGS = -lpam + + OBJS = vlock.o signals.o help.o terminal.o input.o + +-vlock: $(OBJS) ++all: vlock + +-vlock.man: vlock.1 +- groff -man -Tascii vlock.1 > vlock.man ++vlock: $(OBJS) ++ cc $(OBJS) $(LDFLAGS) -o vlock + +-vlock.o: vlock.h version.h +-signals.o: vlock.h +-help.o: vlock.h +-terminal.o: vlock.h +-input.o: vlock.h ++install: ++ /usr/bin/install -c -s -o root -g wheel -m 4555 vlock /usr/local/bin/vlock ++ /usr/bin/install -c -o root -g wheel -m 444 vlock.1 /usr/local/man/man1 + + clean: +- rm -f $(OBJS) vlock core core.vlock ++ rm -f $(OBJS) vlock vlock.core + diff --git a/security/vlock/files/patch-ab b/security/vlock/files/patch-ab new file mode 100644 index 000000000000..cf1153881467 --- /dev/null +++ b/security/vlock/files/patch-ab @@ -0,0 +1,11 @@ +--- signals.c.orig Sun Oct 8 18:03:19 2000 ++++ signals.c Sun Oct 8 18:03:24 2000 +@@ -16,7 +16,7 @@ + #include + #include + #include +-#include ++#include + #include "vlock.h" + + diff --git a/security/vlock/files/patch-ac b/security/vlock/files/patch-ac new file mode 100644 index 000000000000..bf65297f651e --- /dev/null +++ b/security/vlock/files/patch-ac @@ -0,0 +1,11 @@ +--- terminal.c.orig Sun Oct 8 18:03:19 2000 ++++ terminal.c Sun Oct 8 18:03:24 2000 +@@ -15,7 +15,7 @@ + #include + #include + #include +-#include ++#include + #include "vlock.h" + + diff --git a/security/vlock/files/patch-ad b/security/vlock/files/patch-ad new file mode 100644 index 000000000000..bcd6e35fbc3e --- /dev/null +++ b/security/vlock/files/patch-ad @@ -0,0 +1,46 @@ +--- vlock.c.orig Sun Oct 8 18:03:19 2000 ++++ vlock.c Sun Oct 8 18:03:24 2000 +@@ -14,12 +14,10 @@ + #include + #include + #include +-#include + #include + #include +-#include +-#include + #include ++#include + #include "vlock.h" + #include "version.h" + +@@ -37,20 +35,12 @@ + + int main(int argc, char **argv) { + +- static struct option long_options[] = { /* For parsing long arguments */ +- {"current", 0, &o_lock_all, 0}, +- {"all", 0, &o_lock_all, 1}, +- {"version", no_argument, 0, O_VERSION}, +- {"help", no_argument, 0, O_HELP}, +- {0, 0, 0, 0}, +- }; + int option_index; /* Unused */ + int c; + struct vt_mode vtm; + + /* First we parse all the command line arguments */ +- while ((c = getopt_long(argc, argv, "acvh", +- long_options, &option_index)) != -1) { ++ while ((c = getopt(argc, argv, "acvh")) != -1) { + switch(c) { + case 'c': + o_lock_all = 0; +@@ -107,6 +97,7 @@ + vtm.mode = VT_PROCESS; + vtm.relsig = SIGUSR1; /* handled by release_vt() */ + vtm.acqsig = SIGUSR2; /* handled by acquire_vt() */ ++ vtm.frsig = SIGUSR1; /* needed by FreeBSD */ + ioctl(vfd, VT_SETMODE, &vtm); + } + diff --git a/security/vlock/files/patch-ae b/security/vlock/files/patch-ae new file mode 100644 index 000000000000..8a040468317d --- /dev/null +++ b/security/vlock/files/patch-ae @@ -0,0 +1,11 @@ +--- input.c.orig Wed Jan 13 16:19:14 1999 ++++ input.c Sun Oct 22 08:22:42 2000 +@@ -291,7 +291,7 @@ + setuid(getuid()); + setgid(getgid()); + +- sprintf(prompt, "%s's password: ", username); ++ snprintf(prompt, 99, "%s's password: ", username); + #endif /* !USE_PAM */ + } + diff --git a/security/vlock/pkg-comment b/security/vlock/pkg-comment new file mode 100644 index 000000000000..10b7d1ea646c --- /dev/null +++ b/security/vlock/pkg-comment @@ -0,0 +1 @@ +Locks a terminal diff --git a/security/vlock/pkg-descr b/security/vlock/pkg-descr new file mode 100644 index 000000000000..fcbdf10d2343 --- /dev/null +++ b/security/vlock/pkg-descr @@ -0,0 +1,5 @@ +This is a utility which locks a terminal so it can only be unlocked with the +user's password (or the root password). It uses PAM authentication by default. + +- George Reid +services@nevernet.net diff --git a/security/vlock/pkg-plist b/security/vlock/pkg-plist new file mode 100644 index 000000000000..325915dc2c45 --- /dev/null +++ b/security/vlock/pkg-plist @@ -0,0 +1 @@ +bin/vlock -- cgit v1.2.3