From 9d27767c5a68e83d8910f602d66f4df2b5491689 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Wed, 24 Sep 2008 16:45:34 +0200 Subject: doc fix: the gss-api output plugin is called omgssapi Signed-off-by: Rainer Gerhards --- doc/rsyslog_conf.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/rsyslog_conf.html b/doc/rsyslog_conf.html index 330fd51c..68b7da61 100644 --- a/doc/rsyslog_conf.html +++ b/doc/rsyslog_conf.html @@ -29,7 +29,7 @@ what they do (list is currently not complete)

trap output module
  • omrelp - RELP output module
  • -
  • omgss - output module for GSS-enabled syslog
  • +
  • omgssapi - output module for GSS-enabled syslog
  • ommysql - output module for MySQL
  • ompgsql - output module for PostgreSQL
  • omlibdbi - @@ -45,7 +45,7 @@ input module
  • imtcp - input plugin for plain tcp syslog
  • imgssapi - -input plugin for plain tcp and GSS-enable syslog
  • +input plugin for plain tcp and GSS-enabled syslog
  • immark - support for mark messages
  • imklog - kernel logging
  • imuxsock - -- cgit From 58d52a638e453ec4650b01fb5590aeed7416afe3 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 24 Sep 2008 17:51:56 +0200 Subject: added index.html as an entry point to the manual thanks to Michael Biebl for suggesting it --- doc/Makefile.am | 1 + doc/index.html | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 doc/index.html diff --git a/doc/Makefile.am b/doc/Makefile.am index 518b90ed..948cb719 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,4 +1,5 @@ html_files = \ + index.html \ bugs.html \ debug.html \ features.html \ diff --git a/doc/index.html b/doc/index.html new file mode 100644 index 00000000..349c8e57 --- /dev/null +++ b/doc/index.html @@ -0,0 +1,32 @@ + +Welcome to rsyslog + +

    Welcome to rsyslog

    +

    Rsyslog +is an enhanced syslogd suitable both for small systems as +well as large enterprises. +

    This page provide a few quick pointers which hopefully make your +experience with rsyslog a pleasant one. These are +

      +
    • Most importantly, the rsyslog manual - this points to locally +installed documentation which exactly matches the version you have installed. +It is highly suggested to at least briefly look over these files. +
    • The rsyslog web site which offers +probably every information you'll ever need (ok, just kidding...). +
    • The project status page provides +information on current releases +
    • and the troubleshooting guide hopefully helps if +things do not immediately work out +
    +

    In general, rsyslog supports plain old syslog.conf format, except that the +config file is now called rsyslog.conf. This should help you get started +quickly. +To do the really cool things, though, +you need to learn a bit about its new features. +The man pages offer a bare minimum of information (and are still quite long). Read the +html documentation instead. +When you change the configuration, +remember to restart (or HUP) rsyslogd, because otherwise it won't use your +new settings (and you'll end up totally puzzled why this great config of yours +does not even work a bit...;)) + -- cgit From 8a1f6b17698974a1e36c1f0134e4bc4c51c7539f Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 1 Oct 2008 10:44:56 +0200 Subject: added doc on how to build from source repository --- ChangeLog | 5 +++-- README | 2 +- doc/Makefile.am | 1 + doc/build_from_repo.html | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ doc/install.html | 19 ++++++++++++++--- doc/manual.html | 1 + doc/rsyslog_conf.html | 3 +-- 7 files changed, 77 insertions(+), 8 deletions(-) create mode 100644 doc/build_from_repo.html diff --git a/ChangeLog b/ChangeLog index da644d28..f16ac398 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,13 +1,14 @@ --------------------------------------------------------------------------- Version 3.18.5 (rgerhards), 2008-10-?? -- added doc on malformed messages, cause and how to work-around, to the - doc set - bugfix: imudp input module could cause segfault on HUP It did not properly de-init a variable acting as a linked list head. That resulted in trying to access freed memory blocks after the HUP. - doc bugfix: $ActionExecOnlyWhenPreviousIsSuspended was still misspelled as $...OnlyIfPrev... in some parts of the documentation. Thanks to Lorenzo M. Catucci for reporting this bug. +- added doc on malformed messages, cause and how to work-around, to the + doc set +- added doc on how to build from source repository --------------------------------------------------------------------------- Version 3.18.4 (rgerhards), 2008-09-18 - bugfix: order-of magnitude issue with base-10 size definitions diff --git a/README b/README index e8cc42f8..e929c831 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -This file has been superseeded by the fils in the doc folder. +This file has been superseeded by the files in the doc folder. Please see doc/manual.html for futher details. If you are looking for install information doc/install.html is for you! If you do not have the doc set, see diff --git a/doc/Makefile.am b/doc/Makefile.am index 948cb719..34990d90 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -8,6 +8,7 @@ html_files = \ history.html \ how2help.html \ install.html \ + build_from_repo.html \ ipv6.html \ log_rotation_fix_size.html \ manual.html \ diff --git a/doc/build_from_repo.html b/doc/build_from_repo.html new file mode 100644 index 00000000..8d3b20fe --- /dev/null +++ b/doc/build_from_repo.html @@ -0,0 +1,54 @@ + +Building rsyslog from the source repository + + +

    Building rsyslog from the source repository

    +

    In most cases, people install rsyslog either via a package or use an "official" +distribution tarball to generate it. But there may be situations where it is desirable +to build directly from the source repository. This is useful for people who would like to +participate in development or who would like to use the latest, not-yet-released code. +The later may especially be the case if you are asked to try out an experimental version. +

    Building from the repsitory is not much different than building from the source +tarball, but some files are missing because they are output files and thus do not +belong into the repository. +

    Obtaining the Source

    +

    First of all, you need to download the sources. Rsyslog is currently kept in a git +repository. You can clone this repository either via http or git protocol (with the later +being much faster. URLS are: +

      +
    • git://git.adiscon.com/git/rsyslog.git +
    • http://git.adiscon.com/git/rsyslog.git +
    +

    There is also a browsable version (gitweb) available at +http://git.adiscon.com/?p=rsyslog.git;a=summary. +This version also offers snapshots of each commit for easy download. You can use these if +you do not have git present on your system. +

    After you have cloned the repository, you are in the master branch by default. This +is where we keep the devel branch. If you need any other branch, you need to do +a "git checkout --track -b branch origin/branch". For example, the command to check out +the beta branch is "git checkout --track -b beta origin/beta". +

    Prequisites

    +

    To build the compilation system, you need the pkg-config package (an utility for +autotools) present on your system. Otherwise, configure will fail with something like +

    
    +checking for SYSLOG_UNIXAF support... yes
    +checking for FSSTND support... yes
    +./configure: line 25895: syntax error near unexpected token `RELP,'
    +./configure: line 25895: ` PKG_CHECK_MODULES(RELP, relp >= 0.1.1)'
    +
    +

    Creating the Build Environment

    +

    This is fairly easy: just issue "autoreconf -fvi", which should do everything you need. +Once this is done, you can follow the usual ./configure steps just like when +you downloaded an official distribution tarball (see the +rsyslog install guide, starting at step 2, +for further details about that). + +

    [manual index] +[rsyslog site]

    +

    This documentation is part of the +rsyslog project.
    +Copyright © 2008 by Rainer Gerhards and +Adiscon. Released under the GNU GPL +version 1.2 or higher.

    + + diff --git a/doc/install.html b/doc/install.html index 661ae943..48b7f649 100644 --- a/doc/install.html +++ b/doc/install.html @@ -24,7 +24,11 @@ you volunteer to create one, drop me a line). Thus, this guide focuses on installing from the source, which thankfully is quite easy.

    Step 1 - Download Software

    -

    For obvious reasons, you need to download rsyslog. Load the most recent build +

    For obvious reasons, you need to download rsyslog. Here, I assume that you +use a distribution tarball. If you would like to use a version directly from +the repository, see build rsyslog from repository +instead. +

    Load the most recent build from http://www.rsyslog.com/downloads. Extract the software with "tar xzf -nameOfDownloadSet-". This will create a new subdirectory rsyslog-version in the current working directory. CD into that.

    @@ -150,9 +154,12 @@ comments or bug sighting reports are very welcome. Please
  • 2007-07-13 * Rainer Gerhards  * updated to new autotools-based build system
  • +
  • 2008-10-01 * + Rainer Gerhards  + * added info on building from source repository
  • Copyright

    -

    Copyright (c) 2005, 2007 +

    Copyright © 2005-2008 Rainer Gerhards and Adiscon.

    Permission is granted to copy, distribute and/or modify this document @@ -162,6 +169,12 @@ comments or bug sighting reports are very welcome. Please Texts. A copy of the license can be viewed at http://www.gnu.org/copyleft/fdl.html.

    - +

    [manual index] +[rsyslog site]

    +

    This documentation is part of the +rsyslog project.
    +Copyright © 2008 by Rainer Gerhards and +Adiscon. Released under the GNU GPL +version 1.2 or higher.

    diff --git a/doc/manual.html b/doc/manual.html index ec0303c3..f0c02fd2 100644 --- a/doc/manual.html +++ b/doc/manual.html @@ -50,6 +50,7 @@ modules
  • rsyslogd man page

    We have some in-depth papers on

    • installing rsyslog
    • +
    • obtaining rsyslog from the source repository
    • rsyslog and IPv6 (which is fully supported)
    • ssl-encrypting syslog with stunnel
    • writing syslog messages to MySQL (and other databases as well)
    • diff --git a/doc/rsyslog_conf.html b/doc/rsyslog_conf.html index 68b7da61..1073cf5e 100644 --- a/doc/rsyslog_conf.html +++ b/doc/rsyslog_conf.html @@ -1197,6 +1197,5 @@ When compared to syslogd from sysklogd package, rsyslogd offers additional features (like template and database support). For obvious reasons, the syntax for defining -such features is available in rsyslogd, only.

      +such features is available in rsyslogd, only.

      -- cgit From 223c1e48610c27270fdb8532f5e4a920eb9874f3 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 2 Oct 2008 10:53:23 +0200 Subject: bugfix: rsyslogd could hang on HUP because getnameinfo() is not cancel-safe, but was not guarded against being cancelled. pthread_cancel() is routinely being called during HUP processing. --- ChangeLog | 4 ++++ net.c | 27 ++++++++++++++++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index f16ac398..befba912 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ Version 3.18.5 (rgerhards), 2008-10-?? - bugfix: imudp input module could cause segfault on HUP It did not properly de-init a variable acting as a linked list head. That resulted in trying to access freed memory blocks after the HUP. +- bugfix: rsyslogd could hang on HUP + because getnameinfo() is not cancel-safe, but was not guarded against + being cancelled. pthread_cancel() is routinely being called during + HUP processing. - doc bugfix: $ActionExecOnlyWhenPreviousIsSuspended was still misspelled as $...OnlyIfPrev... in some parts of the documentation. Thanks to Lorenzo M. Catucci for reporting this bug. diff --git a/net.c b/net.c index bbd6bec7..4054b863 100644 --- a/net.c +++ b/net.c @@ -106,6 +106,27 @@ static inline void MaskIP4 (struct in_addr *addr, uint8_t bits) { #define SIN(sa) ((struct sockaddr_in *)(sa)) #define SIN6(sa) ((struct sockaddr_in6 *)(sa)) + +/* This is a cancel-safe getnameinfo() version, because we learned + * (via drd/valgrind) that getnameinfo() seems to have some issues + * when being cancelled, at least if the module was dlloaded. + * rgerhards, 2008-09-30 + */ +static inline int +mygetnameinfo(const struct sockaddr *sa, socklen_t salen, + char *host, size_t hostlen, + char *serv, size_t servlen, int flags) +{ + int iCancelStateSave; + int i; + + pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &iCancelStateSave); + i = getnameinfo(sa, salen, host, hostlen, serv, servlen, flags); + pthread_setcancelstate(iCancelStateSave, NULL); + return i; +} + + /* This function adds an allowed sender entry to the ACL linked list. * In any case, a single entry is added. If an error occurs, the * function does its error reporting itself. All validity checks @@ -368,7 +389,7 @@ void PrintAllowedSenders(int iListToPrint) if (F_ISSET(pSender->allowedSender.flags, ADDR_NAME)) dbgprintf ("\t%s\n", pSender->allowedSender.addr.HostWildcard); else { - if(getnameinfo (pSender->allowedSender.addr.NetAddr, + if(mygetnameinfo (pSender->allowedSender.addr.NetAddr, SALEN(pSender->allowedSender.addr.NetAddr), (char*)szIP, 64, NULL, 0, NI_NUMERICHOST) == 0) { dbgprintf ("\t%s/%u\n", szIP, pSender->SignificantBits); @@ -642,7 +663,7 @@ gethname(struct sockaddr_storage *f, uchar *pszHostFQDN) assert(f != NULL); assert(pszHostFQDN != NULL); - error = getnameinfo((struct sockaddr *)f, SALEN((struct sockaddr *)f), + error = mygetnameinfo((struct sockaddr *)f, SALEN((struct sockaddr *)f), ip, sizeof ip, NULL, 0, NI_NUMERICHOST); if (error) { @@ -656,7 +677,7 @@ gethname(struct sockaddr_storage *f, uchar *pszHostFQDN) sigaddset(&nmask, SIGHUP); pthread_sigmask(SIG_BLOCK, &nmask, &omask); - error = getnameinfo((struct sockaddr *)f, SALEN((struct sockaddr *) f), + error = mygetnameinfo((struct sockaddr *)f, SALEN((struct sockaddr *) f), (char*)pszHostFQDN, NI_MAXHOST, NULL, 0, NI_NAMEREQD); if (error == 0) { -- cgit