From 36fff59a38d8771a173ae21b94186bc99ab11724 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 6 Mar 2012 22:20:05 +0100 Subject: client_file: always allow access if client uid equals mpd uid --- src/client_file.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/client_file.c') 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, -- cgit v1.2.3