Tidy up commented code
This commit is contained in:
@@ -72,17 +72,6 @@ func GetSecurityAttributes() string {
|
|||||||
return a
|
return a
|
||||||
}
|
}
|
||||||
|
|
||||||
// func logUser() {
|
|
||||||
// u, err := user.GetUser()
|
|
||||||
// if err == nil {
|
|
||||||
// if len(u.SupplementalGID) == 0 {
|
|
||||||
// log.Printf("Running as user ID %v (%v) with primary group %v", u.UID, u.Name, u.PrimaryGID)
|
|
||||||
// } else {
|
|
||||||
// log.Printf("Running as user ID %v (%v) with primary group %v, and supplementary groups %v", u.UID, u.Name, u.PrimaryGID, strings.Join(u.SupplementalGID, ","))
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
func readProc(filename string) (value string, err error) {
|
func readProc(filename string) (value string, err error) {
|
||||||
// #nosec G304
|
// #nosec G304
|
||||||
buf, err := ioutil.ReadFile(filename)
|
buf, err := ioutil.ReadFile(filename)
|
||||||
|
|||||||
@@ -110,7 +110,6 @@ func GetFilesystem(path string) (string, error) {
|
|||||||
t, ok := fsTypes[int64(statfs.Type)]
|
t, ok := fsTypes[int64(statfs.Type)]
|
||||||
if !ok {
|
if !ok {
|
||||||
return "unknown", nil
|
return "unknown", nil
|
||||||
// log.Printf("WARNING: detected %v has unknown filesystem type %x", path, statfs.Type)
|
|
||||||
}
|
}
|
||||||
return t, nil
|
return t, nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ func getCurrentUserGroups() ([]string, error) {
|
|||||||
|
|
||||||
out = strings.TrimSpace(out)
|
out = strings.TrimSpace(out)
|
||||||
if out == "" {
|
if out == "" {
|
||||||
// we don't have any groups?
|
|
||||||
return nilArray, fmt.Errorf("Unable to determine groups for current user")
|
return nilArray, fmt.Errorf("Unable to determine groups for current user")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -241,7 +241,6 @@ func runContainerWithPorts(t *testing.T, cli *client.Client, containerConfig *co
|
|||||||
hostConfig := container.HostConfig{
|
hostConfig := container.HostConfig{
|
||||||
Binds: []string{
|
Binds: []string{
|
||||||
coverageBind(t),
|
coverageBind(t),
|
||||||
// terminationBind(t),
|
|
||||||
},
|
},
|
||||||
PortBindings: nat.PortMap{},
|
PortBindings: nat.PortMap{},
|
||||||
CapDrop: []string{
|
CapDrop: []string{
|
||||||
|
|||||||
Reference in New Issue
Block a user