aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/ClientFile.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-02 13:59:07 +0100
committerMax Kellermann <max@duempel.org>2014-02-02 13:59:07 +0100
commita8e52ad89f60741adc474d460724e25bc783dfe5 (patch)
tree68c774f929939ea1e8e3ece394b0bf0c10c30f2e /src/client/ClientFile.cxx
parent8cf4fb53aa102380a8e734590aa6e82920e9632c (diff)
downloadmpd-a8e52ad89f60741adc474d460724e25bc783dfe5.tar.gz
mpd-a8e52ad89f60741adc474d460724e25bc783dfe5.tar.xz
mpd-a8e52ad89f60741adc474d460724e25bc783dfe5.zip
ClientFile: move client_allow_file() into the Client class
Diffstat (limited to 'src/client/ClientFile.cxx')
-rw-r--r--src/client/ClientFile.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/client/ClientFile.cxx b/src/client/ClientFile.cxx
index bdd9b0426..eba64d09c 100644
--- a/src/client/ClientFile.cxx
+++ b/src/client/ClientFile.cxx
@@ -18,7 +18,6 @@
*/
#include "config.h"
-#include "ClientFile.hxx"
#include "Client.hxx"
#include "protocol/Ack.hxx"
#include "fs/Path.hxx"
@@ -29,16 +28,14 @@
#include <unistd.h>
bool
-client_allow_file(const Client &client, Path path_fs, Error &error)
+Client::AllowFile(Path path_fs, Error &error) const
{
#ifdef WIN32
- (void)client;
(void)path_fs;
error.Set(ack_domain, ACK_ERROR_PERMISSION, "Access denied");
return false;
#else
- const int uid = client.GetUID();
if (uid >= 0 && (uid_t)uid == geteuid())
/* always allow access if user runs his own MPD
instance */