X-Recipient: archive-cygwin@delorie.com
X-Original-To: cygwin@cygwin.com
Delivered-To: cygwin@cygwin.com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 292083858C2C
Authentication-Results: sourceware.org;
 dmarc=none (p=none dis=none) header.from=cs.umass.edu
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.umass.edu
To: cygwin <cygwin@cygwin.com>
From: Eliot Moss <moss@cs.umass.edu>
Subject: A notion about saving and restoring Windows file security info
Message-ID: <4c5fda33-8f7e-53d2-85ce-28eb11cfb978@cs.umass.edu>
Date: Tue, 4 Jan 2022 22:45:29 -0500
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101
 Thunderbird/68.12.1
MIME-Version: 1.0
Content-Language: en-US
X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
 SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
 server2.sourceware.org
X-BeenThere: cygwin@cygwin.com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-request@cygwin.com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
 <mailto:cygwin-request@cygwin.com?subject=subscribe>
Reply-To: moss@cs.umass.edu
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie.com@cygwin.com>

Dear Cygwiners - Maybe this idea has been discussed before, and I can't say I
exactly have a specific application in mind, but I was wondering about how one
might achieve reliable backup/restore of files on a Windows system via a
backup program written to the POSIX interface and ported to Windows via
Cygwin.

The idea is this: expose the Windows file attributes (such as system, archive,
hidden, etc.) as well as security descriptors (such as managed by icacls), via
specifically named extended attributes, those read/written by get/setfattr.
The Cygwin library could be enhanced to "know" the special names of these
attributes and use the appropriate, different, underlying calls to get/set
them.

Is this a crazy idea?  A useful one?  (How useful?)  What implementation
effort would be required?

What brought it to mind is the restic backup/restore program, which AFAIK
lacks support for these things, but does know how to save/restore xattrs.  (So
I could fake the same thing there, provided I duplicate in golang in restic
what I am suggesting might be done for Cygwin in it library.)

Regards - Eliot

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple
