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.
+
+Downloads:
+[tarball](./releases/paraslash-git.tar.xz)
+
-------------------------------------
0.7.2 (2023-03-08) "optical friction"
-------------------------------------
mode = PLAY_MODE_MOOD;
} else {
ret = -ERRNO_TO_PARA_ERROR(EINVAL);
- msg = make_message("%s: parse error", arg);
+ msg = make_message("%s: parse error\n", arg);
}
if (pb)
para_printf(pb, "%s", msg);
{
int ret = activate_mood_or_playlist(arg, NULL);
if (ret < 0) {
- PARA_WARNING_LOG("could not activate %s: %s\n", arg,
- para_strerror(-ret));
+ PARA_WARNING_LOG("could not activate %s: %s\n", arg?
+ arg : "dummy", para_strerror(-ret));
if (arg)
activate_mood_or_playlist(NULL, NULL);
}
ret = schedule(&s);
sched_shutdown(&s);
mood_unload();
+ playlist_unload();
out_close:
close_afs_tables();
out:
*/
if (strcmp(name, "udp") == 0 || strcmp(name, "dccp") == 0) {
tmp = para_strdup("fecdec");
- add_filter(i, tmp);
+ ret = add_filter(i, tmp);
free(tmp);
if (ret < 0)
goto out;
/** The list of all status items used by para_{server,audiod,gui}. */
const char *status_item_list[] = {STATUS_ITEMS};
-static void dump_stat_client_list(void)
-{
- struct stat_client *sc;
-
- list_for_each_entry(sc, &client_list, node)
- PARA_INFO_LOG("stat client on fd %d\n", sc->fd);
-}
/**
* Add a status client to the list.
*
if (parser_friendly)
new_client->flags = SCF_PARSER_FRIENDLY;
para_list_add(&new_client->node, &client_list);
- dump_stat_client_list();
num_clients++;
return 1;
}
continue;
/* write error or short write */
close_stat_client(sc);
- dump_stat_client_list();
}
free(pb.buf);
free(pfpb.buf);
return false;
for (int i = 0; ct->features[i]; i++)
if (strcmp(feature, ct->features[i]) == 0)
- return i;
+ return true;
return false;
}
if test "$ac_cv_have_decl_RSA_set0_key" != "$ac_cv_lib_crypto_RSA_set0_key"; then
AC_MSG_ERROR([openssl header/library mismatch])
fi
- test "$ac_cv_have_decl_RSA_set0_key" = yes &&
+ if test "$ac_cv_have_decl_RSA_set0_key" = yes; then
AC_DEFINE([HAVE_RSA_SET0_KEY], [1], [openssl >= 1.1])
-
+ else
+ AC_MSG_WARN([
+ Old openssl library detected. Support for openssl-1.0 and earlier
+ will be removed in the next major paraslash release. Please upgrade
+ your openssl installation.])
+ fi
HAVE_CRYPTO_CLEANUP_ALL_EX_DATA=yes
AC_CHECK_DECL([CRYPTO_cleanup_all_ex_data], [],
[HAVE_CRYPTO_CLEANUP_ALL_EX_DATA=no],
* \param key_file The file containing the key.
* \param result The key structure is returned here.
*
- * \return The size of the key on success, negative on errors.
+ * \return The size of the key in bytes on success, negative on errors.
*/
int apc_get_pubkey(const char *key_file, struct asymmetric_key **result);
key_type = PKT_PEM;
begin = map + strlen(PRIVATE_PEM_KEY_HEADER);
footer = strstr(map, PRIVATE_PEM_KEY_FOOTER);
- PARA_INFO_LOG("detected legacy PEM key %s\n", key_file);
+ PARA_WARNING_LOG("detected legacy PEM key %s\n", key_file);
} else if (strncmp(map, PRIVATE_OPENSSH_KEY_HEADER,
strlen(PRIVATE_OPENSSH_KEY_HEADER)) == 0) {
key_type = PKT_OPENSSH;
*/
_static_inline_ const char *para_strerror(int num)
{
+ unsigned idx = num & ~((1U << OSL_ERROR_BIT) | (1U << LLS_ERROR_BIT)
+ | (1U << SYSTEM_ERROR_BIT));
assert(num > 0);
if (IS_OSL_ERROR(num)) {
assert(weak_osl_strerror);
- return weak_osl_strerror(num & ~(1U << OSL_ERROR_BIT));
+ return weak_osl_strerror(idx);
}
if (IS_LLS_ERROR(num)) {
assert(weak_lls_strerror);
- return weak_lls_strerror(num & ~(1U << LLS_ERROR_BIT));
+ return weak_lls_strerror(idx);
}
if (IS_SYSTEM_ERROR(num))
- return strerror(num & ~(1U << SYSTEM_ERROR_BIT));
- return para_errlist[num];
+ return strerror(idx);
+ return para_errlist[idx];
}
/**
key->num_bytes = ret;
key->sexp = sexp;
*result = key;
- ret = bits;
+ ret = bits / 8;
release_n:
gcry_mpi_release(n);
release_e:
ret = aa.m->stats.num;
mood_unload();
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;
}
unsigned int freq;
unsigned int padding;
unsigned int mode;
- unsigned int copyright;
- unsigned int original;
- unsigned int emphasis;
};
static const int frequencies[3][4] = {
+ header->padding;
}
-static int compare_headers(struct mp3header *h1,struct mp3header *h2)
+static int compare_headers(struct mp3header *h1, struct mp3header *h2)
{
if ((*(unsigned int*)h1) == (*(unsigned int*)h2))
return 1;
(h1->layer == h2->layer) &&
(h1->crc == h2->crc) &&
(h1->freq == h2->freq) &&
- (h1->mode == h2->mode) &&
- (h1->copyright == h2->copyright) &&
- (h1->original == h2->original) &&
- (h1->emphasis == h2->emphasis))
+ (h1->mode == h2->mode))
return 1;
return 0;
}
say_color()
{
+ local severity=$1
+
+ shift
if [[ "$o_nocolor" != "true" && -n "$1" ]]; then
export TERM=$ORIGINAL_TERM
- case "$1" in
+ case "$severity" in
error) tput $C_BOLD; tput $C_SETAF 1;;
skip) tput $C_SETAF 5;;
ok)
tput $C_SETAF 6;;
esac
fi
- shift
- printf "%s\n" "$*"
+ if [[ "$severity" == 'error' ]]; then
+ printf "%s\n" "$*" 1>&2
+ else
+ printf "%s\n" "$*"
+ fi
if [[ "$o_nocolor" != "true" && -n "$1" ]]; then
tput $C_SGR0
export TERM=dumb
[[ -z "$o_trash_dir" ]] && o_trash_dir="$test_dir/trashes"
[[ -z "$o_man_dir" ]] && o_man_dir="$test_dir/../build/man/man1"
- # we want alsolute paths because relative paths become invalid
+ # we want absolute paths because relative paths become invalid
# after changing to the trash dir
[[ -n "${o_results_dir##/*}" ]] && o_results_dir="$wd/$o_results_dir"
[[ -n "${o_executables_dir##/*}" ]] && o_executables_dir="$wd/$o_results_dir"