mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-18 03:29:47 +02:00
SF [2099671] Poco::File implementation on unix (reported by Lubomir Zavacky)
In canReadImpl/canWriteImpl, add effective user ID check for super user first. Tested on Ubuntu 8.04, gcc 4.2.3. (The previous commit used wrong local repos copy, sorry about that)
This commit is contained in:
@@ -97,7 +97,7 @@ bool FileImpl::canReadImpl() const
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
if(getegid() == 0)
|
||||
if(geteuid() == 0)
|
||||
return true;
|
||||
|
||||
struct stat st;
|
||||
@@ -119,7 +119,7 @@ bool FileImpl::canWriteImpl() const
|
||||
{
|
||||
poco_assert (!_path.empty());
|
||||
|
||||
if(getegid() == 0)
|
||||
if(geteuid() == 0)
|
||||
return true;
|
||||
|
||||
struct stat st;
|
||||
|
Reference in New Issue
Block a user