summaryrefslogtreecommitdiff
path: root/pinyweb/cgi-bin/auth/rmrepo.cgi
blob: 88e2be6111e52f3952c12300cfbb697e0ad45310 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl
$| = 1;

use warnings;

use CGI;

use IPC::Open2;

$q = CGI->new;

print( "Content-type: text/plain\n\n");

open(STDERR, ">&STDOUT");

if( defined( $q->param('r') ) ) {
  unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'rmrepo', scalar( $q->param('r') ) ) == 0 ) {
    die( 'rmrepo was unsuccessful.' );
  };
} else {
  print 'Missing parameters.';
};