MySQL 8.0.31
Source Code Documentation
access_rights.h File Reference
#include "harness_export.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/unistd.h>
#include <optional>
#include <system_error>
#include <utility>
#include <vector>
#include "mysql/harness/stdx/expected.h"

Go to the source code of this file.

Classes

class  mysql_harness::posix::access_rights::DenyPermissionVerifier< Mask >
 denies permissions. More...
 
class  mysql_harness::posix::access_rights::AllowPermissionVerifier< Mask >
 allows permissions. More...
 

Namespaces

namespace  mysql_harness
 
namespace  mysql_harness::posix
 
namespace  mysql_harness::posix::access_rights
 

Typedefs

using mysql_harness::posix::access_rights::security_descriptor_type = mode_t
 
using mysql_harness::security_descriptor_type = posix::access_rights::security_descriptor_type
 
using mysql_harness::DenyOtherReadWritableVerifier = posix::access_rights::DenyPermissionVerifier<(S_IRWXO)>
 fail access_rights_verify() if others can read or write or execute. More...
 
using mysql_harness::AllowUserReadWritableVerifier = posix::access_rights::AllowPermissionVerifier<(S_IRUSR|S_IWUSR)>
 fail access_rights_verify() if someone else then the owner of the file can read or write. More...
 

Functions

HARNESS_EXPORT stdx::expected< security_descriptor_type, std::error_code > mysql_harness::access_rights_get (const std::string &file_name) noexcept
 get a access rights of file. More...
 
template<class Func >
stdx::expected< void, std::error_code > mysql_harness::access_rights_verify (const security_descriptor_type &rights, Func &&func)
 check if a security descriptor satisfies a verifier. More...
 
HARNESS_EXPORT stdx::expected< void, std::error_code > mysql_harness::access_rights_set (const std::string &file_name, const security_descriptor_type &sec_desc)
 set access rights of a file. More...