[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RFC acl port to FreeBSD (and maybe solaris)
From: |
Pádraig Brady |
Subject: |
RFC acl port to FreeBSD (and maybe solaris) |
Date: |
Tue, 30 Jun 2015 13:32:13 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
Latest coretuils basic operation of cp is failing on FreeBSD and solaris
with ENOSUP errors due to attempts to copy ACLs.
Tracing these I get:
solaris 10
mkdir x
src/cp -a x x.cp
lchown("x.cp", 11003, 10000) = 0
acl("x", ACE_GETACLCNT, 0, 0x00000000) = 3
acl("x", ACE_GETACL, 3, 0x00043490) = 3
acl("x", GETACLCNT, 0, 0x00000000) = 4
acl("x", GETACL, 4, 0x000434C0) = 4
acl("x.cp", SETACL, 4, 0x000434C0) Err#89 ENOSYS
acl("x.cp", ACE_SETACL, 3, 0x00043490) Err#89 ENOSYS
acl("x.cp", ACE_GETACL, 333, 0xFFBFE130) = 3
acl("x.cp", ACE_SETACL, 6, 0xFFBFE0E8) Err#89 ENOSYS
chmod("x.cp", 040755) = 0
FreeBSD 9.1
mkdir x
src/cp -a x x.cp
lchown(0x28417050,0x148d2,0x0,0x8056750,0xffffffff,0x28417050) = 0 (0x0)
__acl_get_file(0xbfbfed96,0x2,0x28418000,0xbfbfe5f0,0x41ed,0x1) ERR#45
'Operation not supported'
madvise(0x28418000,0x1000,0x5,0x8066ea8,0x8066ea0,0x4) = 0 (0x0)
chmod("x.cp/x",040755) = 0 (0x0)
touch f
src/cp --no-preserve=mode f f.cp
cp: setting permissions for 'f.cp': No such file or directory
All tests on FreeBSD are now passing with the attached,
though TBH I've not analyzed this deeply at all so
would appreciate separate analysis.
The crux of the patch is to set the acl_no_supported flag
when getting permissions and get such an errno.
Also I've reinstated the acl_from_mode() replacement
in set-permissions.c which was ignored due to defines in acl-internal.h
I've not tested this on solaris yet.
thanks,
Pádraig.
non-linux-acl.patch
Description: Text Data
- RFC acl port to FreeBSD (and maybe solaris),
Pádraig Brady <=