Skip to content

Commit

Permalink
Better xtrlock.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Sebastian Götte committed Jan 22, 2011
0 parents commit 8fc05c6
Show file tree
Hide file tree
Showing 17 changed files with 653 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Imakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#! Imakefile for xtrlock - X Transparent Lock
#!
#! Copyright (C)1993,1994 Ian Jackson
#!
#! This is free software; you can redistribute it and/or modify
#! it under the terms of the GNU General Public License as published by
#! the Free Software Foundation; either version 2, or (at your option)
#! any later version.
#!
#! This is distributed in the hope that it will be useful,
#! but WITHOUT ANY WARRANTY; without even the implied warranty of
#! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
#! GNU General Public License for more details.

SingleProgramTarget(xtrlock,xtrlock.o,-lcrypt -lX11,)
InstallProgram(xtrlock,$(BINDIR))
InstallManPage(xtrlock,$(MANDIR))
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Makefile for xtrlock - X Transparent Lock
# This Makefile provided for those of you who lack a functioning xmkmf.
#
# Copyright (C)1993,1994 Ian Jackson
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.

LDLIBS=-lX11 -lcrypt
CDEFS=-DSHADOW_PWD
CC=gcc
CFLAGS=-Wall ${CDEFS}
INSTALL=install

xtrlock: xtrlock.o

xtrlock.o: xtrlock.c lock.bitmap mask.bitmap patchlevel.h

install: xtrlock
$(INSTALL) -c -m 755 xtrlock /usr/bin/X11

install.man:
$(INSTALL) -c -m 644 xtrlock.man /usr/man/man1/xtrlock.1x
57 changes: 57 additions & 0 deletions debian/README.Debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
This is X Transparent Lock. Xtrlock is a very minimal X display lock
program, which uses nothing except the Xlib library. It doesn't
obscure the screen, it is completely idle while the display is locked
and you don't type at it, and it doesn't do funny things to the X
access control lists. On my system the binary is under 10K
(Linux/i386, compiled with gcc -O2 -m486 -s).

Note that xtrlock currently does not work with shadow passwords. If
someone sends me some portable patches for shadow password support
I'll probably include them.

[ Shadow passwords are now supported on Linux, and Solaris 2.x (not
tested). To work with shadow passwords, this program should be
compiled with -DSHADOW_PWD and installed setuid root (it will drop
privileges as soon as possible). The shadow-aware version will
still work fine if you don't have shadow passwords.

April 9, 1996
-- Marek Michalkiewicz <[email protected]> ]

You need an ANSI C compiler, such as GCC. Do not attempt to compile
xtrlock with an old C compiler such as most systems' `cc'.

There is no support for X resources or command-line arguments - the
timeouts and cursor bitmaps and colours cannot be modified. If
someone sends me some Xlib-only X resource support I may include it.

To install xtrlock:

Build the program:
xmkmf
make

Test it:
./xtrlock

Install it and the manpage:
really make install install.man


xtrlock is Copyright 1993, 1994 Ian Jackson. It is free software; you
can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation;
either version 2, or (at your option) any later version.

It is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.

In order to save space I have not included a copy of version 2 of the
GNU General Public Licence here. If you do not have one, send me
email at <[email protected]>, or write to me at Churchill
College, Cambridge, CB3 0DS, United Kingdom, or to the Free Software
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

It is also available by anonymous FTP from prep.ai.mit.edu.
113 changes: 113 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
xtrlock (2.0-13) unstable; urgency=low

