what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

syslogd.patch

syslogd.patch
Posted Aug 17, 1999

syslogd.patch

tags | tool, firewall
systems | unix
SHA-256 | dd24976f22422f236f75da2749fa6721a2c1b1e286863f4a6ef7bf5814f9b62b

syslogd.patch

Change Mirror Download
*** old/syslogd.c  1996/09/16 02:52:10
--- syslogd.c 1997/03/18 20:20:08
***************
*** 264,275 ****
(void) alarm(TIMERINTVL);
(void) unlink(LogName);

bzero((char *)&sunx, sizeof(sunx));
sunx.sun_family = AF_UNIX;
(void) strncpy(sunx.sun_path, LogName, sizeof sunx.sun_path);
funix = socket(AF_UNIX, SOCK_DGRAM, 0);
! if (funix < 0 || bind(funix, (struct sockaddr *) &sunx,
! sizeof(sunx.sun_family) + strlen(sunx.sun_path)) < 0 ||
chmod(LogName, 0666) < 0) {
(void) sprintf(line, "cannot create %s", LogName);
logerror(line);
--- 264,279 ----
(void) alarm(TIMERINTVL);
(void) unlink(LogName);

+ #ifndef SUN_LEN
+ #define SUN_LEN(su) \
+ (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
+ #endif
bzero((char *)&sunx, sizeof(sunx));
sunx.sun_family = AF_UNIX;
(void) strncpy(sunx.sun_path, LogName, sizeof sunx.sun_path);
funix = socket(AF_UNIX, SOCK_DGRAM, 0);
! if (funix < 0 ||
! bind(funix, (struct sockaddr *) &sunx, SUN_LEN(&sunx)) < 0 ||
chmod(LogName, 0666) < 0) {
(void) sprintf(line, "cannot create %s", LogName);
logerror(line);
***************
*** 481,487 ****
int fac, prilev;
int msglen;
sigset_t block, oblock;
! struct sigaction act, oact;

char *timestamp;
time_t time();
--- 485,491 ----
int fac, prilev;
int msglen;
sigset_t block, oblock;
! struct sigaction hupact, alrmact, oact;

char *timestamp;
time_t time();
***************
*** 492,497 ****
--- 496,505 ----
(void) sigemptyset(&block);
(void) sigaddset(&block, SIGHUP);
(void) sigaddset(&block, SIGALRM);
+ if (sigaction(SIGHUP, NULL, &hupact) < 0)
+ perror("sigaction");
+ if (sigaction(SIGALRM, NULL, &alrmact) < 0)
+ perror("sigaction");
if (sigprocmask(SIG_BLOCK, &block, &oblock) < 0)
perror("sigprocmask");
/*
***************
*** 529,538 ****
}
(void) sigprocmask(SIG_SETMASK, &oblock, (sigset_t *) NULL);
#ifdef SA_RESTART
! act.sa_flags = SA_RESTART;
#endif
! (void) sigaction(SIGHUP, &act, &oact);
! (void) sigaction(SIGALRM, &act, &oact);
return;
}
for (f = Files; f; f = f->f_next) {
--- 537,547 ----
}
(void) sigprocmask(SIG_SETMASK, &oblock, (sigset_t *) NULL);
#ifdef SA_RESTART
! hupact.sa_flags = SA_RESTART;
! alrmact.sa_flags = SA_RESTART;
#endif
! (void) sigaction(SIGHUP, &hupact, &oact);
! (void) sigaction(SIGALRM, &alrmact, &oact);
return;
}
for (f = Files; f; f = f->f_next) {
***************
*** 594,603 ****
}
(void) sigprocmask(SIG_SETMASK, &oblock, (sigset_t *) NULL);
#ifdef SA_RESTART
! act.sa_flags = SA_RESTART;
#endif
! (void) sigaction(SIGHUP, &act, &oact);
! (void) sigaction(SIGALRM, &act, &oact);
}

fprintlog(f, flags, msg)
--- 603,613 ----
}
(void) sigprocmask(SIG_SETMASK, &oblock, (sigset_t *) NULL);
#ifdef SA_RESTART
! hupact.sa_flags = SA_RESTART;
! alrmact.sa_flags = SA_RESTART;
#endif
! (void) sigaction(SIGHUP, &hupact, &oact);
! (void) sigaction(SIGALRM, &alrmact, &oact);
}

fprintlog(f, flags, msg)
Login or Register to add favorites

File Archive:

March 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Mar 1st
    16 Files
  • 2
    Mar 2nd
    0 Files
  • 3
    Mar 3rd
    0 Files
  • 4
    Mar 4th
    32 Files
  • 5
    Mar 5th
    28 Files
  • 6
    Mar 6th
    42 Files
  • 7
    Mar 7th
    17 Files
  • 8
    Mar 8th
    13 Files
  • 9
    Mar 9th
    0 Files
  • 10
    Mar 10th
    0 Files
  • 11
    Mar 11th
    15 Files
  • 12
    Mar 12th
    19 Files
  • 13
    Mar 13th
    21 Files
  • 14
    Mar 14th
    38 Files
  • 15
    Mar 15th
    15 Files
  • 16
    Mar 16th
    0 Files
  • 17
    Mar 17th
    0 Files
  • 18
    Mar 18th
    10 Files
  • 19
    Mar 19th
    32 Files
  • 20
    Mar 20th
    46 Files
  • 21
    Mar 21st
    16 Files
  • 22
    Mar 22nd
    13 Files
  • 23
    Mar 23rd
    0 Files
  • 24
    Mar 24th
    0 Files
  • 25
    Mar 25th
    12 Files
  • 26
    Mar 26th
    31 Files
  • 27
    Mar 27th
    19 Files
  • 28
    Mar 28th
    42 Files
  • 29
    Mar 29th
    0 Files
  • 30
    Mar 30th
    0 Files
  • 31
    Mar 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close