When the tty chown() fails, report a chown() failure rather than a

chmod() failure.
This commit is contained in:
rwatson 2003-04-26 02:51:03 +00:00
parent c54b661d3c
commit b69a437d31

View File

@ -426,7 +426,7 @@ main(int argc, char *argv[])
if (ttyn != tname && chown(ttyn, pwd->pw_uid,
(gr = getgrnam(TTYGRPNAME)) ? gr->gr_gid : pwd->pw_gid))
if (errno != EROFS)
syslog(LOG_ERR, "chmod(%s): %m", ttyn);
syslog(LOG_ERR, "chown(%s): %m", ttyn);
/*
* Exclude cons/vt/ptys only, assume dialup otherwise