Stopgap for tar creating insane group ownerships due to tiny gid_t.
This commit is contained in:
parent
59bedc2074
commit
a0f8161fe7
1 changed files with 1 additions and 0 deletions
|
@ -551,6 +551,7 @@ char *file;
|
||||||
}
|
}
|
||||||
if (uid == -1) uid = (int) convert(header.member.m_uid, INT_TYPE);
|
if (uid == -1) uid = (int) convert(header.member.m_uid, INT_TYPE);
|
||||||
if (gid == -1) gid = (int) convert(header.member.m_gid, INT_TYPE);
|
if (gid == -1) gid = (int) convert(header.member.m_gid, INT_TYPE);
|
||||||
|
if((gid_t)gid < 0) gid = 0;
|
||||||
chown(file, uid, gid);
|
chown(file, uid, gid);
|
||||||
}
|
}
|
||||||
chmod(file, u_mask & (int) convert(header.member.m_mode, INT_TYPE));
|
chmod(file, u_mask & (int) convert(header.member.m_mode, INT_TYPE));
|
||||||
|
|
Loading…
Reference in a new issue