Merge tag 'v0.18.18' into v0.19.x

This commit is contained in:
Max Kellermann
2014-11-18 21:38:44 +01:00
5 changed files with 17 additions and 4 deletions

View File

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

View File

@@ -41,7 +41,7 @@ Client::AllowFile(Path path_fs, Error &error) const
instance */
return true;
if (uid <= 0) {
if (uid < 0) {
/* unauthenticated client */
error.Set(ack_domain, ACK_ERROR_PERMISSION, "Access denied");
return false;