Commit a13049b8 a13049b8b49c168e64fbb9f54e95ef0ef9f215cd by Sergey Poznyakoff

* README-alpha: Update.

* auth/pam.c (mu_pam_module_init): Use struct.
* include/mailutils/gocs.h (struct mu_gocs_pam): New data type.
* include/mailutils/libcfg.h (mu_sieve_cfg_capa)
(mu_daemon_cfg_capa,mu_auth_cfg_capa): New declarations.
* libargp/common.c (mu_daemon_argp_parser): Handle ARGP_KEY_INIT.
* libargp/pam.c (service_name): Remove.
(pam_settings): Add new variable.
(mu_pam_argp_parser): Reflect this.
* libcfg/auth.c (mu_auth_section_parser): New function.
(mu_auth_cfg_capa): New variable.
* libcfg/common.c (mu_daemon_section_parser): Handle
mu_cfg_section_start.
* libcfg/init.c (cfg_capa_table): Add auth, sieve, daemon.
(reserved_name): Remove auth and daemon.
* mailbox/Makefile.am (EXTRA_DIST): Remove @MU_EXTRA_DIST@.
* mailbox/daemon.c (mu_gocs_daemon_init): Remove extra checks.
* mailbox/mu_auth.c (_add_module_list): Skip delimiters.
* po/POTFILES.in: Update.
1 parent d454d077
2007-11-20 Sergey Poznyakoff <gray@gnu.org.ua>
* README-alpha: Update.
* auth/pam.c (mu_pam_module_init): Use struct.
* include/mailutils/gocs.h (struct mu_gocs_pam): New data type.
* include/mailutils/libcfg.h (mu_sieve_cfg_capa)
(mu_daemon_cfg_capa,mu_auth_cfg_capa): New declarations.
* libargp/common.c (mu_daemon_argp_parser): Handle ARGP_KEY_INIT.
* libargp/pam.c (service_name): Remove.
(pam_settings): Add new variable.
(mu_pam_argp_parser): Reflect this.
* libcfg/auth.c (mu_auth_section_parser): New function.
(mu_auth_cfg_capa): New variable.
* libcfg/common.c (mu_daemon_section_parser): Handle
mu_cfg_section_start.
* libcfg/init.c (cfg_capa_table): Add auth, sieve, daemon.
(reserved_name): Remove auth and daemon.
* mailbox/Makefile.am (EXTRA_DIST): Remove @MU_EXTRA_DIST@.
* mailbox/daemon.c (mu_gocs_daemon_init): Remove extra checks.
* mailbox/mu_auth.c (_add_module_list): Skip delimiters.
* po/POTFILES.in: Update.
2007-11-19 Sergey Poznyakoff <gray@gnu.org.ua>
* configure.ac: Add AM_PROG_LIBTOOL.
......
......@@ -5,13 +5,10 @@ or CVS version of the package. See end of file for copying conditions.
* Introduction
This is a *pre-release* version, and not ready for production use
yet. If you are taking source from CVS, you will need to have libtool,
automake, and autoconf installed to help contribute. See the chapter
`Building' for the detailed instructions. The script autogen.sh is
provided to help autoconfigure mailutils from the cvs src. After you
run autogen.sh, there should be a file 'INSTALL' with (generic)
installation instructions. Package-specific installation instructions
are set forth in the file README.
yet. If you are taking source from CVS, you will need to have several
special tools to help contribute. See the file README-hacking for more
information, See chapter `Building' for the detailed instructions on
how to build the package.
Please, note that the accompanying documentation may be inaccurate
or incomplete. The ChangeLog file is the authoritative documentation of
......@@ -33,35 +30,13 @@ contact the mailing list.
* Building
In order to build this you will first need to have right versions
of autotools and some auxiliary GNU programs. At the time of this
writing these are:
Package Version (>=)
======== ============
automake 1.8.5
autoconf 2.59
libtool 1.5.8
gettext 0.14.1
gawk 3.1.3
You will also need bison (or yacc) and flex. The grammar sources
were written so that any version of yacc or bison should be able to
handle them, however using recent bison is anyway recommended. The lex
sources could theoretically be compiled with AT&T lex. I have not
tested this, however, so using flex is higly recommended. I use flex
2.5.4.
To prepare the package for building run autogen.sh. This may spit out
several warnings like:
pop3d_OBJECTS:.$(OBJEXT: non-POSIX variable name
Ignore them, these are due to the bug in automake. Then run
./configure with the desired options (See INSTALL and README for the
detailed instructions). Finally, run make. Notice that the first make
of the package should be made in the source directory. Subsequent
makes can use build directory different from the source one.
Usual procedures apply:
./configure
make
make install
See INSTALL and README for the detailed instructions.
* Debugging
......@@ -79,7 +54,7 @@ any of the mailutils programs. The option instructs the program to
sleep for a given number of seconds (3600 by default) right after
startup. For example, to debug `mimeview' utility, run
mimeview --HANG [OTHER-OPTIONS]
mimeview --HANG [OTHER-OPTIONS]
Then switch to another terminal, get the PID of the ivoked utility and
attach to it using gdb:
......@@ -92,35 +67,6 @@ Once in gdb, issue the following command
Now set your breakpoints and proceed as usual.
* Importing gnulib files
Mailutils imports several source files from gnulib. These go
mainly to the conventional library libmuaux (directory lib/), but
several of them are incorporated into the main library libmailutils
(directory mailbox/). The imported sources are kept in the CVS
repository to avoid using eventually unstable versions appearing in
the main gnulib CVS. Once in a time we update the sources. The update
procedure is quite straightforward: change to the root directory of
the mailutils tree and run `gnulib-sync' script:
$ cd mailutils
$ scripts/gnulib-sync $HOME/src/gnulib
The script takes a single argument: the name of the directory with the
copy of gnulib source tree (see http://savannah.gnu.org/projects/gnulib
for information on how to obtain gnulib sources). After incorporating
the files, gnulib-sync leaves in the current directory two files named
gnulib.changelog and gnulib.cvs. The file gnulib.changelog contains
an entry to be prepended to ChangeLog, the file gnulib.cvs is a shell
script with the commands necessary to incorporate all the changes into
CVS.
If you need to add more gnulib modules to mailutils, add their
names to gnulib.modules file, following the instructions in its
heading comment. Please avoid placing modules in :mailutils section, as
this may lead to unwanted name clashes when linking user programs with
libmailutils.
* Copyright information:
Copyright (C) 2002, 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
......
......@@ -149,7 +149,10 @@ int
mu_pam_module_init (void *data)
{
if (data)
mu_pam_service = strdup (data);
{
struct mu_gocs_pam *p = data;
mu_pam_service = p->service ? strdup (p->service) : p->service;
}
return 0;
}
......
......@@ -68,6 +68,11 @@ struct mu_gocs_mailer
char *mailer;
};
struct mu_gocs_pam
{
char *service;
};
/* Auxiliary variables for use by libargp/libcfg */
extern int mu_load_user_rcfile;
extern int mu_load_site_rcfile;
......
......@@ -92,6 +92,9 @@ extern struct mu_cfg_capa mu_radius_cfg_capa;
extern struct mu_cfg_capa mu_sql_cfg_capa;
extern struct mu_cfg_capa mu_tls_cfg_capa;
extern struct mu_cfg_capa mu_virtdomain_cfg_capa;
extern struct mu_cfg_capa mu_sieve_cfg_capa;
extern struct mu_cfg_capa mu_daemon_cfg_capa;
extern struct mu_cfg_capa mu_auth_cfg_capa;
#ifdef __cplusplus
}
......
......@@ -498,6 +498,10 @@ mu_daemon_argp_parser (int key, char *arg, struct argp_state *state)
daemon_settings.transcript = 1;
break;
case ARGP_KEY_INIT:
daemon_settings = mu_gocs_daemon;
break;
case ARGP_KEY_FINI:
mu_gocs_store ("daemon", &daemon_settings);
break;
......
......@@ -23,7 +23,7 @@
#include "mailutils/libargp.h"
#include <mailutils/pam.h>
static char *service_name;
static struct mu_gocs_pam pam_settings;
static error_t
mu_pam_argp_parser (int key, char *arg, struct argp_state *state)
......@@ -31,11 +31,11 @@ mu_pam_argp_parser (int key, char *arg, struct argp_state *state)
switch (key)
{
case OPT_PAM_SERVICE:
service_name = arg;
pam_settings.service = arg;
break;
case ARGP_KEY_FINI:
mu_gocs_store ("pam", service_name);
mu_gocs_store ("pam", &pam_settings);
break;
default:
......
......@@ -54,5 +54,22 @@ static struct mu_cfg_param mu_auth_param[] = {
{ NULL }
};
/* FIXME: init? */
int
mu_auth_section_parser
(enum mu_cfg_section_stage stage, const mu_cfg_node_t *node,
void *section_data, void *call_data)
{
switch (stage)
{
case mu_cfg_section_start:
break;
case mu_cfg_section_end:
mu_auth_finish_setup ();
}
return 0;
}
struct mu_cfg_capa mu_auth_cfg_capa = {
"auth", mu_auth_param, mu_auth_section_parser
};
......
......@@ -127,4 +127,24 @@ static struct mu_cfg_param mu_daemon_param[] = {
{ NULL }
};
DCL_CFG_CAPA (daemon);
int
mu_daemon_section_parser
(enum mu_cfg_section_stage stage, const mu_cfg_node_t *node,
void *section_data, void *call_data)
{
switch (stage)
{
case mu_cfg_section_start:
daemon_settings = mu_gocs_daemon;
break;
case mu_cfg_section_end:
mu_gocs_store ("daemon", &daemon_settings);
}
return 0;
}
struct mu_cfg_capa mu_daemon_cfg_capa = {
"daemon", mu_daemon_param, mu_daemon_section_parser
};
......
......@@ -24,6 +24,7 @@
struct mu_cfg_capa *cfg_capa_table[] = {
#define S(c) &__mu_common_cat3__(mu_,c,_cfg_capa)
S (auth),
S (mailbox),
S (locking),
S (address),
......@@ -35,6 +36,8 @@ struct mu_cfg_capa *cfg_capa_table[] = {
S (sql),
S (tls),
S (virtdomain),
S (sieve),
S (daemon),
NULL
};
......@@ -52,7 +55,7 @@ find_cfg_capa (const char *name)
static int
reserved_name (const char *name)
{
static char *reserved[] = { "auth", "common", "daemon", "license", NULL };
static char *reserved[] = { "common", "license", NULL };
char **p;
for (p = reserved; *p; p++)
if (strcmp (name, *p) == 0)
......
# intmax.m4 serial 3 (gettext-0.16)
# intmax.m4 serial 2 (gettext-0.14.2)
dnl Copyright (C) 2002-2005 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -22,10 +22,7 @@ AC_DEFUN([gt_TYPE_INTMAX_T],
#if HAVE_INTTYPES_H_WITH_UINTMAX
#include <inttypes.h>
#endif
], [intmax_t x = -1;
return !x;],
gt_cv_c_intmax_t=yes,
gt_cv_c_intmax_t=no)])
], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
if test $gt_cv_c_intmax_t = yes; then
AC_DEFINE(HAVE_INTMAX_T, 1,
[Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
......
# inttypes-pri.m4 serial 4 (gettext-0.16)
# inttypes-pri.m4 serial 2 (gettext-0.15)
dnl Copyright (C) 1997-2002, 2006 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
......@@ -6,15 +6,13 @@ dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
AC_PREREQ(2.52)
# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
# macros to non-string values. This is the case on AIX 4.3.3.
AC_DEFUN([gt_INTTYPES_PRI],
[
AC_CHECK_HEADERS([inttypes.h])
if test $ac_cv_header_inttypes_h = yes; then
AC_REQUIRE([gl_HEADER_INTTYPES_H])
if test $gl_cv_header_inttypes_h = yes; then
AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
gt_cv_inttypes_pri_broken,
[
......@@ -28,9 +26,5 @@ char *p = PRId32;
if test "$gt_cv_inttypes_pri_broken" = yes; then
AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
[Define if <inttypes.h> exists and defines unusable PRI* macros.])
PRI_MACROS_BROKEN=1
else
PRI_MACROS_BROKEN=0
fi
AC_SUBST([PRI_MACROS_BROKEN])
])
......
# inttypes_h.m4 serial 7
dnl Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc.
# inttypes_h.m4 serial 6
dnl Copyright (C) 1997-2004 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
......@@ -15,7 +15,7 @@ AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
[AC_TRY_COMPILE(
[#include <sys/types.h>
#include <inttypes.h>],
[uintmax_t i = (uintmax_t) -1; return !i;],
[uintmax_t i = (uintmax_t) -1;],
gl_cv_header_inttypes_h=yes,
gl_cv_header_inttypes_h=no)])
if test $gl_cv_header_inttypes_h = yes; then
......
......@@ -33,7 +33,7 @@ AM_CPPFLAGS = \
-DSITE_VIRTUAL_PWDDIR=\"@SITE_VIRTUAL_PWDDIR@\"\
-DLOCALEDIR=\"$(localedir)\"
EXTRA_DIST = @MU_EXTRA_DIST@ errors muerrno.cin parsedate.y fgetpwent.c cfg_parser.y cfg_parser.h inttostr.c
EXTRA_DIST = errors muerrno.cin parsedate.y fgetpwent.c cfg_parser.y cfg_parser.h inttostr.c inttostr.h
libmailutils_la_SOURCES = \
address.c\
......
......@@ -87,12 +87,6 @@ mu_gocs_daemon_init (void *data)
{
struct mu_gocs_daemon *cfg = data;
mu_gocs_daemon = *cfg;
if (mu_gocs_daemon.maxchildren)
mu_gocs_daemon.mode = MODE_DAEMON;
if (mu_gocs_daemon.pidfile)
mu_gocs_daemon.mode = MODE_DAEMON;
}
return 0;
}
......
......@@ -319,7 +319,7 @@ _add_module_list (const char *modlist, int (*fun)(const char *name))
exit (1);
}
for (i = 0; i < argc; i++)
for (i = 0; i < argc; i += 2)
{
if (fun (argv[i]))
{
......
......@@ -27,6 +27,9 @@ imap4d/login.c
imap4d/search.c
imap4d/signal.c
imap4d/util.c
lib/argp-help.c
lib/argp-parse.c
lib/getopt.c
lib/mailcap.c
lib/xmalloc.c
libargp/mu_argp.c
......@@ -94,12 +97,9 @@ mail/summary.c
mail/unalias.c
mail/util.c
mail/z.c
mailbox/argp-help.c
mailbox/argp-parse.c
mailbox/errors
mailbox/file_stream.c
mailbox/filter_iconv.c
mailbox/getopt.c
mailbox/message.c
mailbox/mu_auth.c
mailbox/mutil.c
......