From nobody Fri Mar 27 19:29:43 2026 X-Original-To: dev-commits-src-all@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 4fj9hF19hjz6WLG5 for ; Fri, 27 Mar 2026 19:29:49 +0000 (UTC) (envelope-from git@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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fj9hF0Vk0z3kHr for ; Fri, 27 Mar 2026 19:29:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1774639789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LNvkZTMxtDWt7xlqXVO5+T3rdMitRDdMS1UuYWJwc74=; b=Fh3SV+XH7vpEg69J9gQKTa6TcJMpjG0yxGpwtcDJ38tCAE0GHgy5alSP67bW2TUGaFB42a cXNCOh2sNfrrr9OIlZ5lkTcs3jOGk3zb80XFnKUMwflcz/Df2o3J2ZYN3y8ePnvgFFEy8e eoyB36Xh338mug4zj9sXpk+XKenPSMmYh4LrkjkJxoUcII+OaLmTDkr6+CcS6BqIUdl1nu TiBy+s4VltfkFR2WRPKjRbUOkheV0339iiTQc5BI0ixFCguc6+SFs215sX1Jt1Ar4/bWym 9bIZW/1GXoQwZEecgkSjUXFLU0qafTWkHhU+8OsLAEnP8HWW90QxZi4zJwrP1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1774639789; a=rsa-sha256; cv=none; b=Yferg1vikb3/RiaGHtBoo32pNRxt4yFgLXCDZ6hsmxERI4u9qTyO3OvDp5mKz25LXxg1f5 hIjIM20WjIXOs8W3nqtUeg/BdcNUXxByE16hvbNW/Bbymyd7WW1BZXkwSW1t70VfT7JE1x HookgldAhUK8uTrgIwqWL6+atR7A817syzZWl1iBmwWaa53jnHv3pA1BvxcF39R5kCxKDP 5UYEajUVU1pcdMj77JyUcS7VqVFuPsdrhHgTbZZTr+NdMx9eAjJzEpkdCSvg483gMTCKhR 1PEfJsnp9f88Ld0+InNyXULcRuHepPzhWu8nw3NwACTDo27WscF+YY9rbmce/Q== 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=1774639789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LNvkZTMxtDWt7xlqXVO5+T3rdMitRDdMS1UuYWJwc74=; b=lXFXEImFc/rwOs8NfiJQ9R/KYJXzmW6Yfqzq0sCc3gqauiXtgl+g+1vepCtw59T8Wy0yKh Z5fpyKFFWIYsQX9aB/c/h/fOb+JgdFNkriX07hblCAdmh79C3XC2lGScurBUkwqvIpTxFG z/rwf/5YTI1WqOFNJNe3ARPsU4R6DIC1+il6npl5f16lLhTY4oXMy/F7FtnH3OnS0h9R3C Ga78Q2Zd1TLd74jdA7EFq6bVCEcy3F79aTNsrg/+rpyXSvxPJFP5Hx4gTxNTEcGgJONGbX ntIsn4YUi+IoqKlWoNSkqaqlIaePBV7GEAxJygw0iuFU0VH+e2Dz+Vz8M6VpLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fj9hD73Gyzsj4 for ; Fri, 27 Mar 2026 19:29:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d2d4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 27 Mar 2026 19:29:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Christos Longros From: Gleb Smirnoff Subject: git: 6cf1afeccd8a - main - newsyslog: check for rename failure during log rotation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6cf1afeccd8aaf926c58c5f0ee24ca3d2329a0ce Auto-Submitted: auto-generated Date: Fri, 27 Mar 2026 19:29:43 +0000 Message-Id: <69c6daa7.1d2d4.4bb254d1@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=6cf1afeccd8aaf926c58c5f0ee24ca3d2329a0ce commit 6cf1afeccd8aaf926c58c5f0ee24ca3d2329a0ce Author: Christos Longros AuthorDate: 2026-03-27 19:28:42 +0000 Commit: Gleb Smirnoff CommitDate: 2026-03-27 19:28:42 +0000 newsyslog: check for rename failure during log rotation Differential Revision: https://reviews.freebsd.org/D56088 --- usr.sbin/newsyslog/newsyslog.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/newsyslog/newsyslog.c b/usr.sbin/newsyslog/newsyslog.c index 084aeb36b052..fc8ba7df79af 100644 --- a/usr.sbin/newsyslog/newsyslog.c +++ b/usr.sbin/newsyslog/newsyslog.c @@ -1955,9 +1955,9 @@ do_rotate(const struct conf_entry *ent) if (noaction) printf("\tmv %s %s\n", zfile1, zfile2); - else { - /* XXX - Ought to be checking for failure! */ - (void)rename(zfile1, zfile2); + else if (rename(zfile1, zfile2) != 0) { + warn("can't mv %s to %s", zfile1, zfile2); + continue; } change_attrs(zfile2, ent); if (ent->compress && strlen(logfile_suffix) == 0) {