mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-08-21 17:06:22 +00:00
Close to a Debian build.
This commit is contained in:
parent
dc4526c3d7
commit
5c69ce125a
@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Build the CalDAV database
|
||||
# Build the RSCDS database
|
||||
#
|
||||
|
||||
DBNAME="${1:-caldav}"
|
||||
DBNAME="${1:-rscds}"
|
||||
|
||||
createdb -E UTF8 "${DBNAME}"
|
||||
|
||||
psql -f caldav.sql "${DBNAME}"
|
||||
psql -f rscds.sql "${DBNAME}"
|
||||
|
||||
psql -f sample-data.sql "${DBNAME}"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
-- My CalDAV server - Database Schema
|
||||
-- Really Simple CalDAV Store - Database Schema
|
||||
--
|
||||
|
||||
-- Use the usr, group and schema management stufffrom libawl-php
|
||||
@ -20,7 +20,8 @@ GRANT SELECT,INSERT,UPDATE,DELETE ON ics_event_data TO general;
|
||||
CREATE TABLE time_zones (
|
||||
tzid TEXT PRIMARY KEY,
|
||||
location TEXT,
|
||||
tz_spec TEXT
|
||||
tz_spec TEXT,
|
||||
pgtz TEXT
|
||||
);
|
||||
GRANT SELECT,INSERT ON time_zones TO general;
|
||||
|
||||
@ -30,7 +31,7 @@ CREATE TABLE ical_events (
|
||||
ics_event_name TEXT,
|
||||
ics_event_etag TEXT,
|
||||
|
||||
-- Extracted iCalendar event data
|
||||
-- Extracted vEvent event data
|
||||
uid TEXT,
|
||||
dtstamp TEXT,
|
||||
dtstart TIMESTAMP,
|
||||
4
debian/.gitignore
vendored
Normal file
4
debian/.gitignore
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
compat
|
||||
files
|
||||
html
|
||||
rscds
|
||||
4
debian/control
vendored
4
debian/control
vendored
@ -2,12 +2,12 @@ Source: rscds
|
||||
Section: catalyst
|
||||
Priority: extra
|
||||
Maintainer: Andrew McMillan <andrew@catalyst.net.nz>
|
||||
Standards-Version: 3.5.9
|
||||
Standards-Version: 3.6.3
|
||||
Build-Depends: debhelper
|
||||
|
||||
Package: rscds
|
||||
Architecture: all
|
||||
Depends: debconf (>= 1.0.32), php4 (>= 4:4.1), php4-pgsql(>= 3:4.1.0), postgresql-client (>= 7.2.1) | postgresql-client-8.0 | postgresql-client-8.1, libawl-php (>=0.1-1)
|
||||
Depends: debconf (>= 1.0.32), php4 (>= 4:4.3) | php5, php4-pgsql(>= 3:4.3.0) | php5-pgsql, postgresql-client-8.0 | postgresql-client-8.1, libawl-php (>=0.3-1)
|
||||
Description: Really Simple CalDAV Server
|
||||
The Really Simple CalDAV Server is designed to trivially store
|
||||
CalDAV calendars, such as those from Evolution, in a central
|
||||
|
||||
4
debian/rscds-phpdoc.ini
vendored
4
debian/rscds-phpdoc.ini
vendored
@ -71,7 +71,7 @@ readmeinstallchangelog = README, INSTALL, CHANGELOG, NEWS, FAQ, LICENSE
|
||||
;; legal values: directory paths separated by commas
|
||||
;directory = /path1,/path2,.,..,subdirectory
|
||||
;directory = /home/jeichorn/cvs/pear
|
||||
directory = /home/andrew/projects/rscds/inc,/home/andrew/projects/rscds/html
|
||||
directory = /home/andrew/projects/rscds/inc,/home/andrew/projects/rscds/htdocs
|
||||
|
||||
;; template base directory (the equivalent directory of <installdir>/phpDocumentor)
|
||||
;templatebase = /path/to/my/templates
|
||||
@ -83,7 +83,7 @@ examplesdir = /home/andrew/projects/rscds/examples
|
||||
;; comma-separated list of files, directories or wildcards ? and * (any wildcard) to ignore
|
||||
;; legal values: any wildcard strings separated by commas
|
||||
;ignore = /path/to/ignore*,*list.php,myfile.php,subdirectory/
|
||||
ignore = api/,CVS
|
||||
ignore = .git
|
||||
|
||||
;; comma-separated list of Converters to use in outputformat:Convertername:templatedirectory format
|
||||
;; legal values: HTML:frames:default,HTML:frames:l0l33t,HTML:frames:phpdoc.de,HTML:frames:phphtmllib,
|
||||
|
||||
4
debian/rscds.docs
vendored
Normal file
4
debian/rscds.docs
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
README
|
||||
TODO
|
||||
docs/
|
||||
debian/html/
|
||||
2
debian/rules
vendored
2
debian/rules
vendored
@ -5,7 +5,7 @@
|
||||
package=rscds
|
||||
dt=debian/$(package)
|
||||
|
||||
build: inc htdocs
|
||||
build: inc htdocs debian/$(package)-phpdoc.ini
|
||||
$(checkdir)
|
||||
cd ~andrew/projects/phpdoc/phpDocumentor-1.2.3 && ./phpdoc -c ~andrew/projects/$(package)/debian/$(package)-phpdoc.ini
|
||||
touch build
|
||||
|
||||
55
inc/session-util.php
Normal file
55
inc/session-util.php
Normal file
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/**
|
||||
* @package awl
|
||||
* @subpackage Session
|
||||
* @author Andrew McMillan <andrew@catalyst.net.nz>
|
||||
* @copyright Catalyst IT Ltd
|
||||
* @license http://gnu.org/copyleft/gpl.html GNU GPL v2
|
||||
*/
|
||||
|
||||
if ( !function_exists("session_salted_md5") ) {
|
||||
/**
|
||||
* Make a salted MD5 string, given a string and (possibly) a salt.
|
||||
*
|
||||
* If no salt is supplied we will generate a random one.
|
||||
*
|
||||
* @param string $instr The string to be salted and MD5'd
|
||||
* @param string $salt Some salt to sprinkle into the string to be MD5'd so we don't get the same PW always hashing to the same value.
|
||||
* @return string The salt, a * and the MD5 of the salted string, as in SALT*SALTEDHASH
|
||||
*/
|
||||
function session_salted_md5( $instr, $salt = "" ) {
|
||||
if ( $salt == "" ) $salt = substr( md5(rand(100000,999999)), 2, 8);
|
||||
dbg_error_log( "Login: Making salted MD5: salt=$salt, instr=$instr, md5($salt$instr)=".md5($salt . $instr) );
|
||||
return ( sprintf("*%s*%s", $salt, md5($salt . $instr) ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ( !function_exists("session_validate_password") ) {
|
||||
/**
|
||||
* Checks what a user entered against the actual password on their account.
|
||||
* @param string $they_sent What the user entered.
|
||||
* @param string $we_have What we have in the database as their password. Which may (or may not) be a salted MD5.
|
||||
* @return boolean Whether or not the users attempt matches what is already on file.
|
||||
*/
|
||||
function session_validate_password( $they_sent, $we_have ) {
|
||||
global $debuggroups, $session;
|
||||
|
||||
if ( ereg('^\*\*.+$', $we_have ) ) {
|
||||
// The "forced" style of "**plaintext" to allow easier admin setting
|
||||
return ( "**$they_sent" == $we_have );
|
||||
}
|
||||
|
||||
if ( ereg('^\*(.+)\*.+$', $we_have, $regs ) ) {
|
||||
// A nicely salted md5sum like "*<salt>*<salted_md5>"
|
||||
$salt = $regs[1];
|
||||
$md5_sent = session_salted_md5( $they_sent, $salt ) ;
|
||||
return ( $md5_sent == $we_have );
|
||||
}
|
||||
|
||||
// Anything else is bad
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -17,7 +17,6 @@
|
||||
<item url="config/config.php" uploadstatus="1" />
|
||||
<item url="config/" uploadstatus="1" />
|
||||
<item url="inc/caldav-PUT.php" uploadstatus="1" />
|
||||
<item url="dba/caldav.sql" uploadstatus="1" />
|
||||
<item url="dba/" uploadstatus="1" />
|
||||
<item url="dba/create-database.sh" uploadstatus="1" />
|
||||
<item url="dba/sample-data.sql" uploadstatus="1" />
|
||||
@ -27,7 +26,8 @@
|
||||
<item url="inc/BasicAuthSession.php" uploadstatus="1" />
|
||||
<item url="inc/session-util.php" uploadstatus="1" />
|
||||
<item url="inc/vEvent.php" uploadstatus="1" />
|
||||
<item url="debian/" />
|
||||
<item url="debian/rules" />
|
||||
<item url="debian/" uploadstatus="1" />
|
||||
<item url="debian/rules" uploadstatus="1" />
|
||||
<item url="dba/rscds.sql" />
|
||||
</project>
|
||||
</webproject>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user