diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/Client.hxx | 2 | ||||
-rw-r--r-- | src/ClientFile.cxx | 2 |
3 files changed, 3 insertions, 2 deletions
@@ -2,6 +2,7 @@ ver 0.18.18 (not yet released) * decoder - ffmpeg: support opus * fix crash on failed filename charset conversion +* fix local socket detection from uid=0 (root) ver 0.18.17 (2014/11/02) * playlist diff --git a/src/Client.hxx b/src/Client.hxx index f0bc6b0f7..fd81b59e0 100644 --- a/src/Client.hxx +++ b/src/Client.hxx @@ -109,7 +109,7 @@ public: * a local (UNIX domain) socket? */ bool IsLocal() const { - return uid > 0; + return uid >= 0; } unsigned GetPermission() const { diff --git a/src/ClientFile.cxx b/src/ClientFile.cxx index 382b76083..7a5dd37a6 100644 --- a/src/ClientFile.cxx +++ b/src/ClientFile.cxx @@ -47,7 +47,7 @@ client_allow_file(const Client &client, Path path_fs, Error &error) instance */ return true; - if (uid <= 0) { + if (uid < 0) { /* unauthenticated client */ error.Set(ack_domain, ACK_ERROR_PERMISSION, "Access denied"); return false; |