summaryrefslogtreecommitdiff
path: root/usr.sbin/trpt/trpt.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-03 18:06:24 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-06-03 18:06:24 +0000
commitabf515f715285d1b06fd3418d9aec28d23b1b895 (patch)
treec843167c3a1b1e3d44189ddcbf235c9858c6cebc /usr.sbin/trpt/trpt.c
parentc645536e91428f365d222de60ae6a6167b7b10c6 (diff)
do not rely on constant folding equivelance
Diffstat (limited to 'usr.sbin/trpt/trpt.c')
-rw-r--r--usr.sbin/trpt/trpt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/trpt/trpt.c b/usr.sbin/trpt/trpt.c
index 667f1aa4479..7f5769884cf 100644
--- a/usr.sbin/trpt/trpt.c
+++ b/usr.sbin/trpt/trpt.c
@@ -39,7 +39,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)trpt.c 5.14 (Berkeley) 7/1/91";*/
-static char rcsid[] = "$Id: trpt.c,v 1.2 1996/05/30 09:11:11 deraadt Exp $";
+static char rcsid[] = "$Id: trpt.c,v 1.3 1996/06/03 18:06:18 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -167,7 +167,7 @@ main(argc, argv)
* Discard setgid priviledges if not the running kernel so that bad
* guys can't print interesting stuff from kernel memory.
*/
- if (core != _PATH_KMEM || system != _PATH_UNIX)
+ if (!strcmp(core, _PATH_KMEM) || !strcmp(system, _PATH_UNIX))
setgid(getgid());
if (nlist(system, nl) < 0 || !nl[0].n_value) {