/[smecontribs]/rpms/smeserver-shared-folders/contribs7/smeserver-shared-folders-0.1-rsyncd.patch
ViewVC logotype

Annotation of /rpms/smeserver-shared-folders/contribs7/smeserver-shared-folders-0.1-rsyncd.patch

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


Revision 1.1 - (hide annotations) (download)
Thu Mar 1 21:44:31 2012 UTC (12 years, 8 months ago) by vip-ire
Branch: MAIN
CVS Tags: smeserver-shared-folders-0_1-73_el4_sme, smeserver-shared-folders-0_1-71_el4_sme, smeserver-shared-folders-0_1-72_el4_sme, smeserver-shared-folders-0_1-77_el4_sme, smeserver-shared-folders-0_1-70_el4_sme, smeserver-shared-folders-0_1-75_el4_sme, smeserver-shared-folders-0_1-76_el4_sme, smeserver-shared-folders-0_1-68_el4_sme, smeserver-shared-folders-0_1-74_el4_sme, smeserver-shared-folders-0_1-79_el4_sme, smeserver-shared-folders-0_1-69_el4_sme, smeserver-shared-folders-0_1-78_el4_sme, smeserver-shared-folders-0_1-67_el4_sme, HEAD
* Thu Mar 01 2012 Daniel Berteaud <daniel@firewall-services.com> 0.1-67.sme
- Add rsyncd support

