On Fri, Apr 01, 2016 at 04:19:46PM -0600, Todd C. Miller wrote:
> The problem is that fopen(tty, "w") uses O_CREAT. If we use open
> + fdopen we can avoid that.
>
> Can you try this diff?
Works well. Thank you!
The problem is that fopen(tty, "w") uses O_CREAT. If we use open
+ fdopen we can avoid that.
Can you try this diff?
- todd
Index: libexec/comsat/comsat.c
===
RCS file: /cvs/src/libexec/comsat/comsat.c,v
retrieving revision 1.44
di
When biff(1) is set to y, comsat opens the tty for write.
if ((tp = fopen(tty, "w")) == NULL) {
dsyslog(LOG_ERR, "%s: %s", tty, strerror(errno));
_exit(1);
}
This aborts:
(gdb) bt
#0 0x0890a441 in open () at :2
#1 0x0897e308 in *_libc_fopen (file