Message ID | c3ac99da5ee8c1c177b0ad5f7ba6f4c086b7cc1d.1472125392.git.denis.osvald@sartura.hr |
---|---|
State | Changes Requested |
Delegated to: | John Crispin |
Headers | show
Return-Path: <openwrt-devel-bounces@lists.openwrt.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sKjKx2pGkz9sXR for <incoming@patchwork.ozlabs.org>; Thu, 25 Aug 2016 21:55:33 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=sartura-hr.20150623.gappssmtp.com header.i=@sartura-hr.20150623.gappssmtp.com header.b=hfVlR+Xq; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 8E9CAB91F8D; Thu, 25 Aug 2016 13:55:09 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Thu, 25 Aug 2016 13:55:09 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 654EBB91F71 for <openwrt-devel@lists.openwrt.org>; Thu, 25 Aug 2016 13:55:07 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .sartura. - helo: .mail-wm0-f51.google. - helo-domain: .google.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7 Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by arrakis.dune.hu (Postfix) with ESMTPS for <openwrt-devel@lists.openwrt.org>; Thu, 25 Aug 2016 13:55:07 +0200 (CEST) Received: by mail-wm0-f51.google.com with SMTP id d196so38236266wmd.0 for <openwrt-devel@lists.openwrt.org>; Thu, 25 Aug 2016 04:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sartura-hr.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=wLHLVeBzmSsxp+P2m26S3IYSwIYhG/6YYk8cPS1Z/Vs=; b=hfVlR+XqRsYHquI8gO+D1yY2KVBIf3hr7rpokmjvpgjhc1uFRuSQJeMSJKG06ZxDEo pVB1cY36ehXIJWNm4Jlmj6owU8gvmXf2DQEaEeXL6W8rBEj8tr8x+Oq/zwcru6Hyzi24 zkZTd0cbvZe3vFpEifb39fAgPSn/cnuzHJY6OoCJgW5wstrVpg9S1oEfoKgraRGZG81c DJAcYqtMwbi6GUrwPwIVrIcRVnnS5P4j1epQv5MxvOFjRP9OkiIMd2vFNX7OmtH/MiCt Th1C7ZZNh8yqg9sax++xfqqYOAw5tITlSoxyoFE6DszJpZrr4dFZBX2V1L+hZyUKIU6B 8O7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=wLHLVeBzmSsxp+P2m26S3IYSwIYhG/6YYk8cPS1Z/Vs=; b=hTYs+YfTZBvsm85oRrlwuJH8DBeCOPIoUn3zkamvGqQlb23f9ISNZk6O8M0ZeEk1zh E4YfWBdyjxPiVZz72JPBVBEYnl5t/KGMrc+ij5L5+xpyr6KNB0tcMwDWAz7D0yYRPaXq xviJ27WxvjVWb++krOYMKgy+Ygc8Xj3OJ4Mgl4eJS1N3uXiU2fqkP8QHDnJgTzH+6lrV JSudtCtXEOz4rDokGzAf2nW7qtCE5WYqVczl+FYG06jbDrhceFT71HxvR5LC3kJ6Y596 Hpwrf7ccKvS95oOd/mOi6RTc0obkDUa6u/r89F5W4nV0GhR7vIPhCbVW+8/Imkpz6GJg IUDw== X-Gm-Message-State: AE9vXwP5G5GoHo4aZhcT8VHTCqXHaCVV1z9Gp16bE3oWA/e9UKIJUuTsh+6EM4c8EWGwHkR/5eeA6kv9w9gGFwo6P3zecLRLmpPDD1J2mCvnLJ6AbLY4yj5+brvrYPYnSXgDEPG9PZLj/PpZWq/NXbRoPyTeT3mTHmOBZ1m7HIvuMg0YbAJxv0o2+gp2qYq51jaHOzXToA== X-Received: by 10.28.151.77 with SMTP id z74mr7437578wmd.117.1472126106541; Thu, 25 Aug 2016 04:55:06 -0700 (PDT) Received: from localhost.localdomain (cpe-94-253-164-115.zg.cable.xnet.hr. [94.253.164.115]) by smtp.gmail.com with ESMTPSA id n131sm38428455wmd.3.2016.08.25.04.55.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Aug 2016 04:55:05 -0700 (PDT) From: Denis Osvald <denis.osvald@sartura.hr> To: openwrt-devel@lists.openwrt.org Date: Thu, 25 Aug 2016 13:54:52 +0200 Message-Id: <c3ac99da5ee8c1c177b0ad5f7ba6f4c086b7cc1d.1472125392.git.denis.osvald@sartura.hr> X-Mailer: git-send-email 2.9.3 In-Reply-To: <cover.1472125392.git.denis.osvald@sartura.hr> References: <cover.1472125392.git.denis.osvald@sartura.hr> In-Reply-To: <cover.1472125392.git.denis.osvald@sartura.hr> References: <cover.1472125392.git.denis.osvald@sartura.hr> Subject: [OpenWrt-Devel] [PATCH ubus 1/3] ubusd: don't check ACL when object is NULL X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: OpenWrt Development List <openwrt-devel.lists.openwrt.org> List-Unsubscribe: <https://lists.openwrt.org/cgi-bin/mailman/options/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=unsubscribe> List-Archive: <http://lists.openwrt.org/pipermail/openwrt-devel/> List-Post: <mailto:openwrt-devel@lists.openwrt.org> List-Help: <mailto:openwrt-devel-request@lists.openwrt.org?subject=help> List-Subscribe: <https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel>, <mailto:openwrt-devel-request@lists.openwrt.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" <openwrt-devel-bounces@lists.openwrt.org> |
diff --git a/ubusd_acl.c b/ubusd_acl.c index 85ada5d..2700c86 100644 --- a/ubusd_acl.c +++ b/ubusd_acl.c @@ -101,7 +101,7 @@ ubusd_acl_check(struct ubus_client *cl, const char *obj, struct blob_attr *cur; int rem; - if (!cl->uid) + if (!cl->uid || !obj) return 0; acl = avl_find_ge_element(&ubusd_acls, obj, acl, avl);
If there are any ACLs present other than global wildcard "*", the AVL tree comparator will compare ACL key to object name. However, object name can be NULL in cases where ACL check is done on call to internal ubus objects (e.g. ubus monitor). With this change we skip checking ACLs on such NULL objects. Signed-off-by: Denis Osvald <denis.osvald@sartura.hr> --- ubusd_acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)