Changeset 27 for trunk/src/sh_error.c


Ignore:
Timestamp:
Apr 6, 2006, 8:55:51 PM (19 years ago)
Author:
rainer
Message:

Support for server-to-server relay and more user policies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_error.c

    r22 r27  
    639639}
    640640
    641 #ifdef SH_WITH_CLIENT
     641#if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER)
    642642/* set severity for TCP export
    643643 */
     
    843843#endif
    844844
    845 #ifdef SH_WITH_CLIENT
     845#if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER)
    846846  char   * ex_msg;
    847847#endif
     
    862862  static int syslog_block = 0;
    863863  static int log_block    = 0;
    864 #if defined(SH_WITH_CLIENT)
     864#if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER)
    865865  static int export_block = 0;
    866866#endif
     
    926926    severity = sev;
    927927
     928  /* these are messages from remote sources
     929   */
    928930  if ((severity  & SH_ERR_INET) != 0)
    929931    {
     
    939941       ( (errFlags.sysloglevel  & severity    ) == 0 ||
    940942         (errFlags.syslog_class & (1 << class)) == 0 )     &&
    941 #ifdef SH_WITH_CLIENT
     943#if defined(SH_WITH_CLIENT) || defined(SH_WITH_CLIENT)
    942944       ( (errFlags.exportlevel  & severity    ) == 0 ||
    943945         (errFlags.export_class & (1 << class)) == 0 )     &&
     
    958960         (errFlags.mail_class    & (1 << class)) == 0 )
    959961#ifdef SH_WITH_SERVER
    960       && (flag_inet == S_FALSE)
     962       && (flag_inet == S_FALSE) /* still log messages from remote sources */
    961963#endif
    962964       )
     
    11191121       * to log server
    11201122       ****************************************************/
    1121 #ifdef SH_WITH_CLIENT
     1123#if defined(SH_WITH_CLIENT) || defined(SH_WITH_SERVER)
    11221124      /* Export by TCP.
    11231125       */
    1124       if ((errFlags.exportlevel  & severity  )   != 0 &&
    1125           (errFlags.export_class & (1 << class)) != 0 &&
    1126           (errFlags.exportlevel  & SH_ERR_NOT)   == 0 &&
    1127           class != AUD                                &&
    1128           sh.flag.isserver != GOOD                    &&
    1129           (flag_inet == S_FALSE) ) /* don't log inet to export */
     1126
     1127      if ( ((errFlags.exportlevel  & severity  )   != 0 &&
     1128            (errFlags.export_class & (1 << class)) != 0 &&
     1129            (errFlags.exportlevel  & SH_ERR_NOT)   == 0 &&
     1130            class != AUD                               )
     1131#ifdef SH_WITH_SERVER
     1132           || (flag_inet == S_TRUE) /* always log inet to export */
     1133#endif
     1134          /* sh.flag.isserver != GOOD                    && */
     1135          /* (flag_inet == S_FALSE) */ /* don't log inet to export */
     1136           )
    11301137        {
    11311138          if (export_block == 0)
     
    11421149              sl_snprintf(ex_msg, ex_len, _("%d?%u?%s"),
    11431150                      severity, class, lmsg->msg);
    1144 
    11451151              retval = sh_forward (ex_msg);
    11461152              SH_FREE(ex_msg);
Note: See TracChangeset for help on using the changeset viewer.