From: Ben Gras Date: Tue, 27 Jun 2006 16:30:46 +0000 (+0000) Subject: Stopgap for tar creating insane group ownerships due to tiny gid_t. X-Git-Tag: v3.1.3~281 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zpipe.c?a=commitdiff_plain;h=a0f8161fe7b1850866415283b343b12eaa9e9d91;p=minix.git Stopgap for tar creating insane group ownerships due to tiny gid_t. --- diff --git a/commands/simple/tar.c b/commands/simple/tar.c index 53c68042b..0ee047444 100755 --- a/commands/simple/tar.c +++ b/commands/simple/tar.c @@ -551,6 +551,7 @@ char *file; } 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_t)gid < 0) gid = 0; chown(file, uid, gid); } chmod(file, u_mask & (int) convert(header.member.m_mode, INT_TYPE));