Skip to content

Commit

Permalink
Merge pull request #60 from tri-adam/deprecate-uid-gid
Browse files Browse the repository at this point in the history
Deprecate Descriptor UID/Gid (V1)
  • Loading branch information
tri-adam authored Jul 15, 2021
2 parents 8e5aa5c + 07e0151 commit cde6de8
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 10 deletions.
2 changes: 0 additions & 2 deletions pkg/sif/fmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,6 @@ func (fimg *FileImage) FmtDescrInfo(id uint32) string {
s += fmt.Sprintln(" Filelen: ", v.Filelen)
s += fmt.Sprintln(" Ctime: ", time.Unix(v.Ctime, 0).UTC())
s += fmt.Sprintln(" Mtime: ", time.Unix(v.Mtime, 0).UTC())
s += fmt.Sprintln(" UID: ", v.UID)
s += fmt.Sprintln(" Gid: ", v.Gid)
s += fmt.Sprintln(" Name: ", trimZeroBytes(v.Name[:]))
switch v.Datatype {
case DataPartition:
Expand Down
4 changes: 2 additions & 2 deletions pkg/sif/sif.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ type Descriptor struct {

Ctime int64 // image creation time
Mtime int64 // last modification time
UID int64 // system user owning the file
Gid int64 // system group owning the file
UID int64 // Deprecated: UID exists for historical compatibility and should not be used.
Gid int64 // Deprecated: Gid exists for historical compatibility and should not be used.
Name [DescrNameLen]byte // descriptor name (string identifier)
Extra [DescrMaxPrivLen]byte // big enough for extra data below
}
Expand Down
2 changes: 0 additions & 2 deletions pkg/sif/testdata/TestFileImage_FmtDescrInfo/One.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ Descr slot#: 0
Filelen: 62
Ctime: 2018-08-14 07:45:59 +0000 UTC
Mtime: 2018-08-14 07:45:59 +0000 UTC
UID: 1002
Gid: 1002
Name: busybox.deffile
2 changes: 0 additions & 2 deletions pkg/sif/testdata/TestFileImage_FmtDescrInfo/Three.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Descr slot#: 2
Filelen: 955
Ctime: 2018-08-14 07:47:36 +0000 UTC
Mtime: 2018-08-14 07:47:36 +0000 UTC
UID: 1002
Gid: 1002
Name: part-signature
Hashtype: SHA384
Entity: 9F2B6C36D999A3E91CB3104720671590C12D4222
2 changes: 0 additions & 2 deletions pkg/sif/testdata/TestFileImage_FmtDescrInfo/Two.golden
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Descr slot#: 1
Filelen: 704512
Ctime: 2018-08-14 07:45:59 +0000 UTC
Mtime: 2018-08-14 07:45:59 +0000 UTC
UID: 1002
Gid: 1002
Name: busybox.squash
Fstype: Squashfs
Parttype: *System
Expand Down

0 comments on commit cde6de8

Please sign in to comment.