From 98877a11dd1ab9e9570bfc7552140ccec8b9d326 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 17 Jun 2017 18:30:12 +0200 Subject: vm/gce: fix image archive creation See the added comment. --- vm/gce/gce.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'vm/gce') diff --git a/vm/gce/gce.go b/vm/gce/gce.go index 0ba38298e..81cd02f67 100644 --- a/vm/gce/gce.go +++ b/vm/gce/gce.go @@ -346,10 +346,14 @@ func uploadImageToGCS(localImage, gcsImage string) error { Mode: 0640, Size: localStat.Size(), ModTime: time.Now(), - Uid: 0, - Uname: "root", - Gid: 0, - Gname: "", + // This is hacky but we actually need these large uids. + // GCE understands only the old GNU tar format and + // there is no direct way to force tar package to use GNU format. + // But these large numbers force tar to switch to GNU format. + Uid: 100000000, + Gid: 100000000, + Uname: "syzkaller", + Gname: "syzkaller", } if err := tarWriter.WriteHeader(tarHeader); err != nil { return fmt.Errorf("failed to write image tar header: %v", err) -- cgit mrf-deployment