[84316] trunk/base/src/cregistry/registry.c

jmr at macports.org jmr at macports.org
Thu Sep 22 06:20:30 PDT 2011


Revision: 84316
          http://trac.macports.org/changeset/84316
Author:   jmr at macports.org
Date:     2011-09-22 06:20:27 -0700 (Thu, 22 Sep 2011)
Log Message:
-----------
don't fail to create registry.db due to lack of write perms on registry dir when we're root

Modified Paths:
--------------
    trunk/base/src/cregistry/registry.c

Modified: trunk/base/src/cregistry/registry.c
===================================================================
--- trunk/base/src/cregistry/registry.c	2011-09-22 12:51:25 UTC (rev 84315)
+++ trunk/base/src/cregistry/registry.c	2011-09-22 13:20:27 UTC (rev 84316)
@@ -193,10 +193,8 @@
             if (!(sb.st_mode & S_IWGRP)) {
                 can_write = 0;
             }
-        } else {
-            if (!(sb.st_mode & S_IWOTH)) {
-                can_write = 0;
-            }
+        } else if (!(sb.st_mode & S_IWOTH) && getuid() != 0) {
+            can_write = 0;
         }
     }
     if (initialized || can_write) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110922/38d28e98/attachment.html>


More information about the macports-changes mailing list