Displaying 11 results from an estimated 11 matches for "new_fd".
Did you mean:
new_fb
2010 Jan 14
1
ssh(1) multiplexing rewrite
...t's request. Returns flag indicating whether mux master should
- * begin graceful close.
- */
-int
-muxserver_accept_control(void)
+/* Check mux client environment variables before passing them to mux master. */
+static int
+env_permitted(char *env)
{
- Buffer m;
- Channel *c;
- int client_fd, new_fd[3], ver, allowed, window, packetmax;
- socklen_t addrlen;
- struct sockaddr_storage addr;
- struct mux_session_confirm_ctx *cctx;
- char *cmd;
- u_int i, j, len, env_len, mux_command, flags, escape_char;
- uid_t euid;
- gid_t egid;
- int start_close = 0;
-
- /*
- * Accept connection on control soc...
2019 Jul 17
0
[PATCH libnbd v2] examples: Include an example of integrating with the glib main loop.
...);
+ int r = 0;
+
+ if ((dir & LIBNBD_AIO_DIRECTION_READ) != 0)
+ r |= G_IO_IN;
+ if ((dir & LIBNBD_AIO_DIRECTION_WRITE) != 0)
+ r |= G_IO_OUT;
+ return r;
+}
+
+static gboolean
+prepare (GSource *sp, gint *timeout_)
+{
+ struct NBDSource *source = (struct NBDSource *) sp;
+ int new_fd;
+ int events;
+
+ /* The poll file descriptor can change or become invalid at any
+ * time.
+ */
+ new_fd = nbd_aio_get_fd (source->nbd);
+ if (source->fd != new_fd) {
+ if (source->tag != NULL) {
+ g_source_remove_unix_fd ((GSource *) source, source->tag);
+ sourc...
2019 Jul 17
2
[PATCH libnbd v2] examples: Include an example of integrating with glib main loop.
This is working now, and incorporates all of the changes in Eric's
review, *except* that it still doesn't retire commands (although this
seems to make no obvious difference, except possibly a performance and
memory impact).
Rich.
2006 May 15
0
[PATCH 1/12] bug fix: openssh-4.3p2 memory leak
...sh-4.3p2-kylie/clientloop.c 2006-05-04 10:36:49.000000000 -0500
@@ -833,6 +833,8 @@ client_process_control(fd_set * readset)
debug2("%s: accepted tty %d, subsys %d, cmd %s", __func__,
cctx->want_tty, cctx->want_subsys, cmd);
+ xfree(cmd);
+
/* Gather fds from client */
new_fd[0] = mm_receive_fd(client_fd);
new_fd[1] = mm_receive_fd(client_fd);
2013 Jan 03
20
[PATCH] Switch to poll in xenconsoled's io loop.
The original implementation utilies select(). In Linux select() typically
supports up to 1024 file descriptors. This can be a problem when user tries to
boot up many guests. Switching to poll() has minimum impact on existing code
and has better scalibility.
Up to 8192 file descriptors are supported in the current implementation.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
2008 Jun 19
5
Portforwarding using the control master.
Hi all,
currently I am considering writing a patch for OpenSSH that will allow
portforwarding using the control_master unix domain socket. The idea is
to introduce an extra SSHMUX command, SSHMUX_COMMAND_SOCKS, which will
then pass control to the normal socks functions used for dynamic
forwarding.
The main reason for me to write this patch are:
- some more control over who gets to connect to
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...pe = cpu_to_le16(rarg->info.type);
> + rarg->info.flags = cpu_to_le32(rarg->info.flags);
> + rarg->info.time_sec = cpu_to_le64(stbuf.st_ctim.tv_sec);
> + rarg->info.time_nsec = cpu_to_le32(stbuf.st_ctim.tv_nsec);
> +
> + rarg->ioc = qio_channel_new_fd(fd, &err);
You should just use qio_channel_open_path() and avoid the earlier
call to open()
> + if (err) {
> + error_reportf_err(err, "cannot create io channel: ");
> + goto out;
> + }
> +
> + qio_channel_set_blocking(rarg->ioc, false, &am...
2016 Aug 24
2
[PATCH 2/3] qemu: Implement virtio-pstore device
...pe = cpu_to_le16(rarg->info.type);
> + rarg->info.flags = cpu_to_le32(rarg->info.flags);
> + rarg->info.time_sec = cpu_to_le64(stbuf.st_ctim.tv_sec);
> + rarg->info.time_nsec = cpu_to_le32(stbuf.st_ctim.tv_nsec);
> +
> + rarg->ioc = qio_channel_new_fd(fd, &err);
You should just use qio_channel_open_path() and avoid the earlier
call to open()
> + if (err) {
> + error_reportf_err(err, "cannot create io channel: ");
> + goto out;
> + }
> +
> + qio_channel_set_blocking(rarg->ioc, false, &am...
2016 Aug 26
0
[PATCH 2/3] qemu: Implement virtio-pstore device
...g->info.type);
> > + rarg->info.flags = cpu_to_le32(rarg->info.flags);
> > + rarg->info.time_sec = cpu_to_le64(stbuf.st_ctim.tv_sec);
> > + rarg->info.time_nsec = cpu_to_le32(stbuf.st_ctim.tv_nsec);
> > +
> > + rarg->ioc = qio_channel_new_fd(fd, &err);
>
> You should just use qio_channel_open_path() and avoid the earlier
> call to open()
I did it because to call fstat() using the fd and wanted to keep the
generic ioc pointer.
>
> > + if (err) {
> > + error_reportf_err(err, "cannot create...
2016 Aug 20
7
[RFC/PATCHSET 0/3] virtio: Implement virtio pstore device (v3)
Hello,
This is another iteration of the virtio-pstore work. In this patchset
I addressed most of feedbacks from previous version and drooped the
support for PSTORE_TYPE_CONSOLE for simplicity. It'll be added once the basic implementation
* changes in v3)
- use QIOChannel API (Stefan, Daniel)
- add bound check for malcious guests (Daniel)
- drop support PSTORE_TYPE_CONSOLE for now
2016 Aug 20
7
[RFC/PATCHSET 0/3] virtio: Implement virtio pstore device (v3)
Hello,
This is another iteration of the virtio-pstore work. In this patchset
I addressed most of feedbacks from previous version and drooped the
support for PSTORE_TYPE_CONSOLE for simplicity. It'll be added once the basic implementation
* changes in v3)
- use QIOChannel API (Stefan, Daniel)
- add bound check for malcious guests (Daniel)
- drop support PSTORE_TYPE_CONSOLE for now