root/alternc/tags/0.9.6/src/mem_del

Revision 1618, 455 bytes (checked in by benjamin, 3 years ago)

ajout des perl suid scripts (desole, j'avais oublie...)

  • Property svn:executable set to *
Line 
1 #!/usr/bin/perl
2
3 use strict;
4
5 my ($name) = @ARGV;
6
7 if (!$name) {
8     print "Usage: mem_del <name>\n";
9     print " Delete the AlternC account <name>\n";
10     exit(1);
11 }
12
13 $ENV{PATH} = "";
14 delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
15
16 if (!($name =~ /^([a-z0-9_\+\.-]+)$/)) {
17     die "Account name is incorrect.";
18 }
19 $name=$1;
20
21 $< = $>;
22 $( = $);
23
24 my $PTH="/var/alternc/html/".substr($name,0,1)."/".$name;
25
26 system("/bin/rm -rf '".quotemeta($PTH)."'");
27
28 0;
Note: See TracBrowser for help on using the browser.