Subject: bug#25419: closed (Re: bug#25419: give better message when trying to go to forbidden areas)

From: [email-masked] (GNU bug Tracking System)
Date: Fri, 27 Jan 2017 09:00:02 +0000

Your bug report

#25419: give better message when trying to go to forbidden areas

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
25419: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=25419
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#25419: give better message when trying to go to forbidden areas
From: Eli Zaretskii <[email-masked]>
To: [email-masked]
Cc: [email-masked], [email-masked]
Date: Fri, 27 Jan 2017 10:59:08 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: [email-masked]
> Cc: 積丹尼 Dan Jacobson <[email-masked]>,
>   [email-masked]
> Date: Wed, 18 Jan 2017 22:28:17 -0500
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> >> From: 積丹尼 Dan Jacobson
> >> 	<[email-masked]>
> >> 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.

Subject: give better message when trying to go to forbidden areas
From: 積丹尼 Dan Jacobson <[email-masked]>
To: bug-gnu-emacs <[email-masked]>
Date: Wed, 11 Jan 2017 22:44:08 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

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.