// Code to get around a bogus Ubuntu protection problem with the
// sticky "s" permision on executable file.
//
QDir d("/proc/self");
QFileInfoList dLst = d.entryInfoList();
int cx;
foreach( const QFileInfo flInfo, dLst)
{
if (flInfo.isFile())
{ FILE_LOG(logINFO) << "changing ownership of " << qPrintable(flInfo.absoluteFilePath());
cx = chown(qPrintable(flInfo.absoluteFilePath()), ruid, ruid);
}
}
errno = 0; // don't let stale errors impact us later
What is interesting is that I run at root yet cannot change owner on the directories.
I think a more accurate fix would be for the sticky bit processes to create all /proc/self entries with owners of "user:root" but don't have a method of testing this.
WE REALLY NEED A FIX. Under the compiler shipped with Mint 14 (and probably included with 12.10) this "benign" error is now fatal.
dropping perror() is not going to fix this by itself. I have a QT application. Thank you dearly for your explanation found here:
http:// lukasz. langa.pl/ 5/error- opening- file-for- reading- permission- denied/
I tried to work around this as follows:
// Code to get around a bogus Ubuntu protection problem with the
// sticky "s" permision on executable file.
//
QDir d("/proc/self");
QFileInfoList dLst = d.entryInfoList();
int cx;
foreach( const QFileInfo flInfo, dLst)
FILE_ LOG(logINFO) << "changing ownership of " << qPrintable( flInfo. absoluteFilePat h()); e(flInfo. absoluteFilePat h()), ruid, ruid);
{
if (flInfo.isFile())
{
cx = chown(qPrintabl
}
}
errno = 0; // don't let stale errors impact us later
if (seteuid(ruid) != 0)
FILE_LOG( logINFO) << "seteuid failed errno " << errno;
{
}
STILL no love.
What is interesting is that I run at root yet cannot change owner on the directories.
I think a more accurate fix would be for the sticky bit processes to create all /proc/self entries with owners of "user:root" but don't have a method of testing this.
WE REALLY NEED A FIX. Under the compiler shipped with Mint 14 (and probably included with 12.10) this "benign" error is now fatal.