Date: Wed, 23 Feb 2000 17:47:41 -0700 From: "Kenneth D. Merry" <ken@kdm.org> To: "Justin T. Gibbs" <gibbs@plutotech.com> Cc: Andrew Gallatin <gallatin@cs.duke.edu>, alpha@FreeBSD.ORG Subject: Re: Netbooting.. Message-ID: <20000223174741.A33317@panzer.kdm.org> In-Reply-To: <200002232315.QAA67366@narnia.plutotech.com>; from gibbs@plutotech.com on Wed, Feb 23, 2000 at 04:15:04PM -0700 References: <38AB2424.C4C9D80D@ameslab.gov> <200002232315.QAA67366@narnia.plutotech.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii On Wed, Feb 23, 2000 at 16:15:04 -0700, Justin T. Gibbs wrote: > In article <14512.38559.211308.554400@grasshopper.cs.duke.edu> you wrote: > > > > > Most everything seems to work okay, except I get this whenever I login: > > > > > > Feb 20 17:20:18 modena login: chmod(/dev/ttyp0): Operation not supported > > > > I suspect this is coming from the chflags call in login. > > Well there are two bugs there. First, the log is incorrect and second, > it doesn't silently ignore chflags failures of EOPNOTSUPP. I thought > we squashed all of those in another chflags vs. NFS pass. Yep, those are definitely bugs. The attached patch fixes it for me, although I'm not certain whether the patch to login_fbtab.c is necessary. I haven't run into the problem there, and I didn't really look to see where that function is used. Ken -- Kenneth Merry ken@kdm.org --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="login.chflags.20000223" ==== //depot/cam/usr.bin/login/login.c#14 - /b/ken/perforce/cam/usr.bin/login/login.c ==== *** /tmp/tmp.12791.0 Wed Feb 23 17:43:10 2000 --- /b/ken/perforce/cam/usr.bin/login/login.c Wed Feb 23 17:40:40 2000 *************** *** 466,473 **** * Since it isn't clear that flags are useful on character * devices, we just clear them. */ ! if (chflags(ttyn, 0)) ! syslog(LOG_ERR, "chmod(%s): %m", ttyn); if (chown(ttyn, pwd->pw_uid, (gr = getgrnam(TTYGRPNAME)) ? gr->gr_gid : pwd->pw_gid)) syslog(LOG_ERR, "chmod(%s): %m", ttyn); --- 466,473 ---- * 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, "chflags(%s): %m", ttyn); if (chown(ttyn, pwd->pw_uid, (gr = getgrnam(TTYGRPNAME)) ? gr->gr_gid : pwd->pw_gid)) syslog(LOG_ERR, "chmod(%s): %m", ttyn); ==== //depot/cam/usr.bin/login/login_fbtab.c#3 - /b/ken/perforce/cam/usr.bin/login/login_fbtab.c ==== *** /tmp/tmp.12791.1 Wed Feb 23 17:43:10 2000 --- /b/ken/perforce/cam/usr.bin/login/login_fbtab.c Wed Feb 23 17:41:29 2000 *************** *** 133,139 **** if (strcmp("/*", path + pathlen - 2) != 0) { /* clear flags of the device */ ! if (chflags(path, 0) && errno != ENOENT) syslog(LOG_ERR, "%s: chflags(%s): %m", table, path); if (chmod(path, mask) && errno != ENOENT) syslog(LOG_ERR, "%s: chmod(%s): %m", table, path); --- 133,139 ---- if (strcmp("/*", path + pathlen - 2) != 0) { /* clear flags of the device */ ! if (chflags(path, 0) && errno != ENOENT && errno != EOPNOTSUPP) syslog(LOG_ERR, "%s: chflags(%s): %m", table, path); if (chmod(path, mask) && errno != ENOENT) syslog(LOG_ERR, "%s: chmod(%s): %m", table, path); --xHFwDpU9dbj6ez1V-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000223174741.A33317>