|
Revision 1618, 428 bytes
(checked in by benjamin, 3 years ago)
|
ajout des perl suid scripts (desole, j'avais oublie...)
|
- Property svn:executable set to
*
|
| Line | |
|---|
| 1 |
|
|---|
| 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 '".quotemeta($uid)."'"; |
|---|
| 25 |
|
|---|
| 26 |
system($PTH); |
|---|
| 27 |
|
|---|
| 28 |
0; |
|---|