mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: bert hubert <ahu@ds9a.nl>
To: Andrew Morton <akpm@osdl.org>
Cc: Christoph Hellwig <hch@infradead.org>,
	linux-kernel@vger.kernel.org,
	olaf+list.linux-kernel@olafdietsche.de
Subject: Re: procfs permissions on 2.6.x
Date: Sun, 4 Jul 2004 03:27:14 +0200	[thread overview]
Message-ID: <20040704012714.GA28531@outpost.ds9a.nl> (raw)
In-Reply-To: <20040703133556.44b70d60.akpm@osdl.org>

On Sat, Jul 03, 2004 at 01:35:56PM -0700, Andrew Morton wrote:

> Why is it "extremely bogus"?  I assume Olaf had a reason for wanting chmod
> on procfs files?

On a related note:
ahu@d800:/sys/devices/system/cpu/cpu0/cpufreq$ ls -l
total 0
-r--------    1 ahu      ahu          4096 2004-07-04 03:18 cpuinfo_cur_freq
-r--r--r--    1 ahu      ahu          4096 2004-07-04 03:18 cpuinfo_max_freq

..

I'm not entirely sure why the current CPU frequency has suddenly become a
state secret, nor why the ownership of these files appears to be uid 1000.

-r--r--r--    1 ahu      ahu          4096 2004-07-04 03:18 cpuinfo_min_freq
-r--r--r--    1 ahu      ahu          4096 2004-07-04 03:18 scaling_available_frequencies
-r--r--r--    1 ahu      ahu          4096 2004-07-04 03:18 scaling_available_governors
-r--r--r--    1 ahu      ahu          4096 2004-07-04 03:18 scaling_cur_freq
-r--r--r--    1 ahu      ahu          4096 2004-07-04 03:18 scaling_driver
-rw-r--r--    1 ahu      ahu          4096 2004-07-04 03:18 scaling_governor
-rw-r--r--    1 ahu      ahu          4096 2004-07-04 03:18 scaling_max_freq
-rw-r--r--    1 ahu      ahu          4096 2004-07-04 03:18 scaling_min_freq

This appears to be even more bogus - uid 1000 can write to the scaling
governor. It looks like the uid that mounted /sys owns these files. Not
entirely sure what happens.

Fixes appear trivial but I wonder about the reasons.

Regards,

bert

-- 
http://www.PowerDNS.com      Open source, database driven DNS Software 
http://lartc.org           Linux Advanced Routing & Traffic Control HOWTO

  parent reply	other threads:[~2004-07-04  1:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-03 20:22 Herbert Poetzl
2004-07-03 20:25 ` Christoph Hellwig
2004-07-03 20:35   ` Andrew Morton
2004-07-03 21:04     ` Christoph Hellwig
2004-07-03 21:35       ` Andrew Morton
2004-07-04 21:35         ` viro
2004-07-04 21:55           ` Andrew Morton
2004-07-04 22:13             ` viro
2004-07-04 22:43               ` Andrew Morton
2004-07-06  3:31                 ` Andy Lutomirski
2004-07-05  1:50               ` Clemens Schwaighofer
2004-07-05  1:55                 ` viro
2004-07-05  8:05                 ` Duncan Sands
2004-07-05  8:14                   ` Clemens Schwaighofer
2004-07-04  1:27     ` bert hubert [this message]
     [not found] <2dZjc-7BP-15@gated-at.bofh.it>
     [not found] ` <2dZjf-7BP-27@gated-at.bofh.it>
     [not found]   ` <2dZsQ-7GF-23@gated-at.bofh.it>
     [not found]     ` <2dZVV-867-33@gated-at.bofh.it>
     [not found]       ` <2e0oZ-8lm-35@gated-at.bofh.it>
     [not found]         ` <2emSs-6R8-17@gated-at.bofh.it>
     [not found]           ` <2enbS-72q-19@gated-at.bofh.it>
     [not found]             ` <2env9-7li-9@gated-at.bofh.it>
2004-07-04 22:25               ` Andi Kleen
2004-07-04 22:37                 ` FabF
2004-07-04 23:30                   ` Paul Jackson

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=20040704012714.GA28531@outpost.ds9a.nl \
    --to=ahu@ds9a.nl \
    --cc=akpm@osdl.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olaf+list.linux-kernel@olafdietsche.de \
    /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

Powered by JetHome