From f4f5053170a6bf8e45c15ea0435b86f5fa1b6d06 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 12 Nov 2003 21:41:46 +0000 Subject: initial commit git-svn-id: file:///home/lennart/svn/public/syrep-chub/trunk@2 4c8cc7d0-f3cb-0310-ad32-ddc431b48844 --- info.cgi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 info.cgi (limited to 'info.cgi') diff --git a/info.cgi b/info.cgi new file mode 100755 index 0000000..6b65301 --- /dev/null +++ b/info.cgi @@ -0,0 +1,18 @@ +#!/usr/bin/python + +import cgi, cgitb, os, time, urllib, sch +cgitb.enable() + +form = cgi.FieldStorage() + +if not form.has_key("fname"): + sch.error("No file name passed to script file") + +fname = form["fname"].value + +if not sch.valid_fname(fname): + sch.error("Fuck off!") + +sch.print_header("File Info for '%s'" % fname) +sch.run_proc('/usr/local/bin/syrep --info "%s/%s" ' % (sch.repository_directory, fname)) +sch.print_footer() -- cgit