[LEDE-DEV] [PATCH 0/2] procd: dev_exist() refactoring
Jo-Philipp Wich
jo at mein.io
Tue May 17 08:42:09 PDT 2016
Refactor the dev_exist() function of inittab.c to use openat() instead of the
race condition prone chdir()/open()/chdir() sequence.
The refactoring allows us to drop the now unused dev_open(), so kill it.
While we touch openat() things, also change patch_fd() of utils.c to use
stricter flags when opening the "/dev" directory.
Jo-Philipp Wich (2):
inittab: use more robust dev_exist() implementation
utils: use O_PATH when opening /dev
inittab.c | 31 ++++++++++++-------------------
utils/utils.c | 2 +-
2 files changed, 13 insertions(+), 20 deletions(-)
--
2.1.4
More information about the Lede-dev
mailing list