Displaying 20 results from an estimated 71 matches for "listen_fds".
2023 Jan 28
1
[PATCH libnbd] generator: Pass LISTEN_FDNAMES=nbd with systemd socket activation
...5..22f06d4fd3 100644
--- a/generator/states-connect-socket-activation.c
+++ b/generator/states-connect-socket-activation.c
@@ -34,16 +34,18 @@
/* This is baked into the systemd socket activation API. */
#define FIRST_SOCKET_ACTIVATION_FD 3
-/* == strlen ("LISTEN_PID=") | strlen ("LISTEN_FDS=") */
-#define PREFIX_LENGTH 11
-
extern char **environ;
/* Prepare environment for calling execvp when doing systemd socket
* activation. Takes the current environment and copies it. Removes
- * any existing LISTEN_PID or LISTEN_FDS and replaces them with new
- * variables. env[0] is...
2023 Jan 30
2
[PATCH libnbd v2 4/4] generator/states-connect-socket-activation.c: Set LISTEN_FDNAMES
...gt;
#include <string.h>
#include <unistd.h>
#include <errno.h>
@@ -38,20 +39,27 @@ extern char **environ;
/* Prepare environment for calling execvp when doing systemd socket
* activation. Takes the current environment and copies it. Removes
- * any existing LISTEN_PID or LISTEN_FDS and replaces them with new
- * variables. env[0] is "LISTEN_PID=..." which is filled in by
- * CONNECT_SA.START, and env[1] is "LISTEN_FDS=1".
+ * any existing LISTEN_PID, LISTEN_FDS or LISTEN_FDNAAMES, and
+ * replaces them with new variables.
+ *
+ * env[0] is "LISTEN_PI...
2023 Jan 31
1
[PATCH libnbd] generator: Pass LISTEN_FDNAMES=nbd with systemd socket activation
...enerator/states-connect-socket-activation.c
> +++ b/generator/states-connect-socket-activation.c
> @@ -34,16 +34,18 @@
> /* This is baked into the systemd socket activation API. */
> #define FIRST_SOCKET_ACTIVATION_FD 3
>
> -/* == strlen ("LISTEN_PID=") | strlen ("LISTEN_FDS=") */
> -#define PREFIX_LENGTH 11
> -
> extern char **environ;
>
> /* Prepare environment for calling execvp when doing systemd socket
> * activation. Takes the current environment and copies it. Removes
> - * any existing LISTEN_PID or LISTEN_FDS and replaces them w...
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 31
1
[PATCH libnbd] generator: Pass LISTEN_FDNAMES=nbd with systemd socket activation
...-activation.c
> > +++ b/generator/states-connect-socket-activation.c
> > @@ -34,16 +34,18 @@
> > /* This is baked into the systemd socket activation API. */
> > #define FIRST_SOCKET_ACTIVATION_FD 3
> >
> > -/* == strlen ("LISTEN_PID=") | strlen ("LISTEN_FDS=") */
> > -#define PREFIX_LENGTH 11
> > -
> > extern char **environ;
> >
> > /* Prepare environment for calling execvp when doing systemd socket
> > * activation. Takes the current environment and copies it. Removes
> > - * any existing LISTEN_PI...
2023 Mar 24
4
[libnbd PATCH v3 19/19] socket activation: set LISTEN_FDNAMES
...t;rjones at redhat.com>
>> ---
>>
>
>> @@ -245,6 +245,9 @@ CONNECT_SA.START:
>> "LISTEN_PID=", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", &pid_ofs);
>> SACT_VAR_PUSH (sact_var, &num_vars,
>> "LISTEN_FDS=", "1", NULL);
>> + if (h->sact_name != NULL)
>> + SACT_VAR_PUSH (sact_var, &num_vars,
>> + "LISTEN_FDNAMES=", h->sact_name, NULL);
>> if (prepare_socket_activation_environment (&env, sact_var, num_vars) == -1)...
2023 Mar 23
1
[libnbd PATCH v3 19/19] socket activation: set LISTEN_FDNAMES
...d-by: Richard W.M. Jones <rjones at redhat.com>
> ---
>
> @@ -245,6 +245,9 @@ CONNECT_SA.START:
> "LISTEN_PID=", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", &pid_ofs);
> SACT_VAR_PUSH (sact_var, &num_vars,
> "LISTEN_FDS=", "1", NULL);
> + if (h->sact_name != NULL)
> + SACT_VAR_PUSH (sact_var, &num_vars,
> + "LISTEN_FDNAMES=", h->sact_name, NULL);
> if (prepare_socket_activation_environment (&env, sact_var, num_vars) == -1)
If I'm read...
2019 Oct 01
2
Re: [PATCH libnbd v2 2/2] api: Implement local command with systemd socket activation.
...; +/* This is baked into the systemd socket activation API. */
> +#define FIRST_SOCKET_ACTIVATION_FD 3
> +
> +/* Prepare environment for calling execvpe when doing systemd socket
> + * activation. Takes the current environment and copies it. Removes
> + * any existing LISTEN_PID or LISTEN_FDS and replaces them with new
> + * variables. env[0] is "LISTEN_PID=..." which is filled in by
> + * CONNECT_SA.START, and env[1] is "LISTEN_FDS=1".
> + */
I know that getenv()/setenv()/putenv() tend to prefer sorted environ,
but I also think that exec HAS to handle a...
2017 Jan 31
0
[PATCH nbdkit] Add support for socket activation.
...+opening the listening socket(s), the parent process (typically
+systemd) passes in pre-opened file descriptors. Socket activation
+lets you serve infrequent NBD requests using a superserver without
+needing nbdkit to be running the whole time.
+
+Socket activation is triggered when both the C<LISTEN_FDS> and
+C<LISTEN_PID> environment variables are set. In this mode using
+I<-i>, I<-p>, I<--run>, I<-s> or I<-U> flags on the command line is
+illegal and will cause an error. Also in this mode nbdkit does not
+fork into the background (ie. I<-f> is impli...
2011 Apr 20
2
possible bug leading to lmtp crashes
...TZ KRB5CCNAME=/etc/dovecot/krb5.cc
With that do any of the following lines from the referenced hg rev set
mean I am missing anything on my import_environment variable? Or is it
all good?
10.15 +/* <settings checks> */
10.16 +#ifdef HAVE_SYSTEMD
10.17 +# define ENV_SYSTEMD " LISTEN_PID LISTEN_FDS"
10.18 +#else
10.19 +# define ENV_SYSTEMD ""
10.20 +#endif
10.21 +#ifdef DEBUG
10.22 +# define ENV_GDB " GDB"
10.23 +#else
10.24 +# define ENV_GDB ""
10.25 +#endif
10.26 +/* </settings checks> */
10.27 +
10.28 static const struct master_settings master_defau...
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 24
2
[libnbd PATCH v3 19/19] socket activation: set LISTEN_FDNAMES
...2:26AM +0100, Laszlo Ersek wrote:
> >> @@ -245,6 +245,9 @@ CONNECT_SA.START:
> >> "LISTEN_PID=", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", &pid_ofs);
> >> SACT_VAR_PUSH (sact_var, &num_vars,
> >> "LISTEN_FDS=", "1", NULL);
> >> + if (h->sact_name != NULL)
> >> + SACT_VAR_PUSH (sact_var, &num_vars,
> >> + "LISTEN_FDNAMES=", h->sact_name, NULL);
> >> if (prepare_socket_activation_environment (&env, sact_va...
2019 Nov 15
1
Re: [PATCH libnbd v2 2/2] api: Implement local command with systemd socket activation.
...generator/states-connect-socket-activation.c
b/generator/states-connect-socket-activation.c
index 243ba36..ee08dff 100644
--- a/generator/states-connect-socket-activation.c
+++ b/generator/states-connect-socket-activation.c
@@ -36,7 +36,9 @@
/* == strlen ("LISTEN_PID=") | strlen ("LISTEN_FDS=") */
#define PREFIX_LENGTH 11
-/* Prepare environment for calling execvpe when doing systemd socket
+extern char **environ;
+
+/* Prepare environment for calling execvp when doing systemd socket
* activation. Takes the current environment and copies it. Removes
* any existing LISTE...
2019 Sep 30
4
[PATCH libnbd v2 0/2] Implement systemd socket activation.
v1 was posted here:
https://www.redhat.com/archives/libguestfs/2019-September/thread.html#00337
v2:
- Drop the first patch.
- Hopefully fix the multiple issues with fork-safety and general
behaviour on error paths.
Note this requires execvpe for which there seems to be no equivalent
on FreeBSD, except some kind of tedious path parsing (but can we
assign to environ?)
Rich.
2007 Mar 28
2
Multiple IP(or Host) listen in dovecot.conf.
Hi.
Does someone make update for `Multiple IP(or Host) listen in
dovecot.conf'?
I made trivial patch so.
But this patch doesn't solve `Support listening in multiple sockets'
in TODO. It appends only the capability as multiple listen in
dovecot.conf. So, `login_processes_count' becomes ambiguous.
In CASE1, login_processes_count = 2, forked imap-login processes are
8.
--
samples
2016 Oct 11
2
Problems with GSSAPI and LDAP
...1): generic
failure: GSSAPI Error: Unspecified GSS failure. Minor code may provide
more information (No Kerberos credentials available (default cache:
FILE:/tmp/dovecot.krb5.ccache))
I have set the import_environment in dovecot.conf:
import_environment = TZ CORE_OUTOFMEM CORE_ERROR LISTEN_PID LISTEN_FDS
KRB5CCNAME=FILE:/tmp/dovecot.krb5.ccache
And these in LDAP configuration:
dn = imap/host.example.com at EXAMPLE.COM
sasl_bind = yes
sasl_mech = gssapi
sasl_realm = EXAMPLE.COM
sasl_authz_id = imap/host.example.com at EXAMPLE.COM
I have tried with different values in dn and sasl_authz_id and als...
2019 Sep 30
0
[PATCH libnbd v2 2/2] api: Implement local command with systemd socket activation.
...e "internal.h"
+
+/* This is baked into the systemd socket activation API. */
+#define FIRST_SOCKET_ACTIVATION_FD 3
+
+/* Prepare environment for calling execvpe when doing systemd socket
+ * activation. Takes the current environment and copies it. Removes
+ * any existing LISTEN_PID or LISTEN_FDS and replaces them with new
+ * variables. env[0] is "LISTEN_PID=..." which is filled in by
+ * CONNECT_SA.START, and env[1] is "LISTEN_FDS=1".
+ */
+static char **
+prepare_socket_activation_environment (void)
+{
+ char **env = NULL;
+ char *p0 = NULL, *p1 = NULL;
+ size_t i...
2011 Apr 26
2
possible bug leading to lmtp crashes
...> matter what the configuration says. This seems to be contrary to the
> code and to the top of the page (commit comment?).
>
> So, based on the code, I think HOME, USER, TZ should always be
> preserved. Depending on system compilation (according to ifdefs), GDB,
> LISTEN_PIDS and LISTEN_FDS should also be preserved. Is this what is
> causing my crash? I am still experimenting.
>
> I have three systems doing this. Two were Fedora 15 current and one
> Fedora 14 current. I have upgraded F14 to F15 to help remove variability.
>
> Trever
Sorry for responding to my own po...
2016 Oct 11
2
Problems with GSSAPI and LDAP
...failure. Minor code may
>> provide more information (No Kerberos credentials available (default
>> cache: FILE:/tmp/dovecot.krb5.ccache))
>>
>> I have set the import_environment in dovecot.conf:
>>
>> import_environment = TZ CORE_OUTOFMEM CORE_ERROR LISTEN_PID LISTEN_FDS
>> KRB5CCNAME=FILE:/tmp/dovecot.krb5.ccache
>>
>> And these in LDAP configuration:
>>
>> dn = imap/host.example.com at EXAMPLE.COM
>> sasl_bind = yes
>> sasl_mech = gssapi
>> sasl_realm = EXAMPLE.COM
>> sasl_authz_id = imap/host.example.com at...
2019 Sep 26
2
Re: [PATCH libnbd 2/2] api: Implement local command with systemd socket activation.
...sable_nagle (int sock)
> SET_NEXT_STATE (%^MAGIC.START);
> return 0;
>
> + CONNECT_SA.START:
> + /* This is in some ways similar to nbd_aio_connect_command above,
> + * but we must pass a listening socket to the child process and
> + * we must set LISTEN_PID and LISTEN_FDS environment variables.
> + */
> + size_t len;
> + int s;
> + struct sockaddr_un addr;
> + pid_t pid;
> + int flags;
> + char listen_pid[16];
> +
> + assert (!h->sock);
> + assert (h->argv);
> + assert (h->argv[0]);
> +
> + /* Use /tmp inst...