[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC][PATCH] Test ping w/o privileges
From: |
Erik Auerswald |
Subject: |
Re: [RFC][PATCH] Test ping w/o privileges |
Date: |
Wed, 3 Jul 2024 15:10:40 +0200 |
Hi Collin,
On Tue, Jul 02, 2024 at 03:03:43PM -0700, Collin Funk wrote:
> Erik Auerswald <auerswal@unix-ag.uni-kl.de> writes:
>
> > as a first attempt at testing "ping" without requiring root, the following
> > patch works for me. Do we need to add a check if "cut" is available?
> > Since the "id -G" is only used on systems with the kernel Linux, it may
> > be OK without a check, or should we add one?
>
> Both 'cut' and 'id' are a part of POSIX so they should be fine IMO.
I'd think so, too. Nevertheless, the test suite attempts to also check
for the existence of POSIX tools (but it does not use the prepared test
for the id program in any test scripts, for example) and even works
around a missing "-u" option for "id" in an attempt to work on many
older systems, too.
I'd think it is OK to just add use of both "cut" and "id -G" inside a
Linux-specific part of the test, and fix problems later, if any should
arise. But if anyone already knows where the new code would create
problems, I would be happy to add some checks.
Br,
Erik