/usr/share/pyshared/Pyblosxom/data/pyblosxom.cgi is in pyblosxom 1.5.3-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | #!/usr/bin/python
# -u turns off character translation to allow transmission
# of gzip compressed content on Windows and OS/2
#!/path/to/python -u
import os, sys
# Uncomment this line to add the directory your config.py file is in to the
# python path:
sys.path.append("/etc/pyblosxom/")
# -------------------------------------------------------
# You shouldn't have to adjust anything below this point.
# -------------------------------------------------------
# this allows for a config.py override
script = os.environ.get('SCRIPT_FILENAME', None)
if script is not None:
script = script[0:script.rfind("/")]
sys.path.insert(0, script)
# this allows for grabbing the config based on the DocumentRoot
# setting if you're using apache
root = os.environ.get('DOCUMENT_ROOT', None)
if root is not None:
sys.path.insert(0, root)
# Settings are now in config.py, you should disable access to it by htaccess
# (make it executable or deny access)
from config import py as cfg
# If the user defined a "codebase" property in their config file,
# then we insert that into our sys.path because that's where the
# Pyblosxom installation is.
if cfg.has_key("codebase"):
sys.path.insert(0, cfg["codebase"])
from Pyblosxom.pyblosxom import run_pyblosxom
if __name__ == '__main__':
run_pyblosxom()
|