aboutsummaryrefslogtreecommitdiffstats
path: root/src/client_file.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-03-06 22:20:05 +0100
committerMax Kellermann <max@duempel.org>2012-03-06 22:22:27 +0100
commit36fff59a38d8771a173ae21b94186bc99ab11724 (patch)
treefa217b5141d0be59d317d4e6e92cb9664430ff22 /src/client_file.c
parent1e60a4386a78ed16fc3fdf99c1f398b607178804 (diff)
downloadmpd-36fff59a38d8771a173ae21b94186bc99ab11724.tar.gz
mpd-36fff59a38d8771a173ae21b94186bc99ab11724.tar.xz
mpd-36fff59a38d8771a173ae21b94186bc99ab11724.zip
client_file: always allow access if client uid equals mpd uid
Diffstat (limited to 'src/client_file.c')
-rw-r--r--src/client_file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client_file.c b/src/client_file.c
index e2d315701..2ee433308 100644
--- a/src/client_file.c
+++ b/src/client_file.c
@@ -39,6 +39,11 @@ client_allow_file(const struct client *client, const char *path_fs,
return false;
#else
const int uid = client_get_uid(client);
+ if (uid >= 0 && (uid_t)uid == geteuid())
+ /* always allow access if user runs his own MPD
+ instance */
+ return true;
+
if (uid <= 0) {
/* unauthenticated client */
g_set_error(error_r, ack_quark(), ACK_ERROR_PERMISSION,