lkml.org 
[lkml]   [2003]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectStupid Q regarding reading /proc/PID/mem, etc

I have a probably annoying/dumb question:

Why does reading something that you don't have permission for from
/proc/PID, such as, oh /proc/PID/mem (normally unless you own PID you
can't read that even on lax systems) return -ESRCH to userland? You'd
think it should return -EPERM right?

From fs/proc/base.c::mem_read():

if (!MAY_PTRACE(task) || !may_ptrace_attach(task))
return -ESRCH;

Why not -EPERM?

-Calin



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:59    [W:0.019 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site