mirror of
https://github.com/containers/skopeo.git
synced 2025-09-13 05:23:05 +00:00
vendor: update containers/storage and containers/image
some tests I've done to try out the difference in performance: I am using a directory repository so to not depend on the network. User time (seconds): 39.40 System time (seconds): 6.83 Percent of CPU this job got: 121% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:38.07 User time (seconds): 8.32 System time (seconds): 1.62 Percent of CPU this job got: 128% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:07.72 User time (seconds): 42.68 System time (seconds): 6.64 Percent of CPU this job got: 162% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:30.44 User time (seconds): 8.94 System time (seconds): 1.51 Percent of CPU this job got: 178% Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.85 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
18
vendor/github.com/opencontainers/selinux/go-selinux/label/label.go
generated
vendored
18
vendor/github.com/opencontainers/selinux/go-selinux/label/label.go
generated
vendored
@@ -9,7 +9,7 @@ func InitLabels(options []string) (string, string, error) {
|
||||
return "", "", nil
|
||||
}
|
||||
|
||||
func GetROMountLabel() string {
|
||||
func ROMountLabel() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -25,7 +25,19 @@ func SetProcessLabel(processLabel string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetFileLabel(path string) (string, error) {
|
||||
func ProcessLabel() (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
func SetSocketLabel(processLabel string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func SocketLabel() (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
func FileLabel(path string) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
@@ -41,7 +53,7 @@ func Relabel(path string, fileLabel string, shared bool) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func GetPidLabel(pid int) (string, error) {
|
||||
func PidLabel(pid int) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
|
13
vendor/github.com/opencontainers/selinux/go-selinux/label/label_selinux.go
generated
vendored
13
vendor/github.com/opencontainers/selinux/go-selinux/label/label_selinux.go
generated
vendored
@@ -95,6 +95,17 @@ func SetProcessLabel(processLabel string) error {
|
||||
return selinux.SetExecLabel(processLabel)
|
||||
}
|
||||
|
||||
// SetSocketLabel takes a process label and tells the kernel to assign the
|
||||
// label to the next socket that gets created
|
||||
func SetSocketLabel(processLabel string) error {
|
||||
return selinux.SetSocketLabel(processLabel)
|
||||
}
|
||||
|
||||
// SocketLabel retrieves the current default socket label setting
|
||||
func SocketLabel() (string, error) {
|
||||
return selinux.SocketLabel()
|
||||
}
|
||||
|
||||
// ProcessLabel returns the process label that the kernel will assign
|
||||
// to the next program executed by the current process. If "" is returned
|
||||
// this indicates that the default labeling will happen for the process.
|
||||
@@ -102,7 +113,7 @@ func ProcessLabel() (string, error) {
|
||||
return selinux.ExecLabel()
|
||||
}
|
||||
|
||||
// GetFileLabel returns the label for specified path
|
||||
// FileLabel returns the label for specified path
|
||||
func FileLabel(path string) (string, error) {
|
||||
return selinux.FileLabel(path)
|
||||
}
|
||||
|
11
vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go
generated
vendored
11
vendor/github.com/opencontainers/selinux/go-selinux/selinux_linux.go
generated
vendored
@@ -385,6 +385,17 @@ func SetExecLabel(label string) error {
|
||||
return writeCon(fmt.Sprintf("/proc/self/task/%d/attr/exec", syscall.Gettid()), label)
|
||||
}
|
||||
|
||||
// SetSocketLabel takes a process label and tells the kernel to assign the
|
||||
// label to the next socket that gets created
|
||||
func SetSocketLabel(label string) error {
|
||||
return writeCon(fmt.Sprintf("/proc/self/task/%d/attr/sockcreate", syscall.Gettid()), label)
|
||||
}
|
||||
|
||||
// SocketLabel retrieves the current socket label setting
|
||||
func SocketLabel() (string, error) {
|
||||
return readCon(fmt.Sprintf("/proc/self/task/%d/attr/sockcreate", syscall.Gettid()))
|
||||
}
|
||||
|
||||
// Get returns the Context as a string
|
||||
func (c Context) Get() string {
|
||||
if c["level"] != "" {
|
||||
|
13
vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go
generated
vendored
13
vendor/github.com/opencontainers/selinux/go-selinux/selinux_stub.go
generated
vendored
@@ -96,6 +96,19 @@ func SetExecLabel(label string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
/*
|
||||
SetSocketLabel sets the SELinux label that the kernel will use for any programs
|
||||
that are executed by the current process thread, or an error.
|
||||
*/
|
||||
func SetSocketLabel(label string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SocketLabel retrieves the current socket label setting
|
||||
func SocketLabel() (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
// Get returns the Context as a string
|
||||
func (c Context) Get() string {
|
||||
return ""
|
||||
|
Reference in New Issue
Block a user