16 Aug 2012 21:24
[PATCH 7/7] librdmacm/rspreload: Add fstat support
vsftpd calls fstat on a socket. Fake it out. Signed-off-by: Sean Hefty <sean.hefty@...> --- src/preload.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/src/preload.c b/src/preload.c index c6cf176..8f19af5 100644 --- a/src/preload.c +++ b/src/preload.c <at> <at> -87,6 +87,7 <at> <at> struct socket_calls { int (*fcntl)(int socket, int cmd, ... /* arg */); int (*dup2)(int oldfd, int newfd); ssize_t (*sendfile)(int out_fd, int in_fd, off_t *offset, size_t count); + int (*fxstat)(int ver, int fd, struct stat *buf); }; static struct socket_calls real; <at> <at> -280,6 +281,7 <at> <at> static void init_preload(void) real.fcntl = dlsym(RTLD_NEXT, "fcntl"); real.dup2 = dlsym(RTLD_NEXT, "dup2"); real.sendfile = dlsym(RTLD_NEXT, "sendfile"); + real.fxstat = dlsym(RTLD_NEXT, "__fxstat"); rs.socket = dlsym(RTLD_DEFAULT, "rsocket"); rs.bind = dlsym(RTLD_DEFAULT, "rbind"); <at> <at> -1033,3 +1035,18 <at> <at> ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count) munmap(file_addr, count); return ret;(Continue reading)
RSS Feed