tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pwd_mkdb(8) is still broken to me
Masao Uebayashi <uebayasi%gmail.com@localhost> writes:
> More investigation has revealed that this is also related to some
> compiler problem... tools/pwd_mkdb built with HOST_CFLAGS=-O somehow
> writes 00 00 00 00 7f 7f 00 00 for pw_change being 0. Changing
> HOST_CFLAGS to -O0, -O1, -O2, ... fixes this (00 00 00 00 00 00 00 00
> is written).
What changed by changing compiler option is value of stack garbage.
Those garbage supposed to be filled by pw_scan() but actually it
failed to fill them.
Since the # of bytes written to database is controlled not by
sizeof(time_t) but by sizeof(pwd.pw_change), getversion() also should
return 0 or 1 depending on sizeof(pwd.pw_change).
enami.
Home |
Main Index |
Thread Index |
Old Index