Revert to old ttyname_r behavior that when _ioctl() returns 0 (SUCCEEDED),
return the buffer immediately. This will permit ssh and/or PAM logins broken by previous commit. The (potential) underlying problem is still under investigation. Point hat to: me
This commit is contained in:
parent
914ee8ba4b
commit
68b749ff2f
@ -83,7 +83,7 @@ ttyname_r(int fd, char *buf, size_t len)
|
||||
fgn.len = len - strlen(buf);
|
||||
fgn.buf = buf + strlen(buf);
|
||||
if (!_ioctl(fd, FIODGNAME, &fgn))
|
||||
return (EINVAL);
|
||||
return (0);
|
||||
devname_r(sb.st_rdev, S_IFCHR,
|
||||
buf + strlen(buf), sizeof(buf) - strlen(buf));
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user