diff --git a/ChangeLog b/ChangeLog index 778913788..84b6bda5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-07-12 Badlop + + * src/configure.ac: Improve legibility + * src/aclocal.m4: Likewise + * src/configure: Likewise + + * src/ejabberdctl.template: Remove garbage variable. Document node + option + + * doc/guide.tex: Add references to sections. + * doc/guide.html: Likewise + 2008-07-11 Badlop * src/mod_register.erl: Revert support for io_lib newline, since diff --git a/doc/guide.html b/doc/guide.html index d1841a4cb..a3963637b 100644 --- a/doc/guide.html +++ b/doc/guide.html @@ -333,14 +333,14 @@ Alternatively, the latest development version can be retrieved from the Subversi

To compile ejabberd execute the commands:

./configure
 make
-

The build configuration script provides several parameters. +

The build configuration script allows several options. To get the full list run the command:

./configure --help
 

Some options that you may be interested in modifying:

--prefix=/
Specify the path prefix where the files will be copied when running the make install command.

--enable-pam
- Enable the PAM authentication method.

--enable-odbc or --enable-mssql
+ Enable the PAM authentication method (see section 3.1.4).

--enable-odbc or --enable-mssql
Required if you want to use an external database. See section 3.2 for more information.

--enable-full-xml
Enable the use of XML based optimisations. @@ -351,7 +351,8 @@ To get the full list run the command:

2.4.4  Install

To install ejabberd in the destination directories, run the command:

make install
-

Note that you may need to have administrative privileges in the system.

The files and directories created are, by default: +

Note that you probably need administrative privileges in the system +to install ejabberd.

The files and directories created are, by default:

/etc/ejabberd/
Configuration files:
@@ -359,7 +360,7 @@ To get the full list run the command:
ejabberdctl.cfg
Configuration file of the administration script
inetrc
Network DNS configuration
-
/sbin/ejabberdctl
Administration script +
/sbin/ejabberdctl
Administration script (see section 4.1)
/var/lib/ejabberd/
.erlang.cookie
Erlang cookie file (see section 5.3) @@ -367,7 +368,8 @@ To get the full list run the command:
ebin
Binary Erlang files (*.beam)
priv
- lib
Binary system libraries (*.so) + bin
Binary C programs +
lib
Binary system libraries (*.so)
msgs
Translated strings (*.msgs)
@@ -939,7 +941,7 @@ for more information.

