Changeset View
Changeset View
Standalone View
Standalone View
head/usr.sbin/syslogd/syslogd.c
Show First 20 Lines • Show All 471 Lines • ▼ Show 20 Lines | case 'A': | ||||
send_to_all++; | send_to_all++; | ||||
break; | break; | ||||
case 'a': /* allow specific network addresses only */ | case 'a': /* allow specific network addresses only */ | ||||
if (allowaddr(optarg) == -1) | if (allowaddr(optarg) == -1) | ||||
usage(); | usage(); | ||||
break; | break; | ||||
case 'b': | case 'b': | ||||
bflag = 1; | bflag = 1; | ||||
if ((p = strchr(optarg, ':')) == NULL) { | p = strchr(optarg, ']'); | ||||
if (p != NULL) | |||||
p = strchr(p + 1, ':'); | |||||
else { | |||||
p = strchr(optarg, ':'); | |||||
if (p != NULL && strchr(p + 1, ':') != NULL) | |||||
p = NULL; /* backward compatibility */ | |||||
} | |||||
if (p == NULL) { | |||||
/* A hostname or filename only. */ | /* A hostname or filename only. */ | ||||
addpeer(&(struct peer){ | addpeer(&(struct peer){ | ||||
.pe_name = optarg, | .pe_name = optarg, | ||||
.pe_serv = "syslog" | .pe_serv = "syslog" | ||||
}); | }); | ||||
} else { | } else { | ||||
/* The case of "name:service". */ | /* The case of "name:service". */ | ||||
*p++ = '\0'; | *p++ = '\0'; | ||||
▲ Show 20 Lines • Show All 2,546 Lines • Show Last 20 Lines |