mirror of
				https://github.com/kata-containers/kata-containers.git
				synced 2025-10-31 17:37:20 +00:00 
			
		
		
		
	rustjail: add length check for uid_mappings in rootless euid mapping
This might be a copy miss, gid_mappings is checked twice, one should be uid_mappings. Fixes: #952 Signed-off-by: bin liu <bin@hyper.sh>
This commit is contained in:
		| @@ -225,7 +225,8 @@ fn rootless_euid_mapping(oci: &Spec) -> Result<()> { | ||||
|         return Err(anyhow!(nix::Error::from_errno(Errno::EINVAL))); | ||||
|     } | ||||
|  | ||||
|     if linux.gid_mappings.len() == 0 || linux.gid_mappings.len() == 0 { | ||||
|     if linux.uid_mappings.len() == 0 || linux.gid_mappings.len() == 0 { | ||||
|         // rootless containers requires at least one UID/GID mapping | ||||
|         return Err(anyhow!(nix::Error::from_errno(Errno::EINVAL))); | ||||
|     } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user