This is the mail archive of the
mailing list for the glibc project.
Re: getpass obsolete?
On Wed, May 28, 2003 at 10:57:46AM +0800, Carlo Florendo wrote:
> A solution would be to grab the source for the getpass function and cut
> and paste it to my code and modify it as I want so no issues regarding
> linking my code against future libraries that wouldn't support getpass.
> However, I think it would be better to reuse whatever alternative there
> is. (e.g. the one that is used in linux if indeed it doesn't use getpass
Section 3.1 of the comp.unix.programmer FAQ gives portable code
for mimicking getpass(3).
> Legacy code issues and functions being obsoleted are really surprising for
> me. Now, I'm paranoid over some functions that I might still be using but
> are already legacy code. I thought only java deprecates functions.
this is a wild guess, but i would imagine it's being deprecated because it's
no longer needed and dangerous to keep around. possibly early unix required
user programs to read in passwords for authentication to the system, but now
there are other, safer means for elevating privileges for user apps. and of
course passwords aren't kept in the clear anyhow, and these is no easy and
certainly not portable way to use a plaintext password for privilege
just a theory.