1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-20 02:38:43 +00:00

Add p_candebug() check to access a process map file in procfs; limit

access to map information for processes that you wouldn't otherwise
have debug rights on.

Tested by:	bms
This commit is contained in:
Robert Watson 2003-08-14 15:26:44 +00:00
parent 7bc56ec444
commit 946e86b7e1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=118907

View File

@ -80,6 +80,12 @@ procfs_doprocmap(PFS_FILL_ARGS)
GIANT_REQUIRED;
PROC_LOCK(p);
error = p_candebug(td, p);
PROC_UNLOCK(p);
if (error)
return (error);
if (uio->uio_rw != UIO_READ)
return (EOPNOTSUPP);