Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Finish the proper naming of the module init/fini routine...



details:   https://anonhg.NetBSD.org/src/rev/413b445ef2cc
branches:  trunk
changeset: 945699:413b445ef2cc
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Wed Nov 04 18:12:18 2020 +0000

description:
Finish the proper naming of the module init/fini routines.  Should
fix the "ptrace cannot be used by unpriv user" issue reported by
Rin Okuyama (thanks for the detailed report and analysis).

diffstat:

 sys/kern/sys_ptrace_common.c |  8 ++++----
 sys/sys/ptrace.h             |  6 +++---
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (56 lines):

diff -r 8382e609bb15 -r 413b445ef2cc sys/kern/sys_ptrace_common.c
--- a/sys/kern/sys_ptrace_common.c      Wed Nov 04 16:26:35 2020 +0000
+++ b/sys/kern/sys_ptrace_common.c      Wed Nov 04 18:12:18 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sys_ptrace_common.c,v 1.89 2020/11/01 18:51:02 pgoyette Exp $  */
+/*     $NetBSD: sys_ptrace_common.c,v 1.90 2020/11/04 18:12:18 pgoyette Exp $  */
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -107,7 +107,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.89 2020/11/01 18:51:02 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_ptrace_common.c,v 1.90 2020/11/04 18:12:18 pgoyette Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ptrace.h"
@@ -293,7 +293,7 @@
 }
 
 int
-ptrace_init(void)
+ptrace_common_init(void)
 {
 
 #if 0
@@ -307,7 +307,7 @@
 }
 
 int
-ptrace_fini(void)
+ptrace_common_fini(void)
 {
 
        kauth_unlisten_scope(ptrace_listener);
diff -r 8382e609bb15 -r 413b445ef2cc sys/sys/ptrace.h
--- a/sys/sys/ptrace.h  Wed Nov 04 16:26:35 2020 +0000
+++ b/sys/sys/ptrace.h  Wed Nov 04 18:12:18 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ptrace.h,v 1.72 2020/10/20 20:28:55 christos Exp $     */
+/*     $NetBSD: ptrace.h,v 1.73 2020/11/04 18:12:19 pgoyette Exp $     */
 
 /*-
  * Copyright (c) 1984, 1993
@@ -241,8 +241,8 @@
        int (*ptm_dodbregs)(struct lwp *, struct lwp *, struct uio *);
 };
 
-int    ptrace_init(void);
-int    ptrace_fini(void);
+int    ptrace_common_init(void);
+int    ptrace_common_fini(void);
 int    ptrace_update_lwp(struct proc *t, struct lwp **lt, lwpid_t lid);
 void   ptrace_hooks(void);
 



Home | Main Index | Thread Index | Old Index