Sophie

Sophie

distrib > Altlinux > 4.1 > i586 > media > core-src > by-pkgid > 707f5067461c1948b861ed86dae7c8f7 > files > 2

xscreensaver-5.07-alt0.M41.1.src.rpm

 configure.in                   |    2 +-
 driver/exec.c                  |    4 ++++
 driver/setuid.c                |    4 +++-
 driver/types.h                 |    1 +
 driver/xscreensaver-command.c  |    3 +++
 driver/xscreensaver-getimage.c |    6 ++----
 driver/xscreensaver.c          |    3 +++
 hacks/Makefile.in              |    2 +-
 hacks/glx/dxf2gl.pl            |    1 -
 hacks/glx/glplanet.man         |    2 +-
 hacks/vidwhacker               |    1 -
 hacks/xml2man.pl               |    1 -
 12 files changed, 19 insertions(+), 11 deletions(-)

diff --git a/configure.in b/configure.in
index c486f2a..e84443e 100644
--- a/configure.in
+++ b/configure.in
@@ -1866,7 +1866,7 @@ if test "$enable_locking" = yes -a "$with_pam" = yes; then
 
     # libpam typically requires dlopen and dlsym.  On FreeBSD,
     # those are in libc.  On Linux and Solaris, they're in libdl.
-    AC_CHECK_LIB(dl, dlopen, [PASSWD_LIBS="${PASSWD_LIBS} -ldl"])
+    #AC_CHECK_LIB(dl, dlopen, [PASSWD_LIBS="${PASSWD_LIBS} -ldl"])
 
     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
     have_timedwait=no
diff --git a/driver/exec.c b/driver/exec.c
index 5da53a0..3db8cd7 100644
--- a/driver/exec.c
+++ b/driver/exec.c
@@ -85,6 +85,7 @@ static void nice_process (int nice_level);
 
 
 #ifndef VMS
+extern int __libc_enable_secure = 0;
 
 static void
 exec_simple_command (const char *command)
@@ -99,6 +100,9 @@ exec_simple_command (const char *command)
     }
   av[ac] = 0;
 
+  setgid(getgid());
+  setuid(getuid());
+  __libc_enable_secure = 0;
   execvp (av[0], av);	/* shouldn't return. */
 }
 
diff --git a/driver/setuid.c b/driver/setuid.c
index 3ac78e4..06d0686 100644
--- a/driver/setuid.c
+++ b/driver/setuid.c
@@ -140,9 +140,11 @@ set_ids_by_number (uid_t uid, gid_t gid, char **message_ret)
       setgroups (1, &gid) < 0)
     sgs_errno = errno ? errno : -1;
 
+#if 0
   errno = 0;
   if (setgid (gid) != 0)
     gid_errno = errno ? errno : -1;
+#endif
 
   errno = 0;
   if (setuid (uid) != 0)
@@ -260,7 +262,7 @@ hack_uid (saver_info *si)
 
     si->orig_uid = strdup (uid_gid_string (euid, egid));
 
-    if (uid != euid || gid != egid)
+    if (euid == (uid_t) 0 && (uid != euid || gid != egid))
       if (set_ids_by_number (uid, gid, &si->uid_message) != 0)
 	saver_exit (si, 1, 0);
   }
diff --git a/driver/types.h b/driver/types.h
index 63ac39e..5c65416 100644
--- a/driver/types.h
+++ b/driver/types.h
@@ -141,6 +141,7 @@ struct saver_preferences {
   char *help_url;		/* Where the help document resides. */
   char *load_url_command;	/* How one loads URLs. */
   char *new_login_command;	/* Command for the "New Login" button. */
+  Bool oneshot;			/* HACK HACK HACK HACK HACK */
 };
 
 /* This structure holds all the data that applies to the program as a whole,
diff --git a/driver/xscreensaver-command.c b/driver/xscreensaver-command.c
index 5ec7441..349432f 100644
--- a/driver/xscreensaver-command.c
+++ b/driver/xscreensaver-command.c
@@ -15,6 +15,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <errno.h>
 #include <time.h>
 #include <sys/time.h>
 #include <sys/types.h>
@@ -260,6 +261,8 @@ main (int argc, char **argv)
 
       sprintf (buf, "%s: could not exec %s", progname, new_argv[0]);
       perror(buf);
+      if (errno == EINVAL)
+	fprintf (stderr, "You may wish to install ``xscreensaver-frontend'' package.\n");
       fflush(stdout);
       fflush(stderr);
       exit (-1);
diff --git a/driver/xscreensaver-getimage.c b/driver/xscreensaver-getimage.c
index 68637a7..01191a7 100644
--- a/driver/xscreensaver-getimage.c
+++ b/driver/xscreensaver-getimage.c
@@ -84,7 +84,7 @@ static char *defaults[] = {
 };
 
 
-
+extern const char *__progname;
 char *progname = 0;
 char *progclass = "XScreenSaver";
 XrmDatabase db;
@@ -1744,9 +1744,7 @@ main (int argc, char **argv)
   char *s;
   int i;
 
-  progname = argv[0];
-  s = strrchr (progname, '/');
-  if (s) progname = s+1;
+  progname = __progname;
   oprogname = progname;
 
   /* half-assed way of avoiding buffer-overrun attacks. */
