projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1c80c8
)
Add CGI args parser
author
Jamie Cameron
<jcameron@webmin.com>
Tue, 9 Jun 2009 00:26:18 +0000
(
00:26
+0000)
committer
Jamie Cameron
<jcameron@webmin.com>
Tue, 9 Jun 2009 00:26:18 +0000
(
00:26
+0000)
pam/cgi_args.pl
[new file with mode: 0644]
patch
|
blob
diff --git a/pam/cgi_args.pl
b/pam/cgi_args.pl
new file mode 100644
(file)
index 0000000..
2ca9a52
--- /dev/null
+++ b/
pam/cgi_args.pl
@@ -0,0
+1,15
@@
+
+do 'pam-lib.pl';
+
+sub cgi_args
+{
+my ($cgi) = @_;
+my @pams = &get_pam_config();
+if ($cgi eq 'edit_pam.cgi') {
+ return @pams ? 'idx='.$pams[0]->{'index'} : 'new=1';
+ }
+elsif ($cgi eq 'edit_mod.cgi') {
+ return @pams ? 'idx='.$pams[0]->{'index'}.'&midx=0' : 'new=1';
+ }
+return undef;
+}