search for: nbd_create

Displaying 20 results from an estimated 142 matches for "nbd_create".

2019 Oct 01
1
[libnbd PATCH] docs: Add libnbd-security(1) man page
...4 docs/libnbd-security.pod create mode 100644 SECURITY diff --git a/docs/Makefile.am b/docs/Makefile.am index df58586..4c99b5d 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -38,6 +38,7 @@ generator_built = \ EXTRA_DIST = \ $(generator_built) \ libnbd.pod \ + libnbd-security.pod \ nbd_create.pod \ nbd_close.3 \ nbd_get_error.3 \ @@ -48,6 +49,7 @@ if HAVE_POD man_MANS = \ libnbd.3 \ + libnbd-security.1 \ nbd_create.3 \ nbd_close.3 \ nbd_get_error.3 \ @@ -73,4 +75,9 @@ libnbd.3: libnbd.pod $(top_builddir)/podwrapper.pl \ --html $(top_builddir)/html/$@.html \ $&l...
2019 Jun 03
1
[libnbd PATCH] generator: Add #define witnesses for all API
...pper; + pr "\n" + let generate_include_libnbd_h () = generate_header CStyle; @@ -2729,14 +2735,23 @@ let generate_include_libnbd_h () = List.iter (fun (n, i) -> pr "#define LIBNBD_%-30s %d\n" n i) constants; pr "\n"; pr "extern struct nbd_handle *nbd_create (void);\n"; + pr "#define LIBNBD_HAVE_NBD_CREATE 1\n"; + pr "\n"; pr "extern void nbd_close (struct nbd_handle *h);\n"; + pr "#define LIBNBD_HAVE_NBD_CLOSE 1\n"; + pr "\n"; pr "extern const char *nbd_get_error (void);\n"; +...
2019 Sep 11
1
Re: [PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.
...y=size, value=1M nbdkit: debug: full: config_complete nbdkit: debug: using thread model: parallel nbdkit: debug: bound to unix socket /tmp/tmp.sHet2Luahj nbdkit: debug: forked into background (new pid = 422301) nbdkit: debug: written pidfile /home/rjones/d/nbdkit/tests/full.pid libnbd: debug: nbd1: nbd_create: opening handle libnbd: debug: nbd1: nbd_close: closing handle libnbd: debug: nbd2: nbd_create: opening handle libnbd: debug: nbd2: nbd_close: closing handle libnbd: debug: nbd3: nbd_create: opening handle libnbd: debug: nbd3: nbd_close: closing handle libnbd: debug: nbd4: nbd_create: opening handl...
2019 Oct 01
0
[libnbd PATCH] docs: Add libnbd-security(1) man page
...4 docs/libnbd-security.pod create mode 100644 SECURITY diff --git a/docs/Makefile.am b/docs/Makefile.am index df58586..4c99b5d 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -38,6 +38,7 @@ generator_built = \ EXTRA_DIST = \ $(generator_built) \ libnbd.pod \ + libnbd-security.pod \ nbd_create.pod \ nbd_close.3 \ nbd_get_error.3 \ @@ -48,6 +49,7 @@ if HAVE_POD man_MANS = \ libnbd.3 \ + libnbd-security.1 \ nbd_create.3 \ nbd_close.3 \ nbd_get_error.3 \ @@ -73,4 +75,9 @@ libnbd.3: libnbd.pod $(top_builddir)/podwrapper.pl \ --html $(top_builddir)/html/$@.html \ $&l...
2019 Sep 11
4
[PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.
Very much a work in progress as there are still many tests using qemu-io which are candidates for conversion. You'll notice at the end of test-full.sh that the new test has some duplicated code which looks as if it ought to be refactored into a Python function. When I tried to do that, I got loads of strange Python problems which may indicate bugs in nbdsh itself or problems with my
2019 Jul 27
3
[PATCH libnbd] lib: Use symbol versions.
...otify_read@LIBNBD_1.0 U nbd_aio_notify_write@LIBNBD_1.0 U nbd_aio_peek_command_completed@LIBNBD_1.0 U nbd_aio_pread_callback@LIBNBD_1.0 U nbd_aio_pwrite_callback@LIBNBD_1.0 U nbd_close@LIBNBD_1.0 U nbd_create@LIBNBD_1.0 U nbd_get_debug@LIBNBD_1.0 U nbd_get_error@LIBNBD_1.0 Rich.
2023 May 30
2
[libnbd PATCH v3 04/22] states: Prepare to send 64-bit requests
...t; > + const char *cmd[] = { > > + "nbdkit", "-s", "-v", "--exit-with-parent", "memory", "1048576", NULL > > + }; > > + uint32_t strict; > > + > > + progname = argv[0]; > > + > > + nbd = nbd_create (); > > + if (nbd == NULL) { > > + fprintf (stderr, "%s\n", nbd_get_error ()); > > (3) Minor inconsistency with check(): we're not printing "progname" here. > > > + exit (EXIT_FAILURE); > > + } > > + > > + /* Connect to...
2020 Aug 14
0
[libnbd PATCH v2 09/13] info: Simplify by using nbd_opt_go
...ath); - xmluri->path = new_path; - new_uri = (char *) xmlSaveUri (xmluri); + if (!name) { + fprintf (stderr, "unable to obtain export name: %s\n", + nbd_get_error ()); + exit (EXIT_FAILURE); + } - /* Connect to the new URI. */ - nbd2 = nbd_create (); - if (nbd2 == NULL) { - fprintf (stderr, "%s\n", nbd_get_error ()); - exit (EXIT_FAILURE); - } - nbd_set_uri_allow_local_file (nbd2, true); /* Allow ?tls-psk-file. */ + /* Connect to the original URI, but using opt mode to alter the export. */ + nbd2...
2019 Jul 25
0
[PATCH libnbd v3 2/2] lib: Remove nbd_add_close_callback.
...enerator/generator b/generator/generator index 7aad57c..92a1aae 100755 --- a/generator/generator +++ b/generator/generator @@ -3055,7 +3055,6 @@ let generate_lib_libnbd_syms () = pr "{\n"; pr " global:\n"; - pr " nbd_add_close_callback;\n"; pr " nbd_create;\n"; pr " nbd_close;\n"; pr " nbd_get_errno;\n"; @@ -3255,11 +3254,6 @@ let generate_include_libnbd_h () = pr "extern int nbd_get_errno (void);\n"; pr "#define LIBNBD_HAVE_NBD_GET_ERRNO 1\n"; pr "\n"; - pr "extern int...
2020 Aug 19
0
[libnbd PATCH 2/2] info: Use nbd_opt_info for fewer handles during --list
...ports\": []\n"); for (i = 0; i < export_list.len; ++i) { - const char *name; + const char *name = export_list.names[i]; struct nbd_handle *nbd2; - /* Connect to the original URI, but using opt mode to alter the export. */ - name = export_list.names[i]; - nbd2 = nbd_create (); - if (nbd2 == NULL) { - fprintf (stderr, "%s\n", nbd_get_error ()); - exit (EXIT_FAILURE); - } - nbd_set_uri_allow_local_file (nbd2, true); /* Allow ?tls-psk-file. */ - nbd_set_opt_mode (nbd2, true); + if (probe_content) { + /* Connect to the original URI...
2019 Aug 11
3
[PATCH libnbd proposal] api: Add semi-private function for freeing persistent data.
...tor/generator +++ b/generator/generator @@ -3284,6 +3284,7 @@ let generate_lib_libnbd_syms () = pr "LIBNBD_%d.%d {\n" major minor; pr " global:\n"; if (major, minor) = (1, 0) then ( + pr " nbd_add_free_callback;\n"; pr " nbd_create;\n"; pr " nbd_close;\n"; pr " nbd_get_errno;\n"; @@ -3581,6 +3582,12 @@ let generate_include_libnbd_h () = pr "extern int nbd_get_errno (void);\n"; pr "#define LIBNBD_HAVE_NBD_GET_ERRNO 1\n"; pr "\n"; + pr &quo...
2019 Sep 16
2
[LIBNBD SECURITY PATCH 0/1] NBD Protocol Downgrade Attack in libnbd
We discovered a possible Downgrade Attack in libnbd. Lifecycle --------- Reported: 2019-09-14 Fixed: 2019-09-16 Published: 2019-09-16 There is no CVE number assigned for this issue yet, but the bug is being categorized and processed by Red Hat's security team which may result in a CVE being published later. Description ----------- Libnbd includes the method nbd_set_tls(h,
2020 Jul 20
2
[PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
Proposal for new APIs to list exports. The general shape of the API can probably best be seen from the examples/list-exports.c example. Rich.
2023 Jul 16
2
[libnbd PATCH] api: Fix block status assertion under set_strict bypass
On Sat, Jul 15, 2023 at 08:49:51PM -0500, Eric Blake wrote: > A compliant server should not send NBD_REPLY_TYPE_BLOCK_STATUS unless > we successfully negotiated a meta context. And our default strictness > settings refuse to let us send NBD_CMD_BLOCK_STATUS unless we > negotiated a meta context. But when you mix non-default settings > (using nbd_set_strict to disable
2019 Jul 25
4
[PATCH libnbd v3 0/2] lib: Implement closure lifetimes.
I think I've addressed everything that was raised in review. Some of the highlights: - Callbacks should be freed reliably along all exit paths. - There's a simple test of closure lifetimes. - I've tried to use VALID|FREE in all the places where I'm confident that it's safe and correct to do. There may be more places. Note this is an optimization and shouldn't
2020 Jul 20
2
Re: [PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
...an example I might just use atoi(), with even worse error-handling behavior but easier use. > + name = nbd_get_list_export_name (nbd, i); > + printf ("Connecting to %s ...\n", name); > + nbd_close (nbd); > + > + /* Connect again to the chosen export. */ > + nbd2 = nbd_create (); > + if (nbd2 == NULL) { > + fprintf (stderr, "%s\n", nbd_get_error ()); > + exit (EXIT_FAILURE); > + } > + > + if (nbd_set_export_name (nbd2, name) == -1) { > + fprintf (stderr, "%s\n", nbd_get_error ()); > + exit (EXIT_FAILURE); > +...
2020 Jul 20
0
[PATCH libnbd PROPOSAL] Add APIs for listing exports from an NBD server.
...t; + +int +main (int argc, char *argv[]) +{ + struct nbd_handle *nbd, *nbd2; + int r, i; + char *name; + int64_t size; + + if (argc != 2) { + fprintf (stderr, "%s socket\n", argv[0]); + exit (EXIT_FAILURE); + } + + /* Create the libnbd handle for querying exports. */ + nbd = nbd_create (); + if (nbd == NULL) { + fprintf (stderr, "%s\n", nbd_get_error ()); + exit (EXIT_FAILURE); + } + + /* Set the list exports mode in the handle. */ + nbd_set_list_exports (nbd, 1); + + /* Connect to the NBD server over a + * Unix domain socket. A side effect of + * connec...
2019 Aug 14
3
[libnbd PATCH 0/2] Drop generated file from git
Rich recently patched things to generate one man page per function rather than libnbd-api.3 (nice), but in doing so got stumped by a problem with a fresh git clone (automake fails for any 'include' directive that does not already exist). I've figured out how to hack around it, but the hack requires GNU make. We already use GNU make constructs elsewhere (such as $(wildcard)), but
2019 Oct 01
3
[PATCH libnbd 0/2] Change qemu-nbd interop tests to use socket activation.
Now that we have implemented systemd socket activation, we can use this to run qemu-nbd in tests. The first patch leaves some dead code around (the -DSERVE_OVER_TCP=1 path). It's possible we might want to use this to test against a putative future NBD server that only supports TCP, but on the other hand maybe we should just remove it. Tests & valgrind still pass for me. Rich.
2019 Jul 15
2
[PATCH libnbd] examples: Include an example of integrating with the glibc main loop.
** NOT WORKING ** This patch shows how to integrate libnbd and the glib main loop. Posted mainly as a point of discussion as it doesn't quite work yet. Rich.