summaryrefslogtreecommitdiff
path: root/proc
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2001-12-22 21:00:25 +0000
committerRoland McGrath <roland@gnu.org>2001-12-22 21:00:25 +0000
commit1977d783a60647a384e6ab79bfd4e63f5b38d0a4 (patch)
treebe42848c64dc9035cae973aac066ad80afbd36d6 /proc
parent7d3fa13e26ae944a8cf089b2a5c951f88d426907 (diff)
2001-12-22 Roland McGrath <roland@frob.com>
* proc.h (check_owner): Move this extern inline function ... * info.c (check_owner): ... to here, made static inline.
Diffstat (limited to 'proc')
-rw-r--r--proc/info.c16
-rw-r--r--proc/proc.h15
2 files changed, 17 insertions, 14 deletions
diff --git a/proc/info.c b/proc/info.c
index 580ce8fb..342813c5 100644
--- a/proc/info.c
+++ b/proc/info.c
@@ -33,6 +33,20 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "proc.h"
#include "process_S.h"
+
+/* Returns true if PROC1 has `owner' privileges over PROC2 (and can thus get
+ its task port &c). If PROC2 has an owner, then PROC1 must have that uid;
+ otherwise, both must be in the same login collection. */
+static inline int
+check_owner (struct proc *proc1, struct proc *proc2)
+{
+ return
+ proc2->p_noowner
+ ? check_uid (proc1, 0) || proc1->p_login == proc2->p_login
+ : check_uid (proc1, proc2->p_owner);
+}
+
+
/* Implement S_proc_pid2task as described in <hurd/process.defs>. */
kern_return_t
S_proc_pid2task (struct proc *callerp,
@@ -40,7 +54,7 @@ S_proc_pid2task (struct proc *callerp,
task_t *t)
{
struct proc *p;
-
+
if (!callerp)
return EOPNOTSUPP;
diff --git a/proc/proc.h b/proc/proc.h
index 0e83574d..9e79192a 100644
--- a/proc/proc.h
+++ b/proc/proc.h
@@ -146,7 +146,7 @@ mach_port_t generic_port; /* messages not related to a specific proc */
struct mutex global_lock;
-extern inline void
+static inline void __attribute__ ((unused))
process_drop (struct proc *p)
{
if (p)
@@ -209,17 +209,6 @@ void complete_exit (struct proc *);
void initialize_version_info (void);
void send_signal (mach_port_t, int, mach_port_t);
-
-/* Returns true if PROC1 has `owner' privileges over PROC2 (and can thus get
- its task port &c). If PROC2 has an owner, then PROC1 must have that uid;
- otherwise, both must be in the same login collection. */
-extern inline int
-check_owner (struct proc *proc1, struct proc *proc2)
-{
- return
- proc2->p_noowner
- ? check_uid (proc1, 0) || proc1->p_login == proc2->p_login
- : check_uid (proc1, proc2->p_owner);
-}
+
#endif