From nobody Fri Jul 15 09:00:12 2022 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 4LklgL0gkBz4T7TP for ; Fri, 15 Jul 2022 09:00: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LklgK3SSNz3X4p for ; Fri, 15 Jul 2022 09:00:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 4LklgK28kjzcF8 for ; Fri, 15 Jul 2022 09:00: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 26F90Dn5081091 for ; Fri, 15 Jul 2022 09:00:13 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 26F90D3o081090 for ports-bugs@FreeBSD.org; Fri, 15 Jul 2022 09:00: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: ports-bugs@FreeBSD.org Subject: [Bug 265230] sysutils/nomad: pkg install creates default datadir with insecure permissions Date: Fri, 15 Jul 2022 09:00:12 +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 Only Me X-Bugzilla-Who: grembo@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: jhixson@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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1657875613; 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=iHAdyFOmVLpxy8yvARgA8f4ix9QIPg+2ocxWdhLldoQ=; b=S+wFjeh6kr7irHoBt/2SIImMmL/5ND9DbrRzy49F9cTYDECqK61nhahoNwuFaz40ZHasWM vyWClTuDW2SD9GL2LhLWVco7uxdp/kTYCJEVK1iHBXsgGlw57lEpxLtpbsRNsNsWD5pekr 8yJK/ATUer8rJAFs77qwSGIAuWC+1P9NpIihC3HKGLDRWyEXcW5cl3SLE3LbRtJNva6q1R fGwdvSU+2R4AcDU7D6SzGSslw8PhH1yyKdtz3XW/gYQlaYXxr1J9c0z1wCustdIyNcwjDc fMayHAIhCRWHcfQnFyM4dv/vZn3AYBLXfLKK7crSAFSRk2DGFObf1yz/3UZnhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1657875613; a=rsa-sha256; cv=none; b=yrQEMZQrxLze9lEsrCO1tXE3l+4cV/5Hj5VSqbzrjl6A8Z3MFB0bjfqLf5Z9dr0jGFmVPF 1t33rFyAAlEs8YDBbNZ90WGIKNxgYZJbm5iyz261VR11Dw5yd3UbD5I2GMsxYpuPAdFXnI lQKjg/LbAbsn5breT3E2rVGCdrdiv6g9TBoRLrKMpVXbH8rTZ1KURXfWh5mBRHVBYP6K3M dngHWdb67ST9SK3U6C/pTcJ+VOMrZFwpLbnoajmpfmeWIEOUrX0GUOqQT+86UHSGhsfBm/ ZIsQO5VxAS9iXmeGrFibrkMObaXiAm1Pa2ZCQTwML6WrR21gcxlmLUJipopVXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D265230 Bug ID: 265230 Summary: sysutils/nomad: pkg install creates default datadir with insecure permissions Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: jhixson@FreeBSD.org Reporter: grembo@FreeBSD.org Assignee: jhixson@FreeBSD.org Flags: maintainer-feedback?(jhixson@FreeBSD.org) Created attachment 235266 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D235266&action= =3Dedit Change homedir of nomad user to /nonexistent Since bug #264425 nomad only starts if its datadir has secure permissions (700).=20 The port's default datadir is /var/tmp/nomad, which also happens to be its user's home directory. Therefore installing the package always creates a default datadir with permissions too lose to actually start the service. I see various options to correct this: 1. Change port installation to change permissions of /var/tmp/nomad (not so nice) 2. Change data dir to be under /var/tmp/nomad, e.g., /var/tmp/nomad/data Clean, but might cause breakage on update 3. Change home of nomad user to /nonexistent As far as I can tell, 3. has the least impact (other hashicorp users like v= ault do the same). So the attached patch changes UIDs to change nomad's homedir. I ran some local tests with it and things seem to be fine. So unless there = was a very specific reason to have a real HOME for the nomad user, I would sugg= est to go with the attached patch. --=20 You are receiving this mail because: You are the assignee for the bug.=