From owner-svn-src-all@freebsd.org Tue Dec 20 03:41:41 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80D54C8825E; Tue, 20 Dec 2016 03:41:41 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50CD41F12; Tue, 20 Dec 2016 03:41:41 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBK3feiB042694; Tue, 20 Dec 2016 03:41:40 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBK3fe2x042693; Tue, 20 Dec 2016 03:41:40 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201612200341.uBK3fe2x042693@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Tue, 20 Dec 2016 03:41:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r310310 - head/usr.sbin/syslogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2016 03:41:41 -0000 Author: hrs Date: Tue Dec 20 03:41:40 2016 New Revision: 310310 URL: https://svnweb.freebsd.org/changeset/base/310310 Log: Add a default socket bound to *:514 when no -b option is specified. This was accidentally removed at r309933. Spotted by: Michael Butler Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Tue Dec 20 03:38:14 2016 (r310309) +++ head/usr.sbin/syslogd/syslogd.c Tue Dec 20 03:41:40 2016 (r310310) @@ -383,7 +383,7 @@ close_filed(struct filed *f) int main(int argc, char *argv[]) { - int ch, i, fdsrmax = 0; + int ch, i, fdsrmax = 0, bflag = 0; struct sockaddr_storage ss; fd_set *fdsr = NULL; char line[MAXLINE + 1]; @@ -437,6 +437,7 @@ main(int argc, char *argv[]) pe->pe_name = (strlen(optarg) == 0) ? NULL : optarg; } + bflag = 1; STAILQ_INSERT_TAIL(&pqueue, pe, next); break; case 'c': @@ -528,6 +529,14 @@ main(int argc, char *argv[]) } if ((argc -= optind) != 0) usage(); + + if (bflag == 0) { + pe = calloc(1, sizeof(*pe)); + *pe = (struct peer) { + .pe_serv = "syslog" + }; + STAILQ_INSERT_TAIL(&pqueue, pe, next); + } STAILQ_FOREACH(pe, &pqueue, next) socksetup(pe);