View | Details | Raw Unified | Return to bug 121678 | Differences between
and this patch

Collapse All | Expand All

(-)vlock/Makefile (-6 / +10 lines)
Lines 6-20 Link Here
6
#
6
#
7
7
8
PORTNAME=		vlock
8
PORTNAME=		vlock
9
PORTVERSION=		1.3
9
PORTVERSION=	2.1
10
CATEGORIES=		security
10
CATEGORIES=		security
11
MASTER_SITES=		${MASTER_SITE_SUNSITE}
11
MASTER_SITES=	http://cthulhu.c3d2.de/~toidinamai/vlock/archive/
12
MASTER_SITE_SUBDIR=	utils/console
13
12
14
MAINTAINER=		ports@FreeBSD.org
13
MAINTAINER=		ganael.laplanche@martymac.com
15
COMMENT=	Locks a terminal
14
COMMENT=		Locks a terminal
16
15
16
USE_GMAKE=		yes
17
18
MANLANG=		""
19
MANCOMPRESSED=	no
17
MAN1=			vlock.1
20
MAN1=			vlock.1
18
PLIST_FILES=	bin/vlock
21
MAN8=			vlock-current.8 vlock-all.8 vlock-new.8 vlock-nosysrq.8
22
PLIST_FILES=	bin/vlock sbin/vlock-current sbin/vlock-all sbin/vlock-nosysrq sbin/vlock-new
19
23
20
.include <bsd.port.mk>
24
.include <bsd.port.mk>
(-)vlock/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (vlock-1.3.tar.gz) = d04076f9c5f12aadc4d5fbbabf8a0c12
1
MD5 (vlock-2.1.tar.gz) = a365a8fdde9379417ef2adc1c1230c4d
2
SHA256 (vlock-1.3.tar.gz) = 700b8f45b6b7cdaac2185a4796870ac378015db18a7414eebee5e5b6a4131daf
2
SHA256 (vlock-2.1.tar.gz) = 9d733ab0d8643ca71ee2c8bb22e8bc97a3d87b4f48582999d009855df402bace
3
SIZE (vlock-1.3.tar.gz) = 17188
3
SIZE (vlock-2.1.tar.gz) = 21045
(-)vlock/files/patch-Makefile (+19 lines)
Line 0 Link Here
1
--- Makefile.orig	2008-03-13 21:54:55.000000000 +0100
2
+++ Makefile	2008-03-13 22:02:01.000000000 +0100
3
@@ -70,11 +70,11 @@
4
 
5
 .PHONY: install-man
6
 install-man:
7
-	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock.1 $(DESTDIR)$(PREFIX)/share/man/man1/vlock.1
8
-	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-current.8 $(DESTDIR)$(PREFIX)/share/man/man8/vlock-current.8
9
-	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-all.8 $(DESTDIR)$(PREFIX)/share/man/man8/vlock-all.8
10
-	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-new.8 $(DESTDIR)$(PREFIX)/share/man/man8/vlock-new.8
11
-	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-nosysrq.8 $(DESTDIR)$(PREFIX)/share/man/man8/vlock-nosysrq.8
12
+	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock.1 $(DESTDIR)$(PREFIX)/man/man1/vlock.1
13
+	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-current.8 $(DESTDIR)$(PREFIX)/man/man8/vlock-current.8
14
+	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-all.8 $(DESTDIR)$(PREFIX)/man/man8/vlock-all.8
15
+	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-new.8 $(DESTDIR)$(PREFIX)/man/man8/vlock-new.8
16
+	$(INSTALL) -D -m 644 -o root -g $(ROOT_GROUP) man/vlock-nosysrq.8 $(DESTDIR)$(PREFIX)/man/man8/vlock-nosysrq.8
17
 
18
 .PHONY: clean
19
 clean:
(-)vlock/files/patch-aa (-36 lines)
Lines 1-36 Link Here
1
--- Makefile.orig	Thu Jan 14 01:19:14 1999
2
+++ Makefile	Wed Jun 16 17:23:34 2004
3
@@ -1,24 +1,19 @@
4
 # vlock makefile
