initial commit of file from CVS for smeserver-shared-folders on Sat Sep 7 21:04:36 AEST 2024

This commit is contained in:
Trevor Batley
2024-09-07 21:04:36 +10:00
parent eb9f5d0a97
commit 80a1e6f928
119 changed files with 15333 additions and 2 deletions

View File

@@ -0,0 +1,16 @@
#!/usr/bin/perl
use strict;
use esmith::AccountsDB;
my $a = esmith::AccountsDB->open_ro ||
die "Couldn't open AccountsDB\n";
foreach my $share ( $a->get_all_by_prop( type => 'share' ) ){
my $key = $share->key;
my $perm = $share->prop('ManualPermissions') || 'disabled';
next unless ( $perm eq 'yes' || $perm eq 'enabled' || $perm eq 'ntacl' );
# Dump posix ACL
system("/usr/bin/getfacl -R --physical --absolute-names -- /home/e-smith/files/shares/$key/ > /home/e-smith/db/shares/$key.acl");
system("/usr/bin/getfattr -R -d -m '.*' -e hex -P --absolute-names -- /home/e-smith/files/shares/$key/ > /home/e-smith/db/shares/$key.xattr");
}