libvirt/src
Laine Stump 219305df44 Change default for storage uid/gid from getuid()/getgid() to -1/-1
This allows the config to have a setting that means "leave it alone",
eg when building a pool where the directory already exists the user
may want the current uid/gid of the directory left intact. This
actually gets us back to older behavior - before recent changes to the
pool building code, we weren't as insistent about honoring the uid/gid
settings in the XML, and virt-manager was taking advantage of this
behavior.

As a side benefit, removing calls to getuid/getgid from the XML
parsing functions also seems like a good idea. And having a default
that is different from a common/useful value (0 == root) is a good
thing in general, as it removes ambiguity from decisions (at least one
place in the code was checking for (perms.uid == 0) to see if a
special uid was requested).

Note that this will only affect newly created pools and volumes. Due
to the way that the XML is parsed, then formatted for newly created
volumes, all existing pools/volumes already have an explicit uid and
gid set.

src/conf/storage_conf.c: Remove calls to setuid/setgid for default values
                         of uid/gid, and set them to -1 instead

src/storage/storage_backend.c:
src/storage/storage_backend_fs.c:
        Make account for the new default values of perms.uid
        and perms.gid.
2010-03-04 17:35:27 -05:00
..
conf Change default for storage uid/gid from getuid()/getgid() to -1/-1 2010-03-04 17:35:27 -05:00
cpu x86Decode: avoid NULL-dereference upon questionable input 2010-03-02 08:58:45 +01:00
esx esx: don't ignore failure on close 2010-03-03 11:22:46 +01:00
interface interface: Use proper return codes in the open function 2010-02-15 10:59:43 +01:00
lxc Wire up internal entry points for virDomainAbortJob API 2010-03-02 16:23:31 +00:00
network network: bridge: Fix IsActive, IsPersistent 2010-02-18 09:23:05 -05:00
node_device build: silence coverity warning in node_device 2010-03-02 16:12:48 +01:00
opennebula Wire up internal entry points for virDomainAbortJob API 2010-03-02 16:23:31 +00:00
openvz Wire up internal entry points for virDomainAbortJob API 2010-03-02 16:23:31 +00:00
phyp Wire up internal entry points for virDomainAbortJob API 2010-03-02 16:23:31 +00:00
qemu Support VCPU hotplug in QEMU guests 2010-03-04 13:19:29 +00:00
remote Remote driver implementation for the virDomainAbortJob APi 2010-03-02 16:23:31 +00:00
secret Remove virConnectPtr from secret XML APIs 2010-02-10 13:32:58 +00:00
security Convert virSecurityReportError into a macro 2010-02-15 10:45:25 +01:00
storage Change default for storage uid/gid from getuid()/getgid() to -1/-1 2010-03-04 17:35:27 -05:00
test Wire up internal entry points for virDomainAbortJob API 2010-03-02 16:23:31 +00:00
uml uml: avoid crash on partial read 2010-03-03 10:17:31 +01:00
util Fix safezero() 2010-03-02 18:16:32 +01:00
vbox Wire up internal entry points for virDomainAbortJob API 2010-03-02 16:23:31 +00:00
xen Wire up internal entry points for virDomainAbortJob API 2010-03-02 16:23:31 +00:00
.gitignore Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
datatypes.c Remove conn parameter from virReportOOMError 2010-02-09 01:04:54 +01:00
datatypes.h Add public API definition for data stream handling 2009-09-29 15:48:52 +01:00
driver.c Log dlopen() errors more verbosely 2009-05-08 10:05:56 +00:00
driver.h Wire up internal entry points for virDomainAbortJob API 2010-03-02 16:23:31 +00:00
gnutls_1_0_compat.h
internal.h maint: avoid excess parens in STREQ 2010-02-01 17:21:26 +01:00
libvirt_bridge.syms Support networking in UML driver 2009-06-03 11:13:33 +00:00
libvirt_driver_modules.syms Move --with-driver-modules symbols into a separate sym file 2009-01-05 14:06:41 +00:00
libvirt_internal.h Support a new peer-to-peer migration mode & public API 2009-10-09 12:35:07 +01:00
libvirt_linux.syms migrate linux-specific symbol names into their own sym file 2009-01-05 14:08:26 +00:00
libvirt_macvtap.syms macvtap teardown rework 2010-02-18 15:13:48 +01:00
libvirt_private.syms Add new clock mode allowing variable adjustments 2010-03-01 18:36:01 +00:00
libvirt_public.syms Wire up internal entry points for virDomainAbortJob API 2010-03-02 16:23:31 +00:00
libvirt.c Wire up internal entry points for virDomainAbortJob API 2010-03-02 16:23:31 +00:00
Makefile.am build: vbox: avoid build failure when linking with --no-add-needed 2010-03-04 17:25:22 +01:00
nodeinfo.c Remove conn parameter from virReportSystemError 2010-02-09 01:04:54 +01:00
nodeinfo.h Generic shared impls of all NUMA apis 2009-06-03 13:28:02 +00:00
README Add a README file to src/ explaining the directory structure 2009-09-21 14:41:47 +01:00

       libvirt library code README
       ===========================

The directory provides the bulk of the libvirt codebase. Everything
except for the libvirtd daemon and client tools. The build uses a
large number of libtool convenience libraries - one for each child
directory, and then links them together for the final libvirt.so,
although some bits get linked directly to libvirtd daemon instead.

The files directly in this directory are supporting the public API
entry points & data structures.

There are two core shared modules to be aware of:

 * util/  - a collection of shared APIs that can be used by any
            code. This directory is always in the include path
            for all things built

 * conf/  - APIs for parsing / manipulating all the official XML
            files used by the public API. This directory is only
            in the include path for driver implementation modules


Then there are the hypervisor implementations:

 * esx/          - VMware ESX and GSX support using vSphere API over SOAP
 * lxc/          - Linux Native Containers
 * opennebula/   - Open Nebula using XMLRPC
 * openvz/       - OpenVZ containers using cli tools
 * phyp/         - IBM Power Hypervisor using CLI tools over SSH
 * qemu/         - QEMU / KVM using qemu CLI/monitor
 * remote/       - Generic libvirt native RPC client
 * test/         - A "mock" driver for testing
 * uml/          - User Mode Linux
 * vbox/         - Virtual Box using native API
 * xen/          - Xen using hypercalls, XenD SEXPR & XenStore


Finally some secondary drivers that are shared for several HVs.
Currently these are used by LXC, OpenVZ, QEMU, UML and Xen drivers.
The ESX, OpenNebula, Power Hypervisor, Remote, Test & VirtualBox
drivers all implement the secondary drivers directly

 * interface/    - Host network interface management
 * network/      - Virtual NAT networking
 * node_device/  - Host device enumeration
 * secret/       - Secret management
 * security/     - Mandatory access control drivers
 * storage/      - Storage management drivers


Since both the hypervisor and secondary drivers can be built as
dlopen()able modules, it is *FORBIDDEN* to have build dependencies
between these directories. Drivers are only allowed to depend on
the public API, and the internal APIs in the util/ and conf/
directories