From nobody Mon Sep 9 09:23:13 2024 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X2Lwf1B8xz5WHkC for ; Mon, 09 Sep 2024 09:23:14 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X2Lwd6C7zz4kYx for ; Mon, 9 Sep 2024 09:23:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725873793; a=rsa-sha256; cv=none; b=h/JnS3FEe55wAqlGZ6vnPgtXrfpxZrqewD29+wzyWvl/jnPUg4YACk8VKIRi5/dzbMV7eb 14C+J6ozAh7ufSz00jK8rl+PoH8Osqo8OSHMsqNJNYVobErVtlLT36PP3IdeMIJPLmF8Ji 4B/pakMgAnGB1pHQo8abQf5abXZQz0Q1/LUuxjbG2QP5YgPOJnfVbo5mrIyR837QdEQbpN 7P256dysnlOHA8tLBHlD0FA49ADwh/711QNMXck2ij9rgTGUl3x+V46hqJ1F2hIbHIQoBl 3Rt1QcTLBeI3snFKcae0Sx6WEvJ5St7aOJ7qtbZV+vpzYQ1CUolqc26xJL7dgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725873793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3m2AXrP1C7378VGfMJyrbvJXBlVqyW3qR8a2Kwt7yvU=; b=FVLPzAljUzI/Wr74IUblFL+k8lytHif399yLZZR18hv1e7+X9cFLOiiQkQJwoOWQk/u4X8 4cEZ7F2JKBhJWTJPlQmNrazLDc77kYtq5VsuY3jqSp3/j8SoC9jRvjl0JPmM0d2LJ3PVLC hgjzH4eDt6zcj1/oaO5/LY2i/vWQ5WAJdYztyBeHTEzRHJ3WVHMV6B5ttPPZ22YHfsVARz 2K4AcGuQAGkfNcOwgcYJKtVq/6Ld+gZmhyHEjA0FTM4JnAOKafWoCyoxwvm4r7OaXjbKXe eecVJhODV6flWi14BPDYBgrNjCbLqioz/dCZJRoEA3c4TbpsbgJNJscRcRMdPw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X2Lwd5lkSzxfg for ; Mon, 9 Sep 2024 09:23:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 4899NDNH018765 for ; Mon, 9 Sep 2024 09:23:13 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 4899NDj7018764 for bugs@FreeBSD.org; Mon, 9 Sep 2024 09:23:13 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 238006] syslogd not starting because of missing /var/run/log Date: Mon, 09 Sep 2024 09:23:13 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 12.0-RELEASE X-Bugzilla-Keywords: needs-qa X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: bugzilla.freebsd@omnilan.de X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D238006 --- Comment #8 from Harald Schmalzbauer --- (In reply to Mark Johnston from comment #7) Thanks a lot! I was wondering how comes that your diff calls getaddrinfo() differently... and noticed that HEAD has a significant newer version, tuned by Jake Freela= nd mainly. In main f30b063ee667 =C2=BBsyslogd: Only use peerlist during flag parsing=C2=AB the check in question was moved from socksetup() to addsock() and the unconditional addpeer() was removed. So I thought it's worth giving the unmodified HEAD version a try=E2=80=A0, = especially because the commits were tagged to be MFCd after 3 weeks. And lucky I was: Only reading/understanding parts of the diff, it turns o= ut that HEAD version doesn't terminate in jails without IP/vnet assigned if '-= ss' was passed as CLI arg=20 (while (the default) '-s' still makes syslogd(8) terminate with =C2=BBpri 5= 3, flags 0, from test, msg exiting on signal 2=C2=AB in such jails). For completeness I also successfully tested the patched stable/14 version= of syslogd(8), with Mark's slightly adopted diff (same result as with HEAD version, '-ss' pased starts while '-s' terminates in jails withoutIP/vnet): (note pe->pe_name instead of name and returning with an int) --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -3825,6 +3825,14 @@ socksetup(struct peer *pe) if (pe->pe_serv =3D=3D NULL) pe->pe_serv =3D "syslog"; error =3D getaddrinfo(pe->pe_name, pe->pe_serv, &hints, &res0); + if (error =3D=3D EAI_NONAME && pe->pe_name =3D=3D NULL && SecureMod= e > 1) { + /* + * If we're in secure mode, we won't open inet sockets anyw= ay. + * This failure can arise legitimately when running in a ja= il + * without networking. + */ + return (0); + } if (error) { char *msgbuf; So I guess instead of patching, MFCing is the preferred solution after one = year in HEAD. Unfortunately I don't have any environment where I could test all the netwo= rk functionality of syslogd(8). Neither sending nor collecting via inet... Ever since I discovered 'netstat -an' as young rookie, I'm passing '-ss' to syslogd(8). How to find out if syslogd_flags=3D"-ss" (instead of =3D"-s") would be the = better default in /etc/defaults/rc.conf? But that's unrelated to this PR. =E2=80=A0although I new this would make me upset about git(666) once more..= . I lost the wrestle again, so I took the head src tar and copied usr.sbin/syslogd into = my stable/14 checkout (I _always_ end up with an unusable local git repo and n= eed to re-clone and start from scratch :-( I rarely needed much svn(1) help and never messed it up...) If somebody could tell me how I could have accomplished getting an diff bet= ween the HEAD commit as in stable/14 and head in HEAD, I'd highly appreciate. I guess I'd always need to separately clone the HEAD repo 1st, which is ridiculous imho. --=20 You are receiving this mail because: You are the assignee for the bug.=