From: Zygo Blaxell Date: Mon, 2 Mar 2009 05:42:31 +0000 (-0500) Subject: http://ftp.x.org/contrib/applications/xscreensaver-3.04.tar.gz X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=commitdiff_plain;h=8e0f39b4a12b9a908af2b3b175ebe87c14b4a6ab ftp.x.org/contrib/applications/xscreensaver-3.04.tar.gz -rw-r--r-- 1 zblaxell zblaxell 965445 Nov 15 1998 xscreensaver-3.04.tar.gz 8e4448fa031da1b17773c61bd3a6eecc01584c75 xscreensaver-3.04.tar.gz --- diff --git a/Makefile.in b/Makefile.in index 266f4db1..b2e77f14 100644 --- a/Makefile.in +++ b/Makefile.in @@ -11,7 +11,7 @@ TARFILES = README README.VMS README.debugging INSTALL xscreensaver.lsm \ 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 @@ -39,6 +39,7 @@ uninstall-man: depend: @$(MAKE_SUBDIR) distdepend: + @$(MAKE) update_spec_version @$(MAKE_SUBDIR) TAGS: tags tags: @@ -152,6 +153,22 @@ bump-version:: 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` ; \ diff --git a/README b/README index 9d3df7ba..e866fcaa 100644 --- a/README +++ b/README @@ -77,6 +77,12 @@ http://www.jwz.org/xscreensaver/. ============ +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, diff --git a/config.h.in b/config.h.in index 367aa85a..ae3554ad 100644 --- a/config.h.in +++ b/config.h.in @@ -179,11 +179,13 @@ #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 diff --git a/driver/Makefile.in b/driver/Makefile.in index e4bb9690..7391a19f 100644 --- a/driver/Makefile.in +++ b/driver/Makefile.in @@ -55,6 +55,8 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ AD_DIR = @APPDEFAULTS@ +PAM_DIR = /etc/pam.d +PAM_CONF = /etc/pam.conf UTILS_SRC = $(srcdir)/../utils UTILS_BIN = ../utils @@ -224,8 +226,8 @@ install-pam: @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 ; \ diff --git a/driver/XScreenSaver.ad.in b/driver/XScreenSaver.ad.in index 6e354619..0fee5d3e 100644 --- a/driver/XScreenSaver.ad.in +++ b/driver/XScreenSaver.ad.in @@ -4,8 +4,8 @@ ! 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/ diff --git a/driver/passwd-pam.c b/driver/passwd-pam.c index f7d8528f..e29ff9c7 100644 --- a/driver/passwd-pam.c +++ b/driver/passwd-pam.c @@ -59,6 +59,14 @@ struct pam_closure { }; +#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 @@ -141,10 +149,6 @@ pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p) 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 @@ -160,6 +164,7 @@ pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p) /* 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", @@ -176,6 +181,7 @@ pam_passwd_valid_p (const char *typed_passwd, Bool verbose_p) 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", diff --git a/driver/passwd-pwent.c b/driver/passwd-pwent.c index ba836616..6e83e0f4 100644 --- a/driver/passwd-pwent.c +++ b/driver/passwd-pwent.c @@ -78,7 +78,8 @@ # define PWTYPE struct s_passwd * # define PWPSLOT pw_passwd # define GETPW getspwnam -# define crypt bigcrypt + +# define HAVE_BIGCRYPT #endif @@ -176,7 +177,7 @@ get_encrypted_passwd(const char *user) 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 @@ -233,6 +234,32 @@ pwent_lock_init (int argc, char **argv, Bool verbose_p) } +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. @@ -240,18 +267,14 @@ pwent_lock_init (int argc, char **argv, Bool verbose_p) 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 diff --git a/driver/xscreensaver-command.man b/driver/xscreensaver-command.man index 927fb5bd..5905b85d 100644 --- a/driver/xscreensaver-command.man +++ b/driver/xscreensaver-command.man @@ -11,7 +11,7 @@ .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 diff --git a/driver/xscreensaver-demo.man b/driver/xscreensaver-demo.man index e320b992..44611dd7 100644 --- a/driver/xscreensaver-demo.man +++ b/driver/xscreensaver-demo.man @@ -11,7 +11,7 @@ .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 diff --git a/driver/xscreensaver.man b/driver/xscreensaver.man index ad8b2898..94754b17 100644 --- a/driver/xscreensaver.man +++ b/driver/xscreensaver.man @@ -11,7 +11,7 @@ .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 @@ -914,8 +914,9 @@ without first turning off \fI.Xauthority\fP-based access control, please 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 @@ -934,6 +935,24 @@ xscreensaver-command -restart .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) diff --git a/hacks/Makefile.in b/hacks/Makefile.in index d295b314..de2c10e3 100644 --- a/hacks/Makefile.in +++ b/hacks/Makefile.in @@ -127,7 +127,7 @@ MEN = attraction.man blitspin.man bouboule.man braid.man \ 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 \ diff --git a/hacks/bsod.man b/hacks/bsod.man new file mode 100644 index 00000000..63bcee68 --- /dev/null +++ b/hacks/bsod.man @@ -0,0 +1,126 @@ +.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 . This version is by +Jamie Zawinski . diff --git a/hacks/munch.man b/hacks/munch.man index 87721c02..97b1b797 100644 --- a/hacks/munch.man +++ b/hacks/munch.man @@ -1,4 +1,4 @@ -..de EX \"Begin example +.de EX \"Begin example .ne 5 .if n .sp 1 .if t .sp .5 @@ -15,7 +15,7 @@ .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] diff --git a/utils/version.h b/utils/version.h index 43d4355a..4b67aa21 100644 --- a/utils/version.h +++ b/utils/version.h @@ -1,2 +1,2 @@ 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)"; diff --git a/xscreensaver.lsm b/xscreensaver.lsm index 41d60d44..f74c3920 100644 --- a/xscreensaver.lsm +++ b/xscreensaver.lsm @@ -1,7 +1,7 @@ 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. @@ -10,15 +10,15 @@ Keywords: screen saver, screen lock, lock, xlock, X11 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, diff --git a/xscreensaver.spec b/xscreensaver.spec new file mode 100644 index 00000000..c31c1ad1 --- /dev/null +++ b/xscreensaver.spec @@ -0,0 +1,62 @@ +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 <