Skip to content

Commit cacb292

Browse files
committed
[FAB-2865] Set the chaincode file mode bits
We should force the mode bits, rather than accepting what the filesystem just happened to present. Fixes FAB-2865 Change-Id: I02618026927607cc78fd5545e05880bf01bea5af Signed-off-by: Gregory Haskins <[email protected]>
1 parent aa119ec commit cacb292

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/container/util/writer.go

+1
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ func WriteStreamToPackage(is io.Reader, localpath string, packagepath string, tw
149149
header.ModTime = zeroTime
150150
header.ChangeTime = zeroTime
151151
header.Name = packagepath
152+
header.Mode = 0100644
152153

153154
if err = tw.WriteHeader(header); err != nil {
154155
return fmt.Errorf("Error write header for (path: %s, oldname:%s,newname:%s,sz:%d) : %s", localpath, oldname, packagepath, header.Size, err)

0 commit comments

Comments
 (0)