libvirt/src/storage
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
..
parthelper.c maint: avoid excess parens in STREQ 2010-02-01 17:21:26 +01:00
storage_backend_disk.c Remove virConnectPtr from storage APIs & driver 2010-02-10 13:32:11 +00:00
storage_backend_disk.h Move storage drivers into src/storage/ 2009-09-21 14:41:43 +01:00
storage_backend_fs.c Change default for storage uid/gid from getuid()/getgid() to -1/-1 2010-03-04 17:35:27 -05:00
storage_backend_fs.h Move storage drivers into src/storage/ 2009-09-21 14:41:43 +01:00
storage_backend_iscsi.c Remove virConnectPtr from storage APIs & driver 2010-02-10 13:32:11 +00:00
storage_backend_iscsi.h Implement support for multi IQN 2010-01-21 12:50:52 +01:00
storage_backend_logical.c Remove virConnectPtr from storage APIs & driver 2010-02-10 13:32:11 +00:00
storage_backend_logical.h Move storage drivers into src/storage/ 2009-09-21 14:41:43 +01:00
storage_backend_mpath.c virStorageBackendIsMultipath: avoid dead store 2010-02-16 17:49:05 +01:00
storage_backend_mpath.h Move storage drivers into src/storage/ 2009-09-21 14:41:43 +01:00
storage_backend_scsi.c Remove virConnectPtr from storage APIs & driver 2010-02-10 13:32:11 +00:00
storage_backend_scsi.h Remove virConnectPtr from storage APIs & driver 2010-02-10 13:32:11 +00:00
storage_backend.c Change default for storage uid/gid from getuid()/getgid() to -1/-1 2010-03-04 17:35:27 -05:00
storage_backend.h Remove virConnectPtr from storage APIs & driver 2010-02-10 13:32:11 +00:00
storage_driver.c Fix mis-leading error message in pool delete API 2010-03-04 11:56:50 +00:00
storage_driver.h Move storage drivers into src/storage/ 2009-09-21 14:41:43 +01:00