Changeset - r32:bf6004bf25dd
[Not reviewed]
default
0 4 0
Wolfgang Scherer (ws) - 13 years ago 2012-04-25 12:29:37
wolfgang.scherer@gmx.de
lib/config.php: prepended `formail -c` for problematic `From` headers, that are continued on next line.
4 files changed with 14 insertions and 23 deletions:
0 comments (0 inline, 0 general)
Makefile
Show inline comments
 
@@ -46,56 +46,59 @@ DISTFILES += $(EXTRA_DIST)
 
	cd doc && $(MAKE) ../$@
 

	
 
%.html: %.txt
 
	cd doc && $(MAKE) ../$@
 

	
 
default: all
 

	
 
all: $(DISTFILES) all-local
 

	
 
all-local:
 

	
 
.PHONY: doc
 
doc:
 
	( cd doc && $(MAKE) )
 

	
 
clean: clean-local
 
	test -z '$(CLEANFILES)' || rm -rf $(CLEANFILES)
 

	
 
clean-local:
 
	( cd doc && $(MAKE) clean )
 

	
 

	
 
install: all
 
	mkdir -p $(SUDOERS_D)
 

	
 
dist:
 

	
 
tags-rc:
 
	gen_tags.sh --template
 
tags:
 
	gen_tags.sh --force
 

	
 
# |:here:|
 
# :ide-menu: Emacs IDE Main Menu - Buffer @BUFFER@
 
# . M-x `eIDE-menu' ()(eIDE-menu "z")
 

	
 
# :ide: COMPILE: tags
 
# . (let ((args "tags")) (compile (concat "make -k " args)))
 

	
 
# :ide: COMPILE: dist
 
# . (let ((args "dist")) (compile (concat "make -k " args)))
 

	
 
# :ide: COMPILE: install
 
# . (let ((args "install")) (compile (concat "make -k " args)))
 

	
 
# :ide: COMPILE: clean
 
# . (let ((args "clean")) (compile (concat "make -k " args)))
 

	
 
# :ide: COMPILE: doc
 
# . (let ((args "doc")) (compile (concat "make -k " args)))
 

	
 
# :ide: COMPILE: Standard
 
# . (let ((args "")) (compile (concat "make -k " args)))
 
#
 
# Local Variables:
 
# mode: makefile
 
# snip-mode: makefile-gmake
 
# truncate-lines: t
 
# End:
doc/Makefile
Show inline comments
 
# -*- makefile -*-
 

	
 
top_srcdir = ..
 
srcdir = .
 

	
 
base_dir=$(shell pwd)
 

	
 
INPUTS =
 
TXTS = 
 
HTML_TXTS = 
 
JPGS = 
 
EXTRA_DIST =
 
CLEANFILES =
 

	
 
TXTS += README.txt
 
TXTS += README-de.txt
 
HTML_TXTS += index.txt
 
HTML_TXTS += README-GFDL.txt
 
HTML_TXTS += README-COPYING.txt
 

	
 
JPGS += ws-vacation.jpg
 
JPGS += ws-vacation-user.jpg
 
JPGS += ws-vacation-expert.jpg
 

	
 
JPG_THUMBS = $(patsubst %.jpg, %-t.jpg, $(JPGS))
 
SNIPPETS = ../lib/snippets.pl
 

	
 
# use cp for Windows
 
LN_S = cp
 
LN_S = ln -s
 

	
 
TXT_PDFS = $(patsubst %.txt,%.pdf,$(TXTS))
 
TXT_HTMLS = $(patsubst %.txt,%.html,$(TXTS)) $(patsubst %.txt,%.html,$(HTML_TXTS))
 

	
 
#CLEANFILES += $(TXT_PDFS)
 
#CLEANFILES += $(TXT_HTMLS)
 

	
 
SNIPPETS = ../lib/snippets.pl
 
JPG_THUMBS = $(patsubst %.jpg, %-t.jpg, $(JPGS))
 
#CLEANFILES += $(JPG_THUMBS)
 

	
 
DISTFILES =
 
DISTFILES += Makefile
 
DISTFILES += $(TXTS)
 
DISTFILES += $(TXT_HTMLS)
 
DISTFILES += $(TXT_PDFS)
 
DISTFILES += $(TXT_HTMLS)
 
DISTFILES += $(JPGS)
 
DISTFILES += $(JPG_THUMBS)
 
DISTFILES += $(EXTRA_DIST)
 

	
 
%: %.in
 
	cat $< | $(SNIPPETS) --process --replace --mode text --key base_dir --value $(base_dir) --cat - >$@
 
	test -s $@ || ( rm -f $@ && test 1 = 0 )
 

	
 
%.html: %.txt docutils.conf
 
	cat $< | PYTHONPATH="$$( pwd )" tools/ws_rst2html.py --traceback --cloak-email-addresses >$@
 
	test -s $@ || (rm -f $@ && exit 1)
 

	
 