* build-depend on x11proto-core-dev rather than the old x-dev
* build-depend on xutils-dev (closes: #485728)

-- Matthew Vernon <[email protected]> Tue, 23 Dec 2008 11:36:04 +0000

xtrlock (2.0-12) unstable; urgency=low

* Install into /usr not /usr/X11R6 (closes: #362206, #363293)

-- Matthew Vernon <[email protected]> Tue, 18 Apr 2006 17:19:10 +0100

xtrlock (2.0-11) unstable; urgency=low
* Fix build-depends: for new etch (closes: #346840)

-- Matthew Vernon <[email protected]> Sat, 14 Jan 2006 15:30:28 +0000

xtrlock (2.0-10) unstable; urgency=low

* Take over this package, since I seem to have some tuits
* Correct the Author's address in the manpage to something sensible
* Similarly the original packager's.
* For reference, the security problem fixed in -9 was CAN-2005-0079

-- Matthew Vernon <[email protected]> Thu, 20 Jan 2005 14:02:10 +0000

xtrlock (2.0-9) unstable; urgency=high

* Fix the problem whereby we unlocked on long input (closes: #278191, #278190)
* tidy up a switch statement (closes: #264173)

-- Matthew Vernon <[email protected]> Mon, 17 Jan 2005 10:47:09 +0000

xtrlock (2.0-8) unstable; urgency=low

* Uploading with maintainer set to QA group

-- Andrew Pollock <[email protected]> Sun, 15 Feb 2004 18:32:12 +1100

xtrlock (2.0-7) unstable; urgency=low

* Maintainer upload.
* Update to standards version 3.5.6.
* Removes buffer overrun potentiality (closes: #154738)
* Drop setgid privileges (closes: #154740)

-- Martin Mitchell <[email protected]> Sun, 1 Sep 2002 14:49:26 +1000

xtrlock (2.0-6.1) unstable; urgency=low

* NMU
* Removed the buffer overrun potentiallity (closes: #154738)
* Update the code for remove the possibilty to read shadow file
(closes: #154740)
* Fix spelling error in the copyright file
* Fix the place where is stored the common-licenses
* Update the debian/rules to:
- strip the /usr/X11R6/bin/xtrlock
- include the section and priority in control
* Update the debian/control file:
- include the build-depends
- update the standard-version to 3.5.6

-- Otavio Salvador <[email protected]> Sat, 31 Aug 2002 16:23:21 -0300

xtrlock (2.0-6) unstable; urgency=low

* Update to standards version 3.0.1.
* Add menu entry. (closes: #46201)

-- Martin Mitchell <[email protected]> Thu, 28 Oct 1999 18:38:14 +1000

xtrlock (2.0-5) unstable; urgency=low

* Correct installation path during package build. (#25055)
* Update to standards version 2.4.1.
* Update copyright file.

-- Martin Mitchell <[email protected]> Sun, 2 Aug 1998 13:01:29 +1000

xtrlock (2.0-4) unstable; urgency=low

* Make xtrlock setgid shadow, instead of setuid root. (#7635,#8543)

-- Martin Mitchell <[email protected]> Thu, 4 Dec 1997 00:27:07 +1100

xtrlock (2.0-3) unstable; urgency=low

* New maintainer.

-- Martin Mitchell <[email protected]> Thu, 27 Nov 1997 01:34:14 +1100

xtrlock (2.0-2.2) unstable; urgency=low

* Non-maintainer release.
* Libc6 compile.
* Update from pre-2.0.0.0 standards.

-- Martin Mitchell <[email protected]> Wed, 22 Oct 1997 18:07:31 +1000

xtrlock-2.0 Debian 3 - Michael Meskes <[email protected]>
Include shadow patches
Add architecture field (Bug#4041)
Minor changes to debian.rules
gzip manpage

xtrlock-2.0 Debian 0 - sde

Initial release.



15 changes: 15 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Source: xtrlock
Maintainer: Matthew Vernon <[email protected]>
Section: x11
Priority: optional
Build-Depends: xutils, libx11-dev, x11proto-core-dev, xutils-dev
Standards-Version: 3.5.6

Package: xtrlock
Architecture: any
Depends: ${shlibs:Depends}
Description: Minimal X display lock program
xtrlock is a very minimal X display lock program, which uses nothing
except the Xlib library. It doesn't obscure the screen, it is
completely idle while the display is locked and you don't type at it,
and it doesn't do funny things to the X access control lists.
29 changes: 29 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
This is Debian GNU/Linux's prepackaged version of Ian Jackson's xtrlock
utility. This package provides a minimal X display lock program.

This package was put together by Stephen Early
<[email protected]>, from the source by Ian Jackson, which he
obtained from Usenet. Apart from a couple of bugfixes the changes
were very minimal - merely adding support for the Debian package
maintenance scheme, by adding various debian.* files.

This package is now maintained by Matthew Vernon <[email protected]>.

Program Copyright (C) 1993, 1994 Ian Jackson.
Modifications for Debian GNU/Linux Copyright (C) 1995 Stephen Early.

This program and its documentation are free software; you can
redistribute them and/or modify them under the terms of the GNU
General Public License as published by the Free Software Foundation;
either version 2, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.

You should have received a copy of the GNU General Public License with
your Debian GNU/Linux system, in /usr/share/common-licenses/GPL, or with the
Debian GNU/Linux hello source package as the file COPYING. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite
330, Boston, MA 02111-1307, USA.
1 change: 1 addition & 0 deletions debian/menu
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
?package(xtrlock):command="xtrlock" section="Apps/Tools" needs="x11" title="Xtrlock" longtitle="Xtrlock: X terminal lock"
2 changes: 2 additions & 0 deletions debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh -e
if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
2 changes: 2 additions & 0 deletions debian/postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh -e
if [ -x /usr/bin/update-menus ] ; then update-menus ; fi
63 changes: 63 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/usr/bin/make -f
# debian/rules file for xtrlock-2.0
# Based upon the sample debian.rules file by Ian Jackson.

package=xtrlock

arch=$(shell dpkg --print-architecture)
STRIP=strip

CFLAGS=-O2 -g -DSHADOW_PWD

build:
$(checkdir)
xmkmf
$(MAKE) CFLAGS="$(CFLAGS)" CDEBUGFLAGS="" xtrlock
touch build

clean:
$(checkdir)
-rm -f build
-rm -f xtrlock *.o *.bak Makefile
-rm -rf debian/tmp *~ debian/files debian/substvars debian/*~

binary-indep: checkroot
#No binary independent files in this package

binary-arch: checkroot build
-rm -rf debian/tmp
install -m 755 -d debian/tmp/usr/bin debian/tmp/usr/share/man/man1
install -m 755 -d debian/tmp/usr/share/doc/xtrlock debian/tmp/DEBIAN
install -m 755 -d debian/tmp/usr/lib/menu
# has to be setgid shadow to support shadow passwords. --marekm
install -m 755 xtrlock debian/tmp/usr/bin/xtrlock
$(STRIP) debian/tmp/usr/bin/xtrlock
install -m 644 xtrlock.man debian/tmp/usr/share/man/man1/xtrlock.1x
gzip -9v debian/tmp/usr/share/man/man1/xtrlock.1x
install -m 644 debian/changelog debian/tmp/usr/share/doc/xtrlock
install -m 644 debian/README.Debian debian/tmp/usr/share/doc/xtrlock
gzip -9v debian/tmp/usr/share/doc/xtrlock/*
( cd debian/tmp/usr/share/doc/xtrlock && ln -s changelog.gz changelog.Debian.gz )
install -m 644 debian/copyright debian/tmp/usr/share/doc/xtrlock
install -m 644 debian/menu debian/tmp/usr/lib/menu/xtrlock
install -m 755 debian/postinst debian/postrm debian/tmp/DEBIAN
cp debian/control debian/tmp/DEBIAN/control
dpkg-shlibdeps debian/tmp/usr/bin/xtrlock
dpkg-gencontrol -isp
chown -R root.root debian/tmp
chown root.shadow debian/tmp/usr/bin/xtrlock
chmod -R g-w debian/tmp
chmod 2755 debian/tmp/usr/bin/xtrlock
dpkg --build debian/tmp ..

binary: binary-indep binary-arch

define checkdir
test -f debian/rules
endef

checkroot:
$(checkdir)
test root = "`whoami`"

.PHONY: binary clean checkroot
19 changes: 19 additions & 0 deletions lock.bitmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#define lock_width 28
#define lock_height 40
#define lock_x_hot 14
#define lock_y_hot 21
static char lock_bits[] = {
0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xf8, 0xff, 0x7f, 0x00, 0xe0, 0xff,
0x3f, 0x00, 0xc0, 0xff, 0x1f, 0x00, 0x80, 0xff, 0x0f, 0xfc, 0x03, 0xff,
0x0f, 0xfe, 0x07, 0xff, 0x0f, 0xff, 0x0f, 0xff, 0x07, 0xff, 0x0f, 0xfe,
0x87, 0xff, 0x1f, 0xfe, 0x87, 0xff, 0x1f, 0xfe, 0x87, 0xff, 0x1f, 0xfe,
0x87, 0xff, 0x1f, 0xfe, 0x87, 0xff, 0x1f, 0xfe, 0x87, 0xff, 0x1f, 0xfe,
0x87, 0xff, 0x1f, 0xfe, 0x87, 0xff, 0x1f, 0xfe, 0x87, 0xff, 0x1f, 0xfe,
0x87, 0xff, 0x1f, 0xfe, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf8,
0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf8, 0x01, 0xf0, 0x00, 0xf8,
0x01, 0xf8, 0x01, 0xf8, 0x01, 0xf8, 0x01, 0xf8, 0x01, 0xf8, 0x01, 0xf8,
0x01, 0xf8, 0x01, 0xf8, 0x01, 0xf0, 0x00, 0xf8, 0x01, 0x60, 0x00, 0xf8,
0x01, 0x60, 0x00, 0xf8, 0x01, 0x60, 0x00, 0xf8, 0x01, 0x60, 0x00, 0xf8,
0x01, 0x60, 0x00, 0xf8, 0x01, 0x60, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf8,
0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0xf8,
0xff, 0xff, 0xff, 0xff};
19 changes: 19 additions & 0 deletions mask.bitmap
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#define mask_width 28
#define mask_height 40
#define mask_x_hot 14
#define mask_y_hot 21
static char mask_bits[] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00};
19 changes: 19 additions & 0 deletions mask.bitmap.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#define mask_width 28
#define mask_height 40
#define mask_x_hot 14
#define mask_y_hot 21
static char mask_bits[] = {
0x00, 0xfe, 0x07, 0x00, 0x80, 0xff, 0x1f, 0x00, 0xc0, 0xff, 0x3f, 0x00,
0xe0, 0xff, 0x7f, 0x00, 0xf0, 0xff, 0xff, 0x00, 0xf8, 0xff, 0xff, 0x01,
0xf8, 0x03, 0xfc, 0x01, 0xf8, 0x01, 0xf8, 0x01, 0xfc, 0x01, 0xf8, 0x03,
0xfc, 0x00, 0xf0, 0x03, 0xfc, 0x00, 0xf0, 0x03, 0xfc, 0x00, 0xf0, 0x03,
0xfc, 0x00, 0xf0, 0x03, 0xfc, 0x00, 0xf0, 0x03, 0xfc, 0x00, 0xf0, 0x03,
0xfc, 0x00, 0xf0, 0x03, 0xfc, 0x00, 0xf0, 0x03, 0xfc, 0x00, 0xf0, 0x03,
0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f,
0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f,
0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f,
0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f,
0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f,
0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f,
0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f, 0xff, 0xff, 0xff, 0x0f,
0xff, 0xff, 0xff, 0x0f};
Loading

0 comments on commit 8fc05c6

Please sign in to comment.