Date: Sun, 22 Jul 2018 18:06:42 +0000 (UTC) From: Alan Somers <asomers@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336613 - head/contrib/openbsm/libauditd Message-ID: <201807221806.w6MI6git091121@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: asomers Date: Sun Jul 22 18:06:42 2018 New Revision: 336613 URL: https://svnweb.freebsd.org/changeset/base/336613 Log: auditd(8): Log a better error when no hostname is set in audit_control Cherry-pick from https://github.com/openbsm/openbsm/commit/01ba03b Reviewed by: cem Obtained from: OpenBSM MFC after: 2 weeks Pull Request: https://github.com/openbsm/openbsm/pull/38 Modified: head/contrib/openbsm/libauditd/auditd_lib.c Modified: head/contrib/openbsm/libauditd/auditd_lib.c ============================================================================== --- head/contrib/openbsm/libauditd/auditd_lib.c Sun Jul 22 17:51:11 2018 (r336612) +++ head/contrib/openbsm/libauditd/auditd_lib.c Sun Jul 22 18:06:42 2018 (r336613) @@ -261,7 +261,8 @@ auditd_set_host(void) struct auditinfo_addr aia; int error, ret = ADE_NOERR; - if (getachost(auditd_host, sizeof(auditd_host)) != 0) { + if ((getachost(auditd_host, sizeof(auditd_host)) != 0) || + ((auditd_hostlen = strlen(auditd_host)) == 0)) { ret = ADE_PARSE; /* @@ -278,7 +279,6 @@ auditd_set_host(void) ret = ADE_AUDITON; return (ret); } - auditd_hostlen = strlen(auditd_host); error = getaddrinfo(auditd_host, NULL, NULL, &res); if (error) return (ADE_GETADDR);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201807221806.w6MI6git091121>