Displaying 9 results from an estimated 9 matches for "tls_option".
2018 Jun 28
1
[nbdkit PATCH] main: More idiomatic use of getopt_long
...kend *backend;
static char *random_fifo_dir = NULL;
static char *random_fifo = NULL;
-enum { HELP_OPTION = CHAR_MAX + 1 };
+enum {
+ HELP_OPTION = CHAR_MAX + 1,
+ DUMP_CONFIG_OPTION,
+ DUMP_PLUGIN_OPTION,
+ EXIT_WITH_PARENT_OPTION,
+ FILTER_OPTION,
+ RUN_OPTION,
+ SELINUX_LABEL_OPTION,
+ TLS_OPTION,
+ TLS_CERTIFICATES_OPTION,
+ TLS_VERIFY_PEER_OPTION,
+};
static const char *short_options = "e:fg:i:nop:P:rst:u:U:vV";
static const struct option long_options[] = {
- { "help", 0, NULL, HELP_OPTION },
- { "dump-config",0, NULL, 0 },
- { "dump-plugin...
2018 Nov 14
3
[PATCH nbdkit v2 0/2] build: Replace ./nbdkit with a C program.
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-November/msg00147.html
v2:
- Use stdbool for booleans.
- Use __attribute__((format(printf))).
- Don't abort on invalid options, exit with failure instead.
- Preserve long/short option choices in the output.
- Add '=' in long option output, ie. always use --longopt=arg.
- Add "--" parameter
2018 Nov 14
5
[PATCH nbdkit v3 0/4] build: Replace ./nbdkit with a C program.
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-November/msg00147.html
v2 was here:
https://www.redhat.com/archives/libguestfs/2018-November/msg00152.html
v3:
- Use optarg != NULL as a sentinel for has_arg.
- Moved some variable decls into the inner loop.
- Make nbdkit wrapper depend on config.status, so if srcdir or
builddir changes then we rebuild the wrapper. It
2018 Nov 08
0
[nbdkit PATCH v2 4/5] main: Use new bool parser for --tls
...-off-by: Eric Blake <eblake@redhat.com>
---
src/main.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/src/main.c b/src/main.c
index 7ebbba6..0a883e1 100644
--- a/src/main.c
+++ b/src/main.c
@@ -376,18 +376,14 @@ main (int argc, char *argv[])
case TLS_OPTION:
tls_set_on_cli = 1;
- if (strcmp (optarg, "off") == 0 || strcmp (optarg, "0") == 0)
- tls = 0;
- else if (strcmp (optarg, "on") == 0 || strcmp (optarg, "1") == 0)
- tls = 1;
- else if (strcmp (optarg, "require")...
2018 Nov 13
3
[PATCH 0/2] build: Replace ./nbdkit with a C program.
This patch series solves the FreeBSD shebang problem in a completely
different way, and a few other things besides. I propose that we
replace ./nbdkit with a C program. The C program is a straightforward
translation of the shell script.
Some advantages of this approach are:
- We can parse options in exactly the same way as the real program.
- Use the more accurate ‘is_short_name’ test for
2015 Oct 08
2
Dovecot auth-ldap ignores tls_* settings when using ldaps://
...y reason why LDAPS should not read the tls_*
settings.
This small patch solved it for me
--- dovecot-2.2.9/src/auth/db-ldap.c 2013-11-24 14:37:39.000000000 +0100
+++ dovecot-2.2.9.hs12/src/auth/db-ldap.c 2015-10-08 21:24:47.051446465 +0200
@@ -1043,7 +1043,7 @@
static void db_ldap_set_tls_options(struct ldap_connection *conn)
{
- if (!conn->set.tls)
+ if (!(conn->set.tls || strncmp(conn->set.uris, "ldaps:", 6) == 0))
return;
#ifdef OPENLDAP_TLS_OPTIONS
It would be great, if somebody can confirm this and if this or some
equivalent patch co...
2018 Nov 08
8
[nbdkit PATCH v2 0/5] log appends
v2 turned out to be much more involved, as I ended up fixing
several things along the way that I noticed while debugging a
feature addition.
Eric Blake (5):
maint: Improve ./nbdkit option parsing
main: Saner newline printing during --help
utils: Add nbdkit_parse_bool
main: Use new bool parser for --tls
log: Allow user option of appending to log
docs/nbdkit-plugin.pod | 11
2019 Jan 01
2
[PATCH nbdkit] server: Use bool for types which are really booleans.
...r,
@@ -300,7 +301,7 @@ main (int argc, char *argv[])
exit (EXIT_FAILURE);
}
run = optarg;
- foreground = 1;
+ foreground = true;
break;
case SELINUX_LABEL_OPTION:
@@ -315,7 +316,7 @@ main (int argc, char *argv[])
exit (EXIT_SUCCESS);
case TLS_OPTION:
- tls_set_on_cli = 1;
+ tls_set_on_cli = true;
if (strcasecmp (optarg, "require") == 0 ||
strcasecmp (optarg, "required") == 0 ||
strcasecmp (optarg, "force") == 0)
@@ -336,16 +337,16 @@ main (int argc, char *argv[])
break...
2020 May 19
1
[PATCH nbdkit] common/include: Add locale-safe ascii_strcasecmp and ascii_strncasecmp.
...3 100644
--- a/server/main.c
+++ b/server/main.c
@@ -59,6 +59,8 @@
#include <dlfcn.h>
+#include "ascii-string.h"
+
#include "internal.h"
#include "nbd-protocol.h"
#include "options.h"
@@ -300,9 +302,9 @@ main (int argc, char *argv[])
case TLS_OPTION:
tls_set_on_cli = true;
- if (strcasecmp (optarg, "require") == 0 ||
- strcasecmp (optarg, "required") == 0 ||
- strcasecmp (optarg, "force") == 0)
+ if (ascii_strcasecmp (optarg, "require") == 0 ||
+ ascii_strcasec...