diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-10-02 17:33:48 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-10-02 17:33:48 +0000 |
commit | fcea715cf3ed45c8c537828dd899c3788c158ab8 (patch) | |
tree | bd2ed0fd907d75059b2660c5717abb3428276995 /lib/libcurses/tinfo | |
parent | f4a8933e2b53234d6db28805fe89b1452e6c70ea (diff) |
Don't look in ~/.terminfo if setugid. This is consistent with the
behavior of checking ~/.terminfo.db and ~/.termcap.db
Diffstat (limited to 'lib/libcurses/tinfo')
-rw-r--r-- | lib/libcurses/tinfo/home_terminfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcurses/tinfo/home_terminfo.c b/lib/libcurses/tinfo/home_terminfo.c index 919c7059102..9ed5c5f0e32 100644 --- a/lib/libcurses/tinfo/home_terminfo.c +++ b/lib/libcurses/tinfo/home_terminfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: home_terminfo.c,v 1.3 2000/08/02 04:10:47 millert Exp $ */ +/* $OpenBSD: home_terminfo.c,v 1.4 2000/10/02 17:33:47 millert Exp $ */ /**************************************************************************** * Copyright (c) 1998 Free Software Foundation, Inc. * @@ -51,7 +51,7 @@ _nc_home_terminfo(void) char *home; static char *temp = 0; - if (temp == 0) { + if (temp == 0 && !issetugid()) { if ((home = getenv("HOME")) != 0 && *home != '\0' && my_length <= PATH_MAX) { temp = typeMalloc(char, my_length); |