util: maintain caps when running command with uid != 0
util: maintain caps when running command with uid != 0

virCommand was previously calling virSetUIDGID() to change the uid and
gid of the child process, then separately calling
virSetCapabilities(). This did not work if the desired uid was != 0,
since a setuid to anything other than 0 normally clears all
capabilities bits.

The solution is to use the new virSetUIDGIDWithCaps(), sending it the
uid, gid, and capabilities bits. This will get the new process setup
properly.

Since the static functions virSetCapabilities() and
virClearCapabilities are no longer called, they have been removed.

NOTE: When combined with "filecap $path-to-qemu sys_rawio", this patch
will make CAP_SYS_RAWIO (which is required for passthrough of generic
scsi commands to a guest - see commits e8daeeb, 177db08, 397e6a7, and
74e0349) be retained by qemu when necessary. Apparently that
capability has been broken for non-root qemu ever since it was
originally added.

libvirt/libvirt,libvirt/libvirt,siboulet/libvirt-openvz,fabianfreyer/libvirt,cbosdo/libvirt,andreabolognani/libvirt,crobinso/libvirt,zippy2/libvirt,andreabolognani/libvirt,agx/libvirt,olafhering/libvirt,cbosdo/libvirt,zippy2/libvirt,olafhering/libvirt,iam-TJ/libvirt,iam-TJ/libvirt,crobinso/libvirt,jardasgit/libvirt,jfehlig/libvirt,jfehlig/libvirt,VenkatDatta/libvirt,shugaoye/libvirt,jardasgit/libvirt,agx/libvirt,cbosdo/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,zippy2/libvirt,siboulet/libvirt-openvz,trainstack/libvirt,nertpinx/libvirt,elmarco/libvirt,rlaager/libvirt,iam-TJ/libvirt,nertpinx/libvirt,elmarco/libvirt,rlaager/libvirt,rlaager/libvirt,trainstack/libvirt,shugaoye/libvirt,datto/libvirt,jfehlig/libvirt,iam-TJ/libvirt,datto/libvirt,datto/libvirt,crobinso/libvirt,VenkatDatta/libvirt,eskultety/libvirt,datto/libvirt,iam-TJ/libvirt,zhlcindy/libvirt-1.1.4-maintain,taget/libvirt,nertpinx/libvirt,zhlcindy/libvirt-1.1.4-maintain,jardasgit/libvirt,fabianfreyer/libvirt,eskultety/libvirt,olafhering/libvirt,shugaoye/libvirt,iam-TJ/libvirt,eskultety/libvirt,shugaoye/libvirt,eskultety/libvirt,rlaager/libvirt,cbosdo/libvirt,siboulet/libvirt-openvz,cbosdo/libvirt,zhlcindy/libvirt-1.1.4-maintain,elmarco/libvirt,andreabolognani/libvirt,shugaoye/libvirt,zhlcindy/libvirt-1.1.4-maintain,VenkatDatta/libvirt,eskultety/libvirt,nertpinx/libvirt,crobinso/libvirt,olafhering/libvirt,taget/libvirt,iam-TJ/libvirt,trainstack/libvirt,elmarco/libvirt,taget/libvirt,libvirt/libvirt,fabianfreyer/libvirt,agx/libvirt,jardasgit/libvirt,elmarco/libvirt,VenkatDatta/libvirt,zhlcindy/libvirt-1.1.4-maintain,datto/libvirt,andreabolognani/libvirt,agx/libvirt,rlaager/libvirt,trainstack/libvirt,zippy2/libvirt,fabianfreyer/libvirt,siboulet/libvirt-openvz,VenkatDatta/libvirt,siboulet/libvirt-openvz,andreabolognani/libvirt,libvirt/libvirt,agx/libvirt,trainstack/libvirt,trainstack/libvirt,trainstack/libvirt,taget/libvirt,jardasgit/libvirt,jfehlig/libvirt,taget/libvirt