Stopgap for tar creating insane group ownerships due to tiny gid_t.

This commit is contained in:
Ben Gras 2006-06-27 16:30:46 +00:00
parent 59bedc2074
commit a0f8161fe7

View file

@ -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));