Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Mar 2008 21:27:13 GMT
From:      GanaŽl Laplanche <ganael.laplanche@martymac.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/121678: [port update + adoption] security/vlock v1.3 -> v2.1
Message-ID:  <200803132127.m2DLRDCS018701@www.freebsd.org>
Resent-Message-ID: <200803132140.m2DLe0fN034136@freefall.freebsd.org>

Next in thread | Raw E-Mail | Index | Archive | Help

>Number:         121678
>Category:       ports
>Synopsis:       [port update + adoption] security/vlock v1.3 -> v2.1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 13 21:40:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     GanaŽl Laplanche
>Release:        7.0-STABLE
>Organization:
http://contribs.martymac.com
>Environment:
FreeBSD home.martymac.com 7.0-STABLE FreeBSD 7.0-STABLE #10: Wed Mar 12 14:04:40 CET 2008     root@home.martymac.com:/usr/obj/usr/src/sys/MYKERNEL  amd64
>Description:
Port update + adoption of security/vlock
Please, also add a local mirror for distfiles if possible.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -aNur vlock.orig/Makefile vlock/Makefile
--- vlock.orig/Makefile	2008-03-13 22:21:39.000000000 +0100
+++ vlock/Makefile	2008-03-13 22:24:37.000000000 +0100
@@ -6,15 +6,19 @@
 #
 
 PORTNAME=		vlock
-PORTVERSION=		1.3
+PORTVERSION=	2.1
 CATEGORIES=		security
-MASTER_SITES=		${MASTER_SITE_SUNSITE}
-MASTER_SITE_SUBDIR=	utils/console
+MASTER_SITES=	http://cthulhu.c3d2.de/~toidinamai/vlock/archive/
 
-MAINTAINER=		ports@FreeBSD.org
-COMMENT=	Locks a terminal
+MAINTAINER=		ganael.laplanche@martymac.com
+COMMENT=		Locks a terminal
 
+USE_GMAKE=		yes
+
+MANLANG=		""
+MANCOMPRESSED=	no
 MAN1=			vlock.1
-PLIST_FILES=	bin/vlock
+MAN8=			vlock-current.8 vlock-all.8 vlock-new.8 vlock-nosysrq.8
+PLIST_FILES=	bin/vlock sbin/vlock-current sbin/vlock-all sbin/vlock-nosysrq sbin/vlock-new
 
 .include <bsd.port.mk>
