github.com/rumpl/bof@v23.0.0-rc.2+incompatible/pkg/idtools/idtools_windows.go (about)

     1  package idtools // import "github.com/docker/docker/pkg/idtools"
     2  
     3  import (
     4  	"os"
     5  
     6  	"github.com/docker/docker/pkg/system"
     7  )
     8  
     9  const (
    10  	SeTakeOwnershipPrivilege = "SeTakeOwnershipPrivilege"
    11  )
    12  
    13  const (
    14  	ContainerAdministratorSidString = "S-1-5-93-2-1"
    15  	ContainerUserSidString          = "S-1-5-93-2-2"
    16  )
    17  
    18  // This is currently a wrapper around MkdirAll, however, since currently
    19  // permissions aren't set through this path, the identity isn't utilized.
    20  // Ownership is handled elsewhere, but in the future could be support here
    21  // too.
    22  func mkdirAs(path string, mode os.FileMode, owner Identity, mkAll, chownExisting bool) error {
    23  	if err := system.MkdirAll(path, mode); err != nil {
    24  		return err
    25  	}
    26  	return nil
    27  }
    28  
    29  // CanAccess takes a valid (existing) directory and a uid, gid pair and determines
    30  // if that uid, gid pair has access (execute bit) to the directory
    31  // Windows does not require/support this function, so always return true
    32  func CanAccess(path string, identity Identity) bool {
    33  	return true
    34  }