]> git.saurik.com Git - apple/securityd.git/blobdiff - src/SharedMemoryServer.cpp
securityd-55199.3.tar.gz
[apple/securityd.git] / src / SharedMemoryServer.cpp
index 0b86779642ccd1276e48cf02efe37280e56f3751..699542c6ca816970898ae02d16587e9d41cab876 100644 (file)
@@ -6,8 +6,9 @@
 #include <string>
 #include <sys/stat.h>
 #include <security_utilities/crc.h>
 #include <string>
 #include <sys/stat.h>
 #include <security_utilities/crc.h>
+#include <unistd.h>
 
 
-static const char* kPrefix = "/private/var/tmp/mds/messages/se_";
+static const char* kPrefix = "/private/var/db/mds/messages/se_";
 
 SharedMemoryServer::SharedMemoryServer (const char* segmentName, SegmentOffsetType segmentSize) :
        mSegmentName (segmentName), mSegmentSize (segmentSize)
 
 SharedMemoryServer::SharedMemoryServer (const char* segmentName, SegmentOffsetType segmentSize) :
        mSegmentName (segmentName), mSegmentSize (segmentSize)
@@ -16,7 +17,8 @@ SharedMemoryServer::SharedMemoryServer (const char* segmentName, SegmentOffsetTy
        mFileName += segmentName;
        
        // make the mds directory, just in case it doesn't exist
        mFileName += segmentName;
        
        // make the mds directory, just in case it doesn't exist
-       mkdir("/var/tmp/mds/messages", 0755);
+       mkdir("/var/db/mds", 1777);
+       mkdir("/var/db/mds/messages", 0755);
        
        // make the file name
        // clean any old file away
        
        // make the file name
        // clean any old file away