[Toybox] Clean up password.c

Rob Landley rob at landley.net
Sun Apr 4 14:39:07 PDT 2021


On 4/4/21 1:53 PM, amichaelc via Toybox wrote:
> I have four patches. They all depend on each other, and have to be applied in
> order, except that you can skip the second if you want.
> 
> The first cleans up the style in password.c.
> 
> The second switches from sigaction() to signal() in read_password(). This
> improves simplicity and readability, but theoretically reduces portability.
> Since I'm not sure which is more important, I included the patch. If you don't
> like it, you can skip it without conflicting with any other patch.
> 
> The third changes update_password() to use a flag instead of checking what
> command is running. It also changes every command that uses update_password() to
> use this flag. I kept this change as simple as possible (e.g. not allowing both
> flags at once, because it wasn't allowed before) so as to reduce breakage. It
> doesn't break chsh.
> 
> The last fixes a bug in chsh.

There's no attachment?

Rob



More information about the Toybox mailing list