Hello community, here is the log from the commit of package kvm for openSUSE:11.3 checked in at Mon Jan 16 14:48:41 CET 2012.
-------- --- old-versions/11.3/UPDATES/all/kvm/kvm.changes 2011-07-08 18:53:12.000000000 +0200 +++ 11.3/kvm/kvm.changes 2012-01-11 20:32:00.000000000 +0100 @@ -1,0 +2,5 @@ +Wed Jan 11 00:25:29 UTC 2012 - [email protected] + +- set groups properly for -runas (bnc#705304) + +------------------------------------------------------------------- calling whatdependson for 11.3-i586 New: ---- kvm-qemu-preXX-vl.c-set-groups-properly-for-runas.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kvm.spec ++++++ --- /var/tmp/diff_new_pack.M2MAct/_old 2012-01-16 14:47:58.000000000 +0100 +++ /var/tmp/diff_new_pack.M2MAct/_new 2012-01-16 14:47:58.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package kvm # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,7 +15,6 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild # icecream 0 %bcond_with vde @@ -45,7 +44,16 @@ %define using_buildservice 0%{?opensuse_bs} Name: kvm -BuildRequires: SDL-devel alsa alsa-devel gnutls-devel libaio-devel ncurses-devel pciutils-devel perl python texinfo +BuildRequires: SDL-devel +BuildRequires: alsa +BuildRequires: alsa-devel +BuildRequires: gnutls-devel +BuildRequires: libaio-devel +BuildRequires: ncurses-devel +BuildRequires: pciutils-devel +BuildRequires: perl +BuildRequires: python +BuildRequires: texinfo %ifarch %ix86 x86_64 ia64 %if %{build_fw_from_source} # needed for building vgabios: @@ -63,7 +71,8 @@ %endif Requires: virt-utils %if %suse_version >= 1100 -BuildRequires: libcurl-devel libpulse-devel +BuildRequires: libcurl-devel +BuildRequires: libpulse-devel %endif %if %{with vde} BuildRequires: vde2-devel @@ -72,12 +81,12 @@ %if %suse_version < 1110 Requires: kvm-kmp %endif -License: BSD3c ; GPLv2 ; GPLv2+ ; LGPLv2.1+ ; MIT -Group: System/Kernel Summary: Kernel-based Virtual Machine +License: BSD-3-Clause ; GPL-2.0 ; GPL-2.0+ ; LGPL-2.1+ ; MIT +Group: System/Kernel Url: http://kvm.qumranet.com/ Version: 0.12.5 -Release: 1.<RELEASE8> +Release: 1.<RELEASE10> Source0: qemu-%{name}-%{version}.tar.bz2 Source1: 60-kvm.rules Source2: qemu-ifup @@ -137,6 +146,7 @@ Patch124: kvm-qemu-preXX-e1000-Pad-short-frames-to-minimum-size-60-.patch Patch125: kvm-qemu-preXX-virtio-guard-against-negative-vq-notifies.patch Patch126: kvm-qemu-preXX-validate-virtqueue.patch +Patch127: kvm-qemu-preXX-vl.c-set-groups-properly-for-runas.patch Patch200: kvm-studio-slirp-nooutgoing.patch Patch201: kvm-studio-vnc.patch @@ -254,6 +264,7 @@ %patch124 -p1 %patch125 -p1 %patch126 -p1 +%patch127 -p1 # Studio addons %patch200 -p1 ++++++ kvm-qemu-preXX-dictzip1.patch ++++++ --- /var/tmp/diff_new_pack.M2MAct/_old 2012-01-16 14:47:59.000000000 +0100 +++ /var/tmp/diff_new_pack.M2MAct/_new 2012-01-16 14:47:59.000000000 +0100 @@ -155,7 +155,7 @@ + DictCache cache[CACHE_COUNT]; + int cache_index; + uint8_t stream_in_use; -+ uint32_t chunk_len; ++ uint64_t chunk_len; + uint32_t chunk_cnt; + uint16_t *chunks; + uint32_t *chunks32; ++++++ kvm-qemu-preXX-vl.c-set-groups-properly-for-runas.patch ++++++ Author: Stefan Hajnoczi <[email protected]> Date: Sat Jul 9 10:22:07 2011 +0100 os-posix: set groups properly for -runas Andrew Griffiths reports that -runas does not set supplementary group IDs. This means that gid 0 (root) is not dropped when switching to an unprivileged user. Add an initgroups(3) call to use the -runas user's /etc/groups membership to update the supplementary group IDs. Signed-off-by: Stefan Hajnoczi <[email protected]> Acked-by: Chris Wright <[email protected]> Signed-off-by: Blue Swirl <[email protected]> Acked-by: Bruce Rogers <[email protected]> Index: qemu-kvm-0.12.5/vl.c =================================================================== --- qemu-kvm-0.12.5.orig/vl.c +++ qemu-kvm-0.12.5/vl.c @@ -35,6 +35,7 @@ #ifndef _WIN32 #include <libgen.h> #include <pwd.h> +#include <grp.h> #include <sys/times.h> #include <sys/wait.h> #include <termios.h> @@ -6259,6 +6260,11 @@ int main(int argc, char **argv, char **e fprintf(stderr, "Failed to setgid(%d)\n", pwd->pw_gid); exit(1); } + if (initgroups(pwd->pw_name, pwd->pw_gid) < 0) { + fprintf(stderr, "Failed to initgroups(\"%s\", %d)\n", + pwd->pw_name, pwd->pw_gid); + exit(1); + } if (setuid(pwd->pw_uid) < 0) { fprintf(stderr, "Failed to setuid(%d)\n", pwd->pw_uid); exit(1); continue with "q"... Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
