client_file: always allow access if client uid equals mpd uid
This commit is contained in:
parent
1e60a4386a
commit
36fff59a38
@ -39,6 +39,11 @@ client_allow_file(const struct client *client, const char *path_fs,
|
|||||||
return false;
|
return false;
|
||||||
#else
|
#else
|
||||||
const int uid = client_get_uid(client);
|
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) {
|
if (uid <= 0) {
|
||||||
/* unauthenticated client */
|
/* unauthenticated client */
|
||||||
g_set_error(error_r, ack_quark(), ACK_ERROR_PERMISSION,
|
g_set_error(error_r, ack_quark(), ACK_ERROR_PERMISSION,
|
||||||
|
Loading…
Reference in New Issue
Block a user