1 |
slords |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-proftpd-1.11.0/root/etc/e-smith/templates/etc/proftpd.conf/05Chroot mezzanine_patched_e-smith-proftpd-1.11.0/root/etc/e-smith/templates/etc/proftpd.conf/05Chroot |
2 |
|
|
--- e-smith-proftpd-1.11.0/root/etc/e-smith/templates/etc/proftpd.conf/05Chroot 1970-01-01 10:00:00.000000000 +1000 |
3 |
|
|
+++ mezzanine_patched_e-smith-proftpd-1.11.0/root/etc/e-smith/templates/etc/proftpd.conf/05Chroot 2006-01-28 09:03:06.629694918 +1100 |
4 |
|
|
@@ -0,0 +1,25 @@ |
5 |
|
|
+{ |
6 |
|
|
+ use esmith::AccountsDB; |
7 |
|
|
+ |
8 |
|
|
+ $OUT = ""; |
9 |
|
|
+ my $accounts = esmith::AccountsDB->open; |
10 |
|
|
+ my @users = $accounts->users; |
11 |
|
|
+ |
12 |
|
|
+ foreach my $user (@users) |
13 |
|
|
+ { |
14 |
|
|
+ my $chrootDir = $user->prop('ChrootDir') || next; |
15 |
|
|
+ |
16 |
|
|
+ if ( $chrootDir =~ m#^/# && -d $chrootDir ) |
17 |
|
|
+ { |
18 |
|
|
+ $OUT .= "DefaultRoot $chrootDir ".$user->key."\n"; |
19 |
|
|
+ } |
20 |
|
|
+ elsif ( -d "/home/e-smith/files/ibays/$chrootDir" ) |
21 |
|
|
+ { |
22 |
|
|
+ $OUT .= "DefaultRoot /home/e-smith/files/ibays/$chrootDir ".$user->key."\n"; |
23 |
|
|
+ } |
24 |
|
|
+ elsif ( $chrootDir =~ m#home$# ) |
25 |
|
|
+ { |
26 |
|
|
+ $OUT .= "DefaultRoot /home/e-smith/files/users/".$user->key."/home ".$user->key."\n"; |
27 |
|
|
+ } |
28 |
|
|
+ } |
29 |
|
|
+} |