From patchwork Wed Apr 24 11:00:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1099 Return-Path: Received: from mail.micronovasrl.com (mail.micronovasrl.com [212.103.203.10]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CF21660DB4 for ; Wed, 24 Apr 2019 13:00:49 +0200 (CEST) Received: from mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) by mail.micronovasrl.com (Postfix) with ESMTP id 588A2B014D2 for ; Wed, 24 Apr 2019 13:00:49 +0200 (CEST) Authentication-Results: mail.micronovasrl.com (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=micronovasrl.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=micronovasrl.com; h=references:in-reply-to:x-mailer:message-id:date:date:subject :subject:to:from:from; s=dkim; t=1556103648; x=1556967649; bh=Vc EnqagBzd/AeEeW2wub9PfSdvXbqyoJ5h0iyrH5By4=; b=eCWpUXrjIuL58LBUXb 3uPY8P91PVoUjdgKbicG+EyRg8xAtYByVnqlc0VBeJOAyLrubu0UYGS0IVH0B/dx ALb+lgO+z8UiLE1mSM/1fcSmNzEWHEQCiO96VGp2ocUfcQwU3jQjyzMtMMoVWXxT Z6R+y3qmHVvy+oQBHg3o6XRlc= X-Virus-Scanned: Debian amavisd-new at mail.micronovasrl.com X-Spam-Flag: NO X-Spam-Score: -2.9 X-Spam-Level: X-Spam-Status: No, score=-2.9 tagged_above=-10 required=4.5 tests=[ALL_TRUSTED=-1, BAYES_00=-1.9] autolearn=unavailable autolearn_force=no Received: from mail.micronovasrl.com ([127.0.0.1]) by mail.micronovasrl.com (mail.micronovasrl.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Mp-3Z80ymBXg for ; Wed, 24 Apr 2019 13:00:48 +0200 (CEST) Received: from ubuntu.localdomain (88-149-228-83.v4.ngi.it [88.149.228.83]) by mail.micronovasrl.com (Postfix) with ESMTPSA id BB0BCB0067F; Wed, 24 Apr 2019 13:00:47 +0200 (CEST) From: Giulio Benetti To: libcamera-devel@lists.libcamera.org Date: Wed, 24 Apr 2019 13:00:42 +0200 Message-Id: <20190424110044.12608-1-giulio.benetti@micronovasrl.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <364aa322-85ca-2c17-984e-1e807bd832ca@micronovasrl.com> References: <364aa322-85ca-2c17-984e-1e807bd832ca@micronovasrl.com> Subject: [libcamera-devel] [PATCH 0/2] improve secure_getenv() X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Apr 2019 11:00:50 -0000 Local secure_getenv() at the moment uses getauxval(AT_SECURE), but it's not always present in libc and secure_getenv() instead could be. Check if secure_getenv() is available from libc and use it, otherwise workaround it using issetugid(). Giulio Benetti (2): meson: check if secure_getenv() is present libcamera: utils: call secure_getenv() if it exists or workaround with issetugid() meson.build | 12 ++++++++++++ src/libcamera/utils.cpp | 8 ++++++-- 2 files changed, 18 insertions(+), 2 deletions(-)