Index: davical-0.9.8/dba/appuser_permissions.txt
--- davical-0.9.8/dba/appuser_permissions.txt.orig	2009-12-24 09:50:16 +0100
+++ davical-0.9.8/dba/appuser_permissions.txt	2009-12-25 10:24:46 +0100
@@ -1,57 +1,44 @@
-#
-# This file is used by update-rscds-database to set the correct
-# permissions for the application user.  In newer installations
-# the application user will probably be called app_davical (and
-# the administrative user will be called dba_davical) but in
-# older installations the application user was called 'general'
-# and the administrative user was probably 'postgres'.
-#
-# See the wiki topic 'Database/Users' for more discussion.
-#
-# This file includes lines like:
-#   GRANT SELECT,...
-# which define what gets granted to the following lines like:
-#   ON table1, table2, sequence1, function 3, view4, ...
-# no user-serviceable parts inside, all whitespace is ignored,
-# your mileage should not vary :-)
-#
 
 GRANT SELECT,INSERT,UPDATE,DELETE
-  ON collection
-  ON caldav_data
-  ON calendar_item
-  ON relationship
-  ON locks
-  ON property
-  ON freebusy_ticket
-  ON usr
-  ON usr_setting
-  ON roles
-  ON role_member
-  ON session
-  ON tmp_password
-  ON group_member
-  ON principal
-  ON relationship_type
-  ON sync_tokens
-  ON sync_changes
-  ON grants
-  ON dav_principal
+  ON collection,
+     caldav_data,
+     calendar_item,
+     relationship,
+     locks,
+     property,
+     freebusy_ticket,
+     usr,
+     usr_setting,
+     roles,
+     role_member,
+     session,
+     tmp_password,
+     group_member,
+     principal,
+     relationship_type,
+     sync_tokens,
+     sync_changes,
+     grants,
+     dav_principal
+  TO davical;
 
 GRANT SELECT,UPDATE
-  ON relationship_type_rt_id_seq
-  ON dav_id_seq
-  ON usr_user_no_seq
-  ON roles_role_no_seq
-  ON session_session_id_seq
-  ON principal_type_principal_type_id_seq
-  ON sync_tokens_sync_token_seq
+  ON relationship_type_rt_id_seq,
+     dav_id_seq,
+     usr_user_no_seq,
+     roles_role_no_seq,
+     session_session_id_seq,
+     principal_type_principal_type_id_seq,
+     sync_tokens_sync_token_seq
+  TO davical;
 
 GRANT SELECT,INSERT
   ON time_zone
+  TO davical;
 
 GRANT SELECT
-  ON supported_locales
-  ON awl_db_revision
-  ON principal_type
+  ON supported_locales,
+     awl_db_revision,
+     principal_type
+  TO davical;
 
Index: davical-0.9.8/inc/always.php
--- davical-0.9.8/inc/always.php.orig	2009-12-24 10:16:11 +0100
+++ davical-0.9.8/inc/always.php	2009-12-25 10:24:38 +0100
@@ -88,14 +88,8 @@
 * access which could break DAViCal completely by causing output to start
 * too early.
 */
-if ( @file_exists('/etc/davical/'.$_SERVER['SERVER_NAME'].'-conf.php') ) {
-  include('/etc/davical/'.$_SERVER['SERVER_NAME'].'-conf.php');
-}
-else if ( @file_exists('/etc/davical/config.php') ) {
-  include('/etc/davical/config.php');
-}
-else if ( @file_exists('../config/config.php') ) {
-  include('../config/config.php');
+if ( @file_exists("@l_prefix@/etc/davical/davical-config.php") ) {
+  include_once("@l_prefix@/etc/davical/davical-config.php");
 }
 else {
   include('davical_configuration_missing.php');