%.pdf: %.txt docutils.conf
 
	cat $< | PYTHONPATH="$$( pwd )" tools/ws_rst2pdf -e ws_docutils.raw_role >$@
 
	test -s $@ || (rm -f $@ && exit 1)
 

	
 
%-t.jpg: %.jpg
 
	convert $< -resize 200 $@
 

	
 
default: all
 

	
 
index.html: index.txt index-template.txt docutils.conf
 
	cat $< | PYTHONPATH="$$( pwd )" tools/ws_rst2html.py --template index-template.txt --traceback --cloak-email-addresses >$@
 
	test -s $@ || (rm -f $@ && exit 1)
 

	
 
all: $(DISTFILES) all-local
 

	
 
all-local:
 

	
 
clean: clean-local
 
	test -z '$(CLEANFILES)' || rm -rf $(CLEANFILES)
 

	
 
clean-local:
 
	find . -name '*.pyc' | xargs -r rm 
 

	
 
install_top_dir = ../../wolfmanx.bitbucket.org
 
install_top_dir = $(top_srcdir)/../wolfmanx.bitbucket.org
 
install_dir = $(install_top_dir)/ws-vacation
 

	
 
install: all
 
	@(						\
 
	test ! -d $(install_top_dir) ||			\
 
	(						\
 
	mkdir -p $(install_dir);			\
 
	list='$(TXT_HTMLS)'; test -z "$$list" ||	\
 
	for file in $$list; do				\
 
	    echo "cp $$file $(install_dir)/";		\
 
	    cp $$file $(install_dir)/;			\
 
	done;						\
 
	list='$(JPGS)'; test -z "$$list" ||		\
 
	for file in $$list; do				\
 
	    echo "cp $$file $(install_dir)/";		\
 
	    cp $$file $(install_dir)/;			\
 
	done;						\
 
	list='$(JPG_THUMBS)'; test -z "$$list" ||	\
 
	for file in $$list; do				\
 
	    echo "cp $$file $(install_dir)/";		\
 
	    cp $$file $(install_dir)/;			\
 
	done;						\
 
	)						\
 
	)
 

	
 
dist:
 

	
 
tags-rc:
 
	gen_tags.sh --template
 
tags:
 
	gen_tags.sh --force
 

	
 
README.txt: ../README.txt
 
	rm -f $@
 
	$(LN_S) ../$@ $@
 

	
 
# |:here:|
 
# :ide-menu: Emacs IDE Main Menu - Buffer @BUFFER@
 
# . M-x `eIDE-menu' ()(eIDE-menu "z")
 

	
 
# :ide: COMPILE: tags
 
# . (let ((args "tags")) (compile (concat "make -k " args)))
 

	
 
# :ide: COMPILE: dist
 
# . (let ((args "dist")) (compile (concat "make -k " args)))
 

	
 
# :ide: COMPILE: install
 
# . (let ((args "install")) (compile (concat "make -k " args)))
doc/index-template.txt
Show inline comments
 
%(head_prefix)s
 
%(head)s
 
    <link class="jsbin" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
 
    <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
 
    <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js"></script>
 
