]> git.saurik.com Git - apple/syslog.git/commitdiff
syslog-356.50.1.tar.gz macos-10134 macos-10135 v356.50.1
authorApple <opensource@apple.com>
Fri, 3 Nov 2017 22:30:43 +0000 (22:30 +0000)
committerApple <opensource@apple.com>
Fri, 3 Nov 2017 22:30:43 +0000 (22:30 +0000)
syslogd.tproj/asl.conf.ios
syslogd.tproj/syslogd.c

index ae10c60093987c6c5105138507a09e4774693778..bd4d28ea05949d60438b7ad157ab90a363ffe9ab 100644 (file)
@@ -25,6 +25,6 @@
 
 # Specify owner, group, and access bits for mobile-owned log directories
 > /var/mobile/Library uid=501 gid=501 mode=0700
-> /var/mobile/Library/Logs uid=501 gid=501 mode=0755
-> /var/mobile/Library/Logs/CrashReporter uid=501 gid=501 mode=0755
+> /var/mobile/Library/Logs uid=501 gid=250 mode=0775
+> /var/mobile/Library/Logs/CrashReporter uid=501 gid=250 mode=0775
 > /var/mobile/Library/Logs/CrashReporter/DiagnosticLogs uid=501 gid=501 mode=0755
index 81984746e19213579c7a71610e6f55f19e2c5bc4..2d45dc5839118d943a4385695ccfa8934f05b0c6 100644 (file)
@@ -49,7 +49,6 @@
 #include <notify_keys.h>
 #include <utmpx.h>
 #include <asl_private.h>
-#include <pwd.h>
 
 #if !TARGET_OS_IPHONE
 #include <quarantine.h>
@@ -482,27 +481,6 @@ main(int argc, const char *argv[])
        }
 #endif
 
-#if TARGET_OS_IPHONE
-       /*
-        * Reset owner, group, and permissions in /var/mobile/Library/Logs
-        * in case something created them incorrectly.  syslogd was
-        * guilty of this in the past, creating them with owner root.
-        */
-
-       uid_t __mUserUID = 501;
-       gid_t __mUserGID = 501;
-       struct passwd * pw = getpwnam("mobile");
-
-       if (pw) {
-               __mUserUID = pw->pw_uid;
-               __mUserGID = pw->pw_gid;
-       }
-
-       asl_secure_chown_chmod_dir("/private/var/mobile/Library/Logs", __mUserUID, __mUserGID, 0755);
-       asl_secure_chown_chmod_dir("/private/var/mobile/Library/Logs/CrashReporter", __mUserUID, __mUserGID, 0755);
-       asl_secure_chown_chmod_dir("/private/var/mobile/Library/Logs/CrashReporter/DiagnosticLogs", __mUserUID, __mUserGID, 0755);
-#endif
-
        /* Set I/O policy */
        setiopolicy_np(IOPOL_TYPE_DISK, IOPOL_SCOPE_PROCESS, IOPOL_PASSIVE);