Commit f9222fda authored by Max Kellermann's avatar Max Kellermann

playlist: also allow world-readable local files

Allow a local user to not only add his own files, but also all world-readable files (mode 0444).
parent f1ab4d2c
......@@ -536,7 +536,7 @@ playlist_append_file(const char *path, int uid, int *added_id)
if (ret < 0)
return PLAYLIST_RESULT_ERRNO;
if (st.st_uid != (uid_t)uid)
if (st.st_uid != (uid_t)uid && (st.st_mode & 0444) != 0444)
/* client is not owner */
return PLAYLIST_RESULT_DENIED;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment