Displaying 20 results from an estimated 71 matches for "listen_fd".
Did you mean:
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] i...
2023 Jan 30
2
[PATCH libnbd v2 4/4] generator/states-connect-socket-activation.c: Set LISTEN_FDNAMES
When the user calls nbd_set_socket_activation_name before calling
nbd_connect_system_socket_activation, pass the name down to the server
through LISTEN_FDNAMES. This has no effect unless the new API has
been called to set the socket name to a non-empty string.
---
generator/states-connect-socket-activation.c | 35 +++++++++++++++-----
1 file changed, 26 insertions(+), 9 deletions(-)
diff --git a/generator/states-connect-socket-activation.c b/gener...
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...
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_P...
2023 Mar 24
4
[libnbd PATCH v3 19/19] socket activation: set LISTEN_FDNAMES
On 3/23/23 20:27, Eric Blake wrote:
> On Thu, Mar 23, 2023 at 01:10:16PM +0100, Laszlo Ersek wrote:
>> When the user calls nbd_set_socket_activation_name before calling
>> nbd_connect_system_socket_activation, pass the name down to the server
>> through LISTEN_FDNAMES. This has no effect unless the new API has
>> been called to set the socket name to a non-empty string.
>>
>> https://lists.nongnu.org/archive/html/qemu-devel/2023-01/msg06114.html
>>
>> [Original commit message and upstream discussion reference by Rich Jones;
&g...
2023 Mar 23
1
[libnbd PATCH v3 19/19] socket activation: set LISTEN_FDNAMES
On Thu, Mar 23, 2023 at 01:10:16PM +0100, Laszlo Ersek wrote:
> When the user calls nbd_set_socket_activation_name before calling
> nbd_connect_system_socket_activation, pass the name down to the server
> through LISTEN_FDNAMES. This has no effect unless the new API has
> been called to set the socket name to a non-empty string.
>
> https://lists.nongnu.org/archive/html/qemu-devel/2023-01/msg06114.html
>
> [Original commit message and upstream discussion reference by Rich Jones;
> at
> <htt...
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 impl...
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_defa...
2023 Mar 25
4
[libnbd PATCH v5 0/4] pass LISTEN_FDNAMES with systemd socket activation
...as 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
generator: Add APIs to get/set the socket activation socket name
.gitignore | 1 +
common/include/Makefile.am | 6 +
common/include/ascii-ctype.h...
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_v...
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 LIST...
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.
...ap-server2.example.com
or
CASE 2:
protocol imap {
listen = 127.0.0.1:143, imap-server1:10143
ssl_listen = imap-server2:10943, 127.0.0.1
..
}
protocol pop3 {
listen = 127.0.0.1, pop-server1:10100
..
}
--
Update brief.
src/master/
master-setting.h:
listen_fd and related members changed to array_t.
also name add (s).
master-setting.c:
few member initialization delete.
main.c:
handle multiple IP and port, fds as array_t.
resolve_ip argment change.
login-process.h:
add listen_fd and ssl_listen_fd memb...
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 al...
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...
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 p...
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 a...
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 ins...