Displaying 20 results from an estimated 5000 matches similar to: "[libnbd] Some IRC questions"
2019 Aug 10
0
[PATCH libnbd 9/9] FOR DISCUSSION ONLY: api: Add ‘allow’ parameter to nbd_connect_uri to control permitted URIs.
Add an extra parameter to nbd_connect_uri to control what URIs are
permitted, in case the caller wants to pass in user-controlled URIs
but have some control over who/what/how the connection happens. For
example:
nbd_connect_uri (nbd, "nbd://localhost", LIBNBD_CONNECT_URI_REQUIRE_TLS)
=> error: URI must specify an encrypted connection: Permission denied
This obviously breaks the
2019 Jun 04
1
Re: [PATCH libnbd v2 2/4] generator: Callback returns int instead of void.
On 6/4/19 4:59 AM, Richard W.M. Jones wrote:
> Callback functions now return an int instead of a void. This allows
> in some cases for the callback to indicate that there was an error.
>
> This is a small change to the API:
Indeed; and my work to let nbdkit-nbd use libnbd is slightly impacted.
If I want to support both 0.1.2 and 0.1.x, I now have to do a
conditional compilation
2020 Aug 14
0
[libnbd PATCH v2 09/13] info: Simplify by using nbd_opt_go
Instead of having to munge a URI to supply a different export name, we
can exploit the fact that nbd_opt_mode lets us change the preferred
export name after nbd_connect_uri has established its socket.
In fact, by doing this, nbdinfo no longer needs to directly link
against libxml2, so it can now be built regardless of whether the
underlying libnbd.so supports URIs (although use of the program
2019 Aug 10
2
Re: [PATCH libnbd 9/9] FOR DISCUSSION ONLY: api: Add ‘allow’ parameter to nbd_connect_uri to control permitted URIs.
On 8/10/19 8:02 AM, Richard W.M. Jones wrote:
> Add an extra parameter to nbd_connect_uri to control what URIs are
> permitted, in case the caller wants to pass in user-controlled URIs
> but have some control over who/what/how the connection happens. For
> example:
>
> nbd_connect_uri (nbd, "nbd://localhost", LIBNBD_CONNECT_URI_REQUIRE_TLS)
> => error: URI
2019 Sep 11
1
Re: [PATCH nbdkit] tests: Convert some tests to use nbdsh instead of qemu-io.
On Wed, Sep 11, 2019 at 08:48:28AM -0500, Eric Blake wrote:
> On 9/11/19 5:40 AM, Richard W.M. Jones wrote:
> > 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
2019 Aug 11
0
Re: [PATCH libnbd 9/9] FOR DISCUSSION ONLY: api: Add ‘allow’ parameter to nbd_connect_uri to control permitted URIs.
On Sat, Aug 10, 2019 at 04:50:18PM -0500, Eric Blake wrote:
> On 8/10/19 8:02 AM, Richard W.M. Jones wrote:
> > +++ b/docs/libnbd.pod
> > @@ -364,7 +364,7 @@ when it is available.
> >
> > To connect to a URI via the high level API, use:
> >
> > - nbd_connect_uri (nbd, "nbd://example.com/");
> > + nbd_connect_uri (nbd,
2019 Oct 20
0
[PATCH libnbd] api: Allow NBD URIs to be restricted.
New APIs are added which let you enable or disable features of NBD
URIs, mainly for security reasons.
tls-psk-file is *disabled* by default for obvious security reasons.
All other features are enabled by default.
---
generator/generator | 127 +++++++++++++++++++++++++++++++++++++++++++-
lib/handle.c | 26 +++++++++
lib/internal.h | 5 ++
lib/uri.c | 31 +++++++++--
2019 Jun 03
0
[PATCH libnbd discussion only 1/5] docs: Document NBD URI support.
---
docs/libnbd.pod | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/docs/libnbd.pod b/docs/libnbd.pod
index b909833..f299ef1 100644
--- a/docs/libnbd.pod
+++ b/docs/libnbd.pod
@@ -228,6 +228,8 @@ For C<nbd_connect_tcp> the third parameter is the port name or number,
which can either be a name from F</etc/services> or the port number as
a string (eg.
2020 Jul 10
0
[RFC nbdkit PATCH] server: Allow --run with --vsock
Now that kernels support vsock loopback, we have no reason to forbid
--vsock with --run.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
I'm hoping to commit something like this, but right now, the testsuite
is failing more times than it succeeds, with:
+ port=1082294412
+ nbdkit --vsock --port 1082294412 memory 1M --run 'sleep 1; nbdsh -u "$uri" -c
2023 Aug 03
1
[libnbd PATCH v4 20/25] generator: Actually request extended headers
This is the culmination of the previous patches' preparation work for
using extended headers when possible. The new states in the state
machine are copied extensively from our handling of
OPT_STRUCTURED_REPLY. The next patch will then expose a new API
nbd_opt_extended_headers() for manual control.
At the same time I posted this patch, I had patches for qemu-nbd to
support extended headers
2019 Nov 22
1
[nbdkit PATCH] nbd: Add vsock_cid= transport option
With new enough libnbd, we already support vsock by virtue of uri=;
however, it's also nice to allow direct exposure of the
nbd_connect_vsock() api.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
As with commit 7ce9feef, there is no easy way to add testsuite
coverage for this.
plugins/nbd/nbdkit-nbd-plugin.pod | 30 +++++++++-----
plugins/nbd/nbd.c | 65
2019 Jun 04
0
[PATCH libnbd v2 4/4] examples: Add concurrent writer example.
---
.gitignore | 1 +
examples/Makefile.am | 12 +
examples/concurrent-writer.c | 450 +++++++++++++++++++++++++++++++++++
3 files changed, 463 insertions(+)
diff --git a/.gitignore b/.gitignore
index 30438c1..e4dad91 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,6 +41,7 @@ Makefile.in
/docs/libnbd-api.3
/docs/libnbd-api.pod
/examples/batched-read-write
2019 Jun 25
0
Re: Few libnbd questions/concerns
On Tue, Jun 25, 2019 at 02:58:34PM +0200, Martin Kletzander wrote:
> Here are few things I found out when using libnbd that might be perfectly fine
> or maybe just an oversight, but I wanted to point them out. It's nothing major.
>
> When running a program with `nbdkit -U - --run ...`, the $nbd parameter gets
> expanded to nbd:unix:/path/to/socket. When this string is passed
2019 Jun 25
2
Few libnbd questions/concerns
Here are few things I found out when using libnbd that might be perfectly fine
or maybe just an oversight, but I wanted to point them out. It's nothing major.
When running a program with `nbdkit -U - --run ...`, the $nbd parameter gets
expanded to nbd:unix:/path/to/socket. When this string is passed to
nbd_connect_uri(), it does not return an error (even though it is not a valid
URL), but
2019 Jun 03
0
[PATCH libnbd discussion only 5/5] examples: Add concurrent writer example.
---
.gitignore | 1 +
examples/Makefile.am | 12 +
examples/concurrent-writer.c | 450 +++++++++++++++++++++++++++
examples/threaded-reads-and-writes.c | 2 +-
4 files changed, 464 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 30438c1..e4dad91 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,6 +41,7 @@ Makefile.in
2019 Jun 05
1
[libnbd PATCH] api: Add nbd_supports_tls
This is slightly redundant with just trying nbd_set_tls(nbd, 2) then
checking for failure; however, this function does not set errors and
looks more similar to nbd_supports_uri.
---
This is borderline enough that I figured I'd post it to check if we want it.
generator/generator | 45 ++++++++++++++++++++++++++++++++++++++-------
interop/interop.c | 4 ++++
lib/handle.c | 12
2019 Jun 27
0
Re: Few libnbd questions/concerns
On 6/25/19 9:25 AM, Eric Blake wrote:
>>> When running a program with `nbdkit -U - --run ...`, the $nbd parameter gets
>>> expanded to nbd:unix:/path/to/socket. When this string is passed to
>>> nbd_connect_uri(), it does not return an error (even though it is not a valid
>>> URL), but what's more it treats it as "nbd://localhost", which might be
2020 Sep 28
0
[libnbd PATCH 3/3] api: Add nbd_opt_list_meta_context
Right now, we require the user to supply potential metacontext names
in advance, without knowing what the server actually supports until
after the connection or nbd_opt_info call is complete. But the NBD
protocol also supports a client being able to query what contexts a
server supports, including where a client asks with a prefix and the
server replies back with all answers that match the
2019 Jun 03
3
[PATCH libnbd] api: nbd_get_version, nbd_supports_uri and nbd_get_package_name.
nbd_get_version returns the library version as a string.
nbd_supports_uri returns whether or not the library was compiled with
NBD URI support (ie. with libxml2).
nbd_get_package_name is fairly useless as it always returns the string
"libnbd", however it replaces a function that was written for the
Python bindings.
These take a handle parameter but don't need to use it. Changing
2019 Sep 17
0
Re: [PATCH libnbd] docs: Document limits on export name.
On 9/17/19 3:32 AM, Richard W.M. Jones wrote:
> This commit documents the limits on export name, encoding, etc.
> ---
> generator/generator | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
ACK.
> diff --git a/generator/generator b/generator/generator
> index a72f36c..87a8cdf 100755
> --- a/generator/generator
> +++ b/generator/generator
> @@