[darwinbuild-changes] [735] trunk/darwinup

source_changes at macosforge.org source_changes at macosforge.org
Thu Mar 4 17:23:41 PST 2010


Revision: 735
          http://trac.macosforge.org/projects/darwinbuild/changeset/735
Author:   wsiegrist at apple.com
Date:     2010-03-04 17:23:38 -0800 (Thu, 04 Mar 2010)
Log Message:
-----------
Fix bug where directories were losing their group or world write bits due to umask.

Modified Paths:
--------------
    trunk/darwinup/DB.cpp
    trunk/darwinup/File.cpp

Modified: trunk/darwinup/DB.cpp
===================================================================
--- trunk/darwinup/DB.cpp	2010-03-04 22:57:28 UTC (rev 734)
+++ trunk/darwinup/DB.cpp	2010-03-05 01:23:38 UTC (rev 735)
@@ -425,6 +425,7 @@
 	return DB_ERROR;	
 }
 
+// XXX: get_archive gets called repeatedly by make_file, should memoize
 int DarwinupDatabase::get_archive(uint8_t** data, uint64_t serial) {
 	int res = this->get_row("archive__serial",
 							data,

Modified: trunk/darwinup/File.cpp
===================================================================
--- trunk/darwinup/File.cpp	2010-03-04 22:57:28 UTC (rev 734)
+++ trunk/darwinup/File.cpp	2010-03-05 01:23:38 UTC (rev 735)
@@ -338,6 +338,8 @@
 	
 	IF_DEBUG("[install] mkdir(%s, %04o)\n", dstpath, mode);
 	if (res == 0) res = mkdir(dstpath, mode);
+	// mkdir is limited by umask, so ensure mode is set
+	if (res == 0) res = chmod(dstpath, mode); 
 
 	if (res && errno == EEXIST) {
 		if (is_directory(dstpath)) {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20100304/96d521f7/attachment-0001.html>


More information about the darwinbuild-changes mailing list