From nobody Tue Oct 24 11:08:37 2023 X-Original-To: freebsd-security@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 4SF8Sh4zGbz4xtZn for ; Tue, 24 Oct 2023 11:08:52 +0000 (UTC) (envelope-from pawel.biernacki@gmail.com) Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SF8Sh2yRJz4JXD for ; Tue, 24 Oct 2023 11:08:52 +0000 (UTC) (envelope-from pawel.biernacki@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2c59a4dd14cso283741fa.2 for ; Tue, 24 Oct 2023 04:08:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698145729; x=1698750529; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jJ6qrHWFk9bwgl55U5abo6WxUcKl8JBidC90p0kU5Jo=; b=byDo6V0ahwllKQDtAuD1JY8IIOLF/2tUcUR74mJ6B3p3LJjit8wP/b19Zcejb3Hcgv N73xANBsWWOxqTbLE7qkquMVDIRzDbZm6TfL6h2ETUx8QZq8JDNqWF0OPbLYtoSuQv9d VHmj8QX7zN1mVfiOzyFdc0qr22ZVHiG/NlnnCI3Gc3CupH8c32bZqSi5yqcGQScnTelW NFBC0c308gWbqqaHlvualLe7G9+pKdVWhuuSDt8MU04xcIgFYxPPN6fVuw3v4os9TwIi /Ib1/D15GF7sKuTaup/ccMsjTHx1+05dLpPMzUOn7r1MQ5FD7H0TyDytBzzjjDPcRVr/ I00w== X-Gm-Message-State: AOJu0YwrxSbDaxIOV/EFRBKU+n0+a/IUToy1UhxQB45nwUwHSqu901FH 5WKa4W1C+sY30VrIZbXQHaE= X-Google-Smtp-Source: AGHT+IHCJVScDpMa5iKn78OHPWbLheBKnO7HWNg7zxftd8KKHRPc6xOiwvtZZ/ERP9cymfmA48G/pw== X-Received: by 2002:a2e:8854:0:b0:2b9:e6a0:5c3a with SMTP id z20-20020a2e8854000000b002b9e6a05c3amr9108194ljj.48.1698145729374; Tue, 24 Oct 2023 04:08:49 -0700 (PDT) Received: from smtpclient.apple ([89.234.242.78]) by smtp.gmail.com with ESMTPSA id x3-20020a2ea983000000b002bcbb464a28sm2008877ljq.59.2023.10.24.04.08.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Oct 2023 04:08:48 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Security issues List-Archive: https://lists.freebsd.org/archives/freebsd-security List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-security@freebsd.org X-BeenThere: freebsd-security@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.100.2.1.4\)) Subject: Re: securelevel 1 From: =?utf-8?Q?Pawe=C5=82_Biernacki?= In-Reply-To: Date: Tue, 24 Oct 2023 13:08:37 +0200 Cc: freebsd-security@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <6638DADD-FCDB-492C-B1E8-441C6622038B@FreeBSD.org> References: To: void X-Mailer: Apple Mail (2.3774.100.2.1.4) X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; TAGGED_FROM(0.00)[] X-Rspamd-Queue-Id: 4SF8Sh2yRJz4JXD Setting kern.securelevel to 1 makes the kernel to enforce the = system-level immutable and append-only flags (see chflags(1/2)). Unless you do something extra, syslogd will create new files without = these flags and newsyslog will rotate them as expected. =20 Hope that helps, Pawe=C5=82. > On 24 Oct 2023, at 12:19, void wrote: >=20 > Hi, >=20 > I'd like to set append-only on an arm64 system running = stable/14-n265566 > (so securelevel=3D1) but how would newsyslog(8) handle it? How will it = rotate > logs? >=20 > --=20 >=20