qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v4][ 5/7] guest agent: add guest agent RPCs/comm


From: Andi Kleen
Subject: Re: [Qemu-devel] [PATCH v4][ 5/7] guest agent: add guest agent RPCs/commands
Date: Sat, 04 Jun 2011 13:08:24 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Michael Roth <address@hidden> writes:
> +
> +int64_t qmp_guest_file_open(const char *filename, const char *mode, Error 
> **err)
> +{
> +    FILE *fh;
> +    int fd, ret;
> +    int64_t id = -1;
> +
> +    if (!logging_enabled()) {
> +        error_set(err, QERR_QGA_LOGGING_FAILED);
> +        goto out;
> +    }
> +    slog("guest-file-open called, filename: %s, mode: %s", filename, mode);
> +    fh = fopen(filename, mode);
> +    if (!fh) {
> +        error_set(err, QERR_OPEN_FILE_FAILED, filename);
> +        goto out;
> +    }

Does this really allow a guest to open any host file ?!?
Have you considered all the security implications of that?

-Andi

-- 
address@hidden -- Speaking for myself only



reply via email to

[Prev in Thread] Current Thread [Next in Thread]