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


_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev

Reply via email to