search for: open_memstream

Displaying 20 results from an estimated 66 matches for "open_memstream".

2011 Sep 07
1
[PATCH] hivexsh: Conditionally build for Mac OS X
OS X lacks open_memstream, causing hivexsh to fail to build. This patch defines HAVE_HIVEXSH, setting the only condition to open_memstream existence. Signed-off-by: Alex Nelson <ajnelson at cs.ucsc.edu> --- Makefile.am | 6 +++++- configure.ac | 4 ++++ 2 files changed, 9 insertions(+), 1 deletions(-) diff...
2013 Oct 17
2
Re: Notes on getting libguestfs to work on Mac OS X
...;, "fuser", "-v", "-m", mountpoint, NULL); -> execlp ("/usr/bin/fuser", "fuser", "-c", mountpoint, NULL); - gnulib/lib/error.c: replace - extern char *program_name; -> extern char *program_name = "libguestfs"; - gnulib/lib/open_memstream.c: add new file, from http://lists.gnu.org/archive/html/bug-gnulib/2010-04/msg00379.html, remove from it check for #if !HAVE_FUNOPEN (it exists on Mac OSX, but HAVE_FUNOPEN is not defined) - gnulib/lib/stdio.in.h: add somewhere (for example, before @GNULIB_PCLOSE@): _GL_FUNCDECL_SYS (open_memstream...
2013 Oct 17
4
Notes on getting libguestfs to work on Mac OS X
...t;, "fuser", "-v", "-m", mountpoint, NULL); -> execlp ("/usr/bin/fuser", "fuser", "-c", mountpoint, NULL); - gnulib/lib/error.c: replace extern char *program_name; -> extern char *program_name = "libguestfs"; - gnulib/lib/open_memstream.c: add from http://lists.gnu.org/archive/html/bug-gnulib/2010-04/msg00379.html, remove check for #if !HAVE_FUNOPEN - gnulib/lib/stdio.in.h, gnulib/lib/Makefile.in: add new open_memstream.c [Mac OS X lacks open_memstream and gnulib doesn't supply it. Note that open_memstream is part of POSIX s...
2011 Sep 06
2
[PATCH 0/3] hivex: Improve OS X support
This patch series improves, but does not complete, OS X support for hivex. There are several outstanding issues before hivexml and hivexsh can run: * hivexsh uses open_memstream, which doesn't exist in OS X as near as I can see. Unfortunately, I'm inexperienced with autoconf, so I'm not sure how to employ AC_CHECK_FUNCS([open_memstream]) to conditionally add 'sh' to the Makefile.am's SUBDIRS. * The check for libxml fails, because PKG_CHECK_CONFIG...
2010 May 12
1
[PATCH] guestfish -i and virt-inspector work on filenames containing spaces (RHBZ#507810).
...guestfs_get_selinux (g)) { fprintf (stderr, _("%s: cannot use -i option with -a, -m, -N, " @@ -379,44 +377,90 @@ main (int argc, char *argv[]) exit (EXIT_FAILURE); } - strcpy (cmd, "a=`virt-inspector"); + char *cmd; + size_t cmdlen; + FILE *fp = open_memstream (&cmd, &cmdlen); + if (fp == NULL) { + perror ("open_memstream"); + exit (EXIT_FAILURE); + } + + //fprintf (fp, "virt-inspector"); + fprintf (fp, "inspector/run-inspector-locally"); while (optind < argc) { - if (strlen (cmd) +...
2020 Jul 21
0
Re: [PATCH nbdkit] server: Deprecate the -e/--exportname parameter.
...ore 1.16 could advertize a single export name to advertise (particularly since that was the spelling in the previous text). > +++ b/server/captive.c > @@ -61,8 +61,6 @@ run_command (void) > if (!run) > return; > > - assert (exportname != NULL); > - > fp = open_memstream (&cmd, &len); > if (fp == NULL) { > perror ("open_memstream"); > @@ -74,27 +72,13 @@ run_command (void) > if (port) { > fprintf (fp, "nbd://localhost:"); > shell_quote (port, fp); > - if (strcmp (exportname, "")...
2020 Jul 06
2
Re: [PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...h the exportname=on option) > + > +static int > +tar_get_ready (void) > +{ > + FILE *fp; > + CLEANUP_FREE char *cmd = NULL; > + size_t len = 0; > + bool scanned_ok; > + char s[256]; > + > + /* Construct the tar command to examine the tar file. */ > + fp = open_memstream (&cmd, &len); > + if (fp == NULL) { > + nbdkit_error ("open_memstream: %m"); > + return -1; > + } > + fprintf (fp, "LANG=C tar --no-auto-compress -tRvf "); Use of --no-auto-compress is specific to GNU tar, do we care? Should we allow a 'tar=...
2020 Jul 06
0
Re: [PATCH nbdkit 2/2] tar: Rewrite the tar plugin (again), this time in C.
...;+static int > >+tar_get_ready (void) > >+{ > >+ FILE *fp; > >+ CLEANUP_FREE char *cmd = NULL; > >+ size_t len = 0; > >+ bool scanned_ok; > >+ char s[256]; > >+ > >+ /* Construct the tar command to examine the tar file. */ > >+ fp = open_memstream (&cmd, &len); > >+ if (fp == NULL) { > >+ nbdkit_error ("open_memstream: %m"); > >+ return -1; > >+ } > >+ fprintf (fp, "LANG=C tar --no-auto-compress -tRvf "); > > Use of --no-auto-compress is specific to GNU tar, do we care...
2020 Jul 21
3
[PATCH nbdkit] server: Deprecate the -e/--exportname parameter.
...reground; extern const char *ipaddr; extern enum log_to log_to; diff --git a/server/captive.c b/server/captive.c index f8107604..aa717870 100644 --- a/server/captive.c +++ b/server/captive.c @@ -61,8 +61,6 @@ run_command (void) if (!run) return; - assert (exportname != NULL); - fp = open_memstream (&cmd, &len); if (fp == NULL) { perror ("open_memstream"); @@ -74,27 +72,13 @@ run_command (void) if (port) { fprintf (fp, "nbd://localhost:"); shell_quote (port, fp); - if (strcmp (exportname, "") != 0) { - putc ('/', fp);...
2020 Jul 22
2
[nbdkit PATCH] server: Reinstate limited use of -e/-exportname.
...st char *ipaddr; extern enum log_to log_to; diff --git a/server/captive.c b/server/captive.c index 53b82782..a8947d7c 100644 --- a/server/captive.c +++ b/server/captive.c @@ -61,6 +61,9 @@ run_command (void) if (!run) return; + if (!export_name) + export_name = ""; + fp = open_memstream (&cmd, &len); if (fp == NULL) { perror ("open_memstream"); @@ -72,15 +75,26 @@ run_command (void) if (port) { fprintf (fp, "nbd://localhost:"); shell_quote (port, fp); + if (strcmp (export_name, "") != 0) { + putc ('/', fp);...
2020 Jul 14
3
[PATCH nbdkit RFC 0/2] curl: Implement authorization scripts.
This is an RFC only, at the very least it lacks tests. This implements a rather complex new feature in nbdkit-curl-plugin allowing you to specify an external shell script that can be used to fetch an authorization token for services which requires a token or cookie for access, especially if that token must be renewed periodically. The motivation can be seen in the changes to the docs in patch 2.
2020 Mar 17
0
Re: [PATCH nbdkit v2] New tmpdisk plugin.
...+{ > + return size; > +} > + > +/* This creates and runs the full "mkfs" (or whatever) command. */ > +static int > +run_command (const char *disk) > +{ > + FILE *fp; > + CLEANUP_FREE char *cmd = NULL; > + size_t len = 0; > + int r; > + > + fp = open_memstream (&cmd, &len); > + if (fp == NULL) { > + nbdkit_error ("open_memstream: %m"); > + return -1; > + } > + > + /* Set the shell variables. */ > + fprintf (fp, "disk="); > + shell_quote (disk, fp); [1]...here you are correctly quoting the de...
2005 Jan 07
1
CRASH with squirrelmail.
I'm using: [root at gwydion root]# rpm -q squirrelmail dovecot squirrelmail-1.4.3-0.f1.1 dovecot-0.99.12-2.1.fc1.rf [root at gwydion root]# It works very good (a bit slow I would say, but ok)... until I enable MySQL auth mechanism. When I do that, dovecot-auth crashes when squirrelmail try to login. I keep getting: Jan 7 01:28:31 gwydion dovecot: child 22782 (auth) killed with signal 11
2003 Oct 28
0
I: Segfault in Samba
...e7594 in strtold_l () from /lib/libc.so.6 #2 0x081bcea6 in smb_panic () #3 0x081ab587 in dbgtext () #4 <signal handler called> #5 0x40219abd in mallopt () from /lib/libc.so.6 #6 0x40219368 in mallopt () from /lib/libc.so.6 #7 0x40218553 in malloc () from /lib/libc.so.6 #8 0x4020e0e1 in open_memstream () from /lib/libc.so.6 #9 0x4027adb0 in vsyslog () from /lib/libc.so.6 #10 0x4027ad1f in syslog () from /lib/libc.so.6 #11 0x081ab067 in Debug1 () #12 0x081ab3dd in dbghdr () #13 0x081bfaa3 in read_data () #14 0x081bff89 in send_keepalive () #15 0x4037b008 in ?? () #16 0x00000004 in ?? ()
2019 Mar 26
0
[PATCH nbdkit v4 08/15] log: Log extents requests.
...offs, count, !!(flags & NBDKIT_FLAG_REQ_ONE)); + r = next_ops->extents (nxdata, count, offs, flags, extents, err); + if (r == -1) + output_return (h, "...Extents", id, r, err); + else { + FILE *fp; + char *extents_str = NULL; + size_t i, n, len = 0; + + fp = open_memstream (&extents_str, &len); + if (fp != NULL) { + n = nbdkit_extents_count (extents); + for (i = 0; i < n; ++i) { + struct nbdkit_extent e = nbdkit_get_extent (extents, i); + if (i > 0) + fprintf (fp, ", "); + fprintf (fp, "{ offset=...
2020 Jul 15
0
[PATCH nbdkit v2] curl: Implement header and cookie scripts.
...+ + /* Create a temporary file for the errors so we can redirect them + * into nbdkit_error. + */ + fd = mkstemp (tmpfile); + if (fd == -1) { + nbdkit_error ("mkstemp"); + return -1; + } + close (fd); + + /* Generate the full script with the local $url variable. */ + fp = open_memstream (&cmd, &len); + if (fp == NULL) { + nbdkit_error ("open_memstream: %m"); + return -1; + } + fprintf (fp, "exec </dev/null\n"); /* Avoid stdin leaking (nbdkit -s). */ + fprintf (fp, "exec 2>%s\n", tmpfile); /* Catch errors to a temporary file....
2018 Nov 08
0
[Announce] Samba 4.9.2 Available for Download
...OR. o Amitay Isaacs <amitay at gmail.com> * BUG 13641: Fix CTDB recovery record resurrection from inactive nodes and simplify vacuuming. o Volker Lendecke <vl at samba.org> * BUG 13465: examples: Fix the smb2mount build. * BUG 13629: libtevent: Fix build due to missing open_memstream on Illiumos. * BUG 13662: winbindd_cache: Fix timeout calculation for sid<->name cache. o Gary Lockyer <gary at catalyst.net.nz> * BUG 13653: dsdb encrypted_secrets: Allow "ldb:// and "mdb://" in file path. o Stefan Metzmacher <metze at samba.org> * BUG...
2018 Nov 08
0
[Samba] [Announce] Samba 4.9.2 Available for Download
...OR. o Amitay Isaacs <amitay at gmail.com> * BUG 13641: Fix CTDB recovery record resurrection from inactive nodes and simplify vacuuming. o Volker Lendecke <vl at samba.org> * BUG 13465: examples: Fix the smb2mount build. * BUG 13629: libtevent: Fix build due to missing open_memstream on Illiumos. * BUG 13662: winbindd_cache: Fix timeout calculation for sid<->name cache. o Gary Lockyer <gary at catalyst.net.nz> * BUG 13653: dsdb encrypted_secrets: Allow "ldb:// and "mdb://" in file path. o Stefan Metzmacher <metze at samba.org> * BUG...
2019 Mar 28
0
[PATCH nbdkit v5 FINAL 09/19] log: Log extents requests.
...offs, count, !!(flags & NBDKIT_FLAG_REQ_ONE)); + r = next_ops->extents (nxdata, count, offs, flags, extents, err); + if (r == -1) + output_return (h, "...Extents", id, r, err); + else { + FILE *fp; + char *extents_str = NULL; + size_t i, n, len = 0; + + fp = open_memstream (&extents_str, &len); + if (fp != NULL) { + n = nbdkit_extents_count (extents); + for (i = 0; i < n; ++i) { + struct nbdkit_extent e = nbdkit_get_extent (extents, i); + if (i > 0) + fprintf (fp, ", "); + fprintf (fp, "{ offset=...
2015 Feb 05
4
Patchable build problems on OS X 10.10
...#39;s patches. * fuse/guestunmount.c uses Linux-specific fusermount and '-v' option for fuser. * src/proto.c -- From Apple's xdr.h: "If your code invokes an xdrproc_t callback, it must be modified to pass a third parameter, which may simply be zero." * OS X does not provide open_memstream(). * src/guestfs-internal-frontend.h and gnulib/lib/error.c need monkey-patching to replace program_name with getprogname(). The patch I'm using right now to get libguestfs to successfully compile is here: https://gist.github.com/shulima/c194c5057e88dbd8f686 Configure flags are --disable-pro...