Skip to content

Option parsing should be more strict and only allow supported options and block all others #50

@whowutwut

Description

@whowutwut

When trying to delete a console... I was not sure if it was -d or -D and so i tried -D first, the output I saw is:

[root@stratton01 ~]# makegocons -D c910f3zz01
In preprocess_request, request is $VAR1 = {
          '_xcat_clientfqdn' => [
                                  'localhost'
                                ],
          'arg' => [
                     '-D'
                   ],
          '_xcat_authname' => [
                                'root'
                              ],
          '_xcat_clientport' => [
                                  45572
                                ],
          'node' => [
                      'c910f3zz01'
                    ],
          'username' => [
                          'root'
                        ],
          'noderange' => [
                           'c910f3zz01'
                         ],
          '_xcatdest' => '10.6.29.1',
          'cwd' => [
                   '/root'
                 ],
          '_allnodes' => [
                           0
                         ],
          'clienttype' => [
                            'cli'
                          ],
          '_xcat_clienthost' => [
                                  'localhost'
                                ],
          'command' => [
                         'makegocons'
                       ],
          '_xcatpreprocessed' => [
                                   1
                                 ]
        };

c910f3zz01: Created

So seems like some verbose (DEBUG?) data is printed, but the console is "Created"

The correct command is -d

[root@stratton01 ~]# makegocons -d c910f3zz01
c910f3zz01: Deleted

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions