get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.1/patches/2221486/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2221486,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2221486/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260409135311.49221-1-pablo@netfilter.org/",
    "project": {
        "id": 26,
        "url": "http://patchwork.ozlabs.org/api/1.1/projects/26/?format=api",
        "name": "Netfilter Development",
        "link_name": "netfilter-devel",
        "list_id": "netfilter-devel.vger.kernel.org",
        "list_email": "netfilter-devel@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null
    },
    "msgid": "<20260409135311.49221-1-pablo@netfilter.org>",
    "date": "2026-04-09T13:53:11",
    "name": "[nft,v2,1/5] main: consolidate EPERM to non-root users",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "0a5e61489696670fcfa2977cc4b7ba90a7e274de",
    "submitter": {
        "id": 1315,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/1315/?format=api",
        "name": "Pablo Neira Ayuso",
        "email": "pablo@netfilter.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260409135311.49221-1-pablo@netfilter.org/mbox/",
    "series": [
        {
            "id": 499307,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/499307/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=499307",
            "date": "2026-04-09T13:53:11",
            "name": "[nft,v2,1/5] main: consolidate EPERM to non-root users",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/499307/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2221486/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2221486/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <netfilter-devel+bounces-11770-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "netfilter-devel@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=netfilter.org header.i=@netfilter.org\n header.a=rsa-sha256 header.s=2025 header.b=pVqNEfWO;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c09:e001:a7::12fc:5321; helo=sto.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-11770-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=netfilter.org header.i=@netfilter.org\n header.b=\"pVqNEfWO\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=217.70.190.124",
            "smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=netfilter.org",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=netfilter.org"
        ],
        "Received": [
            "from sto.lore.kernel.org (sto.lore.kernel.org\n [IPv6:2600:3c09:e001:a7::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fs1kK14Pfz1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 23:58:49 +1000 (AEST)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 8F2F9302454C\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  9 Apr 2026 13:54:24 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 3C5B73A1A55;\n\tThu,  9 Apr 2026 13:53:19 +0000 (UTC)",
            "from mail.netfilter.org (mail.netfilter.org [217.70.190.124])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id D9DB53CCFD3\n\tfor <netfilter-devel@vger.kernel.org>; Thu,  9 Apr 2026 13:53:16 +0000 (UTC)",
            "from localhost.localdomain (mail-agni [217.70.190.124])\n\tby mail.netfilter.org (Postfix) with ESMTPSA id B7A0660181;\n\tThu,  9 Apr 2026 15:53:14 +0200 (CEST)"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775742798; cv=none;\n b=UaYosYFTNQp8SX2T6aMI3+kwwzh8fhCH+5v4stxt4EcGas78GjAfA3BaKsfpE9jsxHbx+w63m+NNN2Le4k9Nw6POWPtEfS6mmEIuotM06XGFoJRP95fNK5IyaOoGra9PWu6IASMIaZoOrYZyOKiqLKo6ENO/sizX9IZ9fQmNQnY=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775742798; c=relaxed/simple;\n\tbh=9u6ngc0ZuFsLWmVJgMpInLo4LBvVV3K2EPyYBVxtFXY=;\n\th=From:To:Cc:Subject:Date:Message-ID:MIME-Version;\n b=RN2NHb6SHyZrKvP8mpQ1XrR8cCXBL9RilXmxigAA8BsTD+F474J/ZSma8Ue3HlTglWTGS1bzZ7A9Skg6WaRwxiDmGeLfqMjtGytMe3QH1/a1LYWRFhIjHBuQgK4PJLZPtSuAdcQu5XNV9BGNBnwjKvT6f8lmNwsOMMZoXAJZuQU=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=none (p=none dis=none) header.from=netfilter.org;\n spf=pass smtp.mailfrom=netfilter.org;\n dkim=pass (2048-bit key) header.d=netfilter.org header.i=@netfilter.org\n header.b=pVqNEfWO; arc=none smtp.client-ip=217.70.190.124",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=netfilter.org;\n\ts=2025; t=1775742795;\n\tbh=2UPQ5oMClfE6GCt3zBww21zcRdq2X/3rTwxhiiYG3Hg=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=pVqNEfWOZrKuPUmwzP0yILcmw+vr4snGi+TQ8Np+wMIhV0Yr60JIYyAMHcnrU6xAL\n\t 05BXohasuGpALHNXgiXlANdp+QprYf+TMimxFQ+HwekoQ3b9PxmQ9BmxcFNm3py+6C\n\t rg2pYCC+DRz7pClJdpu8xsUsX3Wxbt5aq9Phezo+faczXXLKPt1CW/9Lrx2ai5Oer+\n\t W3IM+ChF8Uq6cU//BYhZ7YJY0L7ROlIrSKgL7h5+IysZ5a11qQIc5O9ueW5VmuM/PP\n\t +2joCGV78ONgwq2IY4FuKPgeg/JLTVj9K5zzMEhyCqFnowBFb70JSPTzjTlIEN6DOW\n\t 28TqxiKugyl0w==",
        "From": "Pablo Neira Ayuso <pablo@netfilter.org>",
        "To": "netfilter-devel@vger.kernel.org",
        "Cc": "fw@strlen.de,\n\tphil@nwl.cc",
        "Subject": "[PATCH nft,v2 1/5] main: consolidate EPERM to non-root users",
        "Date": "Thu,  9 Apr 2026 15:53:11 +0200",
        "Message-ID": "<20260409135311.49221-1-pablo@netfilter.org>",
        "X-Mailer": "git-send-email 2.47.3",
        "Precedence": "bulk",
        "X-Mailing-List": "netfilter-devel@vger.kernel.org",
        "List-Id": "<netfilter-devel.vger.kernel.org>",
        "List-Subscribe": "<mailto:netfilter-devel+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:netfilter-devel+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "Move the check added by 3cfb9e4b3e40 (\"src: report EPERM for non-root users\")\nto the main function.\n\nEPERM is also possible when removing a ruleset that is owned by a\nprocess, tone it down to suggest that root is maybe needed.\n\nSigned-off-by: Pablo Neira Ayuso <pablo@netfilter.org>\n---\nv2: handle EPERM from main, per Florian.\n    I'm not resending the entire series at this stage,\n    patch 2/5, 3/5, 4/5 and 5/5 got no changes.\n\n src/libnftables.c | 7 +------\n src/main.c        | 2 ++\n 2 files changed, 3 insertions(+), 6 deletions(-)",
    "diff": "diff --git a/src/libnftables.c b/src/libnftables.c\nindex 66b03a1170bb..bc42c32de889 100644\n--- a/src/libnftables.c\n+++ b/src/libnftables.c\n@@ -630,13 +630,8 @@ int nft_run_cmd_from_buffer(struct nft_ctx *nft, const char *buf)\n \tparser_rc = rc;\n \n \trc = nft_evaluate(nft, &msgs, &cmds);\n-\tif (rc < 0) {\n-\t\tif (errno == EPERM) {\n-\t\t\tfprintf(stderr, \"%s (you must be root)\\n\",\n-\t\t\t\tstrerror(errno));\n-\t\t}\n+\tif (rc < 0)\n \t\tgoto err;\n-\t}\n \n \tif (parser_rc) {\n \t\trc = parser_rc;\ndiff --git a/src/main.c b/src/main.c\nindex 29b0533dee7c..4cb51ff7f5fe 100644\n--- a/src/main.c\n+++ b/src/main.c\n@@ -548,6 +548,8 @@ int main(int argc, char * const *argv)\n \t\tgoto out_fail;\n \t}\n \n+\tif (rc && errno == EPERM)\n+\t\t fprintf(stderr, \"Error: %s (perhaps you must be root?)\\n\", strerror(errno));\n out:\n \tnft_ctx_free(nft);\n \treturn rc;\n",
    "prefixes": [
        "nft",
        "v2",
        "1/5"
    ]
}