| Message ID | 20260927232339.33508-1-ihar.hrachyshka@gmail.com |
|---|---|
| State | New |
| Delegated to: | Ilya Maximets |
| Headers | show
Return-Path: <ovs-dev-bounces@openvswitch.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=kA1s5IUF; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4htL9T2QT7z1xyl for <incoming@patchwork.ozlabs.org>; Mon, 28 Sep 2026 09:23:57 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id A925340143; Sun, 27 Sep 2026 23:23:54 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id mpJ31ySP7aFV; Sun, 27 Sep 2026 23:23:53 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.0 smtp2.osuosl.org B174E400C8 Authentication-Results: smtp2.osuosl.org; arc=fail smtp.remote-ip="2605:bc80:3010:104::8cd3:938" ARC-Seal: i=2; d=osuosl.org; s=arc; a=rsa-sha256; cv=fail; t=1790551433; b=BUNnykTcye92BM69BGK8icUNEE/Nta/uEaOps1jDqR/NMVWoEMATQP8jXoXWwuEHPMqd H6sh6WssvamQ/SPdZ/yGkKdH2S+uZkv4PJ3QWUFAzfui1qGBNJMlFYb37TAIwOa96Fhhk JgxQLu/P0n+vH99OpImN5QrUQlyuqrd/FZ0fDX/kPj3PLFlOgpoUPE30exm3gZk8sfBNt pxQ1mHqvuxifs+dJGsFqLVh8Id5/+IWZDoa4/C4Z2xD1maLRfRfkhRr8OJ3QL2weyN9aA RWqWeugRUTVRS+1JlltVTOkqkaPIQHmFWau0Ksyznv/cHVCfXBF9kwt03RvkkCTxV8g== ARC-Message-Signature: i=2; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1790551433; h=X-Comment:Received:X-Original-To:Delivered-To:Received:Received: X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level:X-Spam-Status: Received:ARC-Filter:Received-SPF:Received:Received:DKIM-Signature: X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received: Received:To:Date:Message-ID:X-Mailer:MIME-Version:Subject:X-BeenThere: X-Mailman-Version:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:Content-Type: Content-Transfer-Encoding:Errors-To:Sender; bh=XjytqB+1gJLsHcPh2Unbbk4PEo0fA2HBQnlzQtj6QdY=; b=NKskGCVK/kacmGy6tkAyuAz5SxFXYnfqcdOXgfrOCfZzFOR2p70TGE3yT3IWixCyrzl9 LqNDGBCDXHQPvufd6sM/7PSdZvVXRbxeQLIkcVDxX7uvDHlQD55Gl8m4jXdMtLimN1P6h TdIa9sgIGUTObJeAcN1VKRO6gw1dmaF2xupZN2Ht05DP7aybk2rdQTKWkr6mbBiIbeOqm NSE76QmH1LlJUxK80lFyQfliM0Z46qPSk3gFr9GavocBXStLoDT3hihW10pXxQxuWLTVt cDxXLv5/6EReGdoMfSVgsHEX5ITCtIUUBgzP6dDj8IAKV+KBkjE5QV8nHo3owGijdgw== ARC-Authentication-Results: i=2; smtp2.osuosl.org; dkim=fail reason="signature verification failed" header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=kA1s5IUF; arc=fail smtp.remote-ip="2605:bc80:3010:104::8cd3:938" X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> Authentication-Results: smtp2.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=kA1s5IUF Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp2.osuosl.org (Postfix) with ESMTPS id B174E400C8; Sun, 27 Sep 2026 23:23:53 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 89E7DC0566; Sun, 27 Sep 2026 23:23:53 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 86DC1C0565 for <dev@openvswitch.org>; Sun, 27 Sep 2026 23:23:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 7349380DCF for <dev@openvswitch.org>; Sun, 27 Sep 2026 23:23:52 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id gdSVEF-J32xf for <dev@openvswitch.org>; Sun, 27 Sep 2026 23:23:51 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.0 smtp1.osuosl.org 9EC5080DCD Authentication-Results: smtp1.osuosl.org; arc=none smtp.remote-ip="2607:f8b0:4864:41::d" ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1790551431; b=pQHBP8paDLsxW/yqvQat7DFhq1qDMPKM77VJiBdfnCTSOliQMwxjihVqlAmqaoSAquTm gZxwyrXzkI1+tyEYObeWoZIa4kWj3ova2e5kDCvedNZUsT/sDRQBWdtJjuro9hdDSf024 s1Za+PVbyJNDltpRijsXtZi+qEi2ls8xhZtUUs3M87bQva26koaeii4vmAyCrAroiemWH 8qZWLnGBRO/jn9SxeJYYwfv6+14T77EmvbnoPx0FdwCOSL7yq2NegmZplx444sUMYy8gs suqKz90ugyU00VQT5WPZpLngiLAX/L5CRSxsVl5XwSTGEBBgKmP4/uOvURIefuwLRyA== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1790551431; h=Received-SPF:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding; bh=qFBCAc5YYB06Hn2E+p/v0n18Q6f9buU7IaZOSVozwCk=; b=LflmPH2UAqJWbnkd1kc4877n4Bzls6I3lreXZZHtMN5ur+gpwWn6gPI1/Sv4H/ZlzViY 7eT/84BXyKEQMGzt7Dvp6rr6VASBh0OKMNJ9v1eP0NSrpmKO7x/BcdAJR6cm5iFLh8xeT rjyJtA1WMwUJK0znRDiPTZ1JwWPCYt0fEi6nhXdUQzXQ9QBCUTJiDkXZsbZ0DtRTCrgot xF+8B0t8WJ0Lt6v7iYZ0uBppiAOwkpXgieqnHvgcnAK1E78JLTUVRvmdlanbc7g5r299Y W6EHK/8kORP8gZaZo1zgnVQ7gXuPTA9DXW3R+F0VQT8pK9e3ud9M9lBH/83qnCvz/hA== ARC-Authentication-Results: i=1; smtp1.osuosl.org; dmarc=pass header.from=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=kA1s5IUF; arc=none smtp.remote-ip="2607:f8b0:4864:41::d" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:41::d; helo=mail-yx2-x0d.google.com; envelope-from=ihar.hrachyshka@gmail.com; receiver=<UNKNOWN> Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=kA1s5IUF Received: from mail-yx2-x0d.google.com (mail-yx2-x0d.google.com [IPv6:2607:f8b0:4864:41::d]) by smtp1.osuosl.org (Postfix) with ESMTPS id 9EC5080DCD for <dev@openvswitch.org>; Sun, 27 Sep 2026 23:23:51 +0000 (UTC) Received: by mail-yx2-x0d.google.com with SMTP id 00721157ae682-8a7c33dbfeeso22570127b3.2 for <dev@openvswitch.org>; Sun, 27 Sep 2026 16:23:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790551430; x=1791156230; darn=openvswitch.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=qFBCAc5YYB06Hn2E+p/v0n18Q6f9buU7IaZOSVozwCk=; b=kA1s5IUFiUjcF/2iiODKMmdm8A+ZioWtMg/HEz/Pr7+lBUMtg12TJn3TbwlsfbBtl4 m4//UH9kztMaN3f+hjvuxEGnfoiudKxI5SWIBTeXlhF5rYPQNNsrTJusV/K2+pJGMy7l uwrwNgHPzn22Jb8nKPuSJ96N9Z8dx2jX7O08Gl/mm+q4oG9hchDoDZB3bsmR3wck+94h 3f5scpaYQJbdn9JR4hLg6X/b13DPDp4pnPE64eOZgXRTQ1+nMPcRACZrKpfMMBNE4fdJ w/U52V/B6NWV+MD/7PiUE4vi/p8A15GC167cJqay5wr5NykFjdXL90DPVJkbwdHJVHrr ZBfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790551430; x=1791156230; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=qFBCAc5YYB06Hn2E+p/v0n18Q6f9buU7IaZOSVozwCk=; b=yyv3weSpn97yOF2fz6sbgxA5ipsp88ndkcrUZWgfkepO4SaO4GOTQp+jJkbPmazFjE BIXp8JSnjSTxZFFbQbLcbrJu+kxhXPvQjpp4L/3tVGw1ukYGD4tPqWLQkwVYFAH8Srhh zfNcjAYc3lNfxoB9eHe8gILREBRz8mI+3S17lWjicjlqusRuRflNjFkCPOzqSi16SyAw 1sYt+IFfBviL4xQRNCkwTZsgTGSpZBNkHotxzdWAo/6Mm9ivckx/CtU9gujfeStnnnD9 NzjaLXlTGmIxEpdrkuUgSeiuSoVbZ7UrKOT/Lg/a5to8VPggLwPLv7gR15muIoXn0jSE 9qSw== X-Gm-Message-State: AFq9FYJLycQEd2eQJ8jUYlV0qBrrCpIq9NyP8V9RAvL4VT3BpyTdM1TY 15sdcFK9jATqlDeQUy8v85eKq5pyeQZs6qLvmW9KlnKLGBUSXWX6kN+8hjFQo/VO X-Gm-Gg: AYBFou1e/p351XxDGfOY3xHk/ThA9h4IPAUZUFkWQiFOud9TIaF0kECldfR2ekmE7wd oxxO3aEonNXj+vEgnB3f1kTbfAcJwT5pftnrcDLHdZ168FHm2fjSNi2UBYE+CWBZcWdhl5vjSpM c4/EPfbeSIvYP/UzX5UncXkn7pOAED66YvjLIDQXoXs0R3qmcJ0X0YHw3WNYPD2lwXnAOYfQDD2 RWOaKYeT71iRTZ4Z0U50vmcbKZgIJcFUCTuU0klB3ZxwrruHlkFtGc+RMuZ2sOE/SapivNNJ8eu x7LTe6lCou3vFlej9LVmmWlAFQFFLT3mlr1ltyHMLpG2nkl0JSsCKlINUAAgkhZjgBmR5nDwa8S P1NcMic1dfHnZ+8R3U3Vd1zHgMYVyExOycQp792UuqfV+a9OUf7DZJuzJ16IjM1PsMI+hJZ1nmu z71BJngwlxYWTIMSw49Z7awjnJcslI/Wn6PAL6zK1xXdKynxrvr4rEDmiS6wK+yENpVpQOwMDy8 hTsHa+yi5OaLWYa8zadY5J7cQ== X-Received: by 2002:a05:690c:ec7:b0:873:5bb2:6bfd with SMTP id 00721157ae682-8a64d4009dcmr54306307b3.39.1790551429995; Sun, 27 Sep 2026 16:23:49 -0700 (PDT) Received: from mair.home.arpa ([65.187.96.176]) by smtp.gmail.com with ESMTPSA id 00721157ae682-8a860e5a5desm35654767b3.13.2026.09.27.16.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2026 16:23:48 -0700 (PDT) To: dev@openvswitch.org Date: Sun, 27 Sep 2026 19:23:39 -0400 Message-ID: <20260927232339.33508-1-ihar.hrachyshka@gmail.com> X-Mailer: git-send-email 2.54.0 MIME-Version: 1.0 Subject: [ovs-dev] [PATCH] ovsdb-server: Allow read-only config files. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: <ovs-dev.openvswitch.org> List-Unsubscribe: <https://mail.openvswitch.org/mailman/options/ovs-dev>, <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe> List-Archive: <http://mail.openvswitch.org/pipermail/ovs-dev/> List-Post: <mailto:ovs-dev@openvswitch.org> List-Help: <mailto:ovs-dev-request@openvswitch.org?subject=help> List-Subscribe: <https://mail.openvswitch.org/mailman/listinfo/ovs-dev>, <mailto:ovs-dev-request@openvswitch.org?subject=subscribe> From: Ihar Hrachyshka via dev <ovs-dev@openvswitch.org> Reply-To: Ihar Hrachyshka <ihar.hrachyshka@gmail.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" <ovs-dev-bounces@openvswitch.org> |
| Series |
[ovs-dev] ovsdb-server: Allow read-only config files.
|
expand
|
| Context | Check | Description |
|---|---|---|
| ovsrobot/apply-robot | success | apply and check: success |
| ovsrobot/github-robot-_Build_and_Test | success | github build: passed |
| ovsrobot/github-robot-_FreeBSD_Build_and_Test | success | github build: passed |
diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c index af217476f..a7f89e148 100644 --- a/ovsdb/ovsdb-server.c +++ b/ovsdb/ovsdb-server.c @@ -642,7 +642,7 @@ reconfigure_ovsdb_server(struct server_config *server_config) FILE *file = NULL; if (config_file_path) { - file = fopen(config_file_path, "r+b"); + file = fopen(config_file_path, "rb"); if (!file) { VLOG_ERR("failed to open configuration file '%s': %s", config_file_path, ovs_strerror(errno));
With --config-file, ovsdb-server only reads the file while loading or reloading configuration. Configuration-changing unixctl commands are rejected. save_config() writes only the internal temporary file used when --config-file is absent. Open the user-provided file read-only so immutable configurations can be used directly. Fixes: 55140090e63a ("ovsdb-server: Allow user-provided config files.") Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka@gmail.com> --- ovsdb/ovsdb-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)