mirror of
https://github.com/pocoproject/poco.git
synced 2025-02-21 06:37:42 +01: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:
parent
4ff750168d
commit
e1dbbef72f
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user