lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 6 Jul 2018 13:58:05 -0700
From:   Jakub Kicinski <jakub.kicinski@...ronome.com>
To:     Roman Gushchin <guro@...com>
Cc:     <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <kernel-team@...com>,
        Quentin Monnet <quentin.monnet@...ronome.com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...nel.org>
Subject: Re: [PATCH v2 bpf-next 3/3] bpftool: add bash completion for cgroup
 tree command

On Fri, 6 Jul 2018 11:30:12 -0700, Roman Gushchin wrote:
> This commit adds a bash completion to the bpftool cgroup tree
> command.
> 
> Signed-off-by: Roman Gushchin <guro@...com>
> Cc: Jakub Kicinski <jakub.kicinski@...ronome.com>
> Cc: Quentin Monnet <quentin.monnet@...ronome.com>
> Cc: Daniel Borkmann <daniel@...earbox.net>
> Cc: Alexei Starovoitov <ast@...nel.org>
> ---
>  tools/bpf/bpftool/bash-completion/bpftool | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tools/bpf/bpftool/bash-completion/bpftool b/tools/bpf/bpftool/bash-completion/bpftool
> index fffd76f4998b..82681eb9c02a 100644
> --- a/tools/bpf/bpftool/bash-completion/bpftool
> +++ b/tools/bpf/bpftool/bash-completion/bpftool
> @@ -414,6 +414,9 @@ _bpftool()
>                      _filedir
>                      return 0
>                      ;;
> +		tree)
> +		    _filedir
> +		    return 0

Oh you have not tested this at all, have you?

You're missing ;; at the end of the case, this is not correct bash
syntax and completely breaks the script.

When you respin please use spaces instead of tabs (I know, *very*
annoying but that's apparently how things should be for bash
completions :/).

And please add "tree" to the *) case which completes the actions.

>                  attach|detach)
>                      local ATTACH_TYPES='ingress egress sock_create sock_ops \
>                          device bind4 bind6 post_bind4 post_bind6 connect4 \

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