root/alternc/tags/0.9.6.3/src/quota_get

Revision 1758, 413 bytes (checked in by anarcat, 2 years ago)

remove quotemeta everywhere, and make sure variables are safe before using them. Closes: #1003

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