%(stylesheet)s
 
    <script type="text/javascript"><!--
 
      // Add a trailing slash to the URL, if it does not end in `.html' or `/'.
 
      // This is needed for relative links to work on bitbucket.org
 
      my_url = document.location.href;
 
      query = [];
 
      spc_pos = my_url.indexOf('?');
 
      if (spc_pos >= 0) {
 
          query.unshift(my_url.substr(spc_pos));
 
	  my_url = my_url.substr(0, spc_pos);
 
      }
 
      spc_pos = my_url.indexOf('#');
 
      if (spc_pos >= 0) {
 
          query.unshift(my_url.substr(spc_pos));
 
	  my_url = my_url.substr(0, spc_pos);
 
      }
 
      if (my_url.indexOf('.html') < my_url.length - '.html'.length) {
 
          if (my_url.substr(my_url.length - 1) != '/') {
 
	      my_url += '/' + query.join('');
 
	      document.location.href = my_url;
 
          }
 
      // Elegant solution from David Chambers [Atlassian]
 
      if (!/(\.html|\/)$/.test(location.pathname)) {
 
          location.pathname += '/';
 
      }
 
      $(document).ready(
 
	  function() {
 

	
 
	      // add click handler for screenshots
 
	      $('a.external').each(
 
		  function(i, e) {
 
		      var link = $(e).attr('href');
 
		      if ( link.indexOf('.jpg') > 0) {
 
			  $(e).click(
 
			      function (ev) {
 
				  ev.preventDefault();
 
				  var link = $(this).attr('href');
 
				  $('#show-pic img').attr('src', link);
 
				  var height = window.innerHeight - 20;
 
				  $('#show-pic').dialog("option", "height", height);
 
				  $('#show-pic').dialog("option", "maxHeight", height);
 
				  $('#show-pic').dialog("open");
 
			      });
 
		      }
 
		  });
 

	
 
	      // add the image viewer html + dialog
 
	      $('body').append('<div id="show-pic"><img src="" /></img>');
 
	      $( "#show-pic" ).dialog(
 
		  {
 
		      autoOpen: false,
 
		      height: 'auto',
 
		      width: 640,
 
		      modal: true,
 
		      // buttons: {
 
		      // 	  Close: function() {
 
		      // 	      $( this ).dialog( "close" );
 
		      // 	  }
 
		      // },
 
		  });
 

	
 
	  });
 
      //--></script>
 
%(body_prefix)s
 
%(body_pre_docinfo)s
 
%(docinfo)s
 
%(body)s
 
%(body_suffix)s
lib/config.php
Show inline comments
 
@@ -28,89 +28,90 @@
 
// $USER_ID_MAX are considered:
 
// 1. If the user appears in $ALLOWED_USERS, he is always included
 
// 2. If the HOME directory does not start with $HOME_PFX, the user is ignored
 
// 3. If the user appears in $INVALID_USERS, he is ignored
 
// 4. The user is authorized.
 

	
 
// Alle Benutzer in $PASSWD_FILE, deren User ID >= $USER_ID_MIN und <=
 
// $USER_ID_MAX werden in Betracht gezogen:
 
// 1. Falls der Benutzer in $ALLOWED_USERS angegeben ist, wird er immer zugelassen.
 
// 2. Wenn das HOME-Verzeichnis nicht mit $HOME_PFX beginnnt, wird der Benutzer nicht zugelasssen.
 
// 3. Wenn der Benutzer in $INVALID_USERS angegeben ist, wird er nicht zugelasssen.
 
// 4. Der Benutzer wird zugelassen.
 

	
 
// User which are always allowed.
 
// If the user appears in $PASSWD_FILE, he is always enabled.
 
$ALLOWED_USERS = Array(
 
    );
 

	
 
// Invalid users.
 
// These users are always ignored.
 
$INVALID_USERS = Array(
 
    'clamav',
 
    'elektriker',
 
    'info',
 
    'postman',
 
    'vmail',
 
    );
 

	
 
// Administrators can modify the settings of all users.
 
$ADMIN_USERS = Array(
 
    'js',
 
    'sw',
 
    'ws',
 
    );
 

	
 
$LANGUAGE = 'en';
 
$LANGUAGE = 'de';
 

	
 
$PASSWD_FILE = '/etc/passwd';
 
$SHADOW_FILE = '/etc/shadow';
 
$HTPASSWD_FILE = '.htpasswd';
 
$HOME_PFX = '/home/';
 
$USER_ID_MIN = 1000;
 
$USER_ID_MAX = 60000;
 
$SUDO_CMD = '/usr/bin/sudo';
 
$SUDO_OPT_H = ' -H';
 
$WRITE_TO_CMD = dirname(__FILE__) . '/write_to.sh';
 

	
 
$FORMAIL_CMD = '/usr/bin/formail';
 
$VACATION_CMD = '/usr/bin/vacation';
 
$VACATION_MSG_FILE = '.vacation.msg';
 
$VACATION_DB_FILE = '.vacation.db';
 
$VACATION_FORWARD_ENTRY = '"|/usr/bin/vacation %s"'; // use sprintf($VFE, $user);
 
$VACATION_FORWARD_ENTRY = sprintf('"| %s -c | %s %%s"', $FORMAIL_CMD, $VACATION_CMD); // use sprintf($VFE, $user);
 
$FORWARD_FILE = '.forward';
 
$EXPERT_ENABLED = True;
 

	
 
$HEADER_REMOVE = Array(
 
    'bcc',
 
    'cc',
 
    'date',
 
    'delivered-to',
 
    'message-id',
 
    'received',
 
    'return-path',
 
    'to',
 
    'user-agent',
 
    'references',
 
    'in-reply-to',
 
    );
 

	
 
//
 
// :ide-menu: Emacs IDE Menu - Buffer @BUFFER@
 
// . M-x `eIDE-menu' ()(eIDE-menu "z")
 
// :ide: COMPILE: PHP _DEBUG_=2 _DEBUG_TEST_=2
 
// . (compile (concat "php " (file-name-nondirectory (buffer-file-name)) " _DEBUG_=2 _DEBUG_TEST_=2"))
 

	
 
// :ide: QUO: $this->
 
// . (insert "$this->" )
 

	
 
// :ide: COMPILE: PHP w/o args
 
// . (compile (concat "php " (file-name-nondirectory (buffer-file-name)) ""))
 

	
 
// :ide: COMPILE: PHP _DEBUG_=1 _DEBUG_TEST_=1
 
// . (compile (concat "php " (file-name-nondirectory (buffer-file-name)) " _DEBUG_=1 _DEBUG_TEST_=1"))
 

	
 
//
 
// Local Variables:
 
// mode: php
 
// End:
 
?>
0 comments (0 inline, 0 general)