diff -aNur vlock.orig/distinfo vlock/distinfo
--- vlock.orig/distinfo	2008-03-13 22:21:39.000000000 +0100
+++ vlock/distinfo	2008-03-13 19:48:37.000000000 +0100
@@ -1,3 +1,3 @@
-MD5 (vlock-1.3.tar.gz) = d04076f9c5f12aadc4d5fbbabf8a0c12
-SHA256 (vlock-1.3.tar.gz) = 700b8f45b6b7cdaac2185a4796870ac378015db18a7414eebee5e5b6a4131daf
-SIZE (vlock-1.3.tar.gz) = 17188
+MD5 (vlock-2.1.tar.gz) = a365a8fdde9379417ef2adc1c1230c4d
+SHA256 (vlock-2.1.tar.gz) = 9d733ab0d8643ca71ee2c8bb22e8bc97a3d87b4f48582999d009855df402bace
+SIZE (vlock-2.1.tar.gz) = 21045
diff -aNur vlock.orig/files/patch-Makefile vlock/files/patch-Makefile
--- vlock.orig/files/patch-Makefile	1970-01-01 01:00:00.000000000 +0100
+++ vlock/files/patch-Makefile	2008-03-13 22:02:20.000000000 +0100
@@ -0,0 +1,19 @@
+--- Makefile.orig	2008-03-13 21:54:55.000000000 +0100
++++ Makefile	2008-03-13 22:02:01.000000000 +0100
+@@ -70,11 +70,11 @@
+ 
+ .PHONY: install-man
+ install-man:
+-	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock.1 $(DESTDIR)$(PREFIX)/share/man/man1/vlock.1
+-	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-current.8 $(DESTDIR)$(PREFIX)/share/man/man8/vlock-current.8
+-	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-all.8 $(DESTDIR)$(PREFIX)/share/man/man8/vlock-all.8
+-	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-new.8 $(DESTDIR)$(PREFIX)/share/man/man8/vlock-new.8
+-	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-nosysrq.8 $(DESTDIR)$(PREFIX)/share/man/man8/vlock-nosysrq.8
++	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock.1 $(DESTDIR)$(PREFIX)/man/man1/vlock.1
++	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-current.8 $(DESTDIR)$(PREFIX)/man/man8/vlock-current.8
++	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-all.8 $(DESTDIR)$(PREFIX)/man/man8/vlock-all.8
++	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-new.8 $(DESTDIR)$(PREFIX)/man/man8/vlock-new.8
++	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-nosysrq.8 $(DESTDIR)$(PREFIX)/man/man8/vlock-nosysrq.8
+ 
+ .PHONY: clean
+ clean:
diff -aNur vlock.orig/files/patch-aa vlock/files/patch-aa
--- vlock.orig/files/patch-aa	2008-03-13 22:21:39.000000000 +0100
+++ vlock/files/patch-aa	1970-01-01 01:00:00.000000000 +0100
@@ -1,36 +0,0 @@
---- Makefile.orig	Thu Jan 14 01:19:14 1999
-+++ Makefile	Wed Jun 16 17:23:34 2004
-@@ -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 ${PREFIX}/bin
-+	/usr/bin/install -c -o root -g wheel -m 444 vlock.1 ${MANPREFIX}/man/man1
- 
- clean:
--	rm -f $(OBJS) vlock core core.vlock
-+	rm -f $(OBJS) vlock vlock.core
- 
diff -aNur vlock.orig/files/patch-ab vlock/files/patch-ab
--- vlock.orig/files/patch-ab	2008-03-13 22:21:39.000000000 +0100
+++ vlock/files/patch-ab	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
---- 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 -aNur vlock.orig/files/patch-ac vlock/files/patch-ac
--- vlock.orig/files/patch-ac	2008-03-13 22:21:39.000000000 +0100
+++ vlock/files/patch-ac	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
---- 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 -aNur vlock.orig/files/patch-ad vlock/files/patch-ad
--- vlock.orig/files/patch-ad	2008-03-13 22:21:39.000000000 +0100
+++ vlock/files/patch-ad	1970-01-01 01:00:00.000000000 +0100
@@ -1,46 +0,0 @@
---- 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 -aNur vlock.orig/files/patch-ae vlock/files/patch-ae
--- vlock.orig/files/patch-ae	2008-03-13 22:21:39.000000000 +0100
+++ vlock/files/patch-ae	1970-01-01 01:00:00.000000000 +0100
@@ -1,39 +0,0 @@
---- input.c.orig	Thu Jan 14 03:19:14 1999
-+++ input.c	Fri Feb 28 13:48:38 2003
-@@ -60,11 +60,27 @@
- #error "Shadow and PAM don't mix!"
- #endif
- 
-+#if (__FreeBSD__ == 0)            /* 1.0 did not define __FreeBSD__ */
-+#define __FreeBSD_version 199401
-+#elsif __FreeBSD__ == 1          /* 1.1 defined it to be 1 */
-+#define __FreeBSD_version 199405
-+#else                           /* 2.0 and higher define it to be 2 */
-+#include <osreldate.h>          /* and this works */
-+#endif
-+
- #include <security/pam_appl.h>
-+#if defined (__FreeBSD_version) && (__FreeBSD_version > 500030)
-+#include <security/openpam.h>
-+#else
- #include <security/pam_misc.h>
-+#endif
- 
- static struct pam_conv PAM_conversation = {
-+#if defined (__FreeBSD_version) && (__FreeBSD_version > 500030)
-+    openpam_ttyconv,
-+#else
-     &misc_conv,
-+#endif
-     NULL
- };
- 
-@@ -291,7 +307,7 @@
-   setuid(getuid());
-   setgid(getgid());
- 
--  sprintf(prompt, "%s's password: ", username);
-+  snprintf(prompt, 99, "%s's password: ", username);
- #endif /* !USE_PAM */
- }
- 
diff -aNur vlock.orig/files/patch-config.mk vlock/files/patch-config.mk
--- vlock.orig/files/patch-config.mk	1970-01-01 01:00:00.000000000 +0100
+++ vlock/files/patch-config.mk	2008-03-13 22:01:39.000000000 +0100
@@ -0,0 +1,28 @@
+--- config.mk.orig	2008-03-13 21:59:42.000000000 +0100
++++ config.mk	2008-03-13 22:00:44.000000000 +0100
+@@ -9,13 +9,13 @@
+ 
+ # group to install vlock-all and vlock-nosysrq as
+ # defaults to 'root')
+-VLOCK_GROUP =
++VLOCK_GROUP = wheel
+ # mode to install vlock-all and vlock-nosysrq as
+ # defaults to 4711 if group is unset and 4710 otherwise
+ VLOCK_MODE =
+ 
+ # root's group
+-ROOT_GROUP = root
++ROOT_GROUP = wheel
+ 
+ # installation prefix
+ PREFIX = /usr/local
+@@ -30,7 +30,7 @@
+ LDFLAGS = 
+ 
+ # linker flags needed for pam
+-PAM_LIBS = -ldl -lpam
++PAM_LIBS = -lpam
+ 
+ # gnu install
+-INSTALL = install
++INSTALL = ginstall
diff -aNur vlock.orig/pkg-descr vlock/pkg-descr
--- vlock.orig/pkg-descr	2008-03-13 22:21:39.000000000 +0100
+++ vlock/pkg-descr	2008-03-13 19:49:58.000000000 +0100
@@ -1,5 +1,4 @@
 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
+WWW: http://freshmeat.net/projects/vlock


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



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?200803132127.m2DLRDCS018701>