File ziptool-1.4.0-uid.patch of Package ziptool

drop privileges for stating file, so user can see only his files

--- ziptool.c-orig	2004-09-30 12:09:09.000000000 +0200
+++ ziptool.c	2004-09-30 12:22:20.000000000 +0200
@@ -278,11 +278,13 @@
  * -> Major is SCSI_DISK_MAJOR
  * -> Minor is a multiple of 16 (or 0)
  */
+        seteuid(getuid());
         if (stat (dev, &st_dev)) {
                 (void) fprintf (stderr, "%s: stat(%s) failed: %s.\n",
                         progname, dev, strerror (errno));
                 return (-1);
         }
+        seteuid(0);
 
         if (!S_ISBLK (st_dev.st_mode)
 #if defined SCSI_DISK0_MAJOR
openSUSE Build Service is sponsored by