Frederic,

Frederic,

I have another patch for you for msec.  This time it's for 
msec_find/find.c.  During the search for world writable files, msec_find 
sees sockets and fifos, which have rwxrwxrwx attributes (plus more), and 
lists them.  They shouldn't be listed.

Here's the patch:

--- ./msec-0.32/src/msec_find/find.c    Tue Apr 18 12:30:51 2000
+++ ./msec-0.32.x/src/msec_find/find.c  Tue Aug 20 08:23:11 2002
@@ -105,11 +105,14 @@
                   */
          case FTW_D:
                  /*
-                 * Is world writeable check.
+                 * World Writeable check.
+                 * (Exclude sockets and pipes)
                   */
-               if (sb->st_mode & 0002)
+               if ((sb->st_mode & S_IWOTH)
+                   && ! S_ISSOCK(sb->st_mode)
+                   && ! S_ISFIFO(sb->st_mode) )
                        fprintf(writeable_fd, "%s\n", file);
-
+
                  /*
                   * Unowned user check.
                   */


Cheers!

David
--------------------------------------------------------
David Relson                   Osage Software Systems, Inc.
[EMAIL PROTECTED]       Ann Arbor, MI 48103
www.osagesoftware.com          tel:  734.821.8800


Reply via email to