search for: fds

Displaying 20 results from an estimated 779 matches for "fds".

Did you mean: fd
2020 Feb 26
2
[PATCH] lib: command: switch from select() to poll()
select() has a maximum value for the FDs it can monitor, and since the libguestfs library can be used in other applications, this limit may be hit by users in case lots of FDs are opened. As solution, switch to poll(): it has a slightly better interface to check what changed and for which FD, and it does not have a limit in the value of...
2006 May 01
1
fedora directory server (FDS)
Thanks Craig for your soon answer.. I've now the FDS up and running... I am now creating my users in FDS because I want to unify the authentication of my 3 centos servers. BUT, When I create my users in FDS I don't see any option of UID, GID, home directory, etc, so the FDS server return an error and my remote users can't authenticate.........
2020 Feb 26
1
Re: [PATCH] lib: command: switch from select() to poll()
On Wednesday, 26 February 2020 15:08:24 CET Daniel P. Berrangé wrote: > On Wed, Feb 26, 2020 at 02:39:04PM +0100, Pino Toscano wrote: > > select() has a maximum value for the FDs it can monitor, and since > > the libguestfs library can be used in other applications, this limit > > may be hit by users in case lots of FDs are opened. > > > > As solution, switch to poll(): it has a slightly better interface to > > check what changed and for which...
2020 Feb 26
0
Re: [PATCH] lib: command: switch from select() to poll()
On Wed, Feb 26, 2020 at 02:39:04PM +0100, Pino Toscano wrote: > select() has a maximum value for the FDs it can monitor, and since > the libguestfs library can be used in other applications, this limit > may be hit by users in case lots of FDs are opened. > > As solution, switch to poll(): it has a slightly better interface to > check what changed and for which FD, and it does not have...
2005 Dec 14
2
Patch: ioloop using kqueue/kevent for FreeBSD
...OP_KQUEUE + +#include <sys/types.h> +#include <sys/event.h> +#include <sys/time.h> + +#ifndef INITIAL_BUF_SIZE +# define INITIAL_BUF_SIZE 128 +#endif + + +struct ioloop_handler_context { + int kq; + size_t evbuf_size; + struct kevent *evbuf; + + size_t fds_size; + struct fdrecord *fds; +}; + +struct fdrecord { + /* IO_READ | IO_WRITE | IO_ERROR */ + unsigned char mode : 3; +}; + + +void io_loop_handler_init(struct ioloop *ioloop) +{ + struct ioloop_handler_context *ctx; + + ioloop->handler_context = ctx = +...
2008 Jan 09
3
Sync passwords unix/smb with FDS backend?
Using simple authentication I have been able to tie FDS to Samba 3.x.24. Knowing that the unix passwd and smb passwd are different, dare I ask how difficult it would be to have them sync? Most of my users are using netatalk w/ posix user info and MD5 password. I would like to swing this over to samba without the worries of two passwords per user. I have...
2019 Jun 04
0
[PATCH libnbd v2 1/4] examples, tests: Remove want_to_send / ready logic, increase limit on cmds in flight.
...if (handle == -1) { + fprintf (stderr, "%s\n", nbd_get_error ()); + goto error; + } + handles[in_flight] = handle; + i--; + in_flight++; + if (in_flight > status->most_in_flight) + status->most_in_flight = in_flight; + } fds[0].fd = nbd_aio_get_fd (nbd); - fds[0].events = want_to_send ? POLLOUT : 0; + fds[0].events = 0; fds[0].revents = 0; dir = nbd_aio_get_direction (nbd); if ((dir & LIBNBD_AIO_DIRECTION_READ) != 0) @@ -266,30 +277,6 @@ start_thread (void *arg) (fds[0].revents &a...
2019 Aug 02
0
[nbdkit PATCH v2 07/17] build: Audit for use of pipe2
...c @@ -140,13 +140,13 @@ exit_status_to_nbd_error (int status, const char *cmd) */ int set_cloexec (int fd) { -#if defined SOCK_CLOEXEC && defined HAVE_MKOSTEMP +#if defined SOCK_CLOEXEC && defined HAVE_MKOSTEMP && defined HAVE_PIPE2 nbdkit_error ("prefer creating fds with CLOEXEC atomically set"); close (fd); errno = EBADF; return -1; #else -# if defined SOCK_CLOEXEC || defined HAVE_MKOSTEMP +# if defined SOCK_CLOEXEC || defined HAVE_MKOSTEMP || defined HAVE_PIPE2 # error "Unexpected: your system has incomplete atomic CLOEXEC support"...
2020 Aug 18
1
Re: [PATCH nbdkit 7/9] server: Add hand-written replacement for poll for Windows.
...lation of poll written by Paolo, but it's distributed I know who you mean, but is it worth a surname? > + * under an incompatible license. However Winsock has select so we > + * can write a simple (but slow) emulation of poll using select. > + */ > +int > +poll (struct pollfd *fds, int n, int timeout) > +{ > + int i, nfds = 0, r; > + fd_set readfds, writefds; > + struct timeval tv, *tvp; > + > + FD_ZERO (&readfds); > + FD_ZERO (&writefds); > + > + for (i = 0; i < n; ++i) { > + if (fds[i].events & POLLIN) > + FD_SE...
2013 Jan 03
20
[PATCH] Switch to poll in xenconsoled's io loop.
...;stdlib.h> #include <errno.h> #include <string.h> -#include <sys/select.h> +#include <poll.h> #include <fcntl.h> #include <unistd.h> #include <termios.h> @@ -930,7 +930,6 @@ static void handle_log_reload(void) void handle_io(void) { - fd_set readfds, writefds; int ret; if (log_hv) { @@ -959,21 +958,33 @@ void handle_io(void) for (;;) { struct domain *d, *n; - int max_fd = -1; - struct timeval timeout; + int poll_timeout; /* timeout in milliseconds */ struct timespec ts; long long now, next_timeout = 0; - FD_ZERO(&r...
2017 Feb 04
0
[PATCH] ipconfig: handle multiple interfaces correctly
...print_device_config(dev); + packet_close(dev); ++configured; @@ -374,34 +376,36 @@ struct netdev *ifaces; * 0 = No dhcp/bootp packet was received * 1 = A packet was received and handled */ -static int do_pkt_recv(int pkt_fd, time_t now) +static int do_pkt_recv(int nr, struct pollfd *fds, time_t now) { - int ret = 0; + int i, ret = 0; struct state *s; - for (s = slist; s; s = s->next) - ret |= process_receive_event(s, now); + for (i = 0, s = slist; s && nr; s = s->next, i++) { + if (fds[i].revents & POLLRDNORM) { + ret |= process_receive_event(s, now); +...
2005 Dec 06
2
OpenLDAP to FDS 7.1
I am intending to test FDS 7.1 for our LDAP database. We have a custom schema currently set up with OpenLDAP. I am looking for a script ton convert those schema files to the FDS LDIF format. I could have sworn someone posted a link in the previous LDAP thread, but I can't find it now. If anyone has that script, I wou...
2019 Jun 18
0
[nbdkit PATCH] Experiment: nbd: Use ppoll() instead of pipe-to-self
...#include <pthread.h> #include <semaphore.h> #include <poll.h> +#include <signal.h> #include <libnbd.h> @@ -67,7 +68,6 @@ struct handle { /* These fields are read-only once initialized */ struct nbd_handle *nbd; int fd; /* Cache of nbd_aio_get_fd */ - int fds[2]; /* Pipe for kicking the reader thread */ bool readonly; pthread_t reader; @@ -105,6 +105,15 @@ static char *tls_psk; static struct handle *nbdplug_open_handle (int readonly); static void nbdplug_close_handle (struct handle *h); +/* Original signal mask, with SIGUSR1 unblocked */ +stat...
2019 Jan 18
0
[klibc:master] ipconfig: handle multiple interfaces correctly
...print_device_config(dev); + packet_close(dev); ++configured; @@ -374,34 +376,36 @@ struct netdev *ifaces; * 0 = No dhcp/bootp packet was received * 1 = A packet was received and handled */ -static int do_pkt_recv(int pkt_fd, time_t now) +static int do_pkt_recv(int nr, struct pollfd *fds, time_t now) { - int ret = 0; + int i, ret = 0; struct state *s; - for (s = slist; s; s = s->next) - ret |= process_receive_event(s, now); + for (i = 0, s = slist; s && nr; s = s->next, i++) { + if (fds[i].revents & POLLRDNORM) { + ret |= process_receive_event(s, now); +...
2005 Dec 01
2
LDAP Implementations (was: Linking against a specifi c Berkeley DB install)
...ajor use -- > especially before even the appearance of ADS in Windows 2000, > let alone how well it does integrate it for ADS-to/from-NsDS > synchronization. I.e., NsDS can run on Windows too, and > Fedora makes those binaries available. > > I don't know if I'd trust the FDS 1.0 "open source" version > yet, as it's missing components last time I checked, but the > FDS binaries? 100% NsDS 7.1 -- Linux, Windows, Solaris, > etc... I'm not resistant to changing programs. We are in a testing mode now and I have barely even started looking into...
2019 Aug 27
1
[PATCH nbdkit] server: Try hard to maintain invariant that fds 0, 1 and 2 are always open.
...y (const char *key, size_t len); +static void open_std_file_descriptors (void); struct debug_flag *debug_flags; /* -D */ bool exit_with_parent; /* --exit-with-parent */ @@ -149,6 +150,13 @@ main (int argc, char *argv[]) size_t i; const char *magic_config_key; + /* Ensures that fds 0, 1 and 2 are open (on /dev/null if nothing + * else). This is so that nbdkit and plugins can assume these file + * descriptors are always open, which makes certain code easier to + * write. + */ + open_std_file_descriptors (); + threadlocal_init (); /* The default setting for TL...
2020 Aug 18
0
[PATCH nbdkit 7/9] server: Add hand-written replacement for poll for Windows.
...t; + +#ifdef HAVE_POLL + +#include_next <poll.h> + +#else + +struct pollfd { + int fd; + short events; + short revents; +}; + +#define POLLIN 0x0001 +#define POLLOUT 0x0002 +#define POLLERR 0x0008 +#define POLLHUP 0x0010 +#define POLLRDHUP 0x2000 + +extern int poll (struct pollfd *fds, int n, int timeout); + +#endif + +#endif /* NBDKIT_POLL_H */ diff --git a/server/public.c b/server/public.c index fce16989..b25842f9 100644 --- a/server/public.c +++ b/server/public.c @@ -47,7 +47,6 @@ #include <limits.h> #include <termios.h> #include <errno.h> -#include <p...
2020 Sep 23
2
[PATCH 0/6] drm/nouveau: Support sync FDs and sync objects
...another driver (such as KMS for display). Among other things this > > allows extensions such as eglDupNativeFenceFDANDROID to be implemented. > > > > Note that patch 4 modifies the ABI introduced in patch 3 by allowing DRM > > sync objects to be passed rather than only sync FDs. It also allows any > > number of sync FDs/objects to be passed in or emitted. I think those are > > useful features, but I left them in a separate patch in case everybody > > else thinks that this won't be needed. If we decide to merge the new ABI > > then patch 4 shoul...
2017 Mar 03
2
[PATCH 1/2] Use gnulib set_nonblocking_flag function instead of fcntl.
The previous code: fcntl (fd, F_SETFL, O_NONBLOCK) was technically incorrect, because it would have reset any other flags on the file descriptor. Thanks: Eric Blake --- bootstrap | 1 + daemon/inotify.c | 6 ++++-- lib/conn-socket.c | 21 +++++++++++---------- m4/.gitignore | 9 +++++++++ 4 files changed, 25 insertions(+), 12 deletions(-) diff --git a/bootstrap b/bootstrap
2010 Dec 04
0
Samba as PDC and FDS
I think I'm almost there getting Samba (3.4.9-60) to authenticate against FDS (1.2.6.1) but I'm at a loss to get over this last hurdle.? Total LDAP newbie here so nothing about any of this is obvious to me right now. I've been using http://directory.fedoraproject.org/wiki/Howto:Samba as a guide.? I've configured FDS and put in groups and users.? AFAIK I've c...