1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-520. Removed the chmod 666 calls on our shared mem objects.

This commit is contained in:
Patrick LeBlanc
2018-10-04 08:47:14 -05:00
parent 7aff68969e
commit bc19fb2f2d

View File

@ -138,7 +138,7 @@ int main(int argc, char** argv)
string systemLang = "C"; string systemLang = "C";
setlocale(LC_ALL, systemLang.c_str()); setlocale(LC_ALL, systemLang.c_str());
//get tmp log directory //get tmp log directory
tmpLogDir = startup::StartUp::tmpDir(); tmpLogDir = startup::StartUp::tmpDir();
@ -345,7 +345,7 @@ int main(int argc, char** argv)
//Set the alarm //Set the alarm
// aMonitor.sendAlarm(config.moduleName().c_str(), STARTUP_DIAGNOTICS_FAILURE, SET); // aMonitor.sendAlarm(config.moduleName().c_str(), STARTUP_DIAGNOTICS_FAILURE, SET);
// sleep (1); // sleep (1);
string cmd = startup::StartUp::installDir() + "/bin/infinidb stop > /dev/null 2>&1"; string cmd = startup::StartUp::installDir() + "/bin/infinidb stop > /dev/null 2>&1";
system(cmd.c_str()); system(cmd.c_str());
@ -1886,9 +1886,9 @@ static void statusControlThread()
// //
//Allocate Shared Memory for storing Process Status Data //Allocate Shared Memory for storing Process Status Data
// //
string shmLocation = "/dev/shm/"; string shmLocation = "/dev/shm/";
PROCSTATshmsize = MAX_PROCESS * sizeof(shmProcessStatus); PROCSTATshmsize = MAX_PROCESS * sizeof(shmProcessStatus);
bool memInit = true; bool memInit = true;
#if 0 #if 0
@ -1915,12 +1915,6 @@ static void statusControlThread()
{ {
#if BOOST_VERSION < 104500 #if BOOST_VERSION < 104500
bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write); bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write);
#ifdef __linux__
{
string pname = shmLocation + keyName;
chmod(pname.c_str(), 0666);
}
#endif
#else #else
bi::permissions perms; bi::permissions perms;
perms.set_unrestricted(); perms.set_unrestricted();
@ -1993,12 +1987,6 @@ static void statusControlThread()
try try
{ {
bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write); bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write);
#ifdef __linux__
{
string pname = shmLocation + keyName;
chmod(pname.c_str(), 0666);
}
#endif
shm.truncate(SYSTEMSTATshmsize); shm.truncate(SYSTEMSTATshmsize);
fSysStatShmobj.swap(shm); fSysStatShmobj.swap(shm);
} }
@ -2112,12 +2100,6 @@ static void statusControlThread()
try try
{ {
bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write); bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write);
#ifdef __linux__
{
string pname = shmLocation + keyName;
chmod(pname.c_str(), 0666);
}
#endif
shm.truncate(NICSTATshmsize); shm.truncate(NICSTATshmsize);
fNICStatShmobj.swap(shm); fNICStatShmobj.swap(shm);
} }
@ -2210,12 +2192,6 @@ static void statusControlThread()
try try
{ {
bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write); bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write);
#ifdef __linux__
{
string pname = shmLocation + keyName;
chmod(pname.c_str(), 0666);
}
#endif
shm.truncate(EXTDEVICESTATshmsize); shm.truncate(EXTDEVICESTATshmsize);
fExtStatShmobj.swap(shm); fExtStatShmobj.swap(shm);
} }
@ -2300,12 +2276,6 @@ static void statusControlThread()
try try
{ {
bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write); bi::shared_memory_object shm(bi::create_only, keyName.c_str(), bi::read_write);
#ifdef __linux__
{
string pname = shmLocation + keyName;
chmod(pname.c_str(), 0666);
}
#endif
shm.truncate(DBROOTSTATshmsize); shm.truncate(DBROOTSTATshmsize);
fDbrootShmobj.swap(shm); fDbrootShmobj.swap(shm);
} }
@ -2709,7 +2679,7 @@ void processStatusMSG(messageqcpp::IOSocket* cfIos)
memcpy(fShmSystemStatus[0].StateChangeDate, oam.getCurrentTime().c_str(), DATESIZE); memcpy(fShmSystemStatus[0].StateChangeDate, oam.getCurrentTime().c_str(), DATESIZE);
log.writeLog(__LINE__, "statusControl: REQUEST RECEIVED: Set System State = " + oamState[state], LOG_TYPE_DEBUG); log.writeLog(__LINE__, "statusControl: REQUEST RECEIVED: Set System State = " + oamState[state], LOG_TYPE_DEBUG);
} }
BRM::DBRM dbrm; BRM::DBRM dbrm;
dbrm.setSystemQueryReady(true); dbrm.setSystemQueryReady(true);
} }