Projects
Browse Source     Search     Timeline     Wiki

Changeset 23334

Show
Ignore:
Timestamp:
08/14/07 09:30:48 (15 months ago)
Author:
zarzycki@…
Message:

More sanity checks.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/launchd/src/launchd_core_logic.c

    r23333 r23334  
    986986                return NULL; 
    987987        } 
     988         
     989        if (!jobmgr_assumes(jm, anonpid < 100000)) { 
     990                /* The kernel current defines PID_MAX to be 99999, but that define isn't exported */ 
     991                return NULL; 
     992        } 
    988993 
    989994        if (!jobmgr_assumes(jm, sysctl(mib, 4, &kp, &len, NULL, 0) != -1)) { 
     995                return NULL; 
     996        } 
     997 
     998        if (!jobmgr_assumes(jm, kp.kp_proc.p_comm[0] != '\0')) { 
    990999                return NULL; 
    9911000        } 
     
    10021011        case 1: 
    10031012                if (getpid() != 1) { 
     1013                        /* we cannot possibly find a parent job_t that is useful in this function */ 
    10041014                        break; 
    10051015                }