search for: ascii_isalnum

Displaying 8 results from an estimated 8 matches for "ascii_isalnum".

2020 Aug 10
1
[nbdkit PATCH v2] server: Permit - in plugin names
...ndex 75ca53be..b001a9a9 100644 --- a/server/backend.c +++ b/server/backend.c @@ -98,13 +98,20 @@ backend_load (struct backend *b, const char *name, void (*load) (void)) program_name, b->filename, b->type); exit (EXIT_FAILURE); } - for (i = 0; i < len; ++i) { + if (! ascii_isalnum (*name)) { + fprintf (stderr, + "%s: %s: %s.name ('%s') field must begin with an " + "ASCII alphanumeric\n", + program_name, b->filename, b->type, name); + exit (EXIT_FAILURE); + } + for (i = 1; i < len; ++i) { un...
2020 Aug 10
0
[nbdkit PATCH] server: Permit - and _ in plugin names
...Our code for is_short_name() already accepts such names, but our documentation and backend_load did not. I'm undecided on whether rejecting a plugin beginning with a digit is a good idea; as written, this patch would forbid a plugin named '9p', but it is a one-line tweak to allow it (ascii_isalnum instead of ascii_isalpha). docs/nbdkit-filter.pod | 3 ++- docs/nbdkit-plugin.pod | 3 ++- server/backend.c | 10 ++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/nbdkit-filter.pod b/docs/nbdkit-filter.pod index 3c7527d4..361a70f1 100644 --- a/docs/nbdkit-fi...
2023 Jan 30
4
[PATCH libnbd v2 0/4] Pass LISTEN_FDNAMES with systemd socket activation
This is an alternative approach to https://listman.redhat.com/archives/libguestfs/2023-January/030535.html After discussing this with Dan Berrange we came to the conclusion that you really might want to set LISTEN_FDNAMES to arbitrary short strings (or not set it). Especially when talking to qemu-storage-daemon which would allow you to use these names on the command line. Rich.
2023 Jan 30
2
[PATCH libnbd v2 3/4] generator: Add APIs to get/set the socket activation socket name
...LL; + return 0; + } + + /* Check the proposed name is short and alphanumeric. */ + if (len > 32) { + set_error (ENAMETOOLONG, "socket activation name should be " + "<= 32 characters"); + return -1; + } + for (i = 0; i < len; ++i) { + if (! ascii_isalnum (name[i])) { + set_error (EINVAL, "socket activation name should contain " + "only alphanumeric ASCII characters"); + return -1; + } + } + + new_name = strdup (name); + if (!new_name) { + set_error (errno, "strdup"); + return -1; +...
2023 Mar 23
1
[libnbd PATCH v3 18/19] generator: Add APIs to get/set the socket activation socket name
...LL; + return 0; + } + + /* Check the proposed name is short and alphanumeric. */ + if (len > 32) { + set_error (ENAMETOOLONG, "socket activation name should be " + "<= 32 characters"); + return -1; + } + for (i = 0; i < len; ++i) { + if (! ascii_isalnum (name[i])) { + set_error (EINVAL, "socket activation name should contain " + "only alphanumeric ASCII characters"); + return -1; + } + } + + new_name = strdup (name); + if (!new_name) { + set_error (errno, "strdup"); + return -1; +...
2023 Mar 25
1
[libnbd PATCH v5 3/4] generator: Add APIs to get/set the socket activation socket name
...LL; + return 0; + } + + /* Check the proposed name is short and alphanumeric. */ + if (len > 32) { + set_error (ENAMETOOLONG, "socket activation name should be " + "<= 32 characters"); + return -1; + } + for (i = 0; i < len; ++i) { + if (! ascii_isalnum (name[i])) { + set_error (EINVAL, "socket activation name should contain " + "only alphanumeric ASCII characters"); + return -1; + } + } + + new_name = strdup (name); + if (!new_name) { + set_error (errno, "strdup"); + return -1; +...
2023 Mar 25
4
[libnbd PATCH v5 0/4] pass LISTEN_FDNAMES with systemd socket activation
V4 was here (incorrectly versioned on the mailing list as v3): <http://mid.mail-archive.com/20230323121016.1442655-1-lersek at redhat.com>. See the Notes section on each patch for the v5 updates. Laszlo Ersek (2): socket activation: generalize environment construction socket activation: set LISTEN_FDNAMES Richard W.M. Jones (2): common/include: Copy ascii-ctype functions from nbdkit
2023 Mar 23
20
[libnbd PATCH v3 00/19] pass LISTEN_FDNAMES with systemd socket activation
V3 was here: <http://mid.mail-archive.com/20230215141158.2426855-1-lersek at redhat.com>. See the Notes section on each patch for the v4 updates. The series is nearly ready for merging: every patch has at least one R-b tag, except "socket activation: avoid manipulating the sign bit". The series builds, and passes "make check" and "make check-valgrind", at