From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Agri <agri@desnol.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: BUG: fork do not copy /proc/<PID>/cmdline permissions
Date: Thu, 22 Apr 2004 16:36:28 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.53.0404221628300.940@chaos> (raw)
In-Reply-To: <20040422215322.19475d98@agri-home>
On Thu, 22 Apr 2004, Agri wrote:
> I expected from fork to make a rather complete copy of a process,
> but it does not copy /proc/<PID>/cmdline access permissions.
> Therefore, the only way (at least i know) to hide all args of
> processes is to start every program within shell script:
> bash -c 'chmod /proc/$$/cmdline; exec userprogramm ...'
>
> Tested on 2.6.5.
>
> Agri
Huh? /proc/$PID/cmdline doesn't exist until after a task is
created. What you did was create a task, change whatever
is in proc, then exec (which doesn't change the PID).
How would you expect fork() to know that you wanted to
do this? The permissions in /proc are file permissions.
They have nothing to do with a task.
Also, any task can read its own command-line without using
/proc at all.
Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5557.45 BogoMips).
Note 96.31% of all statistics are fiction.
next prev parent reply other threads:[~2004-04-22 20:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-22 17:53 Agri
2004-04-22 20:36 ` Richard B. Johnson [this message]
2004-04-22 21:21 ` Agri
2004-04-22 21:31 ` Richard B. Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.53.0404221628300.940@chaos \
--to=root@chaos.analogic.com \
--cc=agri@desnol.ru \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®