search for: absname

Displaying 9 results from an estimated 9 matches for "absname".

Did you mean: abiname
2020 Feb 12
0
[nbdkit PATCH 3/3] ext2: Add mode for letting client exportname choose file from image
.../* The per-connection handle. */ struct handle { @@ -143,6 +148,8 @@ ext2_prepare (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle, struct ext2_inode inode; int64_t r; CLEANUP_FREE char *name = NULL; + const char *fname = file ?: nbdkit_export_name (); + CLEANUP_FREE char *absname = NULL; fs_flags = 0; #ifdef EXT2_FLAG_64BITS @@ -168,34 +175,42 @@ ext2_prepare (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle, return -1; } + if (fname[0] != '/') { + if (asprintf (&absname, "/%s", fname) < 0) { + nbdkit_error ("...
2019 Jun 26
5
[libnbd PATCH 0/2] Tighten URI parser
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 inadvertently connect over TCP to localhost:10809 instead of the intended Unix connection
2019 Aug 10
2
Re: [PATCH libnbd 9/9] FOR DISCUSSION ONLY: api: Add ‘allow’ parameter to nbd_connect_uri to control permitted URIs.
...nnection " > + "(use nbds: or nbds+unix:)"); > + goto cleanup; > + } > + Are there any other flags we might want to support, such as permitting or forbidding an authority section that specifies a username? > /* Insist on the scheme://[authority][/absname][?queries] form. */ > if (strncmp (raw_uri + strlen (uri->scheme), "://", 3)) { > set_error (EINVAL, "URI must begin with '%s://'", uri->scheme); > diff --git a/tests/aio-parallel-load.c b/tests/aio-parallel-load.c > index 614c22b..16c2aa2 10064...
2019 Aug 11
0
Re: [PATCH libnbd 9/9] FOR DISCUSSION ONLY: api: Add ‘allow’ parameter to nbd_connect_uri to control permitted URIs.
...these can be tricky. Yet another way to think about this problem is that we leave it up to the caller to sort it out. We might offer some help such as some functions to parse fields out of NBD URIs, but leave the details of validating to them. > > /* Insist on the scheme://[authority][/absname][?queries] form. */ > > if (strncmp (raw_uri + strlen (uri->scheme), "://", 3)) { > > set_error (EINVAL, "URI must begin with '%s://'", uri->scheme); > > diff --git a/tests/aio-parallel-load.c b/tests/aio-parallel-load.c > > index 61...
2016 May 18
0
[ANNOUNCE] libxcb 1.12
...support switch case in the generator generator: support fixed size lists in var-sized structs generator: support lists of structs which contain a switch generator: fix align-pads for switches which start at unaligned pos no typename for nested structs generator: fix absname for fields with only accessor function generator: expressions can generate pre-code generator: sumof: support any type, generate explicit code generator: sumof with nested expression rename _c_helper_absolute_name to _c_helper_fieldaccess_expr function _c_helper_fielda...
2019 Aug 10
0
[PATCH libnbd 9/9] FOR DISCUSSION ONLY: api: Add ‘allow’ parameter to nbd_connect_uri to control permitted URIs.
...;); + goto cleanup; + } + if (!tls && (allow & LIBNBD_CONNECT_URI_REQUIRE_TLS)) { + set_error (EPERM, "URI must specify an encrypted connection " + "(use nbds: or nbds+unix:)"); + goto cleanup; + } + /* Insist on the scheme://[authority][/absname][?queries] form. */ if (strncmp (raw_uri + strlen (uri->scheme), "://", 3)) { set_error (EINVAL, "URI must begin with '%s://'", uri->scheme); diff --git a/tests/aio-parallel-load.c b/tests/aio-parallel-load.c index 614c22b..16c2aa2 100644 --- a/tests/aio-pa...
2020 Feb 12
4
[nbdkit PATCH 0/3] Make ext2 a filter
I'm impressed that I was able to whip this out in just one day of hacking. Below, I'll include a diff between the plugin and the filter as of patch 1, if it aids review. Eric Blake (3): filters: Add ext2 filter ext2: Deprecate ext2 plugin ext2: Add mode for letting client exportname choose file from image TODO | 5 - configure.ac
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 Jul 21
4
[PATCH nbdkit] server: Pass the export name through filter .open calls.
...@@ -148,7 +166,7 @@ ext2_prepare (struct nbdkit_next_ops *next_ops, void *nxdata, void *handle, struct ext2_inode inode; int64_t r; CLEANUP_FREE char *name = NULL; - const char *fname = file ?: nbdkit_export_name (); + const char *fname = file ?: h->exportname; CLEANUP_FREE char *absname = NULL; fs_flags = 0; @@ -242,6 +260,7 @@ ext2_close (void *handle) ext2fs_file_close (h->file); ext2fs_close (h->fs); } + free (h->exportname); free (h); } diff --git a/filters/gzip/gzip.c b/filters/gzip/gzip.c index 31fde3bb..8323b882 100644 --- a/filters/gzip/gz...