Re: [PATCH v4 04/13] parallels: remove unused code from storage driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 121211 15:49:40, Daniel Veillard wrote:
> On Tue, Dec 04, 2012 at 05:43:04PM +0400, Dmitry Guryanov wrote:
> > We don't support unprivileged users anymore, so remove code, which
> > selects configuration directory depending on user.
> > 
> > Signed-off-by: Dmitry Guryanov <dguryanov@xxxxxxxxxxxxx>
> > ---
> >  src/parallels/parallels_storage.c |   22 +++-------------------
> >  1 files changed, 3 insertions(+), 19 deletions(-)
> > 
> > diff --git a/src/parallels/parallels_storage.c b/src/parallels/parallels_storage.c
> > index e602299..90c425a 100644
> > --- a/src/parallels/parallels_storage.c
> > +++ b/src/parallels/parallels_storage.c
> > @@ -118,29 +118,13 @@ static int parallelsLoadPools(virConnectPtr conn)
> >  {
> >      parallelsConnPtr privconn = conn->privateData;
> >      virStorageDriverStatePtr storageState = conn->storagePrivateData;
> > -    bool privileged = (geteuid() == 0);
> >      char *base = NULL;
> >      size_t i;
> >  
> > -    if (privileged) {
> > -        if ((base = strdup(SYSCONFDIR "/libvirt")) == NULL)
> > -            goto out_of_memory;
> > -    } else {
> > -        char *userdir = virGetUserDirectory();
> > -
> > -        if (!userdir)
> > -            goto error;
> > -
> > -        if (virAsprintf(&base, "%s/.libvirt", userdir) == -1) {
> > -            VIR_FREE(userdir);
> > -            goto out_of_memory;
> > -        }
> > -        VIR_FREE(userdir);
> > -    }
> > +    if ((base = strdup(SYSCONFDIR "/libvirt")) == NULL)
> > +        goto out_of_memory;
> >  
> > -    /* Configuration paths are either ~/.libvirt/storage/... (session) or
> > -     * /etc/libvirt/storage/... (system).
> > -     */
> > +    /* Configuration path is /etc/libvirt/parallels-storage/... . */
> >      if (virAsprintf(&storageState->configDir,
> >                      "%s/parallels-storage", base) == -1)
> >          goto out_of_memory;
> 
>   ACK from a code perspective, but that sounds like a user visible
> regression, is that restriction embedded in the hypervisor, or just for
> the libvirt bindings ?
> 

Parallels Cloud Server has this restriction too, but our desktop products
(Parallels Desktop for Mac, Parallels Workstation), which use the same
hypervisor, don't. There are no plans to support them (and it seems nobody
needs it), so I think we'd rather remove this code.

> Daniel
> 
> -- 
> Daniel Veillard      | Open Source and Standards, Red Hat
> veillard@xxxxxxxxxx  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
> http://veillard.com/ | virtualization library  http://libvirt.org/

--
Dmitry Guryanov

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]