From 5457a037a5870f7080f42dcc59f778857eafa01d Mon Sep 17 00:00:00 2001 From: ache Date: Sun, 31 Aug 1997 08:37:28 +0000 Subject: Restore back issetugid() usage and bump major number --- lib/libtermcap/Makefile | 4 ++-- lib/libtermcap/termcap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/libtermcap') diff --git a/lib/libtermcap/Makefile b/lib/libtermcap/Makefile index 0e11df2..2e2c0b3 100644 --- a/lib/libtermcap/Makefile +++ b/lib/libtermcap/Makefile @@ -1,8 +1,8 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 LIB= termcap -SHLIB_MAJOR= 2 -SHLIB_MINOR= 2 +SHLIB_MAJOR= 3 +SHLIB_MINOR= 0 CFLAGS+=-DCM_N -DCM_GT -DCM_B -DCM_D -I${.CURDIR} SRCS= termcap.c tgoto.c tputs.c tparm.c tospeed.c diff --git a/lib/libtermcap/termcap.c b/lib/libtermcap/termcap.c index 96e07e5..4b98c1b 100644 --- a/lib/libtermcap/termcap.c +++ b/lib/libtermcap/termcap.c @@ -115,9 +115,9 @@ tgetent(char *bp, const char *name) strncpy(pathbuf, cp, PBUFSIZ); /* still can be tokenized */ pathbuf[PBUFSIZ - 1] = '\0'; - /* XXX Should really be issetguid(), but we don't have that */ - if (getuid() != geteuid() || getgid() != getegid()) + if (issetugid()) strcpy(pathbuf, _PATH_DEF_SEC); + *fname++ = pathbuf; /* tokenize path into vector of names */ while (*++p) if (*p == ' ' || *p == ':') { -- cgit v1.1