From f9222fdabeccd2b53a9e549c633982928c9451a1 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 15 Oct 2008 23:10:05 +0200 Subject: 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). --- src/playlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/playlist.c b/src/playlist.c index 0dae1a92b..08a8203f5 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; -- cgit v1.2.3