[sheepdog] [PATCH v2] dog:fix dog command misinterpretation when characters are mixed in a -p option

Liu Yuan namei.unix at gmail.com
Mon Apr 21 07:19:23 CEST 2014


On Mon, Apr 21, 2014 at 12:00:23PM +0900, Yuichi Bando wrote:
> This bug is reported in https://bugs.launchpad.net/sheepdog-project/+bug/1309301
> I added a check code if the port number (specified in -p option) is numeric or not.
> 
> === Bug Description ===
> I found that dog command misinterprets when characters are mixed in a numeric option.
> 
> Here's the example.
> 
> $dog vdi list -p 7X000
>   Name Id Size Used Shared Creation time VDI id Copies Tag
> failed to connect to 127.0.0.1:7: Connection refused
> failed to connect to 127.0.0.1:7: Connection refused
> 
> dog interpreted "7X000" as "7".
> I think that dog should output error message " Invalid port number '7X000' ".
> 
> === After modified ===
> $dog vdi list -p 7X000
> Invalid port number '7X000'
> 
> Thanks
> Yuichi Bando
> 
> Signed-off-by: Yuichi Bando <bando.yuichi at lab.ntt.co.jp>

Applied thanks

Yuan



More information about the sheepdog mailing list