basic: allow copy_rights() to work without mounted /proc

This will be used in sysusers later on.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-05-24 21:41:22 +02:00
parent 335f6ab4f1
commit 0520564dcf
4 changed files with 32 additions and 10 deletions
+4 -1
View File
@@ -34,7 +34,10 @@ int readlink_value(const char *p, char **ret);
int readlink_and_make_absolute(const char *p, char **r);
int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid);
int fchmod_and_chown(int fd, mode_t mode, uid_t uid, gid_t gid);
int fchmod_and_chown_with_fallback(int fd, const char *path, mode_t mode, uid_t uid, gid_t gid);
static inline int fchmod_and_chown(int fd, mode_t mode, uid_t uid, gid_t gid) {
return fchmod_and_chown_with_fallback(fd, NULL, mode, uid, gid); /* no fallback */
}
int fchmod_umask(int fd, mode_t mode);
int fchmod_opath(int fd, mode_t m);