Rakesh,
Even though every example program password prompt has been secured by means
of the getpass function we've failed to notice that such function has been
obsoleted as read from getpass(2) manual page so it seems we need to think
of a better way to overcome this, as you can see in the
examples/bugzcxx/testlogin.cpp there is a function called safe_getpass()
which is a very ugly implementation of getpass and basically what it does is
disable echo from the controlling terminal, then it gets user input and
re-enables echo again.
The way it was implemented is calling the stty command with the proper
parameters, which as I said is pretty ugly, I know we can work this out by
means of the tcsetattr function.
Can you take a look into this?
Thanks
--
In science one tries to tell people, in such a way as to be understood by
everyone, something that no one ever knew before. But in poetry, it's the
exact opposite.
-- Paul A. M. Dirac
|