aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-15 23:10:05 +0200
committerMax Kellermann <max@duempel.org>2008-10-15 23:10:05 +0200
commitf9222fdabeccd2b53a9e549c633982928c9451a1 (patch)
treec317db41edaa0c0f94a38b7805c07b3497d42f9e /src
parentf1ab4d2c1ba881337dd6fc3ce57306c7f94153e2 (diff)
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).
Diffstat (limited to 'src')
-rw-r--r--src/playlist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/playlist.c b/src/playlist.c
index 0dae1a92..08a8203f 100644
--- a/src/playlist.c
+++ b/src/playlist.c
@@ -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;