mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-02 11:21:12 +00:00
219305df44
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. |
||
---|---|---|
.. | ||
parthelper.c | ||
storage_backend_disk.c | ||
storage_backend_disk.h | ||
storage_backend_fs.c | ||
storage_backend_fs.h | ||
storage_backend_iscsi.c | ||
storage_backend_iscsi.h | ||
storage_backend_logical.c | ||
storage_backend_logical.h | ||
storage_backend_mpath.c | ||
storage_backend_mpath.h | ||
storage_backend_scsi.c | ||
storage_backend_scsi.h | ||
storage_backend.c | ||
storage_backend.h | ||
storage_driver.c | ||
storage_driver.h |