From: Andre Noll Date: Sun, 15 Oct 2023 15:54:41 +0000 (+0200) Subject: Merge topic branch t/afs-ls-a into master X-Git-Tag: v0.7.3~12 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=4345aa176aecdbd9a876e7efdcc034acd29616a7 Merge topic branch t/afs-ls-a into master A new feature for the ls command. Unfortunately, several bugs were found after the topic graduated to next, so the series contains a few fixup commits on top of the single patch which implements the feature. * refs/heads/t/afs-ls-a: afs: Really fix memory leak in mood_load(). afs: Fix memory leak in mood_load(). playlist: Fix error handling of playlist_load(). server: Fix NULL pointer dereference in com_ls(). Implement ls --admissible=m/foo. --- 4345aa176aecdbd9a876e7efdcc034acd29616a7 diff --cc NEWS.md index a0484f09,598db71f..22816b19 --- a/NEWS.md +++ b/NEWS.md @@@ -1,21 -1,6 +1,24 @@@ NEWS ==== +---------------------------------------------- +0.7.3 (to be announced) "weighted correctness" +---------------------------------------------- + +- Old style PEM keys are now deprecated. They still work but their + use results in a run-time warning. The removal of PEM key support is + scheduled for paraslash-0.8.0. +- Version 1.0 of the openssl library has been deprecated. A warning + is printed at compile-time on systems which have this outdated version + because it will no longer be supported once paraslash-0.8.0 comes out. +- A spring cleanup for the senescent code in fd.c. ++- The --admissible option of the ls command now takes an optional ++ argument. When invoked like --admissible=m/foo, only files which are ++ admissible with respect to mood foo are listed. + +Downloads: +[tarball](./releases/paraslash-git.tar.xz) + ------------------------------------- 0.7.2 (2023-03-08) "optical friction" ------------------------------------- diff --cc afs.c index 865effde,9e679dcf..3083084c --- a/afs.c +++ b/afs.c @@@ -951,8 -962,7 +951,8 @@@ __noreturn void afs_init(int socket_fd } ret = schedule(&s); sched_shutdown(&s); - mood_unload(); - playlist_unload(); + mood_unload(NULL); ++ playlist_unload(NULL); out_close: close_afs_tables(); out: diff --cc mood.c index e85cf36a,18c02f7f..b4d50c88 --- a/mood.c +++ b/mood.c @@@ -628,12 -657,15 +657,16 @@@ int mood_load(const char *mood_name, st if (msg) *msg = get_statistics(aa.m, rnow.tv_sec); ret = aa.m->stats.num; - mood_unload(); - current_mood = aa.m; + if (result) + *result = aa.m; + else { + mood_unload(NULL); + current_mood = aa.m; + } + ret = 1; out: free(aa.array); - if (ret < 0) + if (ret <= 0) /* error, or no admissible files */ destroy_mood(aa.m); return ret; }