and finally
https://github.com/openzfsonosx/openzfs ... f3b8810f71
do we need a pkg now?
roemer wrote:Thanks for the patch on ACLs, lundman!
You seem to really have a run at the moment
Regarding the earlier discussion about the changing of FinderInfo xattrs:
Would it be an idea to make this extended attribute behaviour dependent on the com.apple.mimic property of a dataset?
Like keeping all extended attribute unchanged if mimic is not set to hfs?
roemer wrote:Thanks for the patch on ACLs, lundman!
You seem to really have a run at the moment
Regarding the earlier discussion about the changing of FinderInfo xattrs:
Would it be an idea to make this extended attribute behaviour dependent on the com.apple.mimic property of a dataset?
Like keeping all extended attribute unchanged if mimic is not set to hfs?
mimic: zeroing
ZFS none
HFS yes
apfs none
o3x_prokyon wrote:Only applying the system immutable flag (schg) with "sudo chflags schg /dir" is still possible.
# mkdir /tmp/dir
# sudo -u lundman chflags uchg /tmp/dir
chflags: /tmp/dir: Permission denied
// Not allowed as it is not owned by lundman...
# chown lundman /tmp/dir
# sudo -u lundman chflags uchg /tmp/dir
# ls -lOd /tmp/dir
# drwxr-xr-x 2 lundman wheel uchg 64 Feb 20 08:53 /tmp/dir
# sudo -u lundman chflags nouchg /tmp/dir
# ls -lOd /tmp/dir
# drwxr-xr-x 2 lundman wheel - 64 Feb 20 08:53 /tmp/dir
# sudo -u lundman chflags schg /tmp/dir
chflags: /tmp/dir: Operation not permitted
// Not allowed as System-chg can only be set by root
# chflags schg /tmp/dir // this time as root
# ls -lOd /tmp/dir
drwxr-xr-x 2 lundman wheel schg 64 Feb 20 08:53 /tmp/dir
# chflags noschg /tmp/dir
# ls -lOd /tmp/dir
drwxr-xr-x 2 lundman wheel - 64 Feb 20 08:53 /tmp/dir
# mkdir /Volumes/BOOM/dir3
# sudo -u lundman chflags uchg /Volumes/BOOM/dir3
chflags: /Volumes/BOOM/dir3: Permission denied
// As expected
# chown lundman /Volumes/BOOM/dir3
# sudo -u lundman chflags uchg /Volumes/BOOM/dir3
# ls -lOd /Volumes/BOOM/dir3
drwxr-xr-x 2 lundman wheel uchg 2 Feb 20 09:07 /Volumes/BOOM/dir3
# sudo -u lundman chflags nouchg /Volumes/BOOM/dir3
chflags: /Volumes/BOOM/dir3: Operation not permitted
// Oops BUG 1
// Changing dir names to keep tests separate
# mkdir /Volumes/BOOM/dir4
# chown lundman /Volumes/BOOM/dir4
# sudo -u lundman chflags schg /Volumes/BOOM/dir4
chflags: /Volumes/BOOM/dir4: Operation not permitted
// So far so good
# chflags schg /Volumes/BOOM/dir4
# ls -lOd /Volumes/BOOM/dir4
drwxr-xr-x 2 lundman wheel schg 2 Feb 20 09:08 /Volumes/BOOM/dir4
# chflags noschg /Volumes/BOOM/dir4
# ls -lOd /Volumes/BOOM/dir4
drwxr-xr-x 2 lundman wheel - 2 Feb 20 09:08 /Volumes/BOOM/dir4
lundman wrote:OK are you saying you want to be zeroing of fields in FinderInfo based on the mimic setting? In what direction?
- Code: Select all
mimic: zeroing
ZFS none
HFS yes
apfs none
# pwd: on an HFS-formatted disk image:
touch testfile-hfs
xattr -wx com.apple.FinderInfo 5445585431313131313131313131313131313131313131313131313131313131 testfile-hfs
xattr -w com.apple.ResourceFork "00000000000000000000000000000000" testfile-hfs
ls -l@ testfile-hfs
-rw-r--r--@ 1 user staff 0 20 Feb 13:21 testfile-hfs
com.apple.FinderInfo 32
com.apple.ResourceFork 32
xattr -lx testfile-hfs
com.apple.FinderInfo:
00000000 54 45 58 54 31 31 31 31 31 31 31 31 31 31 31 31 |TEXT111111111111|
00000010 00 00 00 00 00 00 00 00 31 31 31 31 00 00 00 00 |........1111....|
00000020
com.apple.ResourceFork:
00000000 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000|
00000010 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000|
00000020
ln -s testfile-hfs testlink-hfs
xattr -ws org.home.attribute "00000000000000000000000000000000" testlink-hfs
xattr -wsx com.apple.FinderInfo 5445585431313131313131313131313131313131313131313131313131313131 testlink-hfs
xattr -ws com.apple.ResourceFork "00000000000000000000000000000000" testlink-hfs
xattr: [Errno 1] Operation not permitted: 'testlink-hfs'
ls -l@ testlink-hfs
lrwxr-xr-x@ 1 user staff 13 20 Feb 21:56 testlink-hfs -> testfile-hfs
com.apple.FinderInfo 32
org.home.attribute 32
xattr -lsx testlink-hfs
com.apple.FinderInfo:
00000000 00 00 00 00 00 00 00 00 31 31 31 31 31 31 31 31 |................|
00000010 00 00 00 00 00 00 00 00 31 31 31 31 00 00 00 00 |................|
00000020
org.home.attribute:
00000000 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000|
00000010 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000|
00000020
[~]$ xattr -wx com.apple.FinderInfo 5445585431313131313131313131313131313131313131313131313131313131 testfile-hfs
[~]$ xattr -w com.apple.ResourceFork "00000000000000000000000000000000" testfile-hfs
[~]$ ls -l@ testfile-hfs
-rw-r--r--@ 1 arne staff 0 20 Feb 14:50 testfile-hfs
com.apple.FinderInfo 32
com.apple.ResourceFork 32
[~]$ xattr -lx testfile-hfs
com.apple.FinderInfo:
00000000 54 45 58 54 31 31 31 31 31 31 31 31 31 31 31 31 |TEXT111111111111|
00000010 00 00 00 00 00 00 00 00 31 31 31 31 00 00 00 00 |........1111....|
00000020
com.apple.ResourceFork:
00000000 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000|
00000010 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000|
00000020
[~]$ ln -s testfile-hfs testlink-hfs
[~]$ xattr -ws org.home.attribute "00000000000000000000000000000000" testlink-hfs
[~]$ xattr -wsx com.apple.FinderInfo 5445585431313131313131313131313131313131313131313131313131313131 testlink-hfs
[~]$ xattr -ws com.apple.ResourceFork "00000000000000000000000000000000" testlink-hfs
xattr: [Errno 1] Operation not permitted: 'testlink-hfs'
[~]$ ls -l@ testlink-hfs
lrwxr-xr-x@ 1 arne staff 12 20 Feb 14:56 testlink-hfs -> testfile-hfs
com.apple.FinderInfo 32
org.home.attribute 32
[~]$ xattr -lsx testlink-hfs
com.apple.FinderInfo:
00000000 00 00 00 00 00 00 00 00 31 31 31 31 31 31 31 31 |........11111111|
00000010 00 00 00 00 00 00 00 00 31 31 31 31 00 00 00 00 |........1111....|
00000020
org.home.attribute:
00000000 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000|
00000010 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000|
00000020
[~/zfs]$ touch testfile-zfs
[~/zfs]$ xattr -wx com.apple.FinderInfo 5445585431313131313131313131313131313131313131313131313131313131 testfile-zfs
[~/zfs]$ xattr -w com.apple.ResourceFork "00000000000000000000000000000000" testfile-zfs
[~/zfs]$ ls -l@ testfile-zfs
-rw-r--r--@ 1 arne staff 0 20 Feb 15:14 testfile-zfs
com.apple.FinderInfo 32
com.apple.ResourceFork 32
[~/zfs]$ xattr -lx testfile-zfs
com.apple.FinderInfo:
00000000 54 45 58 54 31 31 31 31 31 31 31 31 31 31 31 31 |TEXT111111111111|
00000010 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 |1111111111111111|
00000020
com.apple.ResourceFork:
00000000 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000|
00000010 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000|
00000020
[~/zfs]$ ln -s testfile-zfs testlink-zfs
[~/zfs]$ xattr -ws org.home.attribute "00000000000000000000000000000000" testlink-zfs
[~/zfs]$ xattr -wsx com.apple.FinderInfo 5445585431313131313131313131313131313131313131313131313131313131 testlink-zfs
[~/zfs]$ xattr -ws com.apple.ResourceFork "00000000000000000000000000000000" testlink-zfs
[~/zfs]$ ls -l@ testlink-zfs
lrwxr-xr-x@ 1 arne staff 12 20 Feb 15:15 testlink-zfs -> testfile-zfs
org.home.attribute 32
com.apple.FinderInfo 32
com.apple.ResourceFork 32
[~/zfs]$ xattr -lsx testlink-zfs
org.home.attribute:
00000000 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000|
00000010 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000|
00000020
com.apple.FinderInfo:
00000000 54 45 58 54 31 31 31 31 31 31 31 31 31 31 31 31 |TEXT111111111111|
00000010 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 31 |1111111111111111|
00000020
com.apple.ResourceFork:
00000000 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000|
00000010 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 |0000000000000000|
00000020
Users browsing this forum: No registered users and 123 guests