[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC][PATCH v4 02/18] virtagent: base definitions for h
From: |
Jes Sorensen |
Subject: |
Re: [Qemu-devel] [RFC][PATCH v4 02/18] virtagent: base definitions for host/guest RPC server |
Date: |
Thu, 18 Nov 2010 14:57:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.6 |
On 11/16/10 17:01, Michael Roth wrote:
> +#include <syslog.h>
> +#include "qemu_socket.h"
> +#include "virtagent-daemon.h"
> +#include "virtagent-common.h"
> +#include "virtagent.h"
> +
> +static bool va_enable_syslog = false; /* enable syslog'ing of RPCs */
> +
> +#define SLOG(msg, ...) do { \
> + char msg_buf[1024]; \
> + if (!va_enable_syslog) { \
> + break; \
> + } \
> + sprintf(msg_buf, msg, ## __VA_ARGS__); \
> + syslog(LOG_INFO, "virtagent, %s", msg_buf); \
> +} while(0)
You have a potential buffer overflow here, s/sprintf/snprintf/
> +#include "virtproxy.h"
> +
> +#define GUEST_AGENT_SERVICE_ID "virtagent"
> +#define GUEST_AGENT_PATH "/tmp/virtagent-guest.sock"
> +#define HOST_AGENT_SERVICE_ID "virtagent-host"
> +#define HOST_AGENT_PATH "/tmp/virtagent-host.sock"
> +#define VA_GETFILE_MAX 1 << 30
> +#define VA_FILEBUF_LEN 16384
> +
> +int va_server_init(VPDriver *vp_drv, bool is_host);
More stuff which I think should go into a config file.
Jes
- [Qemu-devel] [RFC][PATCH v4 00/18] virtagent: host/guest RPC communication agent, Michael Roth, 2010/11/16
- [Qemu-devel] [RFC][PATCH v4 02/18] virtagent: base definitions for host/guest RPC server, Michael Roth, 2010/11/16
- Re: [Qemu-devel] [RFC][PATCH v4 02/18] virtagent: base definitions for host/guest RPC server,
Jes Sorensen <=
- [Qemu-devel] [RFC][PATCH v4 01/18] virtagent: add common rpc transport defs, Michael Roth, 2010/11/16
- [Qemu-devel] [RFC][PATCH v4 03/18] virtagent: qemu-vp, integrate virtagent server, Michael Roth, 2010/11/16
- [Qemu-devel] [RFC][PATCH v4 04/18] virtagent: base RPC client definitions, Michael Roth, 2010/11/16
- [Qemu-devel] [RFC][PATCH v4 05/18] virtagent: add getfile RPC, Michael Roth, 2010/11/16
- [Qemu-devel] [RFC][PATCH v4 06/18] virtagent: add agent_viewfile command, Michael Roth, 2010/11/16