OSDN Git Service

libc: make system properties more secure.
authorNick Kralevich <nnk@google.com>
Fri, 18 Jan 2013 22:26:55 +0000 (14:26 -0800)
committerNick Kralevich <nnk@google.com>
Fri, 18 Jan 2013 22:30:07 +0000 (14:30 -0800)
commitf10c5a2215b3da2e226e8bd148c86e2c146d8e90
tree5b04fb0fefa29165aad717b0f0d2da45d95ddb13
parentbf1d22559376aa5c3fff5c278a90fd0832ec6207
libc: make system properties more secure.

Currently, system properties are passed via the environment
variable ANDROID_PROPERTY_WORKSPACE and a file descriptor passed
from parent to child. This is insecure for setuid executables,
as the environment variable can be changed by the caller.

Modify system property handling so that we get the properties
from a root owned properties file, rather than using an
environment variable.

Related to bug: 8029617

Change-Id: I5717e51f20f9e4339ed0a1fdf2fc797e52670fbb
libc/bionic/system_properties.c
libc/include/sys/_system_properties.h