configure configure.in Makefile.in config.h.in \
config.h-vms install-sh setup.com config.guess \
config.sub makevms.com screenblank.txt \
- xscreensaver.lsm.sh
+ xscreensaver.lsm.sh xscreensaver.spec
TAR = tar
COMPRESS = gzip --verbose --best
COMPRESS_EXT = gz
depend:
@$(MAKE_SUBDIR)
distdepend:
+ @$(MAKE) update_spec_version
@$(MAKE_SUBDIR)
TAGS: tags
tags:
echo "overwrote $$SRC"; \
ls -lFd $$SRC
+update_spec_version::
+ @S=$(srcdir)/xscreensaver.spec ; \
+ U=$(srcdir)/utils/version.h ; \
+ V=`sed -n 's/.*\([0-9][0-9]*\.[0-9]*\).*/\1/p' < $$U` ; \
+ echo -n "Updating version number in $$S to \"$$V\"... " ; \
+ T=/tmp/xs.$$$$ ; \
+ sed "s/^\(Version:[^0-9]*\)\(.*\)/\1$$V/" \
+ < $$S > $$T ; \
+ if cmp -s $$S $$T ; then \
+ echo "unchanged." ; \
+ else \
+ cat $$T > $$S ; \
+ echo "done." ; \
+ fi ; \
+ rm $$T
+
test-tar::
@ \
VERS=`sed -n 's/[^0-9]*\([0-9]\.[0-9][0-9]*\).*/\1/p' utils/version.h` ; \
============
+Changes since 3.03: * Added an `xscreensaver.spec' file, to make it easier
+ for other folks to generate RPMs.
+ * Made the password code work on HPUX in the situation
+ where: ``enhanced security'' is available; but not
+ used; but the user typed a password more than 8
+ characters long anyway. FTSOHPUX.
Changes since 3.02: * Made locking work when passwd aging is enabled.
* Added support for PAM (Pluggable Authentication
Modules.) It is still turned off by default, though,
#undef HAVE_PAM
/* If PAM is being used, this is the name of the PAM service that xscreensaver
- * will authenticate as. It would be sensible to set this to "xscreensaver".
- * However, since some systems already have a PAM service named "xlock"
- * defined, we might as well use that.
+ * will authenticate as. The default is "xscreensaver", which means that the
+ * PAM library will look for an "xscreensaver" line in /etc/pam.conf, or (on
+ * recent Linux systems) will look for a file called /etc/pam.d/xscreensaver.
+ * Some systems might already have a PAM installation that is configured for
+ * xlock, so setting this to "xlock" would also work in that case.
*/
-#define PAM_SERVICE_NAME "xlock"
+#define PAM_SERVICE_NAME "xscreensaver"
/* Define this if your system uses `shadow' passwords, that is, the passwords
* live in /etc/shadow instead of /etc/passwd, and one reads them with
AD_DIR = @APPDEFAULTS@
+PAM_DIR = /etc/pam.d
+PAM_CONF = /etc/pam.conf
UTILS_SRC = $(srcdir)/../utils
UTILS_BIN = ../utils
@src="$(srcdir)/xscreensaver.pam" ; \
dest=`sed -n 's/.*PAM_SERVICE_NAME[ ]*"\([^"]*\)".*$$/\1/p' \
< ../config.h` ; \
- dir=/etc/pam.d ; \
- conf=/etc/pam.conf ; \
+ dir="$(PAM_DIR)" ; \
+ conf="$(PAM_CONF)" ; \
\
if [ -d $$dir ] ; then \
echo $(INSTALL_DATA) $$src $$dir/$$dest ; \
! a screen saver and locker for the X window system
! by Jamie Zawinski
!
-! version 3.03
-! 15-Nov-98
+! version 3.04
+! 16-Nov-98
!
! See "man xscreensaver" for more info. The latest version is always
! available at http://www.jwz.org/xscreensaver/
};
+#ifdef HAVE_PAM_FAIL_DELAY
+ /* We handle delays ourself.*/
+ /* Don't set this to 0 (Linux bug workaround.) */
+# define PAM_NO_DELAY(pamh) pam_fail_delay ((pamh), 1)
+# else /* !HAVE_PAM_FAIL_DELAY */
+# define PAM_NO_DELAY(pamh) /* */
+# endif /* !HAVE_PAM_FAIL_DELAY */
+
/* PAM sucks in that there is no way to tell whether a particular service
is configured at all. That is, there is no way to tell the difference
between "authentication of the FOO service is not allowed" and "the
status, pam_strerror (pamh, status));
if (status != PAM_SUCCESS) goto DONE;
-# ifdef HAVE_PAM_FAIL_DELAY
- pam_fail_delay (pamh, 0); /* We handle delays ourself. */
-# endif /* HAVE_PAM_FAIL_DELAY */
-
/* #### We should set PAM_TTY to the display we're using, but we
don't have that handy from here. So set it to :0.0, which is a
good guess (and has the bonus of counting as a "secure tty" as
/* Try to authenticate as the current user.
*/
+ PAM_NO_DELAY(pamh);
status = pam_authenticate (pamh, 0);
if (verbose_p)
fprintf (stderr, "%s: pam_authenticate (...) ==> %d (%s)\n",
blurb(), c.user, status, pam_strerror(pamh, status));
if (status != PAM_SUCCESS) goto DONE;
+ PAM_NO_DELAY(pamh);
status = pam_authenticate (pamh, 0);
if (verbose_p)
fprintf (stderr, "%s: pam_authenticate (...) ==> %d (%s)\n",
# define PWTYPE struct s_passwd *
# define PWPSLOT pw_passwd
# define GETPW getspwnam
-# define crypt bigcrypt
+
+# define HAVE_BIGCRYPT
#endif
result = strdup(p->pw_passwd);
}
- /* The manual for passwd(4) says:
+ /* The manual for passwd(4) on HPUX 10.10 says:
Password aging is put in effect for a particular user if his
encrypted password in the password file is followed by a comma and
}
+static Bool
+passwds_match_p (const char *cleartext, const char *ciphertext)
+{
+ char *s = 0; /* note that on some systems, crypt() may return null */
+
+ s = (char *) crypt (cleartext, ciphertext);
+ if (s && !strcmp (s, ciphertext))
+ return True;
+
+#ifdef HAVE_BIGCRYPT
+ /* There seems to be no way to tell at runtime if an HP machine is in
+ "trusted" mode, and thereby, which of crypt() or bigcrypt() we should
+ be calling to compare passwords. So call them both, and see which
+ one works. */
+
+ s = (char *) bigcrypt (cleartext, ciphertext);
+ if (s && !strcmp (s, ciphertext))
+ return True;
+
+#endif /* HAVE_BIGCRYPT */
+
+ return False;
+}
+
+
+
/* This can be called at any time, and says whether the typed password
belongs to either the logged in user (real uid, not effective); or
to root.
Bool
pwent_passwd_valid_p (const char *typed_passwd, Bool verbose_p)
{
- char *s = 0; /* note that on some systems, crypt() may return null */
-
if (encrypted_user_passwd &&
- (s = (char *) crypt (typed_passwd, encrypted_user_passwd)) &&
- !strcmp (s, encrypted_user_passwd))
+ passwds_match_p (typed_passwd, encrypted_user_passwd))
return True;
/* do not allow root to have a null password. */
else if (typed_passwd[0] &&
encrypted_root_passwd &&
- (s = (char *) crypt (typed_passwd, encrypted_root_passwd)) &&
- !strcmp (s, encrypted_root_passwd))
+ passwds_match_p (typed_passwd, encrypted_root_passwd))
return True;
else
.if n .sp 1
.if t .sp .5
..
-.TH XScreenSaver 1 "15-Nov-98 (3.03)" "X Version 11"
+.TH XScreenSaver 1 "16-Nov-98 (3.04)" "X Version 11"
.SH NAME
xscreensaver-command - control a running xscreensaver process
.SH SYNOPSIS
.if n .sp 1
.if t .sp .5
..
-.TH XScreenSaver 1 "15-Nov-98 (3.03)" "X Version 11"
+.TH XScreenSaver 1 "16-Nov-98 (3.04)" "X Version 11"
.SH NAME
xscreensaver-demo - interactively control the background xscreensaver daemon
.SH SYNOPSIS
.if n .sp 1
.if t .sp .5
..
-.TH XScreenSaver 1 "15-Nov-98 (3.03)" "X Version 11"
+.TH XScreenSaver 1 "16-Nov-98 (3.04)" "X Version 11"
.SH NAME
xscreensaver - graphics hack and screen locker, launched when the user is idle
.SH SYNOPSIS
let me know.
.TP 8
.B Passwords
-If you get an error message like ``couldn't get password of \fIuser\fP''
-then this probably means that you're on a system in which the
+If you get an error message at startup like ``couldn't get password
+of \fIuser\fP'' then this probably means that you're on a system in which
+the
.BR getpwent (3)
library routine can only be effectively used by root. If this is the case,
then \fIxscreensaver\fP must be installed as setuid to root in order for
.EE
to make \fIxscreensaver\fP notice.
.TP 8
+.B PAM Passwords
+If your system uses PAM (Pluggable Authentication Modules), then in order
+for xscreensaver to use PAM properly, PAM must be told about xscreensaver.
+The xscreensaver installation process should update the PAM data (on Linux,
+by creating the file \fI/etc/pam.d/xscreensaver\fP for you, and on Solaris,
+by telling you what lines to add to the \fI/etc/pam.conf\fP file.)
+
+If the PAM configuration files do not know about xscreensaver, then
+you \fImight\fP be in a situation where xscreensaver will refuse to ever
+unlock the screen.
+
+This is a design flaw in PAM (there is no way for a client to tell the
+difference between PAM responding ``I have never heard of your module,''
+and responding, ``you typed the wrong password.'' As far as I can tell,
+there is no way for xscreensaver to automatically work around this, or
+detect the problem in advance, so if you have PAM, make sure it is
+configured correctly!
+.TP 8
.B Colormap lossage: TWM
The \fBinstallColormap\fP option doesn't work very well with the
.BR twm (1)
rocks.man rorschach.man sierpinski.man slidescreen.man \
slip.man sphere.man spiral.man strange.man swirl.man \
xroger.man goop.man starfish.man munch.man rd-bomb.man \
- xjack.man xlyap.man jigsaw.man epicycle.man
+ xjack.man xlyap.man jigsaw.man epicycle.man bsod.man
STAR = *
EXTRAS = README Makefile.in xlock_23.h .gdbinit \
vidwhacker \
--- /dev/null
+.de EX \"Begin example
+.ne 5
+.if n .sp 1
+.if t .sp .5
+.nf
+.in +.5i
+..
+.de EE
+.fi
+.in -.5i
+.if n .sp 1
+.if t .sp .5
+..
+.TH XScreenSaver 1 "28-Oct-98" "X Version 11"
+.SH NAME
+bsod - Blue Screen of Death emulator
+.SH SYNOPSIS
+.B bsod
+[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP]
+[\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install]
+[\-visual \fIvisual\fP] [\-delay \fIseconds\fP]
+.SH DESCRIPTION
+The
+.I bsod
+program is the finest in personal computer emulation.
+.PP
+.I bsod
+steps through a set of screens, each one a recreation of a different failure
+mode of an operating system. Systems depicted include Microsoft's Windows 95
+and Windows NT, Commodore-Amiga's AmigaDOS 1.3, SPARC Linux, SCO UNIX, the
+Apple Macintosh (both the MacsBug debugger and the rarer "Sad Mac"), and the
+Atari ST.
+.PP
+.SH OPTIONS
+.I bsod
+accepts the following options:
+.TP 8
+.B \-window
+Draw on a newly-created window. This is the default.
+.TP 8
+.B \-root
+Draw on the root window.
+.TP 8
+.B \-mono
+If on a color display, pretend we're on a monochrome display.
+.TP 8
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use. Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-delay \fIdelay\fP
+The delay between displaying one crash and another.
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+to get the default host and display number.
+.TP 8
+.B XENVIRONMENT
+to get the name of a resource file that overrides the global resources
+stored in the RESOURCE_MANAGER property.
+.SH X RESOURCES
+Notable X resources supported include the following, which control which
+hacks are displayed and which aren't.
+.BR doWindows ,
+.BR doNT ,
+.BR doAmiga ,
+.BR doMac ,
+.BR doMacsBug ,
+.BR doSCO ,
+.BR doAtari ,
+and
+.BR doSparcLinux .
+Each of these is a Boolean resource, they all default to true, except for
+doSparcLinux and doAtari, which are turned off by default, because they're
+really not all that interesting looking unless you're a fan of those systems.
+There aren't command-line options for these, so to change them, you'll need
+to add entries to your .Xdefaults file, or use the -xrm option.
+For example, to tell bsod not to show the NT crash:
+.EX
+bsod -xrm '*doNT: false'
+.EE
+.SH BUGS
+Unlike the systems that the images are borrowed from,
+.I bsod
+does not require a reboot after running.
+.PP
+.I bsod
+should also emulate more systems, but systems with interesting crash
+graphics are not as common as one might hope.
+
+One I'd really like to see is a Unix system getting a kernel panic,
+rebooting, and running
+.BR fsck (8).
+.SH SEE ALSO
+.BR X (1),
+.BR xscreensaver (1),
+.BR http://www.microsoft.com/ ,
+.BR http://www.apple.com/ ,
+and
+.BR http://www.sco.com/ ,
+.BR http://www.kernel.org/ ,
+and
+.BR http://www.amiga.de/ .
+.SH TRADEMARKS
+Microsoft Windows, Microsoft Windows 95, and Microsoft Windows NT are all
+registered trademarks of Microsoft Corporation. Apple Macintosh is a
+registered trademark of Apple Computer. Amiga is a registered trademark of
+Amiga International, Inc. Atari ST is probably a trademark, too, but it's
+hard to tell who owns it. Linux is a registered trademark of Linus Torvalds,
+but it isn't his fault.
+.SH COPYRIGHT
+Copyright \(co 1998 by Jamie Zawinski. Permission to use, copy, modify,
+distribute, and sell this software and its documentation for any purpose is
+hereby granted without fee, provided that the above copyright notice appear
+in all copies and that both that copyright notice and this permission notice
+appear in supporting documentation. No representations are made about the
+suitability of this software for any purpose. It is provided "as is" without
+express or implied warranty. No animals were harmed during the testing of
+these simulations. Always mount a scratch monkey.
+.SH AUTHOR
+Concept cribbed from Stephen Martin <smartin@mks.com>. This version is by
+Jamie Zawinski <jwz@jwz.org>.
-..de EX \"Begin example
+.de EX \"Begin example
.ne 5
.if n .sp 1
.if t .sp .5
.SH NAME
munch - munching squares screen hack
.SH SYNOPSIS
-.B deco
+.B munch
[\-display \fIhost:display.screen\fP] [\-foreground \fIcolor\fP]
[\-background \fIcolor\fP] [\-window] [\-root] [\-mono] [\-install]
[\-visual \fIvisual\fP] [\-delay \fIseconds\fP] [\-xor] [\-noxor] [\-shift]
static const char screensaver_id[] =
- "@(#)xscreensaver 3.03 (25-Oct-98), by Jamie Zawinski (jwz@jwz.org)";
+ "@(#)xscreensaver 3.04 (15-Nov-98), by Jamie Zawinski (jwz@jwz.org)";
Begin3
Title: xscreensaver
-Version: 3.03
-Entered-date: 15NOV98
+Version: 3.04
+Entered-date: 16NOV98
Description: A modular screen saver and locker for the X Window System.
Highly customizable: allows the use of any program that
can draw on the root window as a display mode.
Author: jwz@jwz.org (Jamie Zawinski)
Maintained-by: jwz@jwz.org (Jamie Zawinski)
Primary-site: http://www.jwz.org/xscreensaver/
- 962K xscreensaver-3.03.tar.gz
+ 964K xscreensaver-3.04.tar.gz
25K xscreensaver.README
1K xscreensaver.lsm
Alternate-site: sunsite.unc.edu /pub/Linux/X11/screensavers/
- 962K xscreensaver-3.03.tar.gz
+ 964K xscreensaver-3.04.tar.gz
25K xscreensaver.README
1K xscreensaver.lsm
Alternate-site: ftp.x.org /contrib/applications/
- 962K xscreensaver-3.03.tar.gz
+ 964K xscreensaver-3.04.tar.gz
25K xscreensaver.README
1K xscreensaver.lsm
Platforms: Linux, Irix, SunOS, Solaris, HPUX, AIX, FreeBSD, NetBSD,
--- /dev/null
+Name: xscreensaver
+Summary: X screen saver and locker
+Vendor: Jamie Zawinski
+Version: 3.04
+Release: 1
+URL: http://www.jwz.org/xscreensaver/
+Source: xscreensaver-%{version}.tar.gz
+Copyright: BSD
+Group: X11/Utilities
+Buildroot: /var/tmp/xscreensaver-root
+
+%description
+A modular screen saver and locker for the X Window System.
+Highly customizable: allows the use of any program that
+can draw on the root window as a display mode.
+More than 80 display modes are included in this package.
+
+%prep
+%setup -q
+
+%build
+./configure --prefix=/usr/X11R6
+make
+
+%install
+mkdir -p $RPM_BUILD_ROOT/usr/X11R6/bin
+mkdir -p $RPM_BUILD_ROOT/usr/X11R6/man/man1
+mkdir -p $RPM_BUILD_ROOT/etc/X11/wmconfig
+mkdir -p $RPM_BUILD_ROOT/etc/pam.d
+make prefix=$RPM_BUILD_ROOT/usr/X11R6 \
+ AD_DIR=$RPM_BUILD_ROOT/usr/X11R6/lib/X11/app-defaults \
+ PAM_DIR=$RPM_BUILD_ROOT/etc/pam.d \
+ install-strip
+
+# This line is redundant, except that it causes the "xscreensaver"
+# executable to be installed unstripped (while all others are stripped.)
+# You should install it this way so that jwz gets useful bug reports.
+#
+install -m 4755 driver/xscreensaver $RPM_BUILD_ROOT/usr/X11R6/bin
+
+# Even if we weren't compiled with PAM support, make sure to include
+# the PAM module file in the RPM anyway, just in case.
+#
+( cd driver; make PAM_DIR=$RPM_BUILD_ROOT/etc/pam.d install-pam )
+
+cat > $RPM_BUILD_ROOT/etc/X11/wmconfig/xscreensaver <<EOF
+xscreensaver name "xscreensaver (1min timeout)"
+xscreensaver description "xscreensaver"
+xscreensaver group "Amusements/Screen Savers"
+xscreensaver exec "xscreensaver -timeout 1 -cycle 1 &"
+EOF
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+/usr/X11R6/bin/*
+/usr/X11R6/lib/X11/app-defaults/*
+/usr/X11R6/man/man1/*
+%config(missingok) /etc/X11/wmconfig/*
+%config(missingok) /etc/pam.d/*