mirror of
https://github.com/troglobit/finit.git
synced 2026-11-20 19:41:51 +00:00
tmpfiles: apply mode and owner of e and f/F entries through an fd
Same treatment as d/D got: e went through fisdir() and a path based chmod/chown, f/F did the chmod/chown by path after closing the file. Both now work on the open fd, so the mode and owner end up on the directory or file that was just checked or written. f/F use open(2) directly, which lets a plain f rely on O_EXCL for create-if-missing instead of the earlier stat(). Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
3 files changed
+68
-47
No files matched your search
@@ -68,6 +68,7 @@ int getgroup (const char *group);
|
||||
int getcuser (char *buf, size_t len);
|
||||
int getcgroup (char *buf, size_t len);
|
||||
|
||||
int fdperm (int fd, mode_t mode, uid_t uid, gid_t gid);
|
||||
int dirperm (const char *path, mode_t mode, uid_t uid, gid_t gid);
|
||||
int mksubsys (const char *dir, mode_t mode, char *user, char *group);
|
||||
|
||||
|
||||
Reference in new issue
Block a user