This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: getpass obsolete?


----- Original Message -----
From: "Marcus Brinkmann" <Marcus.Brinkmann@ruhr-uni-bochum.de>
Sent: Tuesday, May 27, 2003 11:35 PM
Subject: Re: getpass obsolete?


> On Tue, May 27, 2003 at 05:05:06PM +0800, Carlo Florendo wrote:
> > I've successfully compiled an application from redhat linux 8.0 that uses the getpass function from /usr/include/unistd.h.
There is
> > no problem whatsoever but I was just bothered by the
> > documentation on linux when I did a "man getpass".  The first line of the description says:
> >
> > "This function is obsolete.  Do not use it."
>
> The man pages are not the documentation of the GNU C library.  Read the
> glibc info manual (or the manual that is available online in various
> formats).  "info libc" might work on your system, if you have info reader
> and the GNU C library manual installed.

Oh, I always thought that man pages were synopses(i.e. shorter versions) of the info pages.  Anyway, I'll read into that.  How then
does login in linux actually implement getting a password from the user?

It's possible that I implement my own program getting a password from user (similar to getpass), however, I read about getpass and
thought I could just reuse it and save myself of the trouble coding the small routine that reads strings without echoing them.
This obsoleteness is really bothering me since I would release the code and people might need to compile the source again with
future versions of gcc or libc and I'm afraid if they'd get the undefined function error since future versions of glibc might not
include getpass anymore.

> > do I have to implement my own in the future?
>
> There is an example in the proper manual.

Thanks a lot for the pointers Marcus!


Best Regards,

Carlo
 -- Kindly CC me in the replies since I'm not part of the mailing list.  :)





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]