| Summary: | login: chmod(/dev/tty??): No such file or directory | ||
|---|---|---|---|
| Product: | Base System | Reporter: | brian <brian> |
| Component: | bin | Assignee: | Dag-Erling Smørgrav <des> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.4-STABLE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
brian
2001-11-15 01:10:00 UTC
Responsible Changed From-To: freebsd-bugs->des I'll take this. State Changed From-To: open->analyzed I know what the problem is, I just haven't gotten around to fixing it yet. It might make sense to incorporate this into pam_unix(8) session management. Please try this patch: Index: login.c =================================================================== RCS file: /home/ncvs/src/usr.bin/login/login.c,v retrieving revision 1.78 diff -u -r1.78 login.c --- login.c 21 Jan 2002 16:19:38 -0000 1.78 +++ login.c 23 Jan 2002 11:07:50 -0000 @@ -525,9 +525,9 @@ * Since it isn't clear that flags are useful on character * devices, we just clear them. */ - if (chflags(ttyn, 0) && errno != EOPNOTSUPP) - syslog(LOG_ERR, "chmod(%s): %m", ttyn); - if (chown(ttyn, pwd->pw_uid, + if (ttyn != tname && chflags(ttyn, 0) && errno != EOPNOTSUPP) + syslog(LOG_ERR, "chflags(%s): %m", ttyn); + if (ttyn != tname && chown(ttyn, pwd->pw_uid, (gr = getgrnam(TTYGRPNAME)) ? gr->gr_gid : pwd->pw_gid)) syslog(LOG_ERR, "chmod(%s): %m", ttyn); DES -- Dag-Erling Smorgrav - des@ofug.org State Changed From-To: analyzed->closed Fixed, thanks. |