diff options
author | Quentin Deslandes <qd@naccy.de> | 2022-09-05 15:42:48 +0100 |
---|---|---|
committer | Quentin Deslandes <qd@naccy.de> | 2022-09-05 15:49:26 +0100 |
commit | 1aa18710aff992832cf901c943a21715ee5e65e6 (patch) | |
tree | 39cdc4042eef9a08088eafe6b7719c73343d5f50 /src/shared/mount-util.c | |
parent | 11749b6108a942f8c301cb7718fa30436a55f923 (diff) | |
download | systemd-1aa18710aff992832cf901c943a21715ee5e65e6.tar.gz |
nspawn: rename RemountIdmapFlags enum to RemountIdmapping
This enum should be used to define various idmapping modes for bind
mounts which might be incompatible. Changing its name and the values
name to reflect that.
Diffstat (limited to 'src/shared/mount-util.c')
-rw-r--r-- | src/shared/mount-util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/mount-util.c b/src/shared/mount-util.c index 2dd73b508d..ab1acfc2e5 100644 --- a/src/shared/mount-util.c +++ b/src/shared/mount-util.c @@ -1053,7 +1053,7 @@ int make_mount_point(const char *path) { return 1; } -static int make_userns(uid_t uid_shift, uid_t uid_range, RemountIdmapFlags flags) { +static int make_userns(uid_t uid_shift, uid_t uid_range, RemountIdmapping idmapping) { _cleanup_close_ int userns_fd = -1; _cleanup_free_ char *line = NULL; @@ -1073,7 +1073,7 @@ static int make_userns(uid_t uid_shift, uid_t uid_range, RemountIdmapFlags flags * as owned by 'nobody', which is safe. (Of course, we shouldn't leave such inodes around, but always * chown() them to the container's own UID range, but it's good to have a safety net, in case we * forget it.) */ - if (flags & REMOUNT_IDMAP_HOST_ROOT) + if (idmapping == REMOUNT_IDMAPPING_HOST_ROOT) if (strextendf(&line, UID_FMT " " UID_FMT " " UID_FMT "\n", UID_MAPPED_ROOT, 0u, 1u) < 0) @@ -1091,7 +1091,7 @@ int remount_idmap( const char *p, uid_t uid_shift, uid_t uid_range, - RemountIdmapFlags flags) { + RemountIdmapping idmapping) { _cleanup_close_ int mount_fd = -1, userns_fd = -1; int r; @@ -1107,7 +1107,7 @@ int remount_idmap( return log_debug_errno(errno, "Failed to open tree of mounted filesystem '%s': %m", p); /* Create a user namespace mapping */ - userns_fd = make_userns(uid_shift, uid_range, flags); + userns_fd = make_userns(uid_shift, uid_range, idmapping); if (userns_fd < 0) return userns_fd; |