From c58972950480a3550c3586696faabadc23bea1e4 Mon Sep 17 00:00:00 2001 From: Apple Date: Fri, 3 Nov 2017 22:30:43 +0000 Subject: [PATCH] syslog-356.50.1.tar.gz --- syslogd.tproj/asl.conf.ios | 4 ++-- syslogd.tproj/syslogd.c | 22 ---------------------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/syslogd.tproj/asl.conf.ios b/syslogd.tproj/asl.conf.ios index ae10c60..bd4d28e 100644 --- a/syslogd.tproj/asl.conf.ios +++ b/syslogd.tproj/asl.conf.ios @@ -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 diff --git a/syslogd.tproj/syslogd.c b/syslogd.tproj/syslogd.c index 8198474..2d45dc5 100644 --- a/syslogd.tproj/syslogd.c +++ b/syslogd.tproj/syslogd.c @@ -49,7 +49,6 @@ #include #include #include -#include #if !TARGET_OS_IPHONE #include @@ -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); -- 2.45.2