Derek Robert Price <derek@ximbiot.com> writes:
I'd like to import the getpass.c from GNULIB, but it seems to only be
compiled when no getpass() function is found on the system at all,
Isn't that a function of configure.ac, not of getpass.c?
Do you guys know what is the official GNU replacement for getpass()?
None as far as I know. The glibc manual suggests that you roll your
own, if getpass doesn't suffice (and gives sample code).
If the official replacement for getpass() is not satisfactory, would
it make sense to write an autoconf test which tests for the number
of characters getpass() accepts and does anybody have any idea how
to go about faking getpass() out since it makes such an effort to
retreive only /dev/tty?
You'd have to use something like 'expect'. This sounds like overkill.
Personally I'd just use my own replacement code.