Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for DetermineEffectiveRunAsUser (0.56 sec)

  1. pkg/securitycontext/util_test.go

    		t.Run(test.desc, func(t *testing.T) {
    			runAsUser, ok := DetermineEffectiveRunAsUser(test.pod, test.container)
    			if !ok && test.wantRunAsUser != nil {
    				t.Errorf("DetermineEffectiveRunAsUser(%v, %v) = %v, want %d", test.pod, test.container, runAsUser, *test.wantRunAsUser)
    			}
    			if ok && test.wantRunAsUser == nil {
    				t.Errorf("DetermineEffectiveRunAsUser(%v, %v) = %d, want %v", test.pod, test.container, *runAsUser, test.wantRunAsUser)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 05 01:25:23 UTC 2020
    - 5K bytes
    - Viewed (0)
  2. pkg/securitycontext/util.go

    		*effectiveSc.ProcMount = *containerSc.ProcMount
    	}
    
    	return effectiveSc
    }
    
    // DetermineEffectiveRunAsUser returns a pointer of UID from the provided pod's
    // and container's security context and a bool value to indicate if it is absent.
    // Container's runAsUser take precedence in cases where both are set.
    func DetermineEffectiveRunAsUser(pod *v1.Pod, container *v1.Container) (*int64, bool) {
    	var runAsUser *int64
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 15 07:28:24 UTC 2023
    - 7.5K bytes
    - Viewed (0)
  3. pkg/volume/util/util.go

    	var fsUser *int64
    	podutil.VisitContainers(&pod.Spec, podutil.AllFeatureEnabledContainers(), func(container *v1.Container, containerType podutil.ContainerType) bool {
    		runAsUser, ok := securitycontext.DetermineEffectiveRunAsUser(pod, container)
    		// One container doesn't specify user or there are more than one
    		// non-root UIDs.
    		if !ok || (fsUser != nil && *fsUser != *runAsUser) {
    			fsUser = nil
    			return false
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 31 12:32:15 UTC 2024
    - 28.8K bytes
    - Viewed (0)
Back to top