At 03:46 PM 5/24/2001 +0100, BAZLEY, Sebastian wrote:
>That reminds me: sys$check_access() does not work with NFS/DECNET files -
>unless one has extra privileges, IIRC. [The end result is that access to
>such files is denied, even though C code can access them.]
It doesn't generally work across DECNet, regardless of privileges. The only
way to do it is to try and open the file and see what happens.
>Perhaps we could use sys$check_access for regular files only, and use
>something else (whatever was used before sys$check_access was introduced -
>in 5.5.x?)
> - for everything else?
I don't know what perl used before VMS 5.5--that's definitely ancient
history. I wouldn't be surprised if it didn't work on network files.
>-----Original Message-----
>From: Dan Sugalski [mailto:[EMAIL PROTECTED]]
>Sent: 24 May 2001 15:26
>To: BAZLEY, Sebastian; [EMAIL PROTECTED]
>Subject: Re: File access feature with NL: - is this a VMS bug?
>
>
>At 11:57 AM 5/24/2001 +0100, BAZLEY, Sebastian wrote:
> >Just noticed (Perl 5.005_3 PCSI kit) that
> >
> >-e "NL:" and -z "NL:" are true, however
> >
> >-r "NL:" is false, as is -w "NL:"
> >
> >though NL: is both writable and readable ...
> >
> >The equivalent on WinNT (NUL) and OSF1 (/dev/null) return TRUE for -e, -r,
> >-z, and -w, as I would expect.
> >
> >I think that it would be better to agree with the other OSes.
> >
> >What do others think?
>
>I'd agree with that, but that'd require twiddling the source a bit. (Like
>that's a big deal... :) The problem is that some of the VMS library
>functions are returning this result--we don't special case NL: or anything,
>we just call sys$check_access. It isn't entirely simple, since you need to
>alter the functions that check access via file descriptor. (No sense
>returning writable for a check by name and later say we can't write to a
>filehandle open on the file we just said was writable by name...)
>
> Dan
>
>--------------------------------------"it's like this"-------------------
>Dan Sugalski even samurai
>[EMAIL PROTECTED] have teddy bears and even
> teddy bears get drunk
>
>
>___________________________________________________________________________
>This email is confidential and intended solely for the use of the
>individual to whom it is addressed. Any views or opinions presented are
>solely those of the author and do not necessarily represent those of
>Sema.
>If you are not the intended recipient, be advised that you have received this
>email in error and that any use, dissemination, forwarding, printing, or
>copying of this email is strictly prohibited.
>
>If you have received this email in error please notify the Sema UK
>Helpdesk by telephone on +44 (0) 121 627 5600.
>___________________________________________________________________________
Dan
--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk