summaryrefslogtreecommitdiff
path: root/pinyweb
diff options
context:
space:
mode:
authorJulian Blake Kongslie <jblake@omgwallhack.org>2011-05-13 15:15:29 -0700
committerJulian Blake Kongslie <jblake@omgwallhack.org>2011-05-13 15:15:29 -0700
commitd9df093f1837f971090def69fb20e5677cb364da (patch)
tree115b6df9f9a03a79cfdd855003b3b7c0b0447e79 /pinyweb
parentc4fb9497982e2f51c1afefd43f94be8c6cc74edc (diff)
parent9a8be1d87c03fbcdbc7b62e1369cdfe3f5aba193 (diff)
downloadpiny-code-d9df093f1837f971090def69fb20e5677cb364da.tar.gz
piny-code-d9df093f1837f971090def69fb20e5677cb364da.zip
Merge branch 'master' of ssh://piny/srv/git/piny-code
Diffstat (limited to 'pinyweb')
-rwxr-xr-xpinyweb/cgi-bin/auth/addaccess.cgi2
-rwxr-xr-xpinyweb/cgi-bin/auth/lsaccess.cgi24
-rwxr-xr-xpinyweb/cgi-bin/auth/lsrepo.cgi18
-rwxr-xr-xpinyweb/cgi-bin/auth/newrepo.cgi2
-rwxr-xr-xpinyweb/cgi-bin/auth/pinyconfig.cgi26
-rwxr-xr-xpinyweb/cgi-bin/auth/rebuildrepo.cgi22
-rwxr-xr-xpinyweb/cgi-bin/auth/rmaccess.cgi2
-rwxr-xr-xpinyweb/cgi-bin/auth/rmrepo.cgi2
8 files changed, 94 insertions, 4 deletions
diff --git a/pinyweb/cgi-bin/auth/addaccess.cgi b/pinyweb/cgi-bin/auth/addaccess.cgi
index fca9574..f86c19e 100755
--- a/pinyweb/cgi-bin/auth/addaccess.cgi
+++ b/pinyweb/cgi-bin/auth/addaccess.cgi
@@ -13,7 +13,7 @@ $q = CGI->new;
print( "Content-type: text/plain\n\n");
-if( $q->param('r') && $q->param('n') ) {
+if( defined( $q->param('r') ) && defined( $q->param('n') ) ) {
unless( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'addaccess', $q->param('r'), $q->param('n') ) == 0 ) {
die( 'Addaccess was unsuccessful.' );
};
diff --git a/pinyweb/cgi-bin/auth/lsaccess.cgi b/pinyweb/cgi-bin/auth/lsaccess.cgi
new file mode 100755
index 0000000..354ba32
--- /dev/null
+++ b/pinyweb/cgi-bin/auth/lsaccess.cgi
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+$| = 1;
+
+open(STDERR, ">&STDOUT");
+
+use warnings;
+
+use CGI;
+
+use IPC::Open2;
+
+$q = CGI->new;
+
+print( "Content-type: text/plain\n\n");
+
+if( defined( $q->param('r') ) ) {
+ unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'lsaccess', $q->param('r') ) == 0 ) {
+ die( 'lsaccess was unsuccessful.' );
+ };
+} else {
+ unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'lsaccess' ) == 0 ) {
+ die( 'lsaccess was unsuccessful.' );
+ };
+};
diff --git a/pinyweb/cgi-bin/auth/lsrepo.cgi b/pinyweb/cgi-bin/auth/lsrepo.cgi
new file mode 100755
index 0000000..599eb80
--- /dev/null
+++ b/pinyweb/cgi-bin/auth/lsrepo.cgi
@@ -0,0 +1,18 @@
+#!/usr/bin/perl
+$| = 1;
+
+open(STDERR, ">&STDOUT");
+
+use warnings;
+
+use CGI;
+
+use IPC::Open2;
+
+$q = CGI->new;
+
+print( "Content-type: text/plain\n\n");
+
+unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'lsrepo' ) == 0 ) {
+ die( 'lsrepo was unsuccessful.' );
+};
diff --git a/pinyweb/cgi-bin/auth/newrepo.cgi b/pinyweb/cgi-bin/auth/newrepo.cgi
index 000be02..aa42732 100755
--- a/pinyweb/cgi-bin/auth/newrepo.cgi
+++ b/pinyweb/cgi-bin/auth/newrepo.cgi
@@ -13,7 +13,7 @@ $q = CGI->new;
print( "Content-type: text/plain\n\n");
-if( $q->param('r') && $q->param('d') ) {
+if( defined( $q->param('r') ) && defined( $q->param('d') ) ) {
unless( open2( OUT, IN, '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'newrepo', '--batch', $q->param('r') ) ) {
die 'could not execute newrepo';
};
diff --git a/pinyweb/cgi-bin/auth/pinyconfig.cgi b/pinyweb/cgi-bin/auth/pinyconfig.cgi
new file mode 100755
index 0000000..4fd8e89
--- /dev/null
+++ b/pinyweb/cgi-bin/auth/pinyconfig.cgi
@@ -0,0 +1,26 @@
+#!/usr/bin/perl
+$| = 1;
+
+open(STDERR, ">&STDOUT");
+
+use warnings;
+
+use CGI;
+
+use IPC::Open2;
+
+$q = CGI->new;
+
+print( "Content-type: text/plain\n\n");
+
+if( defined( $q->param('r') ) && defined( $q->param('n') ) && defined( $q->param('v') ) ) {
+ unless( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'pinyconfig', $q->param('r'), $q->param('n'), $q->param('v') ) == 0 ) {
+ die( 'pinyconfig was unsuccessful.' );
+ };
+} elsif( defined( $q->param('r') ) ) {
+ unless( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'pinyconfig', $q->param('r') ) == 0 ) {
+ die( 'pinyconfig was unsuccessful.' );
+ };
+} else {
+ print 'Missing parameters.';
+};
diff --git a/pinyweb/cgi-bin/auth/rebuildrepo.cgi b/pinyweb/cgi-bin/auth/rebuildrepo.cgi
new file mode 100755
index 0000000..912e004
--- /dev/null
+++ b/pinyweb/cgi-bin/auth/rebuildrepo.cgi
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+$| = 1;
+
+open(STDERR, ">&STDOUT");
+
+use warnings;
+
+use CGI;
+
+use IPC::Open2;
+
+$q = CGI->new;
+
+print( "Content-type: text/plain\n\n");
+
+if( defined( $q->param('r') ) ) {
+ unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'rebuildrepo', $q->param('r') ) == 0 ) {
+ die( 'rebuildrepo was unsuccessful.' );
+ };
+} else {
+ print 'Missing parameters.';
+};
diff --git a/pinyweb/cgi-bin/auth/rmaccess.cgi b/pinyweb/cgi-bin/auth/rmaccess.cgi
index 5123041..35736ab 100755
--- a/pinyweb/cgi-bin/auth/rmaccess.cgi
+++ b/pinyweb/cgi-bin/auth/rmaccess.cgi
@@ -13,7 +13,7 @@ $q = CGI->new;
print( "Content-type: text/plain\n\n");
-if( $q->param('r') && $q->param('n') ) {
+if( defined( $q->param('r') ) && defined( $q->param('n') ) ) {
unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'rmaccess', $q->param('r'), $q->param('n') ) == 0 ) {
die( 'rmaccess was unsuccessful.' );
};
diff --git a/pinyweb/cgi-bin/auth/rmrepo.cgi b/pinyweb/cgi-bin/auth/rmrepo.cgi
index 2d0ff23..f57170a 100755
--- a/pinyweb/cgi-bin/auth/rmrepo.cgi
+++ b/pinyweb/cgi-bin/auth/rmrepo.cgi
@@ -13,7 +13,7 @@ $q = CGI->new;
print( "Content-type: text/plain\n\n");
-if( $q->param('r') ) {
+if( defined( $q->param('r') ) ) {
unless ( system( '/usr/sbin/piny-suid', $ENV{'REMOTE_USER'}, 'rmrepo', $q->param('r') ) == 0 ) {
die( 'rmrepo was unsuccessful.' );
};