Bug 10649 - --acls does not honor --numeric-ids on OS X
Summary: --acls does not honor --numeric-ids on OS X
Status: NEW
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.1.1
Hardware: x86 Mac OS X
: P5 normal (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-06 03:25 UTC by kcrawford.rsync
Modified: 2015-05-11 22:02 UTC (History)
2 users (show)

See Also:


Attachments
Bash Script that reproduces the error (1.10 KB, application/octet-stream)
2014-06-06 03:25 UTC, kcrawford.rsync
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description kcrawford.rsync 2014-06-06 03:25:55 UTC
Created attachment 10007 [details]
Bash Script that reproduces the error

+++ This bug was initially created as a clone of Bug #8020 +++

Although --number-ids is specified, when rsync is unable to resolve ACL entries to a user or group on OS X, we get an error:
unpack_smb_acl: sys_acl_get_info(): Undefined error: 0 (0)

And an exit status of 23.

With --numeric-ids, we should not require lookup of user/group.

This is the same issue as Bug #8020.  That bug was fixed, but not for OS X.

An old version of a patch for OS X exists here: http://help.bombich.com/discussions/questions/2248-warning-messages-from-rsync-307.  I don't pretend to understand it, I'm only referencing it in case it may provide some ideas for implementing a new patch.

Tested on 3.0.9 and 3.1.1pre1
 
##### How to reproduce the problem (script is also attached)

#!/bin/bash

# create a test user that will be deleted
dscl . -create /Users/_bb_test
dscl . -create /Users/_bb_test UserShell /bin/bash
dscl . -create /Users/_bb_test RealName "Backup Test User"
dscl . -create /Users/_bb_test UniqueID 599
dscl . -create /Users/_bb_test PrimaryGroupID 99
dscl . -create /Users/_bb_test NFSHomeDirectory /Users/_bb_test

# create a test group that will be deleted
dseditgroup -o create _bb_test_group

mkdir /tmp/rsync_acl_test
cd /tmp/rsync_acl_test

touch acl-test-2
chmod +a "_bb_test allow read" acl-test-2
chmod +a "_bb_test_group allow read" acl-test-2

mkdir acl-test-dir-2
chmod +a "_bb_test allow read" acl-test-dir-2
chmod +a "_bb_test_group allow read" acl-test-dir-2

touch acl-test-dir-2/my_file
chmod +a "_bb_test allow read" acl-test-dir-2/my_file
chmod +a "_bb_test_group allow read" acl-test-dir-2/my_file

# delete the user and group so the ACL can not be looked up
dscl . -delete /Users/_bb_test
dscl . -delete /Groups/_bb_test_group

# run the rsync with ACLs and --numeric

/usr/local/bin/rsync -aA --numeric-ids /tmp/rsync_acl_test /tmp/rsync_acl_test_copy

echo $?

# output:
#rsync: unpack_smb_acl: sys_acl_get_info(): Undefined error: 0 (0)
#rsync: unpack_smb_acl: sys_acl_get_info(): Undefined error: 0 (0)
#rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1122) [sender=3.0.9]
#23