Subversion Repositories prayer

Compare Revisions

Ignore whitespace Rev 86 → Rev 85

/trunk/debian/patches/makefile_install_config.patch
13,7 → 13,7
aliases_name = "vacation.aliases"
--- a/files/Makefile
+++ b/files/Makefile
@@ -66,21 +66,16 @@ install-aconfig:
@@ -65,21 +65,16 @@ install-aconfig:
install-motd:
$(INSTALL) -o $(RO_USER) -g $(RO_GROUP) -m $(PUBLIC_FILE) \
61,7 → 61,7
# Name of Prayer user preferences file on IMAP server
prefs_folder_name = ".prayer"
@@ -270,11 +270,11 @@ icon_expire_timeout = 7d
@@ -266,11 +266,11 @@ http_icon_embed = TRUE
# Locatation of SSL certificate file (only used if SSL ports defined).
# Required if we are going to provide SSL services.
75,7 → 75,7
# Master server will regenerate shared RSA key at this interval:
ssl_rsakey_lifespan = 15m
@@ -282,26 +282,14 @@ ssl_rsakey_lifespan = 15m
@@ -278,26 +278,14 @@ ssl_rsakey_lifespan = 15m
# RSA key remains fresh in child process for this long after first actual use.
ssl_rsakey_freshen = 15m
105,30 → 105,35
# Session specific configuration
# Session switches to idle mode after this much time: connections to IMAP
@@ -376,13 +364,15 @@ sendmail_path = /usr/lib/sendmail
ispell_path = /usr/bin/ispell
@@ -382,13 +370,13 @@ ispell_path = /usr/bin/ispell
# <login_suffix_path>
# Login page prefix
-#login_prefix_path = "$prefix/etc/login_prefix.html"
+#login_prefix_path = "/etc/login_prefix.html"
# Message of the day file
-motd_path = "$prefix/etc/motd.html"
-
-# HTML to insert into login page
-#login_insert1_path = "$prefix/etc/ucsnews.html"
-#motd_path = "$prefix/etc/motd.html"
+#motd_path = "/etc/prayer/motd.html"
-# HTML to insert into login page
-#login_insert2_path = "$prefix/etc/ucsnews.html"
+# HTML to make available to login template as $login_insert1
+# (only used in "cam" template set).
+#login_insert1_path = "/etc/prayer/login1.html"
+
+# HTML to make available to login template as $login_insert2
+# (currently not used in any template set).
+#login_insert2_path = "/etc/prayer/login2.html"
# Login page suffix
-#login_suffix_path = "$prefix/etc/login_suffix.html"
+#login_suffix_path = "/etc/login_suffix.html"
# Login security: Prayer's front page defaults to a login form.
# If the user does not connect via SSL then this can be changed
@@ -411,10 +401,11 @@ bin_dir = "__BIN_DIR__"
@@ -409,9 +397,6 @@ ssl_required = FALSE
# Session banner (local HTML inserted into each page of login session)
#session_banner_path = "$prefix/etc/session_banner.html"
-# Location of help files
-help_dir = "$prefix/help"
-
# Location of icon files
icon_dir = "$prefix/icons"
@@ -423,10 +408,11 @@ bin_dir = "__BIN_DIR__"
# Various directories used by the running system
# Logs stored in $log_dir
-log_dir = "$var_prefix/logs"
141,7 → 146,7
# $socket_dir is location for unix domain sockets which connect frontend
# to backend in proxy mode of operation.
@@ -422,7 +413,7 @@ socket_dir = "$var_prefix/socke
@@ -434,7 +420,7 @@ socket_dir = "$var_prefix/socke
# Split socket directory into 64 subdirs keyed on first letter of sessionID
# Code provides compatibility in both directions: can switch back and forward
150,7 → 155,7
# Name of Unix domain socket (in $socket_dir) used for initial handshake
# between prayer and prayer-session processes when a user logs in
@@ -436,7 +427,7 @@ ssl_session_dir = "$var_prefix/ssl_s
@@ -448,7 +434,7 @@ ssl_session_dir = "$var_prefix/ssl_s
tmp_dir = "$var_prefix/tmp"
# Location for PID files for prayer and prayer-session master processes.
159,16 → 164,7
# Interface to Hermes finger database
#lookup_rpasswd = "/data/finger/rpasswd.cdb"
@@ -454,7 +445,7 @@ pid_dir = "$var_prefix/pid"
# Template stuff
template_path = "__PREFIX__/templates"
-template_set = "cam"
+template_set = "old"
template_use_compiled = TRUE
template old "Traditional"
@@ -603,14 +594,14 @@ hiersep = "/"
@@ -609,14 +595,14 @@ hiersep = "/"
dualuse = FALSE
# Names of postponed_folder and sent_mail_folder, relative to maildir
186,3 → 182,18
# Size of small and large compose windows
small_cols = 80
--- a/shared/config.c
+++ b/shared/config.c
@@ -2139,12 +2139,10 @@ BOOL config_check(struct config * config
struct config_http_port *chp;
char hostname[MAX_ADDRESS+1], domainname[MAX_ADDRESS+1];
- TEST_STRING(config->help_dir, "help_dir");
TEST_STRING(config->icon_dir, "icon_dir");
TEST_STRING(config->socket_dir, "socket_dir");
TEST_STRING(config->init_socket_name, "init_socket_name");
TEST_STRING(config->ssl_session_dir, "ssl_session_dir");
- TEST_STRING(config->lock_dir, "lock_dir");
TEST_STRING(config->log_dir, "log_dir");
TEST_STRING(config->tmp_dir, "tmp_dir");
TEST_STRING(config->pid_dir, "pid_dir");
/trunk/debian/patches/templates_fallback_to_compiled.patch
1,6 → 1,6
--- a/lib/template_expand.c
+++ b/lib/template_expand.c
@@ -475,11 +475,11 @@ template_expand_call(struct template_cal
@@ -496,11 +496,11 @@ template_expand_call(struct template_cal
char *s, *t;
char *err = NIL;
16,7 → 16,7
if (!template) {
str_printf(state->error,
"Template \"%s\" not found (CALL from template \"%s\")\n",
@@ -558,11 +558,11 @@ template_expand(char *name, struct templ
@@ -579,11 +579,11 @@ template_expand(char *name, struct templ
struct str *error = tvals->error;
char *err;
31,15 → 31,15
+
if (!template) {
str_printf(tvals->error,
"Template %s not found (top level template_expand())\n",
"Template %s not found (top level template_expand())",
--- a/files/etc/prayer.cf.SRC
+++ b/files/etc/prayer.cf.SRC
@@ -444,7 +444,7 @@ pid_dir = "$var_prefix"
@@ -450,7 +447,7 @@ pid_dir = "$var_prefix"
######################################################################
# Template stuff
-template_path = "__PREFIX__/templates"
+template_path = "/etc/prayer/templates"
template_set = "old"
template_set = "xhtml_strict"
template_use_compiled = TRUE
/trunk/debian/patches/series
1,4 → 1,6
makefile_install_config.patch
templates_fallback_to_compiled.patch
kfreebsd.patch
unlimit_login_username.patch
usernames_with_at.patch
clean_completely.patch
/trunk/debian/patches/clean_completely.patch
1,7 → 1,7
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -71,7 +71,7 @@ mymutex.o: mymutex.c mymutex_sem.c mymu
$(CC) $(MYCFLAGS) $(MUTEX_DEF) -c $<
@@ -74,7 +74,7 @@ mymutex.o: mymutex.c mymutex_sem.c mymu
$(CC) $(CFLAGS) $(MUTEX_DEF) -c $<
clean:
- rm -f lib.o $(OBJS) $(WITHSSL_OBJS) $(NOSSL_OBJS) *~ \#*\#
9,3 → 9,25
install: all
cp template_expand template_compile ../bin
--- a/templates/xhtml_strict/Makefile
+++ b/templates/xhtml_strict/Makefile
@@ -108,7 +108,7 @@ install:
cp *.vars $(BROOT)$(PREFIX)/templates/$(TYPE)
clean:
- rm -f *.html *.o *.c \#*\# *~
+ rm -f *.html *.o *.c \#*\# *~ $(TARGET)
include Makefile.deps
--- a/templates/xhtml_transitional/Makefile
+++ b/templates/xhtml_transitional/Makefile
@@ -108,7 +108,7 @@ install:
cp *.vars $(BROOT)$(PREFIX)/templates/$(TYPE)
clean:
- rm -f *.html *.o *.c \#*\# *~
+ rm -f *.html *.o *.c \#*\# *~ $(TARGET)
include Makefile.deps
/trunk/debian/patches/unlimit_login_username.patch
0,0 → 1,11
--- a/servers/prayer_login.c
+++ b/servers/prayer_login.c
@@ -118,7 +118,7 @@ prayer_login_generate(struct prayer *pra
bprintf(b, "<input name=\"username\" value=\"");
if (user)
html_quote_string(b, user);
- bputs(b, "\" size=\"8\" maxlength=\"8\" />");
+ bputs(b, "\" size=\"16\" />");
bputs(b, "</td>" CRLF);
bputs(b, "</tr>" CRLF);
/trunk/debian/patches/usernames_with_at.patch
0,0 → 1,53
--- a/session/draft.c
+++ b/session/draft.c
@@ -1399,10 +1399,12 @@ char *draft_make_msg(struct draft *draft
if (draft->from_address && draft->from_address[0]) {
from_address = draft->from_address;
use_sender = T;
- } else
- from_address
- =
+ } else if (strchr(session->username, '@')) {
+ from_address = pool_strdup(pool, session->username);
+ } else {
+ from_address =
pool_printf(pool, "%s@%s", session->username, default_domain);
+ }
if (draft->from_personal && draft->from_personal[0]) {
from_personal = draft->from_personal;
@@ -1431,9 +1433,14 @@ char *draft_make_msg(struct draft *draft
NIL);
bputs(mb, "" CRLF);
- if (use_sender)
- bprintf(mb, "Sender: %s@%s" CRLF, session->username,
- default_domain);
+ if (use_sender) {
+ if (strchr(session->username, '@')) {
+ bprintf(mb, "Sender: %s" CRLF, session->username);
+ } else {
+ bprintf(mb, "Sender: %s@%s" CRLF, session->username,
+ default_domain);
+ }
+ }
if (!(draft_make_abook_address(session, mb, "To", draft->to) &&
draft_make_abook_address(session, mb, "Cc", draft->cc) &&
--- a/cmd/cmd_prefs.c
+++ b/cmd/cmd_prefs.c
@@ -474,9 +474,12 @@ generate_compose1_form(struct session *s
template_vals_string(tvals, "from_address", prefs->from_address);
if (!(prefs->from_address && prefs->from_address[0])) {
- char *s = pool_printf(request->pool, "%s@%s",
- session->username, prefs->default_domain);
+ char *s = session->username;
+ if (!strchr(session->username, '@')) {
+ s = pool_printf(request->pool, "%s@%s",
+ session->username, prefs->default_domain);
+ }
template_vals_string(tvals, "default_from_address", s);
}