GNU bug report logs -
#25419
give better message when trying to go to forbidden areas
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 27 Jan 2017 10:59:08 +0200
with message-id <83poj8280z.fsf <at> gnu.org>
and subject line Re: bug#25419: give better message when trying to go to forbidden areas
has caused the debbugs.gnu.org bug report #25419,
regarding give better message when trying to go to forbidden areas
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
25419: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25419
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
Do C-x C-f ~root
You will see:
Setting current directory: Success, /root/
But that is about all.
Because normally,
$ cd ~root
bash: cd: /root: Permission denied
Which better reflects reality.
[Message part 3 (message/rfc822, inline)]
> From: npostavs <at> users.sourceforge.net
> Cc: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>,
> 25419 <at> debbugs.gnu.org
> Date: Wed, 18 Jan 2017 22:28:17 -0500
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> >> From: 積丹尼 Dan Jacobson
> >> <jidanni <at> jidanni.org>
> >> Date: Wed, 11 Jan 2017 22:44:08 +0800
> >>
> >> Do C-x C-f ~root
> >> You will see:
> >> Setting current directory: Success, /root/
> >
> > That's because /root has a file-name handler,
> > tramp-completion-file-name-handler, and although that handler turns
> > around and calls file-accessible-directory-p, the value of errno is
> > lost in transition:
> >
> > /* If the file name has special constructs in it,
> > call the corresponding file handler. */
> > handler = Ffind_file_name_handler (absname, Qfile_accessible_directory_p);
> > if (!NILP (handler))
> > {
> > Lisp_Object r = call2 (handler, Qfile_accessible_directory_p, absname);
> > errno = 0;
> > return r;
> > }
> >
> > Is there any better way than arbitrarily set errno to EACCES if the
> > handler returns something other than t?
>
> AFAICT, not without changing the interface of
> file-accessible-directory-p file handler, no.
OK, thanks. I made that change, and I'm marking this bug done.
This bug report was last modified 8 years and 116 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.