/[smecontribs]/rpms/smeserver-shared-folders/contribs10/smeserver-shared-folders-0.3-dump_acl_and_xattr_for_manual_perm.patch
ViewVC logotype

Annotation of /rpms/smeserver-shared-folders/contribs10/smeserver-shared-folders-0.3-dump_acl_and_xattr_for_manual_perm.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Thu Jul 23 17:47:16 2020 UTC (4 years, 4 months ago) by brianr
Branch: MAIN
CVS Tags: smeserver-shared-folders-0_3-18_el7_sme, smeserver-shared-folders-0_3-16_el7_sme, smeserver-shared-folders-0_3-13_el7_sme, smeserver-shared-folders-0_3-17_el7_sme, smeserver-shared-folders-0_3-20_el7_sme, smeserver-shared-folders-0_3-22_el7_sme, smeserver-shared-folders-0_3-12_el7_sme, smeserver-shared-folders-0_3-21_el7_sme, smeserver-shared-folders-0_3-23_el7_sme, smeserver-shared-folders-0_3-14_el7_sme, smeserver-shared-folders-0_3-15_el7_sme, smeserver-shared-folders-0_3-19_el7_sme, HEAD
Initial import

1 brianr 1.1 diff -Nur smeserver-shared-folders-0.3/createlinks smeserver-shared-folders-0.3_dump_xattr/createlinks
2     --- smeserver-shared-folders-0.3/createlinks 2013-11-25 12:48:18.303255031 +0100
3     +++ smeserver-shared-folders-0.3_dump_xattr/createlinks 2013-11-25 12:48:50.685233828 +0100
4     @@ -30,6 +30,8 @@
5     event_link("share-modify", $event, "15");
6     }
7    
8     +event_link("share-dump-attributes", "pre-backup", "80");
9     +
10     foreach my $event (qw(share-create share-modify share-delete share-modify-servers)){
11     templates2events("/etc/samba/smb.conf", $event);
12     templates2events("/etc/httpd/conf/httpd.conf", $event);
13     diff -Nur smeserver-shared-folders-0.3/root/etc/e-smith/events/actions/share-dump-attributes smeserver-shared-folders-0.3_dump_xattr/root/etc/e-smith/events/actions/share-dump-attributes
14     --- smeserver-shared-folders-0.3/root/etc/e-smith/events/actions/share-dump-attributes 1970-01-01 01:00:00.000000000 +0100
15     +++ smeserver-shared-folders-0.3_dump_xattr/root/etc/e-smith/events/actions/share-dump-attributes 2013-11-25 12:48:50.685233828 +0100
16     @@ -0,0 +1,16 @@
17     +#!/usr/bin/perl
18     +
19     +use strict;
20     +use esmith::AccountsDB;
21     +
22     +my $a = esmith::AccountsDB->open_ro ||
23     + die "Couldn't open AccountsDB\n";
24     +
25     +foreach my $share ( $a->get_all_by_prop( type => 'share' ) ){
26     + my $key = $share->key;
27     + my $perm = $share->prop('ManualPermissions') || 'disabled';
28     + next unless ( $perm eq 'yes' || $perm eq 'enabled' || $perm eq 'ntacl' );
29     + # Dump posix ACL
30     + system("/usr/bin/getfacl -R --physical --absolute-names -- /home/e-smith/files/shares/$key/ > /home/e-smith/db/shares/$key.acl");
31     + 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");
32     +}

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed