[et-mgmt-tools] [PATCH][RESEND] check the VNC port number

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

 



Hi, Dan

Would you give me a comment on this patch?
If not, please apply it.

I think virt-install should check the VNC port number that the user cannot specify.

> When I execute "virt-install --vnc --vncport=5900", domain starts 
> with 5900 + domain ID.
> I think that it is necessary to check, because we cannot appoint 
> the VNC port number equal to or less than 5900.
> 
> The attached patch adds to check the VNC port number.
> 
> Signed-off-by: Nobuhiro Itou <fj0873gn@xxxxxxxxxxxxxxxxx>
> 

Thanks,
Nobuhiro Itou.

Index: virtinst/Guest.py (python-virtinst-0.101.0)
===================================================================
--- Guest.py    2007-02-28 23:18:37.000000000 +0900
+++ Guest.py.vncport_check      2007-02-28 14:15:49.000000000 +0900
@@ -179,7 +179,9 @@ class XenGraphics(VirtualGraphics):
 class VNCVirtualGraphics(XenGraphics):
     def __init__(self, *args):
         self.name = "vnc"
-        if len(args) >= 1 and args[0]:
+        if len(args) >= 1 and not args[0] is None:
+            if args[0] < 5901:
+                raise ValueError, "Invalid value for vncport, vncport must be no less than 5901"
             self.port = args[0]
         else:
             self.port = -1


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux