From: erik quanstrom <quanstro@labs.coraid.com>
To: 9fans@9fans.net
Subject: Re: [9fans] exec permission on plan9
Date: Fri, 26 Feb 2010 12:43:33 -0500 [thread overview]
Message-ID: <329a0a1c22aba5018223cdfb2fe21f03@coraid.com> (raw)
In-Reply-To: <7b956f03980157ec2a6357aaa14eb60f@quintile.net>
> 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.
yes.
> 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.
rc does check, but the check is not bulletproof:
from plan9.c:/^Executable
ret = ((statbuf->mode&0111)!=0 && (statbuf->mode&DMDIR)==0);
rc will try to execute a file for which the owner
has execute permission, but you are not the owner.
byron's rc goes to great pains to get this right, but
in plan 9 it's not really possible since there is no
way to get a user's groups. since this is a property
of the fileserver, and by design you're not supposed
to know those things. :-)
- erik
next prev parent reply other threads:[~2010-02-26 17:43 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 [this message]
2010-02-26 18:28 ` Russ Cox
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=329a0a1c22aba5018223cdfb2fe21f03@coraid.com \
--to=quanstro@labs.coraid.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).