github.com/nicocha30/gvisor-ligolo@v0.0.0-20230726075806-989fa2c0a413/pkg/abi/linux/xattr.go (about)

     1  // Copyright 2019 The gVisor Authors.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package linux
    16  
    17  // Constants for extended attributes.
    18  const (
    19  	XATTR_NAME_MAX = 255
    20  	XATTR_SIZE_MAX = 65536
    21  	XATTR_LIST_MAX = 65536
    22  
    23  	XATTR_CREATE  = 1
    24  	XATTR_REPLACE = 2
    25  
    26  	XATTR_SECURITY_PREFIX     = "security."
    27  	XATTR_SECURITY_PREFIX_LEN = len(XATTR_SECURITY_PREFIX)
    28  
    29  	XATTR_SYSTEM_PREFIX     = "system."
    30  	XATTR_SYSTEM_PREFIX_LEN = len(XATTR_SYSTEM_PREFIX)
    31  
    32  	XATTR_TRUSTED_PREFIX     = "trusted."
    33  	XATTR_TRUSTED_PREFIX_LEN = len(XATTR_TRUSTED_PREFIX)
    34  
    35  	XATTR_USER_PREFIX     = "user."
    36  	XATTR_USER_PREFIX_LEN = len(XATTR_USER_PREFIX)
    37  )