diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2010-04-16 17:25:23 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2010-04-26 16:36:31 -0300 |
commit | e53f27b9d9df73461308618151fa6e6392aebd85 (patch) | |
tree | 3a43939d72679d0700c1c72abeaf1fb93c0e7e42 /monitor.c | |
parent | 97331287ed2c928af6b9f31728d29ef60c3b8cd8 (diff) | |
download | qemu-e53f27b9d9df73461308618151fa6e6392aebd85.tar.gz qemu-e53f27b9d9df73461308618151fa6e6392aebd85.tar.bz2 qemu-e53f27b9d9df73461308618151fa6e6392aebd85.zip |
stash away SCM_RIGHTS fd until a getfd command arrives
If there is already a fd in s->msgfd before recvmsg it is
closed by parts that this patch does not touch. So, only
one descriptor can be "leaked" by attaching it to a command
other than getfd.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 9 |
1 files changed, 0 insertions, 9 deletions
@@ -2415,15 +2415,6 @@ static int do_getfd(Monitor *mon, const QDict *qdict, QObject **ret_data) return -1; } - fd = dup(fd); - if (fd == -1) { - if (errno == EMFILE) - qerror_report(QERR_TOO_MANY_FILES); - else - qerror_report(QERR_UNDEFINED_ERROR); - return -1; - } - QLIST_FOREACH(monfd, &mon->fds, next) { if (strcmp(monfd->name, fdname) != 0) { continue; |