syslogd: Drop -s HOST flag in favor of future BSD SecureMode
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
parent
4ee6211277
commit
d1035377cc
@ -30,7 +30,8 @@ and a replacement for `syslog.h` to enable new features in RFC5424.
|
|||||||
- Incompatible changes to command line options for `syslogd` and
|
- Incompatible changes to command line options for `syslogd` and
|
||||||
`klogd`, e.g;
|
`klogd`, e.g;
|
||||||
- In syslogd: `-b` and `-c` have been replaced with `-R` for global
|
- In syslogd: `-b` and `-c` have been replaced with `-R` for global
|
||||||
log rotation, `-a` has been replaced with the new `-p` support
|
log rotation, `-a` has been replaced with the new `-p` support.
|
||||||
|
The `-r` flag and `-s HOST` has also been dropped
|
||||||
- In klogd: `-i` and `-I` have been removed
|
- In klogd: `-i` and `-I` have been removed
|
||||||
- Update COPYING file to GPL 2 rev 2, with new FSF address and other minor stuff
|
- Update COPYING file to GPL 2 rev 2, with new FSF address and other minor stuff
|
||||||
- Update license header in all files:
|
- Update license header in all files:
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
.Op Fl P Ar FILE
|
.Op Fl P Ar FILE
|
||||||
.Op Fl p Ar SOCK
|
.Op Fl p Ar SOCK
|
||||||
.Op Fl R Ar size[:count]
|
.Op Fl R Ar size[:count]
|
||||||
.Op Fl s Ar NAME[:NAME]
|
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
.Nm
|
.Nm
|
||||||
support RFC3164 and RFC5424 style log messages for both local and remote
|
support RFC3164 and RFC5424 style log messages for both local and remote
|
||||||
@ -178,15 +177,6 @@ The size argument takes optional modifiers; k, M, G. E.g., 100M is
|
|||||||
The optional number of files kept include both gzipped files and the
|
The optional number of files kept include both gzipped files and the
|
||||||
first rotated (not zipped) file. The default for this, when omitted,
|
first rotated (not zipped) file. The default for this, when omitted,
|
||||||
is 5.
|
is 5.
|
||||||
.It Fl s NAME
|
|
||||||
Specify domain name(s) to be stripped off before logging. Multiple
|
|
||||||
domains may be specified using the colon (':') separator. Note, no
|
|
||||||
sub-domains may be specified but only entire domains. For example if
|
|
||||||
.Fl s Ar north.de
|
|
||||||
is specified and the host logging resolves to
|
|
||||||
.Ql satu.infodrom.north.de
|
|
||||||
nothing is stripped, instead two domains must be specified:
|
|
||||||
.Fl s Ar north.de:infodrom.north.de .
|
|
||||||
.It Fl v
|
.It Fl v
|
||||||
Print
|
Print
|
||||||
.Nm
|
.Nm
|
||||||
@ -364,12 +354,6 @@ If the remote host is located in the same domain as the host,
|
|||||||
is running on, only the simple hostname will be logged instead of the
|
is running on, only the simple hostname will be logged instead of the
|
||||||
whole FQDN.
|
whole FQDN.
|
||||||
.Pp
|
.Pp
|
||||||
In a local network you may provide a central log server to have all the
|
|
||||||
important information kept on one machine. If the network consists of
|
|
||||||
different domains, you may want to use the strip-domain feature
|
|
||||||
.Fl s .
|
|
||||||
See above.
|
|
||||||
.Pp
|
|
||||||
Using the
|
Using the
|
||||||
.Fl l
|
.Fl l
|
||||||
option it is possibile to define single hosts as local machines. This
|
option it is possibile to define single hosts as local machines. This
|
||||||
|
@ -135,7 +135,6 @@ static int KeepKernFac; /* Keep remotely logged kernel facility */
|
|||||||
|
|
||||||
static int LastAlarm = 0; /* last value passed to alarm() (seconds) */
|
static int LastAlarm = 0; /* last value passed to alarm() (seconds) */
|
||||||
static int DupesPending = 0; /* Number of unflushed duplicate messages */
|
static int DupesPending = 0; /* Number of unflushed duplicate messages */
|
||||||
static char **StripDomains = NULL; /* these domains may be stripped before writing logs */
|
|
||||||
static char **LocalHosts = NULL; /* these hosts are logged with their hostname */
|
static char **LocalHosts = NULL; /* these hosts are logged with their hostname */
|
||||||
static int NoHops = 1; /* Can we bounce syslog messages through an intermediate host. */
|
static int NoHops = 1; /* Can we bounce syslog messages through an intermediate host. */
|
||||||
static off_t RotateSz = 0; /* Max file size (bytes) before rotating, disabled by default */
|
static off_t RotateSz = 0; /* Max file size (bytes) before rotating, disabled by default */
|
||||||
@ -195,7 +194,7 @@ int usage(int code)
|
|||||||
{
|
{
|
||||||
printf("Usage:\n"
|
printf("Usage:\n"
|
||||||
" syslogd [-46Adnrvh?] [-f FILE] [-l HOST] [-m SEC] [-P PID_FILE]\n"
|
" syslogd [-46Adnrvh?] [-f FILE] [-l HOST] [-m SEC] [-P PID_FILE]\n"
|
||||||
" [-p SOCK_PATH] [-R SIZE[:NUM]] [-s NAME[:NAME[...]]]\n"
|
" [-p SOCK_PATH] [-R SIZE[:NUM]]\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Options:\n"
|
"Options:\n"
|
||||||
" -4 Force IPv4 only\n"
|
" -4 Force IPv4 only\n"
|
||||||
@ -216,7 +215,6 @@ int usage(int code)
|
|||||||
" Rotation can also be defined per log file in syslog.conf\n"
|
" Rotation can also be defined per log file in syslog.conf\n"
|
||||||
" -r Act as remote syslog sink for other hosts, default is secure mode,\n"
|
" -r Act as remote syslog sink for other hosts, default is secure mode,\n"
|
||||||
" i.e., syslogd does not bind to any internet address:port by default\n"
|
" i.e., syslogd does not bind to any internet address:port by default\n"
|
||||||
" -s NAME Strip domain name before logging, use ':' for multiple domains\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
" -? Show this help text\n"
|
" -? Show this help text\n"
|
||||||
" -v Show program version and exit\n"
|
" -v Show program version and exit\n"
|
||||||
@ -247,7 +245,7 @@ int main(int argc, char *argv[])
|
|||||||
KeepKernFac = 1;
|
KeepKernFac = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv, "46Ab:dhHf:l:m:nP:p:R:s:v?")) != EOF) {
|
while ((ch = getopt(argc, argv, "46Ab:dhHf:l:m:nP:p:R:v?")) != EOF) {
|
||||||
switch ((char)ch) {
|
switch ((char)ch) {
|
||||||
case '4':
|
case '4':
|
||||||
family = PF_INET;
|
family = PF_INET;
|
||||||
@ -325,15 +323,6 @@ int main(int argc, char *argv[])
|
|||||||
parse_rotation(optarg, &RotateSz, &RotateCnt);
|
parse_rotation(optarg, &RotateSz, &RotateCnt);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's':
|
|
||||||
if (StripDomains) {
|
|
||||||
fprintf(stderr, "Only one -s argument allowed,"
|
|
||||||
"the first one is taken.\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
StripDomains = crunch_list(optarg);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
printf("syslogd v%s\n", VERSION);
|
printf("syslogd v%s\n", VERSION);
|
||||||
exit(0);
|
exit(0);
|
||||||
@ -1852,16 +1841,6 @@ const char *cvthname(struct sockaddr_storage *f, int len)
|
|||||||
*p = '\0';
|
*p = '\0';
|
||||||
return hname;
|
return hname;
|
||||||
} else {
|
} else {
|
||||||
if (StripDomains) {
|
|
||||||
count = 0;
|
|
||||||
while (StripDomains[count]) {
|
|
||||||
if (strcmp(p + 1, StripDomains[count]) == 0) {
|
|
||||||
*p = '\0';
|
|
||||||
return hname;
|
|
||||||
}
|
|
||||||
count++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (LocalHosts) {
|
if (LocalHosts) {
|
||||||
count = 0;
|
count = 0;
|
||||||
while (LocalHosts[count]) {
|
while (LocalHosts[count]) {
|
||||||
|
Loading…
Reference in New Issue
Block a user