Bug 304361 - libvirt (at least virsh) doesn't use the username in an URI
Summary: libvirt (at least virsh) doesn't use the username in an URI
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: libvirt
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Daniel Veillard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-09-25 00:56 UTC by Fabian Deutsch
Modified: 2007-11-30 22:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-09-25 13:47:30 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Should fix missing recognition of the username when a port is given. (481 bytes, patch)
2007-09-25 10:13 UTC, Fabian Deutsch
no flags Details | Diff
diff -u patch for adding username handling (960 bytes, patch)
2007-09-25 12:58 UTC, Fabian Deutsch
no flags Details | Diff

Description Fabian Deutsch 2007-09-25 00:56:17 UTC
Description of problem:
virsh and virt-manager igbore a given username.

Version-Release number of selected component (if applicable):
Name        : libvirt
Version     : 0.3.2
Name        : virt-manager
Version     : 0.4.0

How reproducible:
Be root and log into a different machine as a different user than root, using an
uri:
[root@sohost ~]# virsh -c qemu+ssh://fabiand.org:222/system
root.org's password: 


Steps to Reproduce:
See example above ...
  
Actual results:
virsh ignores the given username (fabiand)

Expected results:
I get a prompt for the given user e.g:
[root@sohost ~]# virsh -c qemu+ssh://fabiand.org:222/system
fabiand.org's password: 

Additional info:
Also happens in virt-manager.

Comment 1 Fabian Deutsch 2007-09-25 10:13:47 UTC
Created attachment 205071 [details]
Should fix missing recognition of the username when a port is given.

The problem might be fixed using this patch. Not tested with different
transport protocols.

Comment 2 Daniel Veillard 2007-09-25 12:17:05 UTC
Looks sensible, but:
 1/ a contextual patch (cvs diff -p) is less error prone
 2/ usually enhancement are best requested on the mailing-list
    to get active peer-review
W.r.t. 1/ could you send an updated patch, ideally on the mailing
list (see http://libvirt.org/bugs.html ), or just attached to this
bug,

  thanks !

Daniel

Comment 3 Fabian Deutsch 2007-09-25 12:58:01 UTC
Created attachment 205441 [details]
diff -u patch for adding username handling

Actually I thought that this is a bug, because handling a username is part of
the remote uri format.
For now I'll just post the bug here. Enhacements will go to the mailinglist in
future.

Comment 4 Daniel Berrangé 2007-09-25 13:34:40 UTC
Ok, so the problem this patch is fixing is an interaction betweeen the port
number & username handling. If you add a port number, then it forgots to look
for the username. So this patch looks fine to me.


Comment 5 Richard W.M. Jones 2007-09-25 13:47:30 UTC
I think this probably happened as a result of patch fuzzing, causing
code to move around.  In any case I'm going to commit this to libvirt CVS now.

Comment 6 Fabian Deutsch 2007-09-25 13:53:17 UTC
nice :)


Note You need to log in before you can comment on or make changes to this bug.