all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: t_tuneyosi@hotmail.com, emacs-devel@gnu.org
Subject: Re: patch about moving file (or directory) to the Recycle Bin on	Windows NT series
Date: Wed, 23 Apr 2008 07:55:02 +0300	[thread overview]
Message-ID: <uej8x9nmh.fsf@gnu.org> (raw)
In-Reply-To: <jwvlk35pe6e.fsf-monnier+emacs@gnu.org>

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Toru TSUNEYOSHI <t_tuneyosi@hotmail.com>,  emacs-devel@gnu.org
> Date: Tue, 22 Apr 2008 21:14:30 -0400
> 
> >> +      /* On Unix, unlink works without write permission. */
> >> +      _chmod (path, 0666);
> 
> > Can this somehow leave the file writable without deleting it, if the
> > code is interrupted before it gets to undo this _chmod call?  If so,
> > we need to guard against that somehow.
> 
> Also that makes the file temporarily readable/writable by everybody.
> It's probably better to set it to 0600.  Of course, maybe this is
> irrelevant because of the way w32 interprets those
> Unix-style permissions.

Yes, 0600 and 0666 are the same on Windows.  When using the Posix
emulation functions, such as _chmod, there's only 1 bit that describes
whether the file is writable or not.

If we really care about this, we need to use the security API, where a
full-blown ACL functionality is available.

Alternatively, we could simply let the call fail for files not
writable by the user: after all, this is what the Windows Explorer
will do when you delete files through it.




  reply	other threads:[~2008-04-23  4:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-21 21:32 patch about moving file (or directory) to the Recycle Bin on Windows NT series Toru TSUNEYOSHI
2008-04-22  9:02 ` Toru TSUNEYOSHI
2008-04-22 15:47   ` Stefan Monnier
2008-04-22 17:04     ` Eli Zaretskii
2008-04-22 18:24       ` Eli Zaretskii
2008-04-22 18:19 ` Eli Zaretskii
2008-04-22 20:58   ` Jason Rumney
2008-04-23  1:15     ` Stefan Monnier
2008-04-23  1:14   ` Stefan Monnier
2008-04-23  4:55     ` Eli Zaretskii [this message]
2008-04-23 16:45   ` Toru TSUNEYOSHI
2008-04-23 15:35 ` Stefan Monnier
2008-04-25 20:18   ` Toru TSUNEYOSHI
  -- strict thread matches above, loose matches on Subject: below --
2008-05-27 17:11 Toru TSUNEYOSHI
2008-05-27 18:39 ` Stefan Monnier
2008-04-25 21:10 Toru TSUNEYOSHI
2008-04-26  7:25 ` Eli Zaretskii
2008-04-30 15:00   ` Toru TSUNEYOSHI
2008-05-15 17:36     ` Stefan Monnier
2008-05-25  0:07   ` Toru TSUNEYOSHI
2008-05-25  1:24 ` Stefan Monnier
2008-05-25  9:59   ` Jason Rumney
2008-05-25 11:22     ` Stefan Monnier
2008-04-21 14:25 patch is received? Toru TSUNEYOSHI
2008-04-21 16:37 ` Lennart Borgman (gmail)
2008-04-21 17:07   ` patch about moving file (or directory) to the Recycle Bin on Windows NT series Toru TSUNEYOSHI

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uej8x9nmh.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=t_tuneyosi@hotmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.