From: YAMANASHI Takeshi <uncover@beat.cc.titech.ac.jp>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] chdir to mode 000 directory
Date: Thu, 3 Jun 2004 15:01:54 +0900 [thread overview]
Message-ID: <cafdd248ba943c8f25c8374f5216db00@orthanc.cc.titech.ac.jp> (raw)
> > % ls -ld dir
> > d---------- M 9 nashi nashi 0 Jun 3 10:51 dir
> > % cd dir
> > % __chdir succeeds!__
:
> The semantics of directory permissions are different: you can walk to
> a directory without permission,
Thank you. My confusion is cleared now. So when I want to
check if a process can chdir to a directory, the following
fragment is good enough?
if(access("/usr/hoge/adir", AREAD) < 0){
// error, can't chdir to adir
:
}
I thought the following should work at first, hence my question.
if(chdir("/usr/hoge/adir") < 0){
// error, can't chdir to adir
:
}
--
next reply other threads:[~2004-06-03 6:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-03 6:01 YAMANASHI Takeshi [this message]
2004-06-03 6:19 ` lucio
2004-06-06 7:10 ` YAMANASHI Takeshi
2004-06-06 7:33 ` Rob Pike
-- strict thread matches above, loose matches on Subject: below --
2004-06-03 1:58 YAMANASHI Takeshi
2004-06-03 5:49 ` lucio
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=cafdd248ba943c8f25c8374f5216db00@orthanc.cc.titech.ac.jp \
--to=uncover@beat.cc.titech.ac.jp \
--cc=9fans@cse.psu.edu \
/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).