diff options
author | des <des@FreeBSD.org> | 2002-12-04 15:00:10 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2002-12-04 15:00:10 +0000 |
commit | 719f445a6eb3bb22f65fb89a5bda6f3bfc664f61 (patch) | |
tree | bbcc67aaaad273c02aa08c39964127ef96b7693e /usr.bin/login | |
parent | b24c667092357728a5d2871338c0471202c4995d (diff) | |
download | FreeBSD-src-719f445a6eb3bb22f65fb89a5bda6f3bfc664f61.zip FreeBSD-src-719f445a6eb3bb22f65fb89a5bda6f3bfc664f61.tar.gz |
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
Diffstat (limited to 'usr.bin/login')
-rw-r--r-- | usr.bin/login/login.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c index cc1b8d0..9ded0c0 100644 --- a/usr.bin/login/login.c +++ b/usr.bin/login/login.c @@ -228,6 +228,8 @@ main(int argc, char *argv[]) ask = 1; } + setproctitle("-%s", getprogname()); + for (cnt = getdtablesize(); cnt > 2; cnt--) (void)close(cnt); @@ -504,6 +506,7 @@ main(int argc, char *argv[]) * Parent: wait for child to finish, then clean up * session. */ + setproctitle("-%s [pam]", getprogname()); wait(NULL); bail(NO_SLEEP_EXIT, 0); } |