![]() |
CernVM-FS
2.11.0
|
#include <magic_xattr.h>
Public Types | |
enum | EVisibility { kVisibilityAlways, kVisibilityNever, kVisibilityRootOnly } |
Public Member Functions | |
MagicXattrManager (MountPoint *mountpoint, EVisibility visibility, const std::set< std::string > &protected_xattrs, const std::set< gid_t > &privileged_xattr_gids) | |
BaseMagicXattr * | GetLocked (const std::string &name, PathString path, catalog::DirectoryEntry *d) |
std::string | GetListString (catalog::DirectoryEntry *dirent) |
void | Register (const std::string &name, BaseMagicXattr *magic_xattr) |
void | Freeze () |
bool | IsPrivilegedGid (gid_t gid) |
EVisibility | visibility () |
std::set< gid_t > | privileged_xattr_gids () |
MountPoint * | mount_point () |
bool | is_frozen () const |
Protected Attributes | |
std::map< std::string, BaseMagicXattr * > | xattr_list_ |
MountPoint * | mount_point_ |
EVisibility | visibility_ |
const std::set< std::string > | protected_xattrs_ |
const std::set< gid_t > | privileged_xattr_gids_ |
Private Member Functions | |
void | SanityCheckProtectedXattrs () |
Private Attributes | |
bool | is_frozen_ |
Additional Inherited Members | |
![]() | |
SingleCopy () | |
This class is acting as a user entry point for magic extended attributes. It instantiates all defined attributes in the constructor. Users can:
Definition at line 170 of file magic_xattr.h.
Enumerator | |
---|---|
kVisibilityAlways | |
kVisibilityNever | |
kVisibilityRootOnly |
Definition at line 172 of file magic_xattr.h.
MagicXattrManager::MagicXattrManager | ( | MountPoint * | mountpoint, |
EVisibility | visibility, | ||
const std::set< std::string > & | protected_xattrs, | ||
const std::set< gid_t > & | priviledged_xattr_gids | ||
) |
This file is part of the CernVM File System.
Definition at line 19 of file magic_xattr.cc.
|
inline |
Freezes the current setup of MagicXattrManager. No new extended attributes can be added. Only after freezing MagicXattrManager can registered attributes be accessed.
Definition at line 194 of file magic_xattr.h.
Referenced by RegisterMagicXattrs().
std::string MagicXattrManager::GetListString | ( | catalog::DirectoryEntry * | dirent | ) |
Definition at line 77 of file magic_xattr.cc.
Referenced by cvmfs::cvmfs_listxattr().
BaseMagicXattr * MagicXattrManager::GetLocked | ( | const std::string & | name, |
PathString | path, | ||
catalog::DirectoryEntry * | d | ||
) |
The returned BaseMagicXattr* is supposed to be wrapped by a MagicXattrRAIIWrapper
Definition at line 119 of file magic_xattr.cc.
Referenced by cvmfs::cvmfs_getxattr().
|
inline |
Definition at line 202 of file magic_xattr.h.
Referenced by BaseMagicXattr::PrepareValueFencedProtected().
bool MagicXattrManager::IsPrivilegedGid | ( | gid_t | gid | ) |
Definition at line 154 of file magic_xattr.cc.
Referenced by BaseMagicXattr::PrepareValueFencedProtected().
|
inline |
Definition at line 201 of file magic_xattr.h.
Referenced by AuthzMagicXattr::GetValue(), ExternalHostMagicXattr::GetValue(), ExternalTimeoutMagicXattr::GetValue(), FqrnMagicXattr::GetValue(), HostMagicXattr::GetValue(), HostListMagicXattr::GetValue(), LHashMagicXattr::GetValue(), NCleanup24MagicXattr::GetValue(), NDirOpenMagicXattr::GetValue(), NDownloadMagicXattr::GetValue(), NIOErrMagicXattr::GetValue(), NOpenMagicXattr::GetValue(), HitrateMagicXattr::GetValue(), ProxyMagicXattr::GetValue(), ProxyListMagicXattr::GetValue(), ProxyListExternalMagicXattr::GetValue(), RepoMetainfoMagicXattr::GetValue(), RxMagicXattr::GetValue(), SpeedMagicXattr::GetValue(), TimeoutMagicXattr::GetValue(), TimeoutDirectMagicXattr::GetValue(), TimestampLastIOErrMagicXattr::GetValue(), UsedFdMagicXattr::GetValue(), UsedDirPMagicXattr::GetValue(), ExternalURLMagicXattr::GetValue(), AuthzMagicXattr::PrepareValueFenced(), CatalogCountersMagicXattr::PrepareValueFenced(), ChunkListMagicXattr::PrepareValueFenced(), ChunksMagicXattr::PrepareValueFenced(), NClgMagicXattr::PrepareValueFenced(), PubkeysMagicXattr::PrepareValueFenced(), RepoCountersMagicXattr::PrepareValueFenced(), RepoMetainfoMagicXattr::PrepareValueFenced(), RevisionMagicXattr::PrepareValueFenced(), RootHashMagicXattr::PrepareValueFenced(), and TagMagicXattr::PrepareValueFenced().
|
inline |
Definition at line 199 of file magic_xattr.h.
void MagicXattrManager::Register | ( | const std::string & | name, |
BaseMagicXattr * | magic_xattr | ||
) |
Registers a new extended attribute. Will fail if called after Freeze().
Definition at line 135 of file magic_xattr.cc.
Referenced by MagicXattrManager(), and RegisterMagicXattrs().
|
private |
Definition at line 167 of file magic_xattr.cc.
Referenced by Freeze().
|
inline |
Definition at line 198 of file magic_xattr.h.
Referenced by cvmfs::cvmfs_listxattr(), and GetListString().
|
private |
Definition at line 215 of file magic_xattr.h.
Referenced by Freeze(), is_frozen(), and Register().
|
protected |
Definition at line 206 of file magic_xattr.h.
Referenced by GetListString(), and mount_point().
|
protected |
Definition at line 212 of file magic_xattr.h.
Referenced by IsPrivilegedGid(), privileged_xattr_gids(), and SanityCheckProtectedXattrs().
|
protected |
Definition at line 211 of file magic_xattr.h.
Referenced by Register(), and SanityCheckProtectedXattrs().
|
protected |
Definition at line 207 of file magic_xattr.h.
Referenced by visibility().
|
protected |
Definition at line 205 of file magic_xattr.h.
Referenced by GetListString(), GetLocked(), Register(), and SanityCheckProtectedXattrs().