From 1bba722b5edcd4f9180eceddcf8d93c80ce799cb Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Sat, 20 Oct 2007 14:55:49 +0000 Subject: [PATCH 01/15] Initialize branch F-8 for vlock --- branch | 1 + 1 file changed, 1 insertion(+) create mode 100644 branch diff --git a/branch b/branch new file mode 100644 index 0000000..e9e7ccd --- /dev/null +++ b/branch @@ -0,0 +1 @@ +F-8 From 0f1190536804f0c68c44ba35d22052a8cc027808 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 19 Feb 2008 10:38:55 +0000 Subject: [PATCH 02/15] - Autorebuild for GCC 4.3 --- vlock.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlock.spec b/vlock.spec index 642dd93..650f8dc 100644 --- a/vlock.spec +++ b/vlock.spec @@ -1,7 +1,7 @@ Summary: A program which locks one or more virtual consoles Name: vlock Version: 1.3 -Release: 25%{?dist} +Release: 26%{?dist} License: GPL Group: Applications/System Source: ftp://tsx-11.mit.edu:/pub/linux/sources/usr.bin/vlock-1.3.tar.gz @@ -55,6 +55,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/vlock.1* %changelog +* Tue Feb 19 2008 Fedora Release Engineering - 1.3-26 +- Autorebuild for GCC 4.3 + * Thu Mar 1 2007 Karel Zak - 1.3-25 - add missing -p to install calls From 345e55a5244ef59be1083ac3d91c13cb5a4b741a Mon Sep 17 00:00:00 2001 From: Tom Callaway Date: Tue, 9 Sep 2008 03:29:10 +0000 Subject: [PATCH 03/15] fix license tag --- vlock.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/vlock.spec b/vlock.spec index 650f8dc..127a99f 100644 --- a/vlock.spec +++ b/vlock.spec @@ -1,8 +1,9 @@ Summary: A program which locks one or more virtual consoles Name: vlock Version: 1.3 -Release: 26%{?dist} -License: GPL +Release: 27%{?dist} +# No version specified. +License: GPL+ Group: Applications/System Source: ftp://tsx-11.mit.edu:/pub/linux/sources/usr.bin/vlock-1.3.tar.gz @@ -55,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/vlock.1* %changelog +* Mon Sep 8 2008 Tom "spot" Callaway - 1.3-27 +- fix license tag + * Tue Feb 19 2008 Fedora Release Engineering - 1.3-26 - Autorebuild for GCC 4.3 From 34bfdb7e5b9fbfa6b93f40eaba8d780d8b38150c Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Thu, 26 Feb 2009 00:40:53 +0000 Subject: [PATCH 04/15] - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild --- vlock.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlock.spec b/vlock.spec index 127a99f..10ab632 100644 --- a/vlock.spec +++ b/vlock.spec @@ -1,7 +1,7 @@ Summary: A program which locks one or more virtual consoles Name: vlock Version: 1.3 -Release: 27%{?dist} +Release: 28%{?dist} # No version specified. License: GPL+ Group: Applications/System @@ -56,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/vlock.1* %changelog +* Wed Feb 25 2009 Fedora Release Engineering - 1.3-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + * Mon Sep 8 2008 Tom "spot" Callaway - 1.3-27 - fix license tag From 37146c6fe71e3cb67b041cf29a4a312493fcd0ca Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Mon, 27 Jul 2009 06:56:47 +0000 Subject: [PATCH 05/15] - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild --- vlock.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlock.spec b/vlock.spec index 10ab632..7c693f1 100644 --- a/vlock.spec +++ b/vlock.spec @@ -1,7 +1,7 @@ Summary: A program which locks one or more virtual consoles Name: vlock Version: 1.3 -Release: 28%{?dist} +Release: 29%{?dist} # No version specified. License: GPL+ Group: Applications/System @@ -56,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/vlock.1* %changelog +* Sun Jul 26 2009 Fedora Release Engineering - 1.3-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + * Wed Feb 25 2009 Fedora Release Engineering - 1.3-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild From ffb7d1a56ef2d60615a321adb3de4158c7f55c5a Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Wed, 25 Nov 2009 22:43:23 +0000 Subject: [PATCH 06/15] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 331b30b..1a67ad4 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: vlock -# $Id: Makefile,v 1.1 2004/09/09 14:00:42 cvsdist Exp $ +# $Id: Makefile,v 1.2 2007/10/15 19:30:10 notting Exp $ NAME := vlock SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From d9e311effb226049a8c7dccbb6d07aa43874b250 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 26 Nov 2009 01:14:58 +0000 Subject: [PATCH 07/15] Fix typo that causes a failure to update the common directory. (releng #2781) --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 331b30b..1a67ad4 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,10 @@ # Makefile for source rpm: vlock -# $Id: Makefile,v 1.1 2004/09/09 14:00:42 cvsdist Exp $ +# $Id: Makefile,v 1.2 2007/10/15 19:30:10 notting Exp $ NAME := vlock SPECFILE = $(firstword $(wildcard *.spec)) define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done endef MAKEFILE_COMMON := $(shell $(find-makefile-common)) From f2333b1a238ea48b83a23228fb36f0154ffc6854 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 15:06:28 +0000 Subject: [PATCH 08/15] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- branch | 1 - 3 files changed, 22 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile delete mode 100644 branch diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 1a67ad4..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: vlock -# $Id: Makefile,v 1.2 2007/10/15 19:30:10 notting Exp $ -NAME := vlock -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/branch b/branch deleted file mode 100644 index e9e7ccd..0000000 --- a/branch +++ /dev/null @@ -1 +0,0 @@ -F-8 From 6008f4e176bd2e0600dcbfd2bd8a40b000d7ca77 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 29 Jul 2010 15:06:38 +0000 Subject: [PATCH 09/15] dist-git conversion --- .cvsignore => .gitignore | 0 Makefile | 21 --------------------- 2 files changed, 21 deletions(-) rename .cvsignore => .gitignore (100%) delete mode 100644 Makefile diff --git a/.cvsignore b/.gitignore similarity index 100% rename from .cvsignore rename to .gitignore diff --git a/Makefile b/Makefile deleted file mode 100644 index 1a67ad4..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: vlock -# $Id: Makefile,v 1.2 2007/10/15 19:30:10 notting Exp $ -NAME := vlock -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attempt a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) From 1fbb27ed7e117c977ec2d322c6bbc0ca8140b10f Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Mon, 7 Feb 2011 19:43:23 -0600 Subject: [PATCH 10/15] - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild --- vlock.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlock.spec b/vlock.spec index 7c693f1..598482b 100644 --- a/vlock.spec +++ b/vlock.spec @@ -1,7 +1,7 @@ Summary: A program which locks one or more virtual consoles Name: vlock Version: 1.3 -Release: 29%{?dist} +Release: 30%{?dist} # No version specified. License: GPL+ Group: Applications/System @@ -56,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/vlock.1* %changelog +* Mon Feb 07 2011 Fedora Release Engineering - 1.3-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + * Sun Jul 26 2009 Fedora Release Engineering - 1.3-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild From 3d8f6b4a7aeed0a0160a41d131cdc7a5e994a139 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 14 Jan 2012 02:00:51 -0600 Subject: [PATCH 11/15] - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild --- vlock.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlock.spec b/vlock.spec index 598482b..4413557 100644 --- a/vlock.spec +++ b/vlock.spec @@ -1,7 +1,7 @@ Summary: A program which locks one or more virtual consoles Name: vlock Version: 1.3 -Release: 30%{?dist} +Release: 31%{?dist} # No version specified. License: GPL+ Group: Applications/System @@ -56,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/vlock.1* %changelog +* Sat Jan 14 2012 Fedora Release Engineering - 1.3-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + * Mon Feb 07 2011 Fedora Release Engineering - 1.3-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild From fa791ada48fa0ce122ad3e2aaed3b46e4240b8e9 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Jul 2012 21:54:51 -0500 Subject: [PATCH 12/15] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- vlock.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vlock.spec b/vlock.spec index 4413557..cb702d4 100644 --- a/vlock.spec +++ b/vlock.spec @@ -1,7 +1,7 @@ Summary: A program which locks one or more virtual consoles Name: vlock Version: 1.3 -Release: 31%{?dist} +Release: 32%{?dist} # No version specified. License: GPL+ Group: Applications/System @@ -56,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/vlock.1* %changelog +* Sun Jul 22 2012 Fedora Release Engineering - 1.3-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Sat Jan 14 2012 Fedora Release Engineering - 1.3-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From f157d5038ff592b060718f192abeaa3a60b5967d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 14 Nov 2012 11:17:28 +0100 Subject: [PATCH 13/15] 1.3-33: #807369 Signed-off-by: Karel Zak --- vlock.spec | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/vlock.spec b/vlock.spec index cb702d4..6a4e25c 100644 --- a/vlock.spec +++ b/vlock.spec @@ -1,7 +1,7 @@ Summary: A program which locks one or more virtual consoles Name: vlock Version: 1.3 -Release: 32%{?dist} +Release: 33%{?dist} # No version specified. License: GPL+ Group: Applications/System @@ -15,6 +15,7 @@ Patch0: vlock-1.3-system-auth.patch Patch1: vlock-1.3-morepam.patch Patch2: vlock-1.3-screen.patch Patch3: vlock-1.3-gcc.patch +Patch4: vlock-1.3-erase.patch %description The vlock program locks one or more sessions on the console. Vlock @@ -28,10 +29,11 @@ virtual consoles. %prep %setup -q -%patch0 -p1 -b .system-auth -%patch1 -p1 -b .morepam -%patch2 -p1 -b .screen -%patch3 -p1 -b .gcc +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build make RPM_OPT_FLAGS="${RPM_OPT_FLAGS}" %{?_smp_mflags} @@ -56,6 +58,10 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/vlock.1* %changelog +* Wed Nov 14 2012 Karel Zak - 1.3-33 +- fix #807369 - RFE: Clear screen including scroll-back buffer after locking session + (thanks to Petr Pisar) + * Sun Jul 22 2012 Fedora Release Engineering - 1.3-32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 115c164309d20c986cf17c9e8ebeb9062fb3ce3c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 14 Nov 2012 11:36:51 +0100 Subject: [PATCH 14/15] add missing patch... --- vlock-1.3-erase.patch | 78 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 vlock-1.3-erase.patch diff --git a/vlock-1.3-erase.patch b/vlock-1.3-erase.patch new file mode 100644 index 0000000..d7d586c --- /dev/null +++ b/vlock-1.3-erase.patch @@ -0,0 +1,78 @@ +diff -up vlock-1.3/help.c.kzak vlock-1.3/help.c +--- vlock-1.3/help.c.kzak 2012-11-14 11:12:08.378692002 +0100 ++++ vlock-1.3/help.c 2012-11-14 11:13:10.038998321 +0100 +@@ -26,6 +26,7 @@ void print_help(int exitcode) { + " switch to other virtual consoles.\n" + "-a or --all: lock all virtual consoles by preventing other users\n" + " from switching virtual consoles.\n" ++ "-e or --erase: erase current virtual console content\n" + "-v or --version: Print the version number of vlock and exit.\n" + "-h or --help: Print this help message and exit.\n" + ); +diff -up vlock-1.3/vlock.1.kzak vlock-1.3/vlock.1 +--- vlock-1.3/vlock.1.kzak 1999-01-14 01:19:14.000000000 +0100 ++++ vlock-1.3/vlock.1 2012-11-14 11:12:58.745935657 +0100 +@@ -38,6 +38,10 @@ Lock all console sessions and disable VC + .IP + Lock the current session (this is the default). + .PP ++.B -e,--erase ++.IP ++Erase current console content to prevent from leaking sensitive data. ++.PP + .B -h,--help + .IP + Print a brief help message. +diff -up vlock-1.3/vlock.c.kzak vlock-1.3/vlock.c +--- vlock-1.3/vlock.c.kzak 2012-11-14 11:12:08.379692007 +0100 ++++ vlock-1.3/vlock.c 2012-11-14 11:12:58.745935657 +0100 +@@ -29,6 +29,9 @@ + /* This determines whether the default behavior is to lock only the */ + /* current VT or all of them. 0 means current, 1 means all. */ + int o_lock_all = 0; ++ /* This determines whether to erase terminal content after the locking. ++ * 0 means do not erase, 1 means to erase. */ ++ int o_erase_terminal = 0; + + /* Other globals */ + struct vt_mode ovtm; +@@ -41,6 +44,7 @@ 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}, ++ {"erase", no_argument, &o_erase_terminal, 1}, + {"version", no_argument, 0, O_VERSION}, + {"help", no_argument, 0, O_HELP}, + {0, 0, 0, 0}, +@@ -51,7 +55,7 @@ int main(int argc, char **argv) { + char *env; + + /* First we parse all the command line arguments */ +- while ((c = getopt_long(argc, argv, "acvh", ++ while ((c = getopt_long(argc, argv, "acevh", + long_options, &option_index)) != -1) { + switch(c) { + case 'c': +@@ -60,6 +64,9 @@ int main(int argc, char **argv) { + case 'a': + o_lock_all = 1; + break; ++ case 'e': ++ o_erase_terminal = 1; ++ break; + case 'v': + case O_VERSION: + fprintf(stderr, VERSION); +@@ -116,6 +123,12 @@ int main(int argc, char **argv) { + ioctl(vfd, VT_SETMODE, &vtm); + } + ++ /* Erase console. 2J erases display; 3J, since Linux 3.0, erases scroll-back ++ * buffer too. */ ++ if (o_erase_terminal) { ++ puts("\E[3J\E[2J"); ++ } ++ + /* get_password() sets the terminal characteristics and does not */ + /* return until the correct password has been read. */ + get_password(); From f6a3f477e966eef37f5f2c78db956bcbaf49472f Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 14 Jan 2013 10:22:43 +0100 Subject: [PATCH 15/15] merged into KBD package --- .gitignore | 1 - dead.package | 1 + sources | 1 - vlock-1.3-erase.patch | 78 --------------- vlock-1.3-gcc.patch | 31 ------ vlock-1.3-morepam.patch | 28 ------ vlock-1.3-screen.patch | 21 ---- vlock-1.3-system-auth.patch | 7 -- vlock.spec | 188 ------------------------------------ 9 files changed, 1 insertion(+), 355 deletions(-) delete mode 100644 .gitignore create mode 100644 dead.package delete mode 100644 sources delete mode 100644 vlock-1.3-erase.patch delete mode 100644 vlock-1.3-gcc.patch delete mode 100644 vlock-1.3-morepam.patch delete mode 100644 vlock-1.3-screen.patch delete mode 100644 vlock-1.3-system-auth.patch delete mode 100644 vlock.spec diff --git a/.gitignore b/.gitignore deleted file mode 100644 index eaf32b6..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vlock-1.3.tar.gz diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..6124ef1 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +merged into KBD package diff --git a/sources b/sources deleted file mode 100644 index 0702c8d..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -d04076f9c5f12aadc4d5fbbabf8a0c12 vlock-1.3.tar.gz diff --git a/vlock-1.3-erase.patch b/vlock-1.3-erase.patch deleted file mode 100644 index d7d586c..0000000 --- a/vlock-1.3-erase.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff -up vlock-1.3/help.c.kzak vlock-1.3/help.c ---- vlock-1.3/help.c.kzak 2012-11-14 11:12:08.378692002 +0100 -+++ vlock-1.3/help.c 2012-11-14 11:13:10.038998321 +0100 -@@ -26,6 +26,7 @@ void print_help(int exitcode) { - " switch to other virtual consoles.\n" - "-a or --all: lock all virtual consoles by preventing other users\n" - " from switching virtual consoles.\n" -+ "-e or --erase: erase current virtual console content\n" - "-v or --version: Print the version number of vlock and exit.\n" - "-h or --help: Print this help message and exit.\n" - ); -diff -up vlock-1.3/vlock.1.kzak vlock-1.3/vlock.1 ---- vlock-1.3/vlock.1.kzak 1999-01-14 01:19:14.000000000 +0100 -+++ vlock-1.3/vlock.1 2012-11-14 11:12:58.745935657 +0100 -@@ -38,6 +38,10 @@ Lock all console sessions and disable VC - .IP - Lock the current session (this is the default). - .PP -+.B -e,--erase -+.IP -+Erase current console content to prevent from leaking sensitive data. -+.PP - .B -h,--help - .IP - Print a brief help message. -diff -up vlock-1.3/vlock.c.kzak vlock-1.3/vlock.c ---- vlock-1.3/vlock.c.kzak 2012-11-14 11:12:08.379692007 +0100 -+++ vlock-1.3/vlock.c 2012-11-14 11:12:58.745935657 +0100 -@@ -29,6 +29,9 @@ - /* This determines whether the default behavior is to lock only the */ - /* current VT or all of them. 0 means current, 1 means all. */ - int o_lock_all = 0; -+ /* This determines whether to erase terminal content after the locking. -+ * 0 means do not erase, 1 means to erase. */ -+ int o_erase_terminal = 0; - - /* Other globals */ - struct vt_mode ovtm; -@@ -41,6 +44,7 @@ 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}, -+ {"erase", no_argument, &o_erase_terminal, 1}, - {"version", no_argument, 0, O_VERSION}, - {"help", no_argument, 0, O_HELP}, - {0, 0, 0, 0}, -@@ -51,7 +55,7 @@ int main(int argc, char **argv) { - char *env; - - /* First we parse all the command line arguments */ -- while ((c = getopt_long(argc, argv, "acvh", -+ while ((c = getopt_long(argc, argv, "acevh", - long_options, &option_index)) != -1) { - switch(c) { - case 'c': -@@ -60,6 +64,9 @@ int main(int argc, char **argv) { - case 'a': - o_lock_all = 1; - break; -+ case 'e': -+ o_erase_terminal = 1; -+ break; - case 'v': - case O_VERSION: - fprintf(stderr, VERSION); -@@ -116,6 +123,12 @@ int main(int argc, char **argv) { - ioctl(vfd, VT_SETMODE, &vtm); - } - -+ /* Erase console. 2J erases display; 3J, since Linux 3.0, erases scroll-back -+ * buffer too. */ -+ if (o_erase_terminal) { -+ puts("\E[3J\E[2J"); -+ } -+ - /* get_password() sets the terminal characteristics and does not */ - /* return until the correct password has been read. */ - get_password(); diff --git a/vlock-1.3-gcc.patch b/vlock-1.3-gcc.patch deleted file mode 100644 index c98b66a..0000000 --- a/vlock-1.3-gcc.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- vlock-1.3/input.c.gcc 2005-10-14 14:13:13.000000000 +0200 -+++ vlock-1.3/input.c 2005-10-14 14:13:25.000000000 +0200 -@@ -26,7 +26,7 @@ - if getpass() fails. - */ - --#define _XOPEN_SOURCE 1 /* so unistd.h will define crypt() */ -+/*#define _XOPEN_SOURCE 1*/ /* so unistd.h will define crypt() */ - #include - #include - #include ---- vlock-1.3/help.c.gcc 2005-10-14 14:12:53.000000000 +0200 -+++ vlock-1.3/help.c 2005-10-14 14:13:06.000000000 +0200 -@@ -12,6 +12,7 @@ - - - #include -+#include - #include - #include "vlock.h" - ---- vlock-1.3/vlock.c.gcc 2005-10-14 14:13:35.000000000 +0200 -+++ vlock-1.3/vlock.c 2005-10-14 14:13:50.000000000 +0200 -@@ -12,6 +12,7 @@ - - - #include -+#include - #include - #include - #include diff --git a/vlock-1.3-morepam.patch b/vlock-1.3-morepam.patch deleted file mode 100644 index 1c51a1c..0000000 --- a/vlock-1.3-morepam.patch +++ /dev/null @@ -1,28 +0,0 @@ -Check that the user is allowed to unlock the screen at this time. Mmmm, yeah. -Attempt to reinitialize credentials, as xscreensaver does. - ---- vlock-1.3/input.c 2005-08-02 20:23:06.206463656 -0400 -+++ vlock-1.3/input.c 2005-08-02 20:23:00.557322456 -0400 -@@ -104,6 +104,12 @@ - pam_error = pam_set_item(pamh, PAM_USER_PROMPT, strdup(prompt)); - PAM_BAIL; - pam_error = pam_authenticate(pamh, 0); -+ if (pam_error == PAM_SUCCESS) { -+ pam_error = pam_acct_mgmt(pamh, 0); -+ } -+ if (pam_error == PAM_SUCCESS) { -+ pam_setcred(pamh, PAM_REINITIALIZE_CRED); -+ } - /* fix signals that may have been disordered by pam */ - set_signal_mask(0); - #ifdef NO_ROOT_PASS -@@ -117,6 +123,9 @@ - pam_error = pam_set_item(pamh, PAM_USER, "root"); - PAM_BAIL; - pam_error = pam_authenticate(pamh, 0); -+ if (pam_error == PAM_SUCCESS) { -+ pam_error = pam_acct_mgmt(pamh, 0); -+ } - /* fix signals that may have been disordered by pam */ - set_signal_mask(0); - PAM_BAIL; diff --git a/vlock-1.3-screen.patch b/vlock-1.3-screen.patch deleted file mode 100644 index 554639d..0000000 --- a/vlock-1.3-screen.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- vlock-1.3/vlock.c.screen 1999-01-14 01:19:14.000000000 +0100 -+++ vlock-1.3/vlock.c 2005-10-14 13:51:16.000000000 +0200 -@@ -47,6 +47,7 @@ - int option_index; /* Unused */ - int c; - struct vt_mode vtm; -+ char *env; - - /* First we parse all the command line arguments */ - while ((c = getopt_long(argc, argv, "acvh", -@@ -98,6 +99,10 @@ - is_vt = 1; - } - -+ if ((env = getenv("TERM")) && strcmp(env, "screen")==0 && getenv("STY")) -+ fprintf(stderr, " *** WARNING: you're probably runnig screen(1). ***\n" -+ " *** The screen locked by vlock is NOT safe. ***\n\n"); -+ - /* Now set the signals so we can't be summarily executed or stopped, */ - /* and handle SIGUSR{1,2} and SIGCHLD */ - mask_signals(); diff --git a/vlock-1.3-system-auth.patch b/vlock-1.3-system-auth.patch deleted file mode 100644 index 2843aa6..0000000 --- a/vlock-1.3-system-auth.patch +++ /dev/null @@ -1,7 +0,0 @@ ---- vlock-1.3/vlock.pamd.system-auth 2005-10-13 15:44:16.000000000 +0200 -+++ vlock-1.3/vlock.pamd 2005-10-13 15:47:48.000000000 +0200 -@@ -1,2 +1,3 @@ - #%PAM-1.0 --auth required /lib/security/pam_pwdb.so shadow nullok -+auth include system-auth -+account required pam_permit.so diff --git a/vlock.spec b/vlock.spec deleted file mode 100644 index 6a4e25c..0000000 --- a/vlock.spec +++ /dev/null @@ -1,188 +0,0 @@ -Summary: A program which locks one or more virtual consoles -Name: vlock -Version: 1.3 -Release: 33%{?dist} -# No version specified. -License: GPL+ -Group: Applications/System -Source: ftp://tsx-11.mit.edu:/pub/linux/sources/usr.bin/vlock-1.3.tar.gz - -Requires: pam >= 0.59, /etc/pam.d/system-auth -Buildrequires: pam-devel -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -Patch0: vlock-1.3-system-auth.patch -Patch1: vlock-1.3-morepam.patch -Patch2: vlock-1.3-screen.patch -Patch3: vlock-1.3-gcc.patch -Patch4: vlock-1.3-erase.patch - -%description -The vlock program locks one or more sessions on the console. Vlock -can lock the current terminal (local or remote) or the entire virtual -console system, which completely disables all console access. The -vlock program unlocks when either the password of the user who started -vlock or the root password is typed. - -Install vlock if you need to disable access to one console or to all -virtual consoles. - -%prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 - -%build -make RPM_OPT_FLAGS="${RPM_OPT_FLAGS}" %{?_smp_mflags} - -%install -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT%{_bindir} -mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 -mkdir -p $RPM_BUILD_ROOT/etc/pam.d -install -p -m 755 vlock $RPM_BUILD_ROOT%{_bindir}/ -install -p -m 644 vlock.1 $RPM_BUILD_ROOT%{_mandir}/man1/ -install -p -m 644 vlock.pamd $RPM_BUILD_ROOT/etc/pam.d/vlock - -%clean -rm -rf $RPM_BUILD_ROOT - -%files -%defattr(-,root,root) -%doc COPYING README -%config(noreplace) %{_sysconfdir}/pam.d/vlock -%{_bindir}/vlock -%{_mandir}/man1/vlock.1* - -%changelog -* Wed Nov 14 2012 Karel Zak - 1.3-33 -- fix #807369 - RFE: Clear screen including scroll-back buffer after locking session - (thanks to Petr Pisar) - -* Sun Jul 22 2012 Fedora Release Engineering - 1.3-32 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sat Jan 14 2012 Fedora Release Engineering - 1.3-31 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Feb 07 2011 Fedora Release Engineering - 1.3-30 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Sun Jul 26 2009 Fedora Release Engineering - 1.3-29 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Feb 25 2009 Fedora Release Engineering - 1.3-28 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Mon Sep 8 2008 Tom "spot" Callaway - 1.3-27 -- fix license tag - -* Tue Feb 19 2008 Fedora Release Engineering - 1.3-26 -- Autorebuild for GCC 4.3 - -* Thu Mar 1 2007 Karel Zak - 1.3-25 -- add missing -p to install calls - -* Thu Mar 1 2007 Karel Zak - 1.3-24 -- fix #226530 - Merge Review: vlock - -* Wed Jul 19 2006 Karel Zak - 1.3-23 -- spec file cleanup & rebuild - -* Wed Jul 12 2006 Jesse Keating - 1.3-22.2.2 -- rebuild - -* Fri Feb 10 2006 Jesse Keating - 1.3-22.2.1 -- bump again for double-long bug on ppc(64) - -* Tue Feb 07 2006 Jesse Keating - 1.3-22.2 -- rebuilt for new gcc4.1 snapshot and glibc changes - -* Fri Dec 09 2005 Jesse Keating -- rebuilt - -* Fri Oct 14 2005 Karel Zak 1.3-22 -- fix #170488 - add screen(1) warning -- compilation warnings cleanup - -* Thu Oct 13 2005 Karel Zak 1.3-21 -- replace pam_stack with "include" - -* Wed Aug 3 2005 Karel Zak 1.3-20 -- #164950 - call account management and credential reinitialization functions - (patch by Nalin Dahyabhai) - -* Tue May 10 2005 Karel Zak 1.3-19 -- fix debuginfo - -* Wed Mar 16 2005 Elliot Lee -- rebuilt - -* Mon Feb 14 2005 Adrian Havill -- rebuilt - -* Tue Jun 15 2004 Elliot Lee -- rebuilt - -* Fri Feb 13 2004 Elliot Lee -- rebuilt - -* Wed Jun 04 2003 Elliot Lee -- rebuilt - -* Wed Jan 22 2003 Tim Powers -- rebuilt - -* Tue Nov 12 2002 Nalin Dahyabhai 1.3-12 -- remove absolute paths from PAM configuration for use on multilib systems - -* Fri Jun 21 2002 Tim Powers -- automated rebuild - -* Thu May 23 2002 Tim Powers -- automated rebuild - -* Wed Jan 09 2002 Tim Powers -- automated rebuild - -* Mon Jul 23 2001 Michael K. Johnson -- added pam-devel buildrequires - -* Sun Jun 24 2001 Elliot Lee -- Bump release + rebuild. - -* Thu Jul 13 2000 Prospector -- automatic rebuild - -* Thu Jun 01 2000 Nalin Dahyahai -- change PAM setup to use system-auth -- move man pages to %%{_mandir} - -* Tue Feb 08 2000 Nalin Dahyahai -- handle compressed man pages -- use defattr instead of explicit ownership at install-time - -* Sun Mar 21 1999 Cristian Gafton -- auto rebuild in the new build environment (release 2) - -* Wed Jan 13 1999 Michael Johnson -- released 1.3 - -* Thu Mar 12 1998 Michael K. Johnson -- Does not create a DoS attack if pty is closed (not applicable - to use on a VC) - -* Fri Oct 10 1997 Michael K. Johnson -- Moved to new pam conventions. -- Use pam according to spec, rather than abusing it as before. -- Updated to version 1.1. -- BuildRoot - -* Mon Jul 21 1997 Erik Troan -- built against glibc - -* Mon Mar 03 1997 Michael K. Johnson -- moved from pam.conf to pam.d