Update of /cvsroot/tmda/tmda/contrib/cgi
In directory sc8-pr-cvs1:/tmp/cvs-serv842
Modified Files:
tmda-cgi.c compile
Log Message:
Added an environment variable TMDA_CGI_MODE. Defaults.py will not complain
about failures when reading crypt_key if TMDA_CGI_MODE is set to "no-su".
Index: tmda-cgi.c
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/cgi/tmda-cgi.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- tmda-cgi.c 28 Nov 2002 17:11:49 -0000 1.2
+++ tmda-cgi.c 5 Dec 2002 18:29:21 -0000 1.3
@@ -27,6 +27,7 @@
#ifdef TMDARC
setenv("TMDARC", TMDARC, 1);
#endif
+ setenv("TMDA_CGI_MODE", MODE, 1);
chdir(INSTALL);
execl(PYTHON, PYTHON, "tmda-cgi.py", 0);
Index: compile
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/cgi/compile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- compile 29 Nov 2002 17:08:14 -0000 1.2
+++ compile 5 Dec 2002 18:29:22 -0000 1.3
@@ -67,6 +67,10 @@
Program = sys.argv[0]
Target = "tmda-cgi"
Perm = 04755
+if os.geteuid():
+ Mode = "single-user"
+else:
+ Mode = "system-wide"
def Usage(Code, Msg=""):
print __doc__ % globals()
@@ -88,12 +92,14 @@
Target = Arg
elif Opt in ('-n', '--no-su'):
Perm = 0755
+ Mode = "no-su"
# Create dirs.h
F = open("dirs.h", "w")
F.write("""#define PYTHON "%s"
#define INSTALL "%s"
-""" % (sys.executable, os.getcwd()))
+#define MODE "%s"
+""" % (sys.executable, os.getcwd(), Mode))
if os.environ.has_key("TMDARC"):
TMDARC = os.environ["TMDARC"]
if TMDARC.find("~") < 0:
_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs