diff options
author | Dr. David Alan Gilbert | 2021-10-14 14:25:54 +0200 |
---|---|---|
committer | Dr. David Alan Gilbert | 2021-10-25 20:38:32 +0200 |
commit | 555a76e5e5dc2cd3c84c5e1bc060be17d5b32584 (patch) | |
tree | a50f7407af869380f76876606ba80cb41d95a5ee /tools | |
parent | virtiofsd: Add a helper to stop all queues (diff) | |
download | qemu-555a76e5e5dc2cd3c84c5e1bc060be17d5b32584.tar.gz qemu-555a76e5e5dc2cd3c84c5e1bc060be17d5b32584.tar.xz qemu-555a76e5e5dc2cd3c84c5e1bc060be17d5b32584.zip |
virtiofsd: Error on bad socket group name
Make the '--socket-group=' option fail if the group name is unknown:
./tools/virtiofsd/virtiofsd .... --socket-group=zaphod
vhost socket: unable to find group 'zaphod'
Reported-by: Xiaoling Gao <xiagao@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20211014122554.34599-1-dgilbert@redhat.com>
Reviewed-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/virtiofsd/fuse_virtio.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index baead08b28..60b96470c5 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -988,6 +988,13 @@ static int fv_create_listen_socket(struct fuse_session *se) "vhost socket failed to set group to %s (%d): %m\n", se->vu_socket_group, g->gr_gid); } + } else { + fuse_log(FUSE_LOG_ERR, + "vhost socket: unable to find group '%s'\n", + se->vu_socket_group); + close(listen_sock); + umask(old_umask); + return -1; } } umask(old_umask); |