Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 21 for errPermission (0.2 sec)

  1. src/testing/fstest/testfs_test.go

    		t.Fatal("error expected")
    	}
    	t.Logf("Error (expecting wrapped fs.ErrPermission):\n%v", err)
    
    	if !errors.Is(err, fs.ErrPermission) {
    		t.Errorf("error should be a wrapped ErrPermission: %#v", err)
    	}
    
    	// TestFS is expected to return a list of errors.
    	// Enforce that the list can be extracted for browsing.
    	var errs interface{ Unwrap() []error }
    	if !errors.As(err, &errs) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 2.9K bytes
    - Viewed (0)
  2. internal/kms/kes.go

    	return c.client.Version(ctx)
    }
    
    func (c *kesConn) APIs(ctx context.Context) ([]madmin.KMSAPI, error) {
    	APIs, err := c.client.APIs(ctx)
    	if err != nil {
    		if errors.Is(err, kes.ErrNotAllowed) {
    			return nil, ErrPermission
    		}
    		return nil, Error{
    			Code:    http.StatusInternalServerError,
    			APICode: "kms:InternalError",
    			Err:     "failed to list KMS APIs",
    			Cause:   err,
    		}
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  3. src/os/error.go

    // report that permission is denied. It is satisfied by [ErrPermission] as well
    // as some syscall errors.
    //
    // This function predates [errors.Is]. It only supports errors returned by
    // the os package. New code should use errors.Is(err, fs.ErrPermission).
    func IsPermission(err error) bool {
    	return underlyingErrorIs(err, ErrPermission)
    }
    
    // IsTimeout returns a boolean indicating whether the error is known
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:12 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  4. internal/kms/kms.go

    		Enclave: c.enclave,
    		Name:    req.Name,
    	}); err != nil {
    		if errors.Is(err, kms.ErrKeyExists) {
    			return ErrKeyExists
    		}
    		if errors.Is(err, kms.ErrPermission) {
    			return ErrPermission
    		}
    		return errKeyCreationFailed(err)
    	}
    	return nil
    }
    
    func (c *kmsConn) GenerateKey(ctx context.Context, req *GenerateKeyRequest) (DEK, error) {
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  5. internal/kms/errors.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package kms
    
    import (
    	"fmt"
    	"net/http"
    )
    
    var (
    	// ErrPermission is an error returned by the KMS when it has not
    	// enough permissions to perform the operation.
    	ErrPermission = Error{
    		Code:    http.StatusForbidden,
    		APICode: "kms:NotAuthorized",
    		Err:     "insufficient permissions to perform KMS operation",
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Tue May 07 23:55:37 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  6. src/os/exec/lp_plan9.go

    func findExecutable(file string) error {
    	d, err := os.Stat(file)
    	if err != nil {
    		return err
    	}
    	if m := d.Mode(); !m.IsDir() && m&0111 != 0 {
    		return nil
    	}
    	return fs.ErrPermission
    }
    
    // LookPath searches for an executable named file in the
    // directories named by the path environment variable.
    // If file begins with "/", "#", "./", or "../", it is tried
    // directly and the path is not consulted.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:12 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  7. src/os/exec/lp_unix.go

    	// In both cases, fall back to checking the permission bits.
    	if err == nil || (err != syscall.ENOSYS && err != syscall.EPERM) {
    		return err
    	}
    	if m&0111 != 0 {
    		return nil
    	}
    	return fs.ErrPermission
    }
    
    // LookPath searches for an executable named file in the
    // directories named by the PATH environment variable.
    // If file contains a slash, it is tried directly and the PATH is not consulted.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:12 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  8. src/os/exec/lp_windows.go

    var ErrNotFound = errors.New("executable file not found in %PATH%")
    
    func chkStat(file string) error {
    	d, err := os.Stat(file)
    	if err != nil {
    		return err
    	}
    	if d.IsDir() {
    		return fs.ErrPermission
    	}
    	return nil
    }
    
    func hasExt(file string) bool {
    	i := strings.LastIndex(file, ".")
    	if i < 0 {
    		return false
    	}
    	return strings.LastIndexAny(file, `:\/`) < i
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:33:12 UTC 2024
    - 6K bytes
    - Viewed (0)
  9. src/syscall/syscall_js.go

    		s := errorstr[e]
    		if s != "" {
    			return s
    		}
    	}
    	return "errno " + itoa.Itoa(int(e))
    }
    
    func (e Errno) Is(target error) bool {
    	switch target {
    	case oserror.ErrPermission:
    		return e == EACCES || e == EPERM
    	case oserror.ErrExist:
    		return e == EEXIST || e == ENOTEMPTY
    	case oserror.ErrNotExist:
    		return e == ENOENT
    	case errorspkg.ErrUnsupported:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 21:03:59 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  10. src/os/fifo_test.go

    	// we can add them here.
    	const nonPollable = "/dev/net/tun"
    
    	f, err := os.OpenFile(nonPollable, os.O_RDWR, 0)
    	if err != nil {
    		if errors.Is(err, fs.ErrNotExist) || errors.Is(err, fs.ErrPermission) || testenv.SyscallIsNotSupported(err) {
    			t.Skipf("can't open %q: %v", nonPollable, err)
    		}
    		t.Fatal(err)
    	}
    	f.Close()
    
    	// On a Linux laptop, before the problem was fixed,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 11:47:23 UTC 2024
    - 6.1K bytes
    - Viewed (0)
Back to top