File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -463,12 +463,8 @@ impl Env {
463463 . map_err ( |err| JailerError :: Chmod ( folder_path. to_owned ( ) , err) ) ?;
464464
465465 let c_path = CString :: new ( folder_path. to_str ( ) . unwrap ( ) ) . unwrap ( ) ;
466- #[ cfg( target_arch = "x86_64" ) ]
467- let folder_bytes_ptr = c_path. as_ptr ( ) . cast :: < i8 > ( ) ;
468- #[ cfg( target_arch = "aarch64" ) ]
469- let folder_bytes_ptr = c_path. as_ptr ( ) ;
470466 // SAFETY: This is safe because folder was checked for a null-terminator.
471- SyscallReturnCode ( unsafe { libc:: chown ( folder_bytes_ptr , self . uid ( ) , self . gid ( ) ) } )
467+ SyscallReturnCode ( unsafe { libc:: chown ( c_path . as_ptr ( ) , self . uid ( ) , self . gid ( ) ) } )
472468 . into_empty_result ( )
473469 . map_err ( |err| JailerError :: ChangeFileOwner ( folder_path. to_owned ( ) , err) )
474470 }
You can’t perform that action at this time.
0 commit comments