1 vip-ire 1.1 diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/createlinks mezzanine_patched_smeserver-shared-folders-0.1/createlinks
2     --- smeserver-shared-folders-0.1/createlinks 2012-02-23 22:45:01.000000000 +0100
3     +++ mezzanine_patched_smeserver-shared-folders-0.1/createlinks 2012-02-23 21:51:35.000000000 +0100
4     @@ -26,17 +26,17 @@
5    
6     event_link("share-delete", $event, "15");
7    
8     -foreach my $event (qw(share-create share-modify share-modify-files))
9     -{
10     +foreach my $event (qw(share-create share-modify share-modify-files)){
11     event_link("share-modify", $event, "15");
12     }
13    
14     -foreach my $event (qw(share-create share-modify share-delete share-modify-servers))
15     -{
16     +foreach my $event (qw(share-create share-modify share-delete share-modify-servers)){
17     templates2events("/etc/samba/smb.conf", $event);
18     templates2events("/etc/httpd/conf/httpd.conf", $event);
19     + templates2events("/etc/rsyncd.conf", $event);
20     safe_symlink("sighup", "root/etc/e-smith/events/$event/services2adjust/smbd");
21     safe_symlink("sigusr1", "root/etc/e-smith/events/$event/services2adjust/httpd-e-smith");
22     + safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/rsyncd");
23     }
24    
25     #--------------------------------------------------
26     @@ -52,3 +52,13 @@
27    
28     safe_touch("root/etc/e-smith/templates/etc/smb.conf/shares/template-begin");
29    
30     +safe_touch("root/var/service/rsyncd/down");
31     +service_link_enhanced("rsyncd", "S95", "7");
32     +service_link_enhanced("rsyncd", "K05", "6");
33     +service_link_enhanced("rsyncd", "K05", "0");
34     +safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/rsyncd');
35     +safe_symlink("/var/service/rsyncd" , 'root/service/rsyncd');
36     +
37     +templates2events("/etc/rsyncd.conf", "bootstrap-console-save");
38     +templates2events("/etc/rsyncd.conf", "remoteaccess-update");
39     +
40     diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/access mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/access
41     --- smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/access 1970-01-01 01:00:00.000000000 +0100
42     +++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/access 2012-02-23 21:47:56.000000000 +0100
43     @@ -0,0 +1 @@
44     +private
45     diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/status mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/status
46     --- smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/status 1970-01-01 01:00:00.000000000 +0100
47     +++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/status 2012-02-23 21:47:56.000000000 +0100
48     @@ -0,0 +1 @@
49     +enabled
50     diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/TCPPort mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/TCPPort
51     --- smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/TCPPort 1970-01-01 01:00:00.000000000 +0100
52     +++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/TCPPort 2012-02-23 21:47:56.000000000 +0100
53     @@ -0,0 +1 @@
54     +873
55     diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/type mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/type
56     --- smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/type 1970-01-01 01:00:00.000000000 +0100
57     +++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/db/configuration/defaults/rsyncd/type 2012-02-23 21:47:56.000000000 +0100
58     @@ -0,0 +1 @@
59     +service
60     diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/share-modify mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/share-modify
61     --- smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/share-modify 2012-02-23 22:45:01.000000000 +0100
62     +++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/events/actions/share-modify 2012-02-23 22:22:31.000000000 +0100
63     @@ -94,6 +94,7 @@
64     my @readgroups = split(/[;,]/,($properties {'ReadGroups'} || 'admin'));
65     my @writeusers = split(/[;,]/,($properties {'WriteUsers'} || ''));
66     my @readusers = split(/[;,]/,($properties {'ReadUsers'} || ''));
67     +my $rsync = $properties{'rsyncAccess'} || 'none';
68    
69     # Don't reset permissions if ManualPermissions is set to 'yes'
70    
71     @@ -125,6 +126,7 @@
72     foreach my $user (@readusers){
73     $acl .= 'u:'.$user.':rX,';
74     }
75     + $acl .= 'u:rsync:rX,' if ($rsync =~ /^local|global$/);
76    
77     # Set the effective ACLs
78     system($setfacl,
79     @@ -158,6 +160,7 @@
80     foreach my $user (@writeusers,@readusers){
81     $acl .= 'u:'.$user.':rX,';
82     }
83     + $acl .= 'u:rsync:rX,' if ($rsync =~ /^local|global$/);
84    
85     system($setfacl,
86     '-m',
87     diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/rsyncd.conf/10global mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/rsyncd.conf/10global
88     --- smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/rsyncd.conf/10global 1970-01-01 01:00:00.000000000 +0100
89     +++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/rsyncd.conf/10global 2012-02-23 21:47:56.000000000 +0100
90     @@ -0,0 +1 @@
91     +port = {$rsyncd{'TCPPort'} || '873'}
92     diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/rsyncd.conf/20shares mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/rsyncd.conf/20shares
93     --- smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/rsyncd.conf/20shares 1970-01-01 01:00:00.000000000 +0100
94     +++ mezzanine_patched_smeserver-shared-folders-0.1/root/etc/e-smith/templates/etc/rsyncd.conf/20shares 2012-02-23 22:36:50.000000000 +0100
95     @@ -0,0 +1,39 @@
96     +{
97     +
98     +use esmith::AccountsDB;
99     +my $a = esmith::AccountsDB->open_ro();
100     +my $n = esmith::NetworksDB->open_ro();
101     +
102     +my $local = '';
103     +foreach my $net ($n->networks){
104     + my $addr = $net->key;
105     + my $mask = $net->prop('Mask');
106     + $local .= "$addr/$mask "
107     +}
108     +foreach (split /[;,]/, (${'httpd-admin'}{'ValidFrom'} || '')){
109     + $local .= "$_ ";
110     +}
111     +
112     +foreach my $share ($a->get_all_by_prop(type=>'share')){
113     + my $name = $share->key;
114     + my $access = $share->prop('rsyncAccess') || 'none';
115     + next unless ($access =~ /^global|local$/);
116     + my $desc = $share->prop('Name') || $name;
117     + $OUT .=<<"EOF";
118     +
119     +[$name]
120     +comment = $desc
121     +path = /home/e-smith/files/shares/$name/files
122     +uid = rsync
123     +gid = rsync
124     +use chroot = true
125     +log file = /dev/stdout
126     +EOF
127     + $OUT .= "auth users = *\nsecrets file = /home/e-smith/files/shares/$name/rsyncd.secrets\n"
128     + if ( -e "/home/e-smith/files/shares/$name/rsyncd.secrets" );
129     + if ($access eq 'local'){
130     + my $hosts = $local;
131     + $OUT .= "hosts allow = $local";
132     + }
133     +}
134     +}
135     diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/var/service/rsyncd/log/run mezzanine_patched_smeserver-shared-folders-0.1/root/var/service/rsyncd/log/run
136     --- smeserver-shared-folders-0.1/root/var/service/rsyncd/log/run 1970-01-01 01:00:00.000000000 +0100
137     +++ mezzanine_patched_smeserver-shared-folders-0.1/root/var/service/rsyncd/log/run 2012-02-23 22:33:42.000000000 +0100
138     @@ -0,0 +1,6 @@
139     +#!/bin/sh
140     +
141     +exec \
142     + /usr/local/bin/setuidgid smelog \
143     + /usr/local/bin/multilog t s5000000 \
144     + /var/log/rsyncd
145     diff -Nur -x '*.orig' -x '*.rej' smeserver-shared-folders-0.1/root/var/service/rsyncd/run mezzanine_patched_smeserver-shared-folders-0.1/root/var/service/rsyncd/run
146     --- smeserver-shared-folders-0.1/root/var/service/rsyncd/run 1970-01-01 01:00:00.000000000 +0100
147     +++ mezzanine_patched_smeserver-shared-folders-0.1/root/var/service/rsyncd/run 2012-02-22 21:57:36.000000000 +0100
148     @@ -0,0 +1,5 @@
149     +#!/bin/sh
150     +
151     +exec 2>&1
152     +
153     +exec /usr/bin/rsync --daemon --no-detach

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