Module Name:    src
Committed By:   pgoyette
Date:           Wed Nov  4 18:12:19 UTC 2020

Modified Files:
        src/sys/kern: sys_ptrace_common.c
        src/sys/sys: ptrace.h

Log Message:
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).


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/sys/kern/sys_ptrace_common.c
cvs rdiff -u -r1.72 -r1.73 src/sys/sys/ptrace.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/kern/sys_ptrace_common.c
diff -u src/sys/kern/sys_ptrace_common.c:1.89 src/sys/kern/sys_ptrace_common.c:1.90
--- src/sys/kern/sys_ptrace_common.c:1.89	Sun Nov  1 18:51:02 2020
+++ src/sys/kern/sys_ptrace_common.c	Wed Nov  4 18:12:18 2020
@@ -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 @@ ptrace_listener_cb(kauth_cred_t cred, ka
 }
 
 int
-ptrace_init(void)
+ptrace_common_init(void)
 {
 
 #if 0
@@ -307,7 +307,7 @@ ptrace_init(void)
 }
 
 int
-ptrace_fini(void)
+ptrace_common_fini(void)
 {
 
 	kauth_unlisten_scope(ptrace_listener);

Index: src/sys/sys/ptrace.h
diff -u src/sys/sys/ptrace.h:1.72 src/sys/sys/ptrace.h:1.73
--- src/sys/sys/ptrace.h:1.72	Tue Oct 20 20:28:55 2020
+++ src/sys/sys/ptrace.h	Wed Nov  4 18:12:19 2020
@@ -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 @@ struct ptrace_methods {
 	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);
 

Reply via email to