From nobody Sun Jan 29 02:35:13 2023 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 4P4Flk0LBrz3c155 for ; Sun, 29 Jan 2023 02:35: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 4P4Flj3vTcz3x5B for ; Sun, 29 Jan 2023 02:35:13 +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=1674959713; 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=CwFn+P1+HxNmfTpYwAsRyZgN6pU+YWy7e8HyZDFqsWQ=; b=ckqrD/Q+ScYhENBOA+vBioE7lx4any3xiC0cSSk7qbYwxbE0nf3BdpzCg8l35fulvtsigu b2QJegk4gejqHJ1OmVeweSaHXpbsNA+ESp1Ffl13LN76qRijzO3cZ81XpLZNLCYb8JyJcq GzWbeWWyE5n5cMGvWT6lpfP44/zvnRs+OgKbBUvbWR7QohHuiLJS0W7H/U09qA5WzI4PrI MPUM0+zoxCOEKLSK10YBf+agJdRKBMT4iG4zXmMZtqUGNB3/6x/tY1vbv5C5Fn/r7c3DaW hDmZDsGzSo/4cym5T7FTXVVhPBQ7NSBdyySO/bzKRLIXisP9c4Rpjo2OXKIclg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674959713; a=rsa-sha256; cv=none; b=F+0GzdULqTeXni+h78oKGxS9gEsUTYunfrjHhPVvTnofNRvhGwdRmI8Zvl0al/bWB5Dag3 Y05tjCCQc0El3EWjLesemjvcgvZ0x9Dlf7DpoA52+Yft4jxkNm0BujG7+Ry6doDbbdrP4N c6OyIQ3xCMKUncBy2ybccAdSZ3qnNpi2Ek/z05Ne1dnmz2n4ihCfoa4qyVd8gb3dnqdOPm joq904CqwmAaPWdVm3ukr/uQ+3Hl73kyBx0x/Zkapa+fPsaJ1iNGuVa7zcIs1iSpHA4S4X E2De5YWa71soJPQ1C4NblBmphEIMz61ZdQPElNAMExx++GaWUibuIUIOc9oHkg== 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 4P4Flj2zQqz1BF9 for ; Sun, 29 Jan 2023 02:35: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 30T2ZD4f090528 for ; Sun, 29 Jan 2023 02:35:13 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 30T2ZDQc090527 for bugs@FreeBSD.org; Sun, 29 Jan 2023 02:35: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 269213] /etc/rc.d/cleanvar interaction with samba fdescfs mount causes file deletions outside of /var/run Date: Sun, 29 Jan 2023 02:35:13 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: Unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: julian@precisium.com.au X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter 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: 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 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269213 Bug ID: 269213 Summary: /etc/rc.d/cleanvar interaction with samba fdescfs mount causes file deletions outside of /var/run Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: julian@precisium.com.au With newer samba versions there is apparently a requirement of the new VFS = to mount fdescfs with the nodup option. Samba mounts fdescfs under /var/run e.g /var/run/samba4/fd This interacts badly with /etc/rc.d/cleanvar which uses 'find /var/run ...'= =20=20 to delete files under /var/run. During startup - there appear to be various parts of the filesystem referen= ced under /var/run/samba4/fd so that the result is deletion of all files under paths such as /bin /sbin /etc /root=20 Rather than pushing to try to stop samba mounting this where it wants - I'm filing this bug to see if it makes sense instead to make cleanvar safer, as potentially other packages may do this sort of thing in future anyway. I tried various -name & -path flags to exclude *samba4/fd/* etc -but 'find' doesn't seem to recognise these as normal names & paths. adding "-mount" to restrict find to the same device number as /var/run seem= s to work. e.g the relevant line in /etc/rc.d/cleanvar becomes: find /var/run -mount \( -type f -or -type s | -name log -and ! -name logpri= v \) -delete see also discussion at https://forums.freebsd.org/threads/iocage-removes-files-at-startup.87733/ --=20 You are receiving this mail because: You are the assignee for the bug.=