[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] id: add feature to accept multiple usernames

From: Achilles Gaikwad
Subject: Re: [PATCH] id: add feature to accept multiple usernames
Date: Sun, 15 Jul 2018 12:40:43 +0530

Hello Pádraig,

> I've not reviewed it yet, but things to consider.
> - Add tests/docs
Yes, I wanted to understand if this feature is ok to work on.
I will work on the tests and updating the man page and relevant documentation.

> - Ensure we process all arguments. I.E. don't die() early
I shall follow the code paths once more and test possibilities where
we might do this.
One such occurrence was if the user didn't exist we would exit.
if (pwd == NULL)
        die (EXIT_FAILURE, 0, _("%s: no such user"), quote (spec));
I'll checkout other possibilities and get back with a v2 of this patch.

> - Do we need double \0\0 with -z to delimit each record?
I am sorry, I do not understand this. If we delimit each record with
two nulls, we would still have a following input.
$  id root nobody -uz

This could be :
0 99

I would like to know your recommendations on if

A] we should have only the last record null terminated?
0' '99'\0'
a space between the first few records and only the last record which
would be null.
This defeats the purpose of `-z`  since we add a space.

B] we should not enable `-z` for more than one user

C] any other solutions that we can discuss?

> thanks for the patch,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]