Displaying 20 results from an estimated 6000 matches similar to: "[libnbd PATCH 0/2] Tighten URI parser"
2019 Jun 26
1
Re: [libnbd PATCH 0/2] Tighten URI parser
On 6/26/19 4:05 AM, Martin Kletzander wrote:
> On Tue, Jun 25, 2019 at 09:09:58PM -0500, Eric Blake wrote:
>> I'm not sure whether we want to go with just the first patch (reject
>> nbd:unix:/path but still accept nbd:/path), or squash the two in order
>> to go with the second (reject both abbreviated forms, and require
>> scheme://...). Either way, though, nbdkit
2019 Aug 10
17
[PATCH libnbd 0/9] Add Enum and Flags types.
This largish series adds several new features to the generator.
Enum maps to enumerated types (like enum in C). The only current use
for this is replacing the nbd_set_tls (nbd, 0/1/2) parameter with
LIBNBD_TLS_DISABLE, LIBNBD_TLS_ALLOW, LIBNBD_TLS_REQUIRE (and natural
equivalents in other programming languages).
Flags maps to any uint32_t bitmask. It is basically a non-optional,
generalized
2020 Oct 27
6
[PATCH libnbd 0/5] info: --map: Coalesce adjacent extents of the same type.
This adds coalescing of adjacent extents of the same type, as
mentioned by Eric Blake in the commit message here:
https://github.com/libguestfs/libnbd/commit/46072f6611f80245846a445766da071e457b00cd
The patch series is rather long because it detours through adding the
<vector.h> library from nbdkit into libnbd and replacing ad hoc uses
of realloc, char ** etc in various places.
Rich.
2019 Oct 20
2
[PATCH libnbd] api: Allow NBD URIs to be restricted.
Previous discussion:
https://www.redhat.com/archives/libguestfs/2019-August/msg00102.html
Last night I experimentally added support for URIs that contain the
query parameter tls-psk-file, as part of rewriting the tests to cover
more of the URI code. So you can now have a URI like:
nbds://alice@localhost/?tls-psk-file=keys.psk
However there's an obvious security problem here because now
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 Jun 26
0
Re: [libnbd PATCH 0/2] Tighten URI parser
On Tue, Jun 25, 2019 at 09:09:58PM -0500, Eric Blake wrote:
>I'm not sure whether we want to go with just the first patch (reject
>nbd:unix:/path but still accept nbd:/path), or squash the two in order
>to go with the second (reject both abbreviated forms, and require
>scheme://...). Either way, though, nbdkit -U - --run '$nbd' will now
>error out rather than
2019 Jun 26
3
[nbdkit PATCH] captive: Support $uri in --run
The existing --run '$nbd' outputs an older form that differs between
libguestfs and qemu, and which is not always a valid URI. For
historical compatibility, we probably can't change that; but we can
instead add a new '$uri' that outputs a valid URI. Note that the
libguestfs '$nbd' TCP form is already a valid URI, but that libguestfs
still needs to be taught about the
2019 Oct 18
2
[PATCH nbdkit] Add support for AF_VSOCK.
This is a series of patches to libnbd and nbdkit adding AF_VSOCK
support.
On the host side it allows you to start an nbdkit instance which
listens on a virtio-vsock socket:
$ ./nbdkit -fv --vsock memory 1G
...
nbdkit: debug: bound to vsock 2:10809
On the guest side you can then use libnbd to connect to the server:
$ ./run nbdsh -c 'h.connect_vsock(2, 10809)' -c
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
2022 Nov 04
3
[libnbd PATCH v2 0/3] Improve nbdsh -u handling
v1 was here:
https://listman.redhat.com/archives/libguestfs/2022-October/030216.html
Since then, I've incorporated changes based on Rich's feedback:
swap order of patches 2 and 3
less change in patch 1 (including no unsafe eval(%s) for --uri)
in patch 2, include -c in list of snippets to store, and use dict of
lambdas to map back to the desired action
Eric Blake (3):
nbdsh:
2019 Oct 18
1
[PATCH nbdkit v2] Add support for AF_VSOCK.
v1 was discussed here:
https://www.redhat.com/archives/libguestfs/2019-October/thread.html#00100
v2:
- Bind to VMADDR_CID_ANY (instead of HOST) and update the
documentation accordingly.
- Don't bother with SOCK_CLOEXEC fallback path that can
never be used.
Rich.
2019 Oct 18
5
[PATCH libnbd 0/2] api: Add support for AF_VSOCK.
This is a series of patches to libnbd and nbdkit adding AF_VSOCK
support.
On the host side it allows you to start an nbdkit instance which
listens on a virtio-vsock socket:
$ ./nbdkit -fv --vsock memory 1G
...
nbdkit: debug: bound to vsock 2:10809
On the guest side you can then use libnbd to connect to the server:
$ ./run nbdsh -c 'h.connect_vsock(2, 10809)' -c
2019 Jun 26
3
[nbdkit PATCH v2 0/2] adding nbdkit --run '$uri'
Since v1:
- new patch to add uri_quote()
- rebase on top of other recent patches needed while auditing shell_quote()
- use uri_quote() instead of shell_quote() for producing $uri
Eric Blake (2):
common/utils: Add uri_quote and tests
captive: Support $uri in --run
docs/nbdkit-captive.pod | 8 ++-
common/utils/utils.h | 1 +
common/utils/test-quotes.c | 108
2019 Sep 12
1
[libnbd PATCH] nbdsh: Support -u as synonym for --connect
Typing nbdsh --con (the minimum to get an unambiguous prefix for
--connect, different from --command) is annoying compared to having a
short option. Since it takes a URI as an argument, using -u seems
like a reasonable mnemonic.
---
sh/nbdsh.pod | 6 ++++--
python/nbdsh.py | 2 +-
sh/test-context.sh | 8 ++++----
sh/test-pattern.sh | 2 +-
4 files changed, 10 insertions(+), 8
2020 Oct 01
2
[PATCH libnbd] interop: Add test of qemu-storage-daemon.
This commit adds a simple test of qemu-storage-daemon (QSD). On the
basis that QSD is just qemu-nbd in new clothes this is only a simple
test, not complete coverage. Nor does it test the unique features of
QSD like being able to use QMP to create new server instances.
Unfortunately QSD is not yet stable upstream. This version works with
qemu 5.1.0 but at least two of the command line
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 Sep 28
11
[nbdkit PATCH v2 0/7] Spec compliance patches
Since the v1 series (0/4, at [1]), I've applied patches 1 and 2,
rewritten patch 3 [Forbid NUL in export and context names] into patch
4 here, patch 4 there turned into patch 6 here, and everything else
here is new.
[1]https://www.redhat.com/archives/libguestfs/2019-September/msg00180.html
I don't know if there is a handy reusable function for checking
whether a string contains valid
2019 May 28
1
[libnbd PATCH] connect: Better handling of long socket names
Copy various Unix socket handling techniques from nbdkit's nbd plugin:
Silently truncating a socket name rather than issuing an error message
can confuse users. No need to do an explicit memset if the compiler
does it for us via an initializer. No need to use strncpy() which
does wasted effort on short names, when we can use memcpy() given that
we already checked length in order to detect
2019 Apr 29
3
[nbdkit PATCH 0/2] Let nbd plugin connect to TCP socket
Accepting only Unix sockets can be a bit limiting; let's be more flexible.
Eric Blake (2):
nbd: Refactor Unix socket connection
nbd: Support TCP socket
plugins/nbd/nbdkit-nbd-plugin.pod | 36 ++++--
plugins/nbd/nbd.c | 175 ++++++++++++++++++++++--------
TODO | 3 -
3 files changed, 161 insertions(+), 53 deletions(-)
--
2.20.1
2019 Sep 12
2
[libnbd PATCH] nbdsh: Add -b option to simplify h.block_status
We decided to not request the "base:allocation" context by default (if
a client wants to use block_status on a different context, then they'd
have to get any default request out of the way); however, block status
is useless without at least one meta context. This adds a convenience
knob for requesting that, and has the nice benefit of working with the
--connect command line option