1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-20 02:38:43 +00:00

Change the process title as soon as possible to mask information passed on

the command line by getty(8).  This is not a perfect fix, but drastically
reduces the window of exposure.

Approved by:	re (rwatson)
MFC after:	1 week
This commit is contained in:
Dag-Erling Smørgrav 2002-12-04 15:00:10 +00:00
parent 3178b11905
commit 2517862ed9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107585

View File

@ -228,6 +228,8 @@ main(int argc, char *argv[])
ask = 1; ask = 1;
} }
setproctitle("-%s", getprogname());
for (cnt = getdtablesize(); cnt > 2; cnt--) for (cnt = getdtablesize(); cnt > 2; cnt--)
(void)close(cnt); (void)close(cnt);
@ -504,6 +506,7 @@ main(int argc, char *argv[])
* Parent: wait for child to finish, then clean up * Parent: wait for child to finish, then clean up
* session. * session.
*/ */
setproctitle("-%s [pam]", getprogname());
wait(NULL); wait(NULL);
bail(NO_SLEEP_EXIT, 0); bail(NO_SLEEP_EXIT, 0);
} }