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).
This commit is contained in:
Max Kellermann 2008-10-15 23:10:05 +02:00
parent f1ab4d2c1b
commit f9222fdabe

View File

@ -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;