9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Russ Cox <rsc@swtch.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] exec permission on plan9
Date: Fri, 26 Feb 2010 10:28:05 -0800	[thread overview]
Message-ID: <dd6fe68a1002261028i7001bda2i190a3653109fd65e@mail.gmail.com> (raw)
In-Reply-To: <7b956f03980157ec2a6357aaa14eb60f@quintile.net>

On Fri, Feb 26, 2010 at 9:28 AM, Steve Simon <steve@quintile.net> wrote:
> Who enforces the exec bit on plan9?
>
> It appears to me (though my code may be buggy) that
> the file server is expected to enforce the exec bit
> in the file's modes when a file is opened with OEXEC.
>
> I would have expected rc(1) to have checked the mode and
> not to have tried to exec() the file if the exec bit in the
> file's mode is not set.
>
> Is it another case of "This is Plan9 not Unix" or perhaps
> I am mis-remembering that too?

I think enforce is the wrong mindset.  (This is Plan 9, not Unix.)
OEXEC and OREAD are just two different ways
to open a file for reading.  As a convenience to exec
more than anything else, most file servers associate
them with different permission bits, but absolutely
nothing stops you from reading an 0111 file or
executing an 0444 file; in both cases, open it with
the right mode, read out a copy, and change the
bits on your own copy.

Russ


  parent reply	other threads:[~2010-02-26 18:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-26 17:28 Steve Simon
2010-02-26 17:43 ` erik quanstrom
2010-02-26 18:28 ` Russ Cox [this message]
2010-02-26 18:50   ` Steve Simon
2010-02-26 18:55     ` erik quanstrom
2010-02-26 19:19       ` Steve Simon
2010-02-26 19:05     ` Federico G. Benavento
2010-02-26 19:17       ` Lyndon Nerenberg (VE6BBM/VE7TFX)

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=dd6fe68a1002261028i7001bda2i190a3653109fd65e@mail.gmail.com \
    --to=rsc@swtch.com \
    --cc=9fans@9fans.net \
    /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;
as well as URLs for NNTP newsgroup(s).