Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for currentUID (0.19 sec)

  1. src/os/user/lookup_stubs.go

    var (
    	// unused variables (in this implementation)
    	// modified during test to exercise code paths in the cgo implementation.
    	userBuffer  = 0
    	groupBuffer = 0
    )
    
    func current() (*User, error) {
    	uid := currentUID()
    	// $USER and /etc/passwd may disagree; prefer the latter if we can get it.
    	// See issue 27524 for more information.
    	u, err := lookupUserId(uid)
    	if err == nil {
    		return u, nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 07 16:09:09 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  2. pkg/volume/volume_linux_test.go

    	if (unixPerms&filePerm == unixPerms) && (info.Mode()&os.ModeSetgid != 0) {
    		return true
    	}
    	return false
    }
    
    func TestSetVolumeOwnershipOwner(t *testing.T) {
    	fsGroup := int64(3000)
    	currentUid := os.Geteuid()
    	if currentUid != 0 {
    		t.Skip("running as non-root")
    	}
    	currentGid := os.Getgid()
    
    	tests := []struct {
    		description string
    		fsGroup     *int64
    		setupFunc   func(path string) error
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 03 19:34:37 UTC 2023
    - 12.1K bytes
    - Viewed (0)
Back to top