5
 
6
-CC = gcc
7
-# remove the -DUSE_PAM, -ldl, and -lpam if you aren't using PAM
8
-RPM_OPT_FLAGS=-O2
9
-CFLAGS = $(RPM_OPT_FLAGS) -DUSE_PAM
10
-LDFLAGS = -ldl -lpam -lpam_misc
11
+CFLAGS += -DUSE_PAM
12
+LDFLAGS = -lpam
13
 
14
 OBJS = vlock.o signals.o help.o terminal.o input.o
15
 
16
-vlock: $(OBJS)
17
+all:	vlock
18
 
19
-vlock.man: vlock.1
20
-	groff -man -Tascii vlock.1 > vlock.man
21
+vlock:	$(OBJS)
22
+	cc $(OBJS) $(LDFLAGS) -o vlock
23
 
24
-vlock.o: vlock.h version.h
25
-signals.o: vlock.h
26
-help.o: vlock.h
27
-terminal.o: vlock.h
28
-input.o: vlock.h
29
+install:
30
+	/usr/bin/install -c -s -o root -g wheel -m 4555 vlock ${PREFIX}/bin
31
+	/usr/bin/install -c -o root -g wheel -m 444 vlock.1 ${MANPREFIX}/man/man1
32
 
33
 clean:
34
-	rm -f $(OBJS) vlock core core.vlock
35
+	rm -f $(OBJS) vlock vlock.core
36
 
(-)vlock/files/patch-ab (-11 lines)
Lines 1-11 Link Here
1
--- signals.c.orig	Sun Oct  8 18:03:19 2000
2
+++ signals.c		Sun Oct  8 18:03:24 2000
3
@@ -16,7 +16,7 @@
4
 #include <signal.h>
5
 #include <sys/wait.h>
6
 #include <sys/ioctl.h>
7
-#include <sys/vt.h>
8
+#include <sys/consio.h>
9
 #include "vlock.h"
10
 
11
 
(-)vlock/files/patch-ac (-11 lines)
Lines 1-11 Link Here
1
--- terminal.c.orig	Sun Oct  8 18:03:19 2000
2
+++ terminal.c		Sun Oct  8 18:03:24 2000
3
@@ -15,7 +15,7 @@
4
 #include <unistd.h>
5
 #include <termios.h>
6
 #include <sys/ioctl.h>
7
-#include <sys/vt.h>
8
+#include <sys/consio.h>
9
 #include "vlock.h"
10
 
11
 
(-)vlock/files/patch-ad (-46 lines)
Lines 1-46 Link Here
1
--- vlock.c.orig	Sun Oct  8 18:03:19 2000
2
+++ vlock.c		Sun Oct  8 18:03:24 2000
3
@@ -14,12 +14,10 @@
4
 #include <stdio.h>
5
 #include <unistd.h>
6
 #include <fcntl.h>
7
-#include <getopt.h>
8
 #include <termios.h>
9
 #include <signal.h>
10
-#include <sys/vt.h>
11
-#include <sys/kd.h>
12
 #include <sys/ioctl.h>
13
+#include <sys/consio.h>
14
 #include "vlock.h"
15
 #include "version.h"
16
 
17
@@ -37,20 +35,12 @@
18
 
