mirror of
https://github.com/troglobit/finit.git
synced 2026-11-02 13:20:32 +00:00
Refactor; common nomenclature, ordering, possib. security fix
- Use _PATH_foo for all condition paths, *with* trailing / - Read condition file first, may not exist, in which case we save time - Change from libte makepath() to mkpath(), this changes from hard-coded 0777 perms on all cond dirs to 0755 -- possible security fix Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
32ca117949
commit
e3c8febe3b
4 files changed
+23
-21
No files matched your search
+6
-3
@@ -4,9 +4,12 @@
|
||||
#include <paths.h>
|
||||
#include <svc.h>
|
||||
|
||||
#define COND_DIR "finit/cond"
|
||||
#define COND_PATH _PATH_VARRUN COND_DIR
|
||||
#define COND_RECONF COND_PATH "/reconf"
|
||||
#define COND_BASE "finit/cond"
|
||||
#define COND_USR "usr/"
|
||||
|
||||
#define _PATH_COND _PATH_VARRUN COND_BASE "/"
|
||||
#define _PATH_CONDUSR _PATH_COND COND_USR
|
||||
#define _PATH_RECONF _PATH_COND "reconf"
|
||||
|
||||
typedef enum cond_state {
|
||||
COND_OFF = 0,
|
||||
|
||||
Reference in new issue
Block a user