Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Oct 2000 19:35:27 +0100 (BST)
From:      George Reid <geeorgy@nevernet.net>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/21834: New port: vlock, all-console locker
Message-ID:  <Pine.BSF.4.21.0010081932190.19730-100000@sobek.nevernet.net>

next in thread | raw e-mail | index | archive | help

>Number:         21834
>Category:       ports
>Synopsis:       New port: vlock, all-console locker
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 08 11:40:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     George Reid
>Release:        FreeBSD 4.1-RELEASE i386
>Organization:
NeverNET IRC
>Environment:

>Description:

vlock is a utility which locks a terminal which can only be unlocked
with the user's password (or the root password). vlock also has the
ability to prevent console switching (in effect everybody out of the local
system (except for root)) and uses PAM authentication by default.

>How-To-Repeat:

>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	vlock
#	vlock/Makefile
#	vlock/files
#	vlock/files/md5
#	vlock/patches
#	vlock/patches/patch-aa
#	vlock/patches/patch-ab
#	vlock/patches/patch-ac
#	vlock/patches/patch-ad
#	vlock/pkg
#	vlock/pkg/PLIST
#	vlock/pkg/COMMENT
#	vlock/pkg/DESCR
#
echo c - vlock
mkdir -p vlock > /dev/null 2>&1
echo x - vlock/Makefile
sed 's/^X//' >vlock/Makefile << 'END-of-vlock/Makefile'
X# New ports collection makefile for:   vlock
X# Date created:        08 Oct 2000
X# Whom:                George Reid <services@nevernet.net>
X#
X# $FreeBSD$
X#
X
XPORTNAME=       	vlock
XPORTVERSION=		1.3
XCATEGORIES=     	misc
XMASTER_SITES=   	${MASTER_SITE_SUNSITE}
XMASTER_SITE_SUBDIR=	utils/console
X
XMAINTAINER=		services@nevernet.net
X
XMAN1=			vlock.1
X
X.include <bsd.port.mk>
END-of-vlock/Makefile
echo c - vlock/files
mkdir -p vlock/files > /dev/null 2>&1
echo x - vlock/files/md5
sed 's/^X//' >vlock/files/md5 << 'END-of-vlock/files/md5'
XMD5 (vlock-1.3.tar.gz) = d04076f9c5f12aadc4d5fbbabf8a0c12
END-of-vlock/files/md5
echo c - vlock/patches
mkdir -p vlock/patches > /dev/null 2>&1
echo x - vlock/patches/patch-aa
sed 's/^X//' >vlock/patches/patch-aa << 'END-of-vlock/patches/patch-aa'
X--- Makefile.orig	Sun Oct  8 18:03:19 2000
X+++ Makefile		Sun Oct  8 18:03:24 2000
X@@ -1,24 +1,19 @@
X # vlock makefile
X 
X-CC = gcc
X-# remove the -DUSE_PAM, -ldl, and -lpam if you aren't using PAM
X-RPM_OPT_FLAGS=-O2
X-CFLAGS = $(RPM_OPT_FLAGS) -DUSE_PAM
X-LDFLAGS = -ldl -lpam -lpam_misc
X+CFLAGS += -DUSE_PAM
X+LDFLAGS = -lpam
X 
X OBJS = vlock.o signals.o help.o terminal.o input.o
X 
X-vlock: $(OBJS)
X+all:	vlock
X 
X-vlock.man: vlock.1
X-	groff -man -Tascii vlock.1 > vlock.man
X+vlock:	$(OBJS)
X+	cc $(OBJS) $(LDFLAGS) -o vlock
X 
X-vlock.o: vlock.h version.h
X-signals.o: vlock.h
X-help.o: vlock.h
X-terminal.o: vlock.h
X-input.o: vlock.h
X+install:
X+	/usr/bin/install -c -s -o root -g wheel -m 4555 vlock /usr/local/bin/vlock
X+	/usr/bin/install -c -o root -g wheel -m 444 vlock.1 /usr/local/man/man1
X 
X clean:
X-	rm -f $(OBJS) vlock core core.vlock
X+	rm -f $(OBJS) vlock vlock.core
X 
END-of-vlock/patches/patch-aa
echo x - vlock/patches/patch-ab
sed 's/^X//' >vlock/patches/patch-ab << 'END-of-vlock/patches/patch-ab'
X--- signals.c.orig	Sun Oct  8 18:03:19 2000
X+++ signals.c		Sun Oct  8 18:03:24 2000
X@@ -16,7 +16,7 @@
X #include <signal.h>
X #include <sys/wait.h>
X #include <sys/ioctl.h>
X-#include <sys/vt.h>
X+#include <sys/consio.h>
X #include "vlock.h"
X 
X 
END-of-vlock/patches/patch-ab
echo x - vlock/patches/patch-ac
sed 's/^X//' >vlock/patches/patch-ac << 'END-of-vlock/patches/patch-ac'
X--- terminal.c.orig	Sun Oct  8 18:03:19 2000
X+++ terminal.c		Sun Oct  8 18:03:24 2000
X@@ -15,7 +15,7 @@
X #include <unistd.h>
X #include <termios.h>
X #include <sys/ioctl.h>
X-#include <sys/vt.h>
X+#include <sys/consio.h>
X #include "vlock.h"
X 
X 
END-of-vlock/patches/patch-ac
echo x - vlock/patches/patch-ad
sed 's/^X//' >vlock/patches/patch-ad << 'END-of-vlock/patches/patch-ad'
X--- vlock.c.orig	Sun Oct  8 18:03:19 2000
X+++ vlock.c		Sun Oct  8 18:03:24 2000
X@@ -14,12 +14,10 @@
X #include <stdio.h>
X #include <unistd.h>
X #include <fcntl.h>
X-#include <getopt.h>
X #include <termios.h>
X #include <signal.h>
X-#include <sys/vt.h>
X-#include <sys/kd.h>
X #include <sys/ioctl.h>
X+#include <sys/consio.h>
X #include "vlock.h"
X #include "version.h"
X 
X@@ -37,20 +35,12 @@
X 
X int main(int argc, char **argv) {
X 
X-  static struct option long_options[] = { /* For parsing long arguments */
X-    {"current", 0, &o_lock_all, 0},
X-    {"all", 0, &o_lock_all, 1},
X-    {"version", no_argument, 0, O_VERSION},
X-    {"help", no_argument, 0, O_HELP},
X-    {0, 0, 0, 0},
X-  };
X   int option_index; /* Unused */
X   int c;
X   struct vt_mode vtm;
X 
X   /* First we parse all the command line arguments */
X-  while ((c = getopt_long(argc, argv, "acvh",
X-			  long_options, &option_index)) != -1) {
X+  while ((c = getopt(argc, argv, "acvh")) != -1) {
X     switch(c) {
X     case 'c':
X       o_lock_all = 0;
X@@ -107,6 +97,7 @@
X     vtm.mode = VT_PROCESS;
X     vtm.relsig = SIGUSR1; /* handled by release_vt() */
X     vtm.acqsig = SIGUSR2; /* handled by acquire_vt() */
X+    vtm.frsig = SIGUSR1;  /* needed by FreeBSD */
X     ioctl(vfd, VT_SETMODE, &vtm);
X   }
X 
END-of-vlock/patches/patch-ad
echo c - vlock/pkg
mkdir -p vlock/pkg > /dev/null 2>&1
echo x - vlock/pkg/PLIST
sed 's/^X//' >vlock/pkg/PLIST << 'END-of-vlock/pkg/PLIST'
Xbin/vlock
END-of-vlock/pkg/PLIST
echo x - vlock/pkg/COMMENT
sed 's/^X//' >vlock/pkg/COMMENT << 'END-of-vlock/pkg/COMMENT'
XA terminal locking with the ability to prevent console switching
END-of-vlock/pkg/COMMENT
echo x - vlock/pkg/DESCR
sed 's/^X//' >vlock/pkg/DESCR << 'END-of-vlock/pkg/DESCR'
Xvlock is a utility which locks a terminal which can only be unlocked
Xwith the user's password (or the root password). vlock also has the
Xability to prevent console switching (in effect everybody out of the local
Xsystem (except for root)) and uses PAM authentication by default.
X
X- George Reid
Xservices@nevernet.net
END-of-vlock/pkg/DESCR
exit



>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0010081932190.19730-100000>