[libcamera-devel,0/2] improve secure_getenv()
mbox series

Message ID 20190424110044.12608-1-giulio.benetti@micronovasrl.com
Headers show
Series
  • improve secure_getenv()
Related show

Message

Giulio Benetti April 24, 2019, 11 a.m. UTC
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(-)

Comments

Giulio Benetti April 26, 2019, 8:42 a.m. UTC | #1
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().

Changes:
V1->V2: 
* improve meson.build
* fix recursive secure_getenv()

Giulio Benetti (2):
  meson: check if secure_getenv() is present
  libcamera: utils: call secure_getenv() if it exists or workaround with
    issetugid()

 meson.build             | 11 +++++++++++
 src/libcamera/utils.cpp |  8 ++++++--
 2 files changed, 17 insertions(+), 2 deletions(-)