Message from discussion
Fix problems of getting/setting ACL on Win32 (Preserve Cygwin file mode)
Received: by 10.216.138.27 with SMTP id z27mr301920wei.13.1346360310375;
Thu, 30 Aug 2012 13:58:30 -0700 (PDT)
X-BeenThere: vim_dev@googlegroups.com
Received: by 10.216.202.99 with SMTP id c77ls3990720weo.6.gmail; Thu, 30 Aug
2012 13:58:27 -0700 (PDT)
Received: by 10.180.19.68 with SMTP id c4mr320430wie.4.1346360307525;
Thu, 30 Aug 2012 13:58:27 -0700 (PDT)
Received: by 10.180.19.68 with SMTP id c4mr320428wie.4.1346360307417;
Thu, 30 Aug 2012 13:58:27 -0700 (PDT)
Return-Path: <b...@moolenaar.net>
Received: from fep17.mx.upcmail.net (fep17.mx.upcmail.net. [62.179.121.37])
by gmr-mx.google.com with ESMTP id e5si349936wiw.0.2012.08.30.13.58.26;
Thu, 30 Aug 2012 13:58:27 -0700 (PDT)
Received-SPF: neutral (google.com: 62.179.121.37 is neither permitted nor denied by best guess record for domain of b...@moolenaar.net) client-ip=62.179.121.37;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 62.179.121.37 is neither permitted nor denied by best guess record for domain of b...@moolenaar.net) smtp.mail=b...@moolenaar.net
Received: from edge03.upcmail.net ([192.168.13.238])
by viefep17-int.chello.at
(InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP
id <20120830205826.OMUJ5175.viefep17-int.chello...@edge03.upcmail.net>;
Thu, 30 Aug 2012 22:58:26 +0200
Received: from moolenaar.net ([84.75.9.99])
by edge03.upcmail.net with edge
id t8yP1j03B28CNeC038yS2V; Thu, 30 Aug 2012 22:58:26 +0200
X-SourceIP: 84.75.9.99
X-Authenticated-Sender: b...@hispeed.ch
Received: from masaka.moolenaar.net (localhost.localdomain [127.0.0.1])
by moolenaar.net (8.14.4/8.14.4/Debian-2ubuntu2) with ESMTP id q7UKwglx010842;
Thu, 30 Aug 2012 22:58:42 +0200
Received: from masaka.moolenaar.net (B...@Moolenaar.net)
by masaka.moolenaar.net (8.14.4/8.14.4/Submit) with ESMTP id q7UKwfVp010838;
Thu, 30 Aug 2012 22:58:42 +0200
Message-Id: <201208302058.q7UKwfVp010838@masaka.moolenaar.net>
To: Ken Takata <ken...@csc.jp>
Cc: vim_dev@googlegroups.com
In-Reply-To: <446f4504-ff38-4916-a093-f9f5dbd105d8@googlegroups.com>
Subject: Re: [PATCH] Fix problems of getting/setting ACL on Win32 (Preserve
Cygwin file mode)
From: Bram Moolenaar <B...@Moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Date: Thu, 30 Aug 2012 22:58:41 +0200
Sender: B...@Moolenaar.net
Ken Takata wrote:
> I found that the current implementation of mch_get_acl() and mch_set_acl()
> in os_win32.c does not work well. There are some causes:
>
> 1. mch_get_acl() tries to retrieve all security information (Owner, Group,
> DACL and SACL), but it may fail because of lack of privileges.
> SE_SECURITY_NAME privilege must be held and must be enabled to retrieve SACL.
> 2. Setting Owner or Group may also fail if the caller doesn't have enough
> privileges.
> 3. mch_[gs]et_acl() functions don't support multibyte characters at all.
>
> I wrote a patch to fix these problems.
> (Also available at https://gist.github.com/3489193 )
>
> This patch may also fix a problem of Cygwin file modes.
> (e.g. https://groups.google.com/d/topic/vim_dev/gEQe2esLPAc/discussion )
> Even if 'backupcopy' is set to 'auto' or 'no', Cygwin file modes will be
> preserved. (Cygwin file modes are stored as DACL.)
Thanks! I'll add a note in the todo list.
--
FATHER: One day, lad, all this will be yours ...
PRINCE: What - the curtains?
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- B...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///