19
 int main(int argc, char **argv) {
20
 
21
-  static struct option long_options[] = { /* For parsing long arguments */
22
-    {"current", 0, &o_lock_all, 0},
23
-    {"all", 0, &o_lock_all, 1},
24
-    {"version", no_argument, 0, O_VERSION},
25
-    {"help", no_argument, 0, O_HELP},
26
-    {0, 0, 0, 0},
27
-  };
28
   int option_index; /* Unused */
29
   int c;
30
   struct vt_mode vtm;
31
 
32
   /* First we parse all the command line arguments */
33
-  while ((c = getopt_long(argc, argv, "acvh",
34
-			  long_options, &option_index)) != -1) {
35
+  while ((c = getopt(argc, argv, "acvh")) != -1) {
36
     switch(c) {
37
     case 'c':
38
       o_lock_all = 0;
39
@@ -107,6 +97,7 @@
40
     vtm.mode = VT_PROCESS;
41
     vtm.relsig = SIGUSR1; /* handled by release_vt() */
42
     vtm.acqsig = SIGUSR2; /* handled by acquire_vt() */
43
+    vtm.frsig = SIGUSR1;  /* needed by FreeBSD */
44
     ioctl(vfd, VT_SETMODE, &vtm);
45
   }
46
 
(-)vlock/files/patch-ae (-39 lines)
Lines 1-39 Link Here
1
--- input.c.orig	Thu Jan 14 03:19:14 1999
2
+++ input.c	Fri Feb 28 13:48:38 2003
3
@@ -60,11 +60,27 @@
4
 #error "Shadow and PAM don't mix!"
5
 #endif
6
 
7
+#if (__FreeBSD__ == 0)            /* 1.0 did not define __FreeBSD__ */
8
+#define __FreeBSD_version 199401
9
+#elsif __FreeBSD__ == 1          /* 1.1 defined it to be 1 */
10
+#define __FreeBSD_version 199405
11
+#else                           /* 2.0 and higher define it to be 2 */
12
+#include <osreldate.h>          /* and this works */
13
+#endif
14
+
15
 #include <security/pam_appl.h>
16
+#if defined (__FreeBSD_version) && (__FreeBSD_version > 500030)
17
+#include <security/openpam.h>
18
+#else
19
 #include <security/pam_misc.h>
20
+#endif
21
 
22
 static struct pam_conv PAM_conversation = {
23
+#if defined (__FreeBSD_version) && (__FreeBSD_version > 500030)
24
+    openpam_ttyconv,
25
+#else
26
     &misc_conv,
27
+#endif
28
     NULL
29
 };
30
 
31
@@ -291,7 +307,7 @@
32
   setuid(getuid());
33
   setgid(getgid());
34
 
35
-  sprintf(prompt, "%s's password: ", username);
36
+  snprintf(prompt, 99, "%s's password: ", username);
37
 #endif /* !USE_PAM */
38
 }
39
 
(-)vlock/files/patch-config.mk (+28 lines)
Line 0 Link Here
1
--- config.mk.orig	2008-03-13 21:59:42.000000000 +0100
2
+++ config.mk	2008-03-13 22:00:44.000000000 +0100
3
@@ -9,13 +9,13 @@
4
 
5
 # group to install vlock-all and vlock-nosysrq as
6
 # defaults to 'root')
7
-VLOCK_GROUP =
8
+VLOCK_GROUP = wheel
9
 # mode to install vlock-all and vlock-nosysrq as
10
 # defaults to 4711 if group is unset and 4710 otherwise
11
 VLOCK_MODE =
12
 
13
 # root's group
14
-ROOT_GROUP = root
15
+ROOT_GROUP = wheel
16
 
17
 # installation prefix
18
 PREFIX = /usr/local
19
@@ -30,7 +30,7 @@
20
 LDFLAGS = 
21
 
22
 # linker flags needed for pam
23
-PAM_LIBS = -ldl -lpam
24
+PAM_LIBS = -lpam
25
 
26
 # gnu install
27
-INSTALL = install
28
+INSTALL = ginstall
(-)vlock/pkg-descr (-2 / +1 lines)
Lines 1-5 Link Here
1
This is a utility which locks a terminal so it can only be unlocked with the
1
This is a utility which locks a terminal so it can only be unlocked with the
2
user's password (or the root password).  It uses PAM authentication by default.
2
user's password (or the root password).  It uses PAM authentication by default.
3
3
4
- George Reid
4
WWW: http://freshmeat.net/projects/vlock
5
services@nevernet.net

Return to bug 121678