toybox icon indicating copy to clipboard operation
toybox copied to clipboard

update_password() pos argument

Open frikiluser opened this issue 2 years ago • 1 comments

Hi,

Some pending tools call update_password() using only 3 arguments while 4 are expected.

lib/password.c:int update_password(char *filename, char *username, char *entry, int pos)

GCC error:

toys/pending/chsh.c:74:13: error: too few arguments to function 'update_password'

I've patched 5 toys adding a trailing argument 0. It seems to work fine now.

toys/pending/chsh.c
toys/pending/groupadd.c
toys/pending/groupdel.c
toys/pending/useradd.c
toys/pending/userdel.c

Patch: https://salsa.debian.org/debian/toybox/-/raw/d4513b243b800e0be9ecaec835656f0366a8cb2a/debian/patches/update_password.patch

frikiluser avatar Aug 18 '22 23:08 frikiluser

My bad, I have a largeish rewrite of lib/password.c in my tree that I need to test under mkroot, ala https://landley.net/notes-2022.html#08-01-2022

Looks like some of the changes leaked into a commit. Oops.

landley avatar Aug 19 '22 07:08 landley