From: Eli Zaretskii <eliz@gnu.org>
To: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
Cc: 25419@debbugs.gnu.org
Subject: bug#25419: give better message when trying to go to forbidden areas
Date: Wed, 11 Jan 2017 19:58:02 +0200 [thread overview]
Message-ID: <83wpe1cwd1.fsf@gnu.org> (raw)
In-Reply-To: <87ziixzmfb.fsf@jidanni.org>
> From: 積丹尼 Dan Jacobson
> <jidanni@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?
next prev parent reply other threads:[~2017-01-11 17:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-11 14:44 bug#25419: give better message when trying to go to forbidden areas 積丹尼 Dan Jacobson
2017-01-11 17:58 ` Eli Zaretskii [this message]
2017-01-19 3:28 ` npostavs
2017-01-27 8:59 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83wpe1cwd1.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=25419@debbugs.gnu.org \
--cc=jidanni@jidanni.org \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).