From c8b93d6573550ec3735b070245769970db62a312 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 18 Nov 2014 20:56:27 +0100 Subject: 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. --- src/ClientFile.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ClientFile.cxx') 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; -- cgit v1.2.3