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-next>] [day] [month] [year] [list]
Date:   Fri, 13 Aug 2021 00:08:11 +0900
From:   Juhee Kang <claudiajkang@...il.com>
To:     hawk@...nel.org, brouer@...hat.com, davem@...emloft.net,
        toke@...hat.com, toke@...e.dk
Cc:     netdev@...r.kernel.org, Juhee Kang <claudiajkang@...il.com>
Subject: [PATCH net-next 0/2] samples: pktgen: enhance the usability of pktgen samples

This patchset improves the usability of pktgen samples by adding an option for
propagating the environment variable of normal user to sudo. And also adds the
missing IPv6 option to pktgen scripts.

Currently, all pktgen samples are able to use the environment variable instead
of optional parameters. However, it doesn't work appropriately when running
samples as normal user.

This is results of running sample as root and user:

    // running as root
    # DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample01_simple.sh -v -n 1
    Running... ctrl^C to stop

    // running as normal user
    $ DEV=eth0 DEST_IP=10.1.0.1 DST_MAC=00:11:22:33:44:55 ./pktgen_sample01_simple.sh -v -n 1
    [...]
    ERROR: Please specify output device

The reason why passing the environment varaible doesn't work properly when
running samples as normal user is that the environment variable of normal user
doesn't propagate to sudo (root_check_run_with_sudo)). So the first commit
solves this issue by using "-E" (--preserve-env) option of "sudo", which passes
normal user's existing environment variables.

Also, "sample04" and "sample05" are not working properly when running with IPv6
option parameter("-6"). Because the commit 0f06a6787e05 ("samples: Add an IPv6
"-6" option to the pktgen scripts") has omitted the addition of this option at
these samples. So the second commit adds missing IPv6 option to pktgen scripts.

Fixes: 0f06a6787e05 ("samples: Add an IPv6 "-6" option to the pktgen scripts")

Juhee Kang (2):
  samples: pktgen: pass the environment variable of normal user to sudo
  samples: pktgen: add missing IPv6 option to pktgen scripts

 samples/pktgen/functions.sh                       |  2 +-
 samples/pktgen/pktgen_sample04_many_flows.sh      | 12 +++++++-----
 samples/pktgen/pktgen_sample05_flow_per_thread.sh | 12 +++++++-----
 3 files changed, 15 insertions(+), 11 deletions(-)

--
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