Commit ff7ebeaa authored by David Byers's avatar David Byers

Documentation: Protocol-A.texi is now nearly complete.

               Documented the aux-item definition file format.
               Updated the database format documentation.

Server:        Implemented aux-items.
               Checked error returns and set error-status to something
                   useful in most cases.
               New RPC calls:
                   create-text
                   create-anonymous-text
                   create-conf
                   create-person
                   get-text-stat
                   get-conf-stat
                   modify-text-info
                   modify-conf-info
                   get-info
                   modify-server-info
                   get-collate-table
                   set-expire
                   query-unread-texts
               New asynchronous messages:
                   new-text
                   deleted-text
parent 36cbe853
This diff is collapsed.
# INSTALL -- installation instructions for the LysKOM server
#
# $Id: INSTALL,v 1.25 1996/08/04 02:22:01 ceder Exp $
# $Id: INSTALL,v 1.26 1997/09/13 15:31:20 byers Exp $
# Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
......@@ -80,6 +80,12 @@ if you succeed in compiling it with another machine/OS/compiler.
We use the "include" statement in our Makefiles. Get GNU make if your
make does not support it.
1.3 Bison and flex
You may need the Gnu tools bison and flex. The standard lex and yacc
are not flexible enough. You should have bison version 1.25 or later
and flex version 2.5.4 or later.
2. INSTALLING (quick version)
--------------------------
......
This diff is collapsed.
dnl $Id: configure.in,v 1.41 1997/06/06 21:37:05 ceder Exp $
dnl $Id: configure.in,v 1.42 1997/09/13 15:31:24 byers Exp $
dnl Configuration for LysKOM
dnl Copyright (C) 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
dnl
......@@ -18,7 +18,7 @@ dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
dnl Please mail bug reports to bug-lyskom@lysator.liu.se.
dnl
AC_REVISION($Revision: 1.41 $)
AC_REVISION($Revision: 1.42 $)
AC_INIT(src/server/lyskomd.h)
AC_ARG_WITH([gnu-malloc],
[ --with-gnu-malloc use GNU malloc],
......@@ -141,6 +141,8 @@ AC_PROG_AWK
AC_PROG_LN_S
AC_PROG_YACC
AC_PROG_LEX
AC_CHECK_PROGS(BISON, bison)
AC_CHECK_PROGS(FLEX, flex)
AC_CHECK_PROGS(SED, sed)
AC_CHECK_HEADERS(string.h memory.h strings.h sys/param.h sys/time.h)
AC_CHECK_HEADERS(stdarg.h stdlib.h stddef.h locale.h sys/resource.h)
......
No preview for this file type
This diff is collapsed.
1. Adding new predefined aux items
New items are added to the file run-support/aux-items.conf, unless
they need to be compiled into the server, in which case they need to
be added to compiled_aux_item_definitions in src/server/aux-items.c
Remember to document all predefined aux items in doc/Protocol-A.texi.
2. aux-items.conf
Each entry in this file has the following format:
tag : name ( target, target, ... )
{
field = value;
field = value;
...
}
Tag is an integer, the aux-item's tag. The last definition of a tag
overrides all previous definitions of that tag. Each target is one of
`server', `text', `conference' or `letterbox', and defines which kind
of object the item can be attached to. If `server' is listed, items
with this tag can be attached to the server information. If `text' is
listed, items with this tag can be attached to texts; if `conference'
is listed, they can be attached to conferences; if `letterbox' is
listed, but `conference' is not, they can be attached to letterbox
conferences. Field is an identifier (see below). Value is a boolean
constant (`true', `false', `yes', `no', `on' or `off'); an integer; or
a string enclosed in double quotes (C-style escapes are probably
supported.) Some items have trillian values. They can be set to
boolean values in the file, but the default is some other value.
The following fields can be assigned to:
author-only Boolean, default false. When true, only the author
of a text or supervisor of a conference can create
items with this tag.
supervisor-only Boolean, default false. When true, only the
supervisors of the author or letterbox can create
items with this tag. In all likelihood, the
implementation of this flag is screwed up.
permanent Boolean, default false. When true, items with this
tag cannot be deleted once they have been created.
unique Boolean, default false. When true, there can only
be one non-deleted item with this tag per creator.
inherit-limit Integer, default 0. The maximum number of times
items with this tag can be inherited, plus one.
Zero means an unlimited number of times, one means
no times, 2 means once and so forth. This number
overrides the inherit-limit set by the client only
if that number is higher than this one.
inherit Trillian. When set, the inherit bit on new items
with this tag is forced to the specified value.
secret Trillian. When set, the secret bit on new items
with this tag is forced to the specified value.
hide-creator Trillian. When set, the hide-creator bit on new
items with this tag is forced to the specified
value.
validate String, default none. When set, this specifies a
regexp that must match the data field in newly
created items with this tag. If the regexp fails
to match, then the item will not be created.
......@@ -12,8 +12,12 @@ number of lines of conferences, followed by the same number of
persons. Next is a single integer on a single line followed by that
number of text-stat records.
DATABASE ::= HEADER '\n' NEXT-FREE-NUM '\n' CONFS PERSONS \
NEXT-TEXT-NUM '\n' TEXTS
DATABASE ::= HEADER '\n'
NEXT-FREE-NUM '\n'
CONFS
PERSONS
NEXT-TEXT-NUM '\n'
TEXTS
;
HEADER ::= 'CLEAN'
......@@ -47,6 +51,7 @@ TEXT ::= EMPTY-RECORD
EMPTY-RECORD ::= '@\n'
Notes
o Records are stored sequentially; e.g. the eighteenth conference
......@@ -126,3 +131,10 @@ o The NEXT-TEXT-NUM record denotes the highest test number in the
o A conference or text must have a number lower than the closest
NEXT-FREE-NUM or NEXT-TEXT-NUM before it.
DATABASE VERSION 2
Identical to version 1, but SERVER-INFO, CONF-RECORD, PERSON-RECORD
and TEXT-RECORD also include the highest_aux_no and aux_item_list
fields of the data structure, and CONF-RECORD has the expire field.
.\" $Id: lyskomd.8,v 1.24 1996/08/03 01:29:06 ceder Exp $
.\" $Id: lyskomd.8,v 1.25 1997/09/13 15:31:34 byers Exp $
.\" Copyright (C) 1991, 1994 Lysator Academic Computer Association.
.\"
.\" This file is part of the LysKOM server.
......@@ -21,18 +21,27 @@
.\"
.\" Please mail bug reports to bug-lyskom@lysator.liu.se.
.\"
.\" $Id: lyskomd.8,v 1.24 1996/08/03 01:29:06 ceder Exp $
.\" $Date: 1996/08/03 01:29:06 $
.\" $Id: lyskomd.8,v 1.25 1997/09/13 15:31:34 byers Exp $
.\" $Date: 1997/09/13 15:31:34 $
.TH lyskomd 8 "January 12, 1994" "Lysator"
.SH NAME
lyskomd - LysKOM server
.SH SYNOPSIS
.B /usr/lyskom/bin/lyskomd
.B lyskomd
[
.B -d ...
] [
.B config-file
]
.PP
.B lyskomd
[
.B -d
] [
.B -c config-file
] [
.B -a aux-item-defs
]
.SH DESCRIPTION
This documents lyskomd release 1.9.0. lyskomd is a LysKOM server.
.PP
......@@ -57,6 +66,12 @@ make the process print a
for every timeout, a message for every person that is connecting or
disconnecting and a message for every successful or unsuccessful
communication to the process.
.TP
.B \-c config-file
Selects which configuration file to use (see CONFIGURATION below).
.TP
.B \-a aux-item-defs
Selects which file to read definitions of aux-items from.
.SH CONFIGURATION
The configuration file is line oriented.
Each line consists of one
......@@ -288,6 +303,15 @@ significant, even if this number is much larger.
.TP
.B Max super_conf loop: int
.TP
.B Max accept_async len: int
Maximum length of list accepted in the accept_async call.
.TP
.B Max aux_items deleted per call: int
Maximum number of aux_items that can be deleted in one call.
.TP
.B Max aux_items added per call: int
Maximum number of aux_items that can be added at once.
.TP
.B Default garb nice: int
Each conference has a lifetime for texts written in it.
The lifetime is counted in days, and can be set for each conference by
......@@ -436,8 +460,6 @@ There is no practical handling of security.
.PP
The choice of asynchronously issued messages is not very good.
.PP
The so called "data base" is a joke.
.PP
It uses too much memory.
.SH HISTORY
In 1990, Per Cederqvist <ceder@lysator.liu.se> and Peter Eriksson
......
......@@ -113,6 +113,8 @@ binaries: FORCE
install: FORCE
test -f $(etcdir)/config \
|| $(INSTALL_DATA) $(srcdir)/config $(etcdir)/config
test -f $(etcdir)/aux-items.conf \
|| $(INSTALL_DATA) $(srcdir)/aux-items.conf $(etcdir)/aux-items.conf
for i in $(SCRIPTS); do \
$(INSTALL_PROGRAM) $$i $(bindir); \
done
......
#
# $Id: Makefile.src,v 1.10 1996/08/04 02:03:46 ceder Exp $
# $Id: Makefile.src,v 1.11 1997/09/13 15:31:36 byers Exp $
# Copyright (C) 1994, 1995, 1996 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
......@@ -29,5 +29,7 @@ LK_SCRIPTS([komrunning savecore])
define([doinstall],
[LK_cmd([test -f $(etcdir)/config \
|| $(INSTALL_DATA) $(srcdir)/config $(etcdir)/config])]dnl
[LK_cmd([test -f $(etcdir)/aux-items.conf \
|| $(INSTALL_DATA) $(srcdir)/aux-items.conf $(etcdir)/aux-items.conf])]dnl
LK_QUOTE(doinstall))dnl
LK_DESCEND
#
# $Id: aux-items.conf,v 1.1 1997/09/13 15:31:37 byers Exp $
# Copyright (C) 1994, 1995, 1996 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
#
# LysKOM is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 1, or (at your option)
# any later version.
#
# LysKOM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with LysKOM; see the file COPYING. If not, write to
# Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
# or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
# MA 02139, USA.
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.
#
#
# If you make an addition to this file that you feel is useful
# you should contact the LysKOM developers to reserve a number
# and to get the change incorporated into the server distribution.
#
#
# Content type of a text (MIME type)
#
1 : content-type (text)
{
author-only = true;
unique = true;
secret = false;
hide-creator = false;
inherit = false;
inherit-limit = 1;
validate = "^.*/.*$";
}
#
# Quick reply to a text
#
2 : fast-reply (text)
{
secret = false;
hide-creator = false;
inherit = false;
inherit-limit = 1;
}
#
# Cross reference from one object to another
#
3 : cross-reference (text, conference)
{
inherit = false;
inherit-limit = 1;
validate = "^[CTP][0-9]+ ";
}
#
# Request for no comments to a text
#
4 : no-comments (text)
{
secret = false;
hide-creator = false;
author-only = true;
inherit = false;
inherit-limit = 1;
}
#
# Request for personal comments only
#
5 : personal-comment (text)
{
secret = false;
hide-creator = false;
author-only = true;
inherit = false;
inherit-limit = 1;
}
#
# Request for read confirmation
#
6 : request-confirmation (text)
{
secret = false;
unique = true;
inherit = false;
inherit-limit = 1;
}
#
# Read confirmation (creator has read the text)
#
7 : read-confirm (text)
{
secret = false;
hide-creator = false;
inherit = false;
inherit-limit = 1;
permanent = true;
}
#
# Request redirect of texts from one conference to another or to e-mail
#
8 : redirect (conference)
{
supervisor-only = true;
validate = "^(LysKOM|E-mail):";
}
#
# Graphics in compface format
#
9 : x-face (conference, server)
{
secret = false;
hide-creator = false;
supervisor-only = true;
inherit = false;
inherit-limit = 1;
}
#
# Alternate name (subject or name) selected by the creator
#
10 : alternate-name (text, conference)
{
inherit = false;
}
#
# PGP signature of a text (created with pgp -fsba)
#
11 : pgp-signature (text)
{
permanent = true;
hide-creator = false;
inherit = false;
inherit-limit = 1;
}
#
# Public key of a person
#
12 : pgp-public-key (letterbox)
{
author-only = true;
hide-creator = false;
inherit = false;
inherit-limit = 1;
}
#
# E-mail address of a person or conference
#
13 : e-mail-address (conference, letterbox, server)
{
author-only = true;
hide-creator = false;
inherit = false;
inherit-limit = 1;
}
/*
* $Id: config.h,v 0.13 1994/06/18 18:48:14 ceder Exp $
* $Id: config.h,v 0.14 1997/09/13 15:31:38 byers Exp $
* Copyright (C) 1991, 1992, 1993, 1994 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -54,6 +54,7 @@
extern const char *DEFAULT_DBASE_DIR;
extern const char *CONFIG_FILE;
extern const char *AUX_DEF_FILE;
/* Communications */
......
/*
* $Id: kom-errno.h,v 0.13 1996/08/25 19:51:11 ceder Exp $
* $Id: kom-errno.h,v 0.14 1997/09/13 15:31:39 byers Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -85,6 +85,12 @@ typedef enum
KOM_TEMPFAIL = 45, /* Try again later. */
KOM_LONG_ARRAY = 46, /* Too long array supplied. */
KOM_ANON_REJECTED = 47, /* Anonymous text not allowed in conference. */
KOM_ILL_AUX = 48, /* Bad misc item */
KOM_AUX_PERM = 49, /* No permission to set aux */
KOM_UNKNOWN_ASYNC = 50, /* Accepting an unknown async message */
KOM_INTERNAL_ERROR = 51, /* Internal server error */
KOM_FEATURE_DISABLED = 52, /* Server feature is disabled */
KOM_MESSAGE_NOT_SENT = 53, /* Message not sent (no recipient found) */
KOM_num_errs /* End marker */
} Kom_err;
......
/*
* $Id: kom-types.h,v 0.23 1996/09/12 17:14:31 inge Exp $
* $Id: kom-types.h,v 0.24 1997/09/13 15:31:40 byers Exp $
* Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -170,7 +170,8 @@ typedef enum {
loc_no = 6, /* 6 Sequence number within conference */
rec_time = 7, /* 7 Received at (time) */
sent_by = 8, /* 8 Sent by (person) */
sent_at = 9 /* 9 Sent at (time) */
sent_at = 9, /* 9 Sent at (time) */
bcc_recpt = 15 /* 15 BCC recipient (for kannedom) */
#ifdef PROT_a
,
x_person = 11, /* 11 External person id. (Global_name). */
......@@ -187,6 +188,7 @@ typedef String Global_name;
typedef union {
Conf_no recipient;
Conf_no cc_recipient;
Conf_no bcc_recipient;
Text_no comment_to;
Text_no commented_in;
Text_no footnote_to;
......@@ -217,6 +219,34 @@ typedef struct {
} Misc_info;
typedef struct {
unsigned int deleted : 1; /* This item has been deleted */
unsigned int inherit : 1; /* Copy to comments */
unsigned int secret : 1; /* Don't show anyone */
unsigned int hide_creator : 1; /* Don't show the creator */
unsigned int reserved2 : 1;
unsigned int reserved3 : 1;
unsigned int reserved4 : 1;
unsigned int reserved5 : 1;
} Aux_item_flags;
typedef struct {
unsigned long aux_no;
Pers_no creator;
Time sent_at;
Aux_item_flags flags;
unsigned long inherit_limit;
unsigned long tag;
String data;
} Aux_item;
typedef struct {
unsigned short length;
Aux_item * items;
} Aux_item_list;
/* Fields of this type is supposed to tell the garbage collector
* which texts it should remove first.
*/
......@@ -234,7 +264,9 @@ typedef struct {
String_size no_of_chars;
unsigned short no_of_marks; /* Antal markeringar */
unsigned short no_of_misc; /* Recipients, times, comments, ... */
unsigned long highest_aux;
Misc_info * misc_items; /* List of miscellaneous info. */
Aux_item_list aux_item_list;
} Text_stat;
......@@ -357,6 +389,8 @@ typedef struct {
Conf_no motd_conf; /* Conf that receive motds */
Conf_no kom_news_conf; /* News about kom */
Text_no motd_of_lyskom; /* To be displayed after login */
long highest_aux_no; /* Last aux-item number */
Aux_item_list aux_item_list; /* System aux items */
/* and maybe more... */
} Info;
......@@ -385,7 +419,10 @@ typedef struct {
conf is referenced by the user. */
Garb_nice nice; /* How long do texts in this
conf live? */
Garb_nice expire; /* When do we auto-kill this */
String name; /* Name of conference */
unsigned long highest_aux;
Aux_item_list aux_item_list;
#ifdef CLIENT
unsigned short no_of_members;
Local_text_no first_local_no;
......@@ -431,7 +468,7 @@ typedef struct {
unsigned long no_of_text_fetches; /* (statistics) */
unsigned short created_persons; /* (statistics) */
unsigned short created_confs; /* (statistics) */
String username; /* User-name & hostname */
String username; /* User-name & hostname */
#ifdef CLIENT
Local_text_no first_created_text; /* The first text that still
* exists. */
......
/*
* $Id: services.h,v 0.31 1996/08/03 21:03:15 ceder Exp $
* $Id: services.h,v 0.32 1997/09/13 15:31:41 byers Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -148,21 +148,24 @@ KOM_( user_active (void));
* Create a new person. Returns 0 if any error occured.
*/
extern Pers_no
KOM_( create_person (const String name,
const String passwd ));
KOM_( create_person_old (const String name,
const String passwd ));
extern Pers_no
KOM_( create_person (const String name,
const String passwd,
Aux_item_list *conf_aux ));
/* Obsolete call; use get_person_stat instead. */
extern Success
KOM_( get_person_stat_old (Pers_no person,
int mask,
Person * result ));
int mask,
Person * result ));
extern Success
KOM_( get_person_stat (Pers_no person,
Person * result ));
Person * result ));
extern Success
KOM_( get_created_texts (Pers_no person,
......@@ -215,8 +218,18 @@ KOM_( set_user_area(Pers_no pers_no,
extern Conf_no
KOM_( create_conf (const String name,
Conf_type type ));
KOM_( create_conf_old (const String name,
Conf_type type ));
extern Conf_no
KOM_( create_conf (const String name,
Conf_type type,
Aux_item_list *aux ));
extern Success
KOM_ ( modify_conf_info (Conf_no conf_no,
Number_list *items_to_delete,
Aux_item_list *items_to_add));
/* Delete a conference. Also used to delete persons. */
......@@ -269,10 +282,17 @@ KOM_( re_z_lookup (const String regexp,
int want_confs,
Conf_z_info_list *result));
extern Success
KOM_( get_collate_table (String * result));
extern Success