diff --git a/driver/xscreensaver.c b/driver/xscreensaver.c
index 1ac1d68..9b7ec6e 100644
--- a/driver/xscreensaver.c
+++ b/driver/xscreensaver.c
@@ -662,6 +662,9 @@ process_command_line (saver_info *si, int *argc, char **argv)
 	/* no resource for this one, out of paranoia. */
 	si->prefs.debug_p = True;
 
+      else if (!strcmp (argv[i], "-oneshot"))
+	si->prefs.oneshot = True;
+
       else if (!strcmp (argv[i], "-h") ||
 	       !strcmp (argv[i], "-help") ||
 	       !strcmp (argv[i], "--help"))
diff --git a/hacks/Makefile.in b/hacks/Makefile.in
index 6c3954a..c68e3ea 100644
--- a/hacks/Makefile.in
+++ b/hacks/Makefile.in
@@ -165,7 +165,7 @@ NEXES		= attraction blitspin bouboule braid bubbles decayscreen deco \
 		  interference truchet bsod crystal discrete distort kumppa \
 		  demon loop t3d penetrate deluxe compass squiral xflame \
 		  wander spotlight critical phosphor xmatrix petri shadebobs \
-		  ccurve blaster bumps ripples xspirograph \
+		  xsublim ccurve blaster bumps ripples xspirograph \
 		  nerverot xrayswarm hyperball zoom whirlwindwarp rotzoomer \
 		  whirlygig speedmine vermiculate twang apollonian euler2d \
 		  juggle polyominoes thornbird  fluidballs anemone halftone \
diff --git a/hacks/glx/dxf2gl.pl b/hacks/glx/dxf2gl.pl
index b2d334b..5f3a69a 100755
--- a/hacks/glx/dxf2gl.pl
+++ b/hacks/glx/dxf2gl.pl
@@ -25,7 +25,6 @@
 # Created:  8-Mar-2003.
 
 require 5;
-use diagnostics;
 use strict;
 
 my $progname = $0; $progname =~ s@.*/@@g;
diff --git a/hacks/glx/glplanet.man b/hacks/glx/glplanet.man
index a01358e..4abb6ae 100644
--- a/hacks/glx/glplanet.man
+++ b/hacks/glx/glplanet.man
@@ -35,7 +35,7 @@ Use Flat Coloring.
 .B \-delay \fInumber\fP
 Per-frame delay, in microseconds.  Default: 20000 (0.02 seconds.).
 .TP 8
-.B \-images \fIfile\fP
+.B \-image \fIfile\fP
 The texture map to wrap around the planet's surface.
 .TP 8
 .B \-resolution
diff --git a/hacks/vidwhacker b/hacks/vidwhacker
index 1496495..54f4e36 100755
--- a/hacks/vidwhacker
+++ b/hacks/vidwhacker
@@ -17,7 +17,6 @@
 # Created: 14-Apr-01.
 
 require 5;
-use diagnostics;
 use strict;
 
 my $progname = $0; $progname =~ s@.*/@@g;
diff --git a/hacks/xml2man.pl b/hacks/xml2man.pl
index 2e2ba16..711d44d 100755
--- a/hacks/xml2man.pl
+++ b/hacks/xml2man.pl
@@ -18,7 +18,6 @@
 # but at least they exist.
 
 require 5;
-use diagnostics;
 use strict;
 
 use Text::Wrap;