Though it is quite easy to set up PAM support in ejabberd, PAM itself introduces some security issues:

  • To perform PAM authentication ejabberd uses external C-program called -epam. By default, it is located in /var/lib/ejabberd/priv/lib/ +epam. By default, it is located in /var/lib/ejabberd/priv/bin/ directory. You have to set it root on execution in the case when your PAM module requires root privileges (pam_unix.so for example). Also you have to grant access for ejabberd to this file and remove all other permissions from it. diff --git a/doc/guide.tex b/doc/guide.tex index 49e40400d..b5dbc41da 100644 --- a/doc/guide.tex +++ b/doc/guide.tex @@ -313,7 +313,7 @@ To compile \ejabberd{} execute the commands: make \end{verbatim} -The build configuration script provides several parameters. +The build configuration script allows several options. To get the full list run the command: \begin{verbatim} ./configure --help @@ -325,7 +325,7 @@ Some options that you may be interested in modifying: Specify the path prefix where the files will be copied when running the make install command. \titem{--enable-pam} - Enable the PAM authentication method. + Enable the PAM authentication method (see section \ref{pam}). \titem{--enable-odbc or --enable-mssql} Required if you want to use an external database. @@ -348,7 +348,8 @@ To install \ejabberd{} in the destination directories, run the command: \begin{verbatim} make install \end{verbatim} -Note that you may need to have administrative privileges in the system. +Note that you probably need administrative privileges in the system +to install \term{ejabberd}. The files and directories created are, by default: \begin{description} @@ -358,7 +359,7 @@ The files and directories created are, by default: \titem{ejabberdctl.cfg} Configuration file of the administration script \titem{inetrc} Network DNS configuration \end{description} - \titem{/sbin/ejabberdctl} Administration script + \titem{/sbin/ejabberdctl} Administration script (see section~\ref{ejabberdctl}) \titem{/var/lib/ejabberd/} \begin{description} \titem{.erlang.cookie} Erlang cookie file (see section \ref{cookie}) @@ -366,6 +367,7 @@ The files and directories created are, by default: \titem{ebin} Binary Erlang files (*.beam) \titem{priv} \begin{description} + \titem{bin} Binary C programs \titem{lib} Binary system libraries (*.so) \titem{msgs} Translated strings (*.msgs) \end{description} @@ -393,6 +395,7 @@ ejabberd is running ejabberdctl stop \end{verbatim} + Please refer to the section~\ref{ejabberdctl} for details about \term{ejabberdctl}, and configurable options to fine tune the Erlang runtime system. @@ -1117,7 +1120,7 @@ security issues: \begin{itemize} \item To perform PAM authentication \ejabberd{} uses external C-program called -\term{epam}. By default, it is located in \verb|/var/lib/ejabberd/priv/lib/| +\term{epam}. By default, it is located in \verb|/var/lib/ejabberd/priv/bin/| directory. You have to set it root on execution in the case when your PAM module requires root privileges (\term{pam\_unix.so} for example). Also you have to grant access for \ejabberd{} to this file and remove all other permissions from it. diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 46020d339..a1c9416ba 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -1,6 +1,6 @@ AC_DEFUN(AM_WITH_EXPAT, [ AC_ARG_WITH(expat, - [ --with-expat=PREFIX prefix where EXPAT is installed]) + [AC_HELP_STRING([--with-expat=PREFIX], [prefix where EXPAT is installed])]) EXPAT_CFLAGS= EXPAT_LIBS= @@ -34,7 +34,7 @@ AC_DEFUN(AM_WITH_EXPAT, AC_DEFUN(AM_WITH_ZLIB, [ AC_ARG_WITH(zlib, - [ --with-zlib=PREFIX prefix where zlib is installed]) + [AC_HELP_STRING([--with-zlib=PREFIX], [prefix where zlib is installed])]) ZLIB_CFLAGS= ZLIB_LIBS= @@ -68,7 +68,7 @@ AC_DEFUN(AM_WITH_ZLIB, AC_DEFUN(AM_WITH_PAM, [ AC_ARG_WITH(pam, - [ --with-pam=PREFIX prefix where PAM is installed]) + [AC_HELP_STRING([--with-pam=PREFIX], [prefix where PAM is installed])]) PAM_CFLAGS= PAM_LIBS= @@ -102,7 +102,7 @@ AC_DEFUN(AM_WITH_PAM, AC_DEFUN(AM_WITH_ERLANG, [ AC_ARG_WITH(erlang, - [ --with-erlang=PREFIX path to erlc and erl ]) + [AC_HELP_STRING([--with-erlang=PREFIX], [path to erlc and erl])]) AC_PATH_TOOL(ERLC, erlc, , $with_erlang:$with_erlang/bin:$PATH) AC_PATH_TOOL(ERL, erl, , $with_erlang:$with_erlang/bin:$PATH) @@ -195,14 +195,13 @@ _EOF AC_SUBST(ERL) ]) - AC_DEFUN(AC_MOD_ENABLE, [ $1= make_$1= AC_MSG_CHECKING([whether build $1]) AC_ARG_ENABLE($1, - [ --enable-$1 enable $1 (default: $2)], + [AC_HELP_STRING([--enable-$1], [enable $1 (default: $2)])], [mr_enable_$1="$enableval"], [mr_enable_$1=$2]) if test "$mr_enable_$1" = "yes"; then @@ -223,7 +222,7 @@ AC_DEFUN([AM_ICONV], dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_ARG_WITH([libiconv-prefix], -[ --with-libiconv-prefix=PREFIX prefix where libiconv is installed], [ + [AC_HELP_STRING([--with-libiconv-prefix=PREFIX], [prefix where libiconv is installed])], [ for dir in `echo "$withval" | tr : ' '`; do if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi if test -d $dir/include; then CFLAGS="$CFLAGS -I$dir/include"; fi @@ -308,7 +307,7 @@ size_t iconv(); dnl AC_DEFUN(AM_WITH_OPENSSL, [ AC_ARG_WITH(openssl, - [ --with-openssl=PREFIX prefix where OPENSSL is installed ]) + [AC_HELP_STRING([--with-openssl=PREFIX], [prefix where OPENSSL is installed])]) unset SSL_LIBS; unset SSL_CFLAGS; have_openssl=no diff --git a/src/configure b/src/configure index 5829e2d95..e484e110c 100755 --- a/src/configure +++ b/src/configure @@ -1281,31 +1281,39 @@ if test -n "$ac_init_help"; then Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-mod_pubsub enable mod_pubsub (default: yes) + --enable-mod_pubsub enable mod_pubsub (default: yes) --enable-mod_irc enable mod_irc (default: yes) --enable-mod_muc enable mod_muc (default: yes) - --enable-mod_proxy65 enable mod_proxy65 (default: yes) - --enable-eldap enable eldap (default: yes) - --enable-pam enable pam (default: no) - --enable-web enable web (default: yes) - --enable-tls enable tls (default: yes) - --enable-odbc enable odbc (default: no) - --enable-ejabberd_zlib enable ejabberd_zlib (default: yes) - --enable-hipe Compile natively with HiPE, not recommended (default: no) - --enable-roster-gateway-workaround Turn on workaround for processing gateway subscriptions (default: no) - --enable-mssql Use Microsoft SQL Server database (default: no, requires --enable-odbc) - --enable-transient_supervisors Use Erlang supervision for transient process (default: yes) - --enable-full-xml Use XML features in XMPP stream (ex: CDATA) (default: no, requires XML compliant clients) + --enable-mod_proxy65 enable mod_proxy65 (default: yes) + --enable-eldap enable eldap (default: yes) + --enable-pam enable pam (default: no) + --enable-web enable web (default: yes) + --enable-tls enable tls (default: yes) + --enable-odbc enable odbc (default: no) + --enable-ejabberd_zlib enable ejabberd_zlib (default: yes) + --enable-hipe compile natively with HiPE, not recommended + (default: no) + --enable-roster-gateway-workaround + turn on workaround for processing gateway + subscriptions (default: no) + --enable-mssql use Microsoft SQL Server database (default: no, + requires --enable-odbc) + --enable-transient_supervisors + use Erlang supervision for transient process + (default: yes) + --enable-full-xml use XML features in XMPP stream (ex: CDATA) + (default: no, requires XML compliant clients) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-erlang=PREFIX path to erlc and erl - --with-libiconv-prefix=PREFIX prefix where libiconv is installed - --with-expat=PREFIX prefix where EXPAT is installed - --with-zlib=PREFIX prefix where zlib is installed - --with-pam=PREFIX prefix where PAM is installed - --with-openssl=PREFIX prefix where OPENSSL is installed + --with-libiconv-prefix=PREFIX + prefix where libiconv is installed + --with-expat=PREFIX prefix where EXPAT is installed + --with-zlib=PREFIX prefix where zlib is installed + --with-pam=PREFIX prefix where PAM is installed + --with-openssl=PREFIX prefix where OPENSSL is installed Some influential environment variables: CC C compiler command diff --git a/src/configure.ac b/src/configure.ac index 254b16b06..15d099dc2 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -48,7 +48,7 @@ AC_MOD_ENABLE(odbc, no) AC_MOD_ENABLE(ejabberd_zlib, yes) AC_ARG_ENABLE(hipe, -[ --enable-hipe Compile natively with HiPE, not recommended (default: no)], +[AC_HELP_STRING([--enable-hipe], [compile natively with HiPE, not recommended (default: no)])], [case "${enableval}" in yes) hipe=true ;; no) hipe=false ;; @@ -57,7 +57,7 @@ esac],[hipe=false]) AC_SUBST(hipe) AC_ARG_ENABLE(roster_gateway_workaround, -[ --enable-roster-gateway-workaround Turn on workaround for processing gateway subscriptions (default: no)], +[AC_HELP_STRING([--enable-roster-gateway-workaround], [turn on workaround for processing gateway subscriptions (default: no)])], [case "${enableval}" in yes) roster_gateway_workaround=true ;; no) roster_gateway_workaround=false ;; @@ -66,7 +66,7 @@ esac],[roster_gateway_workaround=false]) AC_SUBST(roster_gateway_workaround) AC_ARG_ENABLE(mssql, -[ --enable-mssql Use Microsoft SQL Server database (default: no, requires --enable-odbc)], +[AC_HELP_STRING([--enable-mssql], [use Microsoft SQL Server database (default: no, requires --enable-odbc)])], [case "${enableval}" in yes) db_type=mssql ;; no) db_type=generic ;; @@ -75,7 +75,7 @@ esac],[db_type=generic]) AC_SUBST(db_type) AC_ARG_ENABLE(transient_supervisors, -[ --enable-transient_supervisors Use Erlang supervision for transient process (default: yes)], +[AC_HELP_STRING([--enable-transient_supervisors], [use Erlang supervision for transient process (default: yes)])], [case "${enableval}" in yes) transient_supervisors=true ;; no) transient_supervisors=false ;; @@ -84,7 +84,7 @@ esac],[transient_supervisors=true]) AC_SUBST(transient_supervisors) AC_ARG_ENABLE(full_xml, -[ --enable-full-xml Use XML features in XMPP stream (ex: CDATA) (default: no, requires XML compliant clients)], +[AC_HELP_STRING([--enable-full-xml], [use XML features in XMPP stream (ex: CDATA) (default: no, requires XML compliant clients)])], [case "${enableval}" in yes) full_xml=true ;; no) full_xml=false ;; diff --git a/src/ejabberdctl.template b/src/ejabberdctl.template index e086d1ef4..fc768fe3d 100644 --- a/src/ejabberdctl.template +++ b/src/ejabberdctl.template @@ -135,7 +135,6 @@ live () echo "" erl \ $NAME $ERLANG_NODE \ - $ERLANG_OPTS \ -pa $EJABBERD_EBIN \ -mnesia dir "\"$EJABBERD_DB\"" \ -s ejabberd \ @@ -165,6 +164,7 @@ ctl () echo " --ctl-config file Config file of ejabberdctl: $CONFIG" echo " --logs dir Directory for logs: $LOGS_DIR" echo " --spool dir Database spool dir: $EJABBERD_DB" + echo " --node nodename ejabberd node name: $ERLANG_NODE" echo "";; esac return $result