Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
* stat oddities
@ 2001-11-20 15:27 Matteo Catanese
  2001-11-21 15:39 ` Joerg Bruehe
  0 siblings, 1 reply; 3+ messages in thread
From: Matteo Catanese @ 2001-11-20 15:27 UTC (permalink / raw)


Tru64 5.1

software:leonardo ~ > mkdir foo
software:leonardo ~ > chmod 000 foo/
software:leonardo ~ > ./stat foo/.
foo/.:
         inode 38754
         dev 2877,258714
         links 2
         size 8192
         directory
         mode is ---------
         uid 201 (software)
         gid 19 (adm)
         change time - Wed Nov 14 15:17:39 2001 <1005747459>
access time - Wed Nov 14 15:17:30 2001 <1005747450>
modify time - Wed Nov 14 15:17:30 2001 <1005747450>

Since 'foo' does not give read and execute permissions to the uid that 
executes stat(), it therefore follows that a stat of 'foo/.' should FAIL:

This breaks "make check" of courier imap


On digital unix 4.0x

~> mkdir foo
~> chmod 000 foo
~> ./stat foo/.
Cannot stat "foo/."
foo/.: Permission denied






^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: stat oddities
  2001-11-20 15:27 stat oddities Matteo Catanese
@ 2001-11-21 15:39 ` Joerg Bruehe
  2001-11-21 16:27   ` John F Carr
  0 siblings, 1 reply; 3+ messages in thread
From: Joerg Bruehe @ 2001-11-21 15:39 UTC (permalink / raw)


Hi!

Matteo Catanese wrote:
> 
> Tru64 5.1
> 
> software:leonardo ~ > mkdir foo
> software:leonardo ~ > chmod 000 foo/
> software:leonardo ~ > ./stat foo/.
> foo/.:
>          [ ... output deleted - J.B. ]
> 
> Since 'foo' does not give read and execute permissions to the uid that
> executes stat(), it therefore follows that a stat of 'foo/.' should FAIL:

Given the requirement that "." is a link to the directory itself, 
the "stat" program might have the cleverness to translate 
'foo/.' to 'foo' before doing the work.

Have you tried any tracing facility (sorry, I do not remember what 
it is called on Tru64 - "truss", "strace", ...) ?

Regards, 
Joerg Bruehe

-- 
Joerg Bruehe, SQL Datenbanksysteme GmbH, Berlin, Germany
     (speaking only for himself)
mailto: joerg@sql.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: stat oddities
  2001-11-21 15:39 ` Joerg Bruehe
@ 2001-11-21 16:27   ` John F Carr
  0 siblings, 0 replies; 3+ messages in thread
From: John F Carr @ 2001-11-21 16:27 UTC (permalink / raw)


In article <3BFBCAA9.368C1718@sql.de>, Joerg Bruehe  <joerg@sql.de> wrote:
>Hi!
>
>Matteo Catanese wrote:
>> 
>> Tru64 5.1
>> 
>> software:leonardo ~ > mkdir foo
>> software:leonardo ~ > chmod 000 foo/
>> software:leonardo ~ > ./stat foo/.
>> foo/.:
>>          [ ... output deleted - J.B. ]
>> 
>> Since 'foo' does not give read and execute permissions to the uid that
>> executes stat(), it therefore follows that a stat of 'foo/.' should FAIL:
>
>Given the requirement that "." is a link to the directory itself, 
>the "stat" program might have the cleverness to translate 
>'foo/.' to 'foo' before doing the work.

stat won't do that sort of transformation, but the kernel pathname
lookup probably isn't written to check permission for lookup of ".".

-- 
    John Carr (jfc@mit.edu)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-11-21 16:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-20 15:27 stat oddities Matteo Catanese
2001-11-21 15:39 ` Joerg Bruehe
2001-11-21 16:27   ` John F Carr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox