]> git.saurik.com Git - apple/syslog.git/blobdiff - syslogd.tproj/syslogd.c
syslog-356.50.1.tar.gz
[apple/syslog.git] / syslogd.tproj / syslogd.c
index e929e9d5c4b890faf7e8af853d0984465a985306..2d45dc5839118d943a4385695ccfa8934f05b0c6 100644 (file)
@@ -48,9 +48,7 @@
 #include <notify.h>
 #include <notify_keys.h>
 #include <utmpx.h>
-#include <vproc_priv.h>
 #include <asl_private.h>
-#include <pwd.h>
 
 #if !TARGET_OS_IPHONE
 #include <quarantine.h>
@@ -67,8 +65,6 @@
 
 #define NOTIFY_DELAY 1
 
-#define forever for(;;)
-
 extern int _malloc_no_asl_log;
 
 #if TARGET_IPHONE_SIMULATOR
@@ -485,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);
 
@@ -743,19 +718,6 @@ main(int argc, const char *argv[])
                dispatch_resume(global.mark_timer);
        }
 
-#if !TARGET_IPHONE_SIMULATOR
-       asldebug("starting launchd input channel\n");
-       /*
-        * Start launchd service
-        * This pins a thread in _vprocmgr_log_drain.  Eventually we will either
-        * remove the whole stderr/stdout -> ASL mechanism entirely, or come up 
-        * with a communication channel that we can trigger with a dispatch source.
-        */
-       dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
-               forever _vprocmgr_log_drain(NULL, NULL, launchd_callback);
-       });
-#endif
-
        asldebug("starting mach service\n");
        /*
         * Start mach server