From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailsrv.cs.umass.edu (mailsrv.cs.umass.edu [128.119.240.136]) by sourceware.org (Postfix) with ESMTPS id 292083858C2C for ; Wed, 5 Jan 2022 03:45:30 +0000 (GMT) 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 Received: from [192.168.50.148] (c-24-62-201-179.hsd1.ma.comcast.net [24.62.201.179]) by mailsrv.cs.umass.edu (Postfix) with ESMTPSA id 9D7114037689; Tue, 4 Jan 2022 22:45:29 -0500 (EST) Reply-To: moss@cs.umass.edu To: cygwin From: Eliot Moss 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-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jan 2022 03:45:31 -0000 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