All the go-lint work forced any existing "Uid" -> "UID", but seems to
not have the same rules for Gid, so stat package has calls UID() and
Gid().
Docker-DCO-1.1-Signed-off-by: Phil Estes <estesp@linux.vnet.ibm.com> (github: estesp)
| ... | ... |
@@ -28,7 +28,7 @@ func copyOwnership(source, destination string) error {
|
| 28 | 28 |
return err |
| 29 | 29 |
} |
| 30 | 30 |
|
| 31 |
- if err := os.Chown(destination, int(stat.UID()), int(stat.Gid())); err != nil {
|
|
| 31 |
+ if err := os.Chown(destination, int(stat.UID()), int(stat.GID())); err != nil {
|
|
| 32 | 32 |
return err |
| 33 | 33 |
} |
| 34 | 34 |
|
| ... | ... |
@@ -80,5 +80,5 @@ func (s *DockerDaemonSuite) TestDaemonUserNamespaceRootSetting(c *check.C) {
|
| 80 | 80 |
c.Fatal(err) |
| 81 | 81 |
} |
| 82 | 82 |
c.Assert(stat.UID(), check.Equals, uint32(uid), check.Commentf("Touched file not owned by remapped root UID"))
|
| 83 |
- c.Assert(stat.Gid(), check.Equals, uint32(gid), check.Commentf("Touched file not owned by remapped root GID"))
|
|
| 83 |
+ c.Assert(stat.GID(), check.Equals, uint32(gid), check.Commentf("Touched file not owned by remapped root GID"))
|
|
| 84 | 84 |
} |
| ... | ... |
@@ -12,7 +12,7 @@ func statDifferent(oldStat *system.StatT, newStat *system.StatT) bool {
|
| 12 | 12 |
// Don't look at size for dirs, its not a good measure of change |
| 13 | 13 |
if oldStat.Mode() != newStat.Mode() || |
| 14 | 14 |
oldStat.UID() != newStat.UID() || |
| 15 |
- oldStat.Gid() != newStat.Gid() || |
|
| 15 |
+ oldStat.GID() != newStat.GID() || |
|
| 16 | 16 |
oldStat.Rdev() != newStat.Rdev() || |
| 17 | 17 |
// Don't look at size for dirs, its not a good measure of change |
| 18 | 18 |
(oldStat.Mode()&syscall.S_IFDIR != syscall.S_IFDIR && |