/[hurd]/hurd/proc/info.c
ViewVC logotype

Diff of /hurd/proc/info.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.42 by marcus, Wed Jun 27 11:31:06 2001 UTC revision 1.43 by roland, Sat Dec 22 21:00:25 2001 UTC
# Line 33  the Free Software Foundation, 675 Mass A Line 33  the Free Software Foundation, 675 Mass A
33  #include "proc.h"  #include "proc.h"
34  #include "process_S.h"  #include "process_S.h"
35    
36    
37    /* Returns true if PROC1 has `owner' privileges over PROC2 (and can thus get
38       its task port &c).  If PROC2 has an owner, then PROC1 must have that uid;
39       otherwise, both must be in the same login collection.  */
40    static inline int
41    check_owner (struct proc *proc1, struct proc *proc2)
42    {
43      return
44        proc2->p_noowner
45          ? check_uid (proc1, 0) || proc1->p_login == proc2->p_login
46          : check_uid (proc1, proc2->p_owner);
47    }
48    
49    
50  /* Implement S_proc_pid2task as described in <hurd/process.defs>. */  /* Implement S_proc_pid2task as described in <hurd/process.defs>. */
51  kern_return_t  kern_return_t
52  S_proc_pid2task (struct proc *callerp,  S_proc_pid2task (struct proc *callerp,
# Line 40  S_proc_pid2task (struct proc *callerp, Line 54  S_proc_pid2task (struct proc *callerp,
54                   task_t *t)                   task_t *t)
55  {  {
56    struct proc *p;    struct proc *p;
57      
58    if (!callerp)    if (!callerp)
59      return EOPNOTSUPP;      return EOPNOTSUPP;
60    

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26