Skip to content

Commit 3cc7b7d

Browse files
committed
Merge branch 'v0.23.x'
2 parents 57e7fb3 + 687475c commit 3cc7b7d

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ ver 0.24 (not yet released)
7171
* require Meson 1.0
7272

7373
ver 0.23.17 (not yet released)
74+
* storage
75+
- nfs: require libnfs 4.0 or later
76+
* database
77+
- inotify: trigger update after symlink was created
7478
* support libfmt 11.1
7579

7680
ver 0.23.16 (2024/12/03)

src/client/File.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Client::AllowFile(Path path_fs) const
1212
#ifdef _WIN32
1313
(void)path_fs;
1414

15-
throw ProtocolError(ACK_ERROR_PERMISSION, "Access denied");
15+
throw ProtocolError(ACK_ERROR_PERMISSION, "Access to local files not implemented on Windows");
1616
#else
1717
if (uid >= 0 && (uid_t)uid == geteuid())
1818
/* always allow access if user runs his own MPD
@@ -21,12 +21,12 @@ Client::AllowFile(Path path_fs) const
2121

2222
if (uid < 0)
2323
/* unauthenticated client */
24-
throw ProtocolError(ACK_ERROR_PERMISSION, "Access denied");
24+
throw ProtocolError(ACK_ERROR_PERMISSION, "Access to local files via TCP is not allowed");
2525

2626
const FileInfo fi(path_fs);
2727

2828
if (fi.GetUid() != (uid_t)uid && (fi.GetMode() & 0444) != 0444)
2929
/* client is not owner */
30-
throw ProtocolError(ACK_ERROR_PERMISSION, "Access denied");
30+
throw ProtocolError(ACK_ERROR_PERMISSION, "Access to this local file denied due to file permissions");
3131
#endif
3232
}

src/db/update/InotifyUpdate.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,10 @@ InotifyUpdate::OnInotify(int wd, unsigned mask, const char *)
279279
}
280280

281281
if ((mask & (IN_CLOSE_WRITE|IN_MOVE|IN_DELETE)) != 0 ||
282+
/* regular file or symlink was created; this check is only
283+
interesting for symlinks because regular files have
284+
usable content only after IN_CLOSE_WRITE */
285+
(mask & (IN_CREATE|IN_ISDIR)) == IN_CREATE ||
282286
/* at the maximum depth, we watch out for newly created
283287
directories */
284288
(directory.GetDepth() == max_depth &&

test/meson.build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ if zeroconf_dep.found()
8484
include_directories: inc,
8585
dependencies: [
8686
zeroconf_dep,
87+
event_dep,
8788
util_dep,
8889
],
8990
)
@@ -202,6 +203,7 @@ if neighbor_glue_dep.found()
202203
include_directories: inc,
203204
dependencies: [
204205
neighbor_glue_dep,
206+
event_dep,
205207
],
206208
)
207209
endif
@@ -271,6 +273,7 @@ if enable_database
271273
'../src/LocateUri.cxx',
272274
include_directories: inc,
273275
dependencies: [
276+
event_dep,
274277
log_dep,
275278
tag_dep,
276279
fs_dep,
@@ -307,6 +310,7 @@ if curl_dep.found()
307310
include_directories: inc,
308311
dependencies: [
309312
curl_dep,
313+
event_dep,
310314
],
311315
)
312316

0 commit comments

Comments
 (0)