=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rwall/rwall.c,v retrieving revision 1.3 retrieving revision 1.4 diff -c -r1.3 -r1.4 *** src/usr.bin/rwall/rwall.c 1996/09/16 02:26:14 1.3 --- src/usr.bin/rwall/rwall.c 1998/12/16 01:29:37 1.4 *************** *** 1,4 **** ! /* $OpenBSD: rwall.c,v 1.3 1996/09/16 02:26:14 deraadt Exp $ */ /* * Copyright (c) 1993 Christopher G. Demetriou --- 1,4 ---- ! /* $OpenBSD: rwall.c,v 1.4 1998/12/16 01:29:37 deraadt Exp $ */ /* * Copyright (c) 1993 Christopher G. Demetriou *************** *** 42,48 **** #ifndef lint /*static char sccsid[] = "from: @(#)wall.c 5.14 (Berkeley) 3/2/91";*/ ! static char rcsid[] = "$OpenBSD: rwall.c,v 1.3 1996/09/16 02:26:14 deraadt Exp $"; #endif /* not lint */ /* --- 42,48 ---- #ifndef lint /*static char sccsid[] = "from: @(#)wall.c 5.14 (Berkeley) 3/2/91";*/ ! static char rcsid[] = "$OpenBSD: rwall.c,v 1.4 1998/12/16 01:29:37 deraadt Exp $"; #endif /* not lint */ /* *************** *** 124,133 **** time_t now; FILE *fp; int fd; ! char *whom, hostname[MAXHOSTNAMELEN], lbuf[100], tmpname[32]; ! (void)strcpy(tmpname, _PATH_TMP); ! (void)strcat(tmpname, "wall.XXXXXX"); if (!(fd = mkstemp(tmpname)) || !(fp = fdopen(fd, "r+"))) { (void)fprintf(stderr, "wall: can't open temporary file.\n"); exit(1); --- 124,132 ---- time_t now; FILE *fp; int fd; ! char *whom, hostname[MAXHOSTNAMELEN], lbuf[100], tmpname[64]; ! snprintf(tmpname, sizeof(tmpname), "%s/wall.XXXXXX", _PATH_TMP); if (!(fd = mkstemp(tmpname)) || !(fp = fdopen(fd, "r+"))) { (void)fprintf(stderr, "wall: can't open temporary file.\n"); exit(1);