Client: assume uid==0 is local socket

A negative uid value means it's not a "local socket" (PF_LOCAL).
uid==0 means user "root" connected.
This commit is contained in:
Max Kellermann
2014-11-18 20:56:27 +01:00
parent 3f5f96ac91
commit c8b93d6573
3 changed files with 3 additions and 2 deletions

View File

@@ -109,7 +109,7 @@ public:
* a local (UNIX domain) socket?
*/
bool IsLocal() const {
return uid > 0;
return uid >= 0;
}
unsigned GetPermission() const {