From nobody Sat Jan 28 08:28:03 2023 X-Original-To: ports-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 4P3ndJ00cFz3bL4T for ; Sat, 28 Jan 2023 08:28:04 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P3ndH59kgz4TGK for ; Sat, 28 Jan 2023 08:28:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674894483; 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; bh=T8A4h8I9jEy0XuTDl1MqtWpfvJT/fqgeNKG66W7+Va0=; b=pWrsJIYPneKI01i/5e3htjy6yztLPWricjLcypHyz7Dtk+8oxZU58LHMsQZCa0Xvs/b7CV JeUSwgvYOdEN9jxgV1SAeJSK4pXrCwvTcCM7b8FWiwlUOA2QBUJ0dHfwkXiAiMWxNPkWy6 rSS1X4p5SZ/EayiR3ibSA7Mz2OuIE7URu0Tsa8qnf3To3dDD1FHR5LzxsNt8wjdg1Ft7X+ N1vTxUhPv/yCkZ1zniz3jb5xDpVaMjWXLdQWNEWQXoabKfa3G+NR/tDGrvbY6b5BCtIDvt VddupiVm6ZsMdtq9QKwbr7KLPEwbcelo6NYVLISsy/GjRUydu4GLXdSA05Ae0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674894483; a=rsa-sha256; cv=none; b=cirLxjrLxRXQ8Wf0lFpauyM541oecWqid19AjNOJGLAmJ/mWibVCfPpLQ4itWxDuFUFwz9 Bsrv4WgLoEguz7MrOc0CXDHlT/t5DmroZBBH8bNnTuUc3+eorxzwiYMZqO/6ueevPDFJiY w51DIZ5mOVqfo88SzxiLulaC17CQpKqEi/AsQD4BDIrKGC+f1CUV2NqTYxcrKCREH958h/ IHTrcIpOY75jYrg8VYp4Zg/CkmTy380u/Mls57t19CJqAZp42uNHXbIip98n/BI84wx1hB qQ1k3LdVjuQOQ1cNbGldBijK1iq3D4H8oZzaiPpFj+yGMMBOftND30OjQQukTQ== 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 4P3ndH47JTzhTk for ; Sat, 28 Jan 2023 08:28:03 +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 30S8S3Qv086288 for ; Sat, 28 Jan 2023 08:28:03 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 30S8S3RR086287 for ports-bugs@FreeBSD.org; Sat, 28 Jan 2023 08:28:03 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: ports-bugs@FreeBSD.org Subject: [Bug 269198] dns/blocky: running daemon as non-root user is not supported Date: Sat, 28 Jan 2023 08:28:03 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: bspiegel100@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: eduardo@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name attachments.created Message-ID: 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: Ports bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-ports-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports-bugs@freebsd.org X-BeenThere: freebsd-ports-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269198 Bug ID: 269198 Summary: dns/blocky: running daemon as non-root user is not supported Product: Ports & Packages Version: Latest Hardware: amd64 OS: Any Status: New Severity: Affects Some People Priority: --- Component: Individual Port(s) Assignee: eduardo@FreeBSD.org Reporter: bspiegel100@gmail.com Assignee: eduardo@FreeBSD.org Flags: maintainer-feedback?(eduardo@FreeBSD.org) Created attachment 239759 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D239759&action= =3Dedit Patch with improved rc.d script Most rc.d scripts support a standard _user option in /etc/rc.= conf to run the service as the specified user. The rc.d script for dns/blocky doesn't observe this setting. As a result, it's not possible to run as a us= er other than root (blocky documentation recommends using a non-privileged use= r). Please see the attached patch for an updated rc script that supports this option. Thanks for considering! Steps to Reproduce: Install dns/blocky, add the following to /etc/rc.conf and run service blocky start. blocky_user=3D"" blocky_enable=3D"YES" Actual Behavior: The blocky daemon runs as root regardless of what's in /etc/rc.conf. Tested= on 14.0-CURRENT and 13.1-RELEASE with blocky version 0.20_2 (from ports) and 0.20_1 (package). Expected Behavior: The blocky daemon should run as the specified user. Proposed Solution: The current rc.d script overrides the built-in start_cmd function (which ch= ecks for standard options like _user and _chroot). The replacement function doesn't check these options. The patch instead defines the command in $command and $command_args vars, a= dds handling for file permissions to support non-root users, and does a few min= or touch-ups. --=20 You are receiving this mail because: You are the assignee for the bug.=