summaryrefslogtreecommitdiff
path: root/security/vlock
diff options
context:
space:
mode:
authorTrevor Johnson <trevor@FreeBSD.org>2000-10-22 15:36:25 +0000
committerTrevor Johnson <trevor@FreeBSD.org>2000-10-22 15:36:25 +0000
commit1a71f31ac430772b7da4c500f8f5627e0aacca55 (patch)
tree6bf2f5fd1db16377a7f2d39d4bdd8e1bc91cfe03 /security/vlock
parentUpdate to version 1.3 (diff)
new port of vlock 1.3, a utility to lock a console until a password
is entered PR: 21834 Submitted by: George Reid <services@nevernet.net>
Notes
Notes: svn path=/head/; revision=34104
Diffstat (limited to 'security/vlock')
-rw-r--r--security/vlock/Makefile18
-rw-r--r--security/vlock/distinfo1
-rw-r--r--security/vlock/files/patch-aa36
-rw-r--r--security/vlock/files/patch-ab11
-rw-r--r--security/vlock/files/patch-ac11
-rw-r--r--security/vlock/files/patch-ad46
-rw-r--r--security/vlock/files/patch-ae11
-rw-r--r--security/vlock/pkg-comment1
-rw-r--r--security/vlock/pkg-descr5
-rw-r--r--security/vlock/pkg-plist1
10 files changed, 141 insertions, 0 deletions
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 <services@nevernet.net>
+#
+# $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 <bsd.port.mk>
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 <signal.h>
+ #include <sys/wait.h>
+ #include <sys/ioctl.h>
+-#include <sys/vt.h>
++#include <sys/consio.h>
+ #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 <unistd.h>
+ #include <termios.h>
+ #include <sys/ioctl.h>
+-#include <sys/vt.h>
++#include <sys/consio.h>
+ #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 <stdio.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+-#include <getopt.h>
+ #include <termios.h>
+ #include <signal.h>
+-#include <sys/vt.h>
+-#include <sys/kd.h>
+ #include <sys/ioctl.h>
++#include <sys/consio.h>
+ #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