/[smecontribs]/rpms/smeserver-subversion/contribs7/smeserver-subversion-1.4-ImproveRepositoryDeleteSanityCheck.patch
ViewVC logotype

Annotation of /rpms/smeserver-subversion/contribs7/smeserver-subversion-1.4-ImproveRepositoryDeleteSanityCheck.patch

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


Revision 1.1 - (hide annotations) (download)
Mon Feb 25 22:51:53 2008 UTC (16 years, 8 months ago) by snetram
Branch: MAIN
CVS Tags: smeserver-subversion-1_4-8_el4_sme, smeserver-subversion-1_4-24_el4_sme, smeserver-subversion-1_4-25_el4_sme, smeserver-subversion-1_4-30_el4_sme, smeserver-subversion-1_4-14_el4_sme, smeserver-subversion-1_4-17_el4_sme, smeserver-subversion-1_4-13_el4_sme, smeserver-subversion-1_4-29_el4_sme, smeserver-subversion-1_4-34_el4_sme, smeserver-subversion-1_4-5_el4_sme, smeserver-subversion-1_4-21_el4_sme, smeserver-subversion-1_4-31_el4_sme, smeserver-subversion-1_4-12_el4_sme, smeserver-subversion-1_4-35_el4_sme, smeserver-subversion-1_4-2_el4_sme, smeserver-subversion-1_4-33_el4_sme, smeserver-subversion-1_4-6_el4_sme, smeserver-subversion-1_4-20_el4_sme, smeserver-subversion-1_4-18_el4_sme, smeserver-subversion-1_4-28_el4_sme, smeserver-subversion-1_4-11_el4_sme, smeserver-subversion-1_4-10_el4_sme, smeserver-subversion-1_4-23_el4_sme, smeserver-subversion-1_4-27_el4_sme, smeserver-subversion-1_4-32_el4_sme, smeserver-subversion-1_4-22_el4_sme, smeserver-subversion-1_4-26_el4_sme, smeserver-subversion-1_4-4_el4_sme, smeserver-subversion-1_4-16_el4_sme, smeserver-subversion-1_4-15_el4_sme, smeserver-subversion-1_4-3_el4_sme
* Mon Feb 25 2008 Jonathan Martens <smeserver-contribs@snetram.nl>
- 1.4-3
- Add hooks to user-delete and group-delete event [SME: 3981]
- Remove subversion-delete event since it is and should not be used [SME: 3982]
- Improve sanity check on repository-delete event [SME: 3983]

1 snetram 1.1 --- smeserver-subversion-1.4/root/etc/e-smith/events/actions/repository-delete.ImproveRepositoryDeleteSanityCheck 2006-08-26 23:59:54.000000000 +0200
2     +++ smeserver-subversion-1.4/root/etc/e-smith/events/actions/repository-delete 2008-02-25 21:15:47.000000000 +0100
3     @@ -24,18 +24,30 @@
4     #----------------------------------------------------------------------
5    
6     #------------------------------------------------------------
7     -# Delete the Unix account and files for the repository.
8     +# Delete the files for the repository.
9     #------------------------------------------------------------
10    
11     -event=$1
12     -repository=$2
13     -if [ -z "$repository" ]
14     -then
15     - echo repositoryName argument missing
16     - exit 1
17     -fi
18     -
19     -/bin/rm -rf /home/e-smith/files/repositories/$repository
20     -#/usr/sbin/userdel "$repository"
21     -#/usr/sbin/groupdel "$repository"
22     -/sbin/e-smith/db accounts delete $repository
23     +use strict;
24     +use Errno;
25     +use File::Path;
26     +
27     +use esmith::AccountsDB;
28     +my $adb = esmith::AccountsDB->open_ro();
29     +
30     +my $event = $ARGV [0];
31     +my $repository = $ARGV [1];
32     +
33     +$a = $adb->get($repository) || undef;
34     +unless ( defined $a && $a->prop('type') eq "repository-deleted" )
35     +{
36     + warn "$repository is not a repository\n";
37     + exit (0);
38     +}
39     +
40     +my $dir = "/home/e-smith/files/repositories/$repository";
41     +
42     +exit 0 unless ( -d $dir );
43     +
44     +rmtree( $dir ) || die "Couldn't remove tree $dir\n";
45     +
46     +exit (0);

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