pxar: change uid and gid to u32 instead of u64
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
This commit is contained in:
parent
5e50c606b0
commit
ead7546a96
@ -198,8 +198,8 @@ impl <'a, W: Write> Encoder<'a, W> {
|
||||
let entry = PxarEntry {
|
||||
mode: mode,
|
||||
flags: 0,
|
||||
uid: stat.st_uid as u64,
|
||||
gid: stat.st_gid as u64,
|
||||
uid: stat.st_uid,
|
||||
gid: stat.st_gid,
|
||||
mtime: mtime as u64,
|
||||
};
|
||||
|
||||
|
@ -51,8 +51,8 @@ pub struct PxarHeader {
|
||||
pub struct PxarEntry {
|
||||
pub mode: u64,
|
||||
pub flags: u64,
|
||||
pub uid: u64,
|
||||
pub gid: u64,
|
||||
pub uid: u32,
|
||||
pub gid: u32,
|
||||
pub mtime: u64,
|
||||
}
|
||||
|
||||
|
@ -378,8 +378,8 @@ impl <'a, R: Read, F: Fn(&Path) -> Result<(), Error>> SequentialDecoder<'a, R, F
|
||||
|
||||
fn restore_ugid(&mut self, entry: &PxarEntry, fd: RawFd) -> Result<(), Error> {
|
||||
|
||||
let uid = entry.uid as u32;
|
||||
let gid = entry.gid as u32;
|
||||
let uid = entry.uid;
|
||||
let gid = entry.gid;
|
||||
|
||||
let res = unsafe { libc::fchown(fd, uid, gid) };
|
||||
Errno::result(res)?;
|
||||
|
Loading…
Reference in New Issue
Block a user