MySQL 8.3.0
Source Code Documentation
sys_user_operations.cc File Reference
#include "mysqlrouter/sys_user_operations.h"
#include <cassert>
#include <cerrno>
#include <cstring>
#include <stdexcept>
#include <grp.h>
#include <sys/types.h>
#include <unistd.h>
#include "mysql/harness/utility/string.h"

Namespaces

namespace  mysqlrouter
 

Functions

void mysqlrouter::set_owner_if_file_exists (const std::string &filepath, const std::string &username, struct passwd *user_info_arg, mysqlrouter::SysUserOperationsBase *sys_user_operations)
 Sets the owner of selected file/directory if it exists. More...
 
static bool mysqlrouter::check_if_root (const std::string &username, SysUserOperationsBase *sys_user_operations)
 
static passwd * mysqlrouter::get_user_info (const std::string &username, SysUserOperationsBase *sys_user_operations)
 
struct passwd * mysqlrouter::check_user (const std::string &username, bool must_be_root, mysqlrouter::SysUserOperationsBase *sys_user_operations)
 Checks if the given user can be switched to or made an owner of a selected file. More...
 
static void mysqlrouter::set_user_priv (const std::string &username, struct passwd *user_info_arg, bool permanently, SysUserOperationsBase *sys_user_operations)
 
void mysqlrouter::set_user (const std::string &username, bool permanently=false, mysqlrouter::SysUserOperationsBase *sys_user_operations=SysUserOperations::instance())
 Sets effective user of the calling process. More...