nbd_set_uri_allow_tls_priority(3)
π nbd_set_uri_allow_tls_priority(3) β the libnbd girlies' guide π
okay so bestie, this is a page from LIBNBD, and it's about nbd_set_uri_allow_tls_priority β yes that's a mouthful, we're gonna get through it together π«Ά
β¨ NAME β¨
nbd_set_uri_allow_tls_priority β literally just sets whether tls-priority is allowed in NBD URIs. that's it. that's the whole vibe π
πΈ SYNOPSIS πΈ
#include <libnbd.h>
int nbd_set_uri_allow_tls_priority (
struct nbd_handle *h, bool allow
);
look at her. iconic signature. two params, no notes π
π¦ DESCRIPTION π¦
so here's the tea β β this one lets NBD URIs override the TLS priority by sticking ?tls-priority=PRIORITY into the query string. like, the URI itself gets to be a little main character and pick the priority. iykyk.
it's disabled by default though, and honestly? for good reason π because it's probably not safe. like, not "oops I broke it" unsafe β the TLS priority string is quite powerful, lowkey scary powerful. the way that it can let you read some local configuration files π and possibly even downgrade TLS security π
so yeah β if you turn this on, you're the one making that choice. no cap. be careful bestie π
β RETURN VALUE β
if the call goes through and everything's cute? it returns 0. slay β¨
π ERRORS π
if something goes wrong, you get -1 back. not the vibe.
refer to ERROR HANDLING in libnbd(3) for how to get further details of the error β that's where the actual lore lives fr fr.
also, these parameters must not be NULL: h. for more info see Non-NULL parameters in libnbd(3). tiny detail, huge consequences π
π HANDLE STATE π
nbd_set_uri_allow_tls_priority can be called when the handle is in these states β vibe check time:
- Handle created, before connecting β β allowed (this is her moment π)
- Connecting β β error
- Connecting & handshaking (opt_mode) β β error
- Connected to the server β β error
- Connection shut down β β error
- Handle dead β β error
so basically: catch her before you connect. periodt π
π VERSION π
this function first appeared in libnbd 1.24. new girl on the block π¦
if you need to test at compile time whether this function is available, check if the following macro is defined:
#define LIBNBD_HAVE_NBD_SET_URI_ALLOW_TLS_PRIORITY 1
π₯ SEE ALSO π₯
nbd_connect_uri(3)nbd_create(3)libnbd(3)https://gnutls.org/manual/html_node/Priority-Strings.htmlβ go read up on priority strings, it's giving deep lore π
π AUTHORS π
- Eric Blake
- Richard W.M. Jones
the masterminds. we stan π«Ά
π COPYRIGHT π
Copyright Red Hat
π§ LICENSE π§
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
okay that's the whole page bestie, go forth and set your URI allow-tls-priority flag responsibly πβ¨
and like, credit where it's due β this masterpiece came from libnbd-1.24.4, dated 2026-10-13, page nbd_set_uri_allow_tls_priority(3). byeeee ππ
π¦ where this page comes from
- arch rolling: libnbd 1.24.4-1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms