From a0f8161fe7b1850866415283b343b12eaa9e9d91 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Tue, 27 Jun 2006 16:30:46 +0000 Subject: [PATCH] Stopgap for tar creating insane group ownerships due to tiny gid_t. --- commands/simple/tar.c | 1 + 1 file changed, 1 insertion(+) 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)); -- 2.44.0