How to compile Rsync with acl support on Cygwin

Peter Olivia polivia at mindspring.com
Thu Mar 16 16:21:49 GMT 2006


Problem:

-------

For sometime now, I have wanted to be able to rsync ACLs of files on windows
machines to a Linux server.  I never saw anyone post anything about how to
make it work.  I tried, but I was never able to compile on Cygwin when I
patched the source with the acls.diff patch.  ./configure would error out
after displaying: 

 

Checking whether to support ACLS... checking for acl_get_file in -lacl...
no

checking for ACL support... no

 

This issue was referenced in this post, but I never saw a follow up or
resolution: 

http://www.cygwin.com/ml/cygwin/2004-01/msg01329.html

 

Solution:

-----------

Well I did some poking around the acls.diff patch and started examining the
way cygwin implements ACLs to see what could be patched to make it work.  I
found that cygwin ACLs are implemented using the Solaris implementation:

http://www.ee.adfa.edu.au/staff/hrp/webDesignHelp/cygwin-ug-net-nochunks.htm
l#OV-HI-PERM

 

Corinna Vinschen also mentioned that the cygwin ACLs were modeled using
Solaris ACLs and to reference the sun documentation site for implementation

http://sources.redhat.com/ml/cygwin/2001-06/msg01243.html

 

Seeing that the acls.diff patch already had all the code for doing Solaris
ACLs, it struck me that maybe it might work for Cygwin.  I edited the
acls.diff patch and it compiled (albeit with a few warnings).  I have since
tested it using the 2.6.6 and 2.6.7 code successfully.  I was able to rsync
acls intact to and from my Linux server.

 

Here is the only edit needed for acls.diff to work on Cygwin

----------------------------------------------------------------------------
-------

Edit the following line 

+               *solaris*)

+                       AC_MSG_RESULT(Using solaris ACLs)

+                       AC_DEFINE(HAVE_SOLARIS_ACLS, 1, [true if you have
solaris ACLs])

 

to read :

+               *solaris*|*cygwin*)

+                       AC_MSG_RESULT(Using solaris ACLs)

+                       AC_DEFINE(HAVE_SOLARIS_ACLS, 1, [true if you have
solaris ACLs])

 

Open Issue

---------------- 

1) The only issue I've seen so far with rsync is that setuid, setgid and
sticky bits don't get restored when restoring to windows with --acls .  If
you restore once with -acls and once more without, it restores both acls and
setuid/setgid/sticky bits. 

2) I also had to use the old way (autoconf and autoheader) with 2.6.7 as the
./prepare-source did not regenerate the configure file

 

Thought someone might want to test it out and merge the change into CVS. 

 

 

-------------- next part --------------
HTML attachment scrubbed and removed


More information about the rsync mailing list