Do not issue a warning when chflags() fails with EOPNOTSUPP.
PR: 17875 Submitted by: Bjoern Fischer <bfischer@Techfak.Uni-Bielefeld.DE>
This commit is contained in:
parent
ddf48d5ff5
commit
1806a85c5a
@ -493,7 +493,7 @@ main(argc, argv)
|
||||
* Since it isn't clear that flags are useful on character
|
||||
* devices, we just clear them.
|
||||
*/
|
||||
if (chflags(ttyn, 0))
|
||||
if (chflags(ttyn, 0) && (errno != EOPNOTSUPP))
|
||||
syslog(LOG_ERR, "chmod(%s): %m", ttyn);
|
||||
if (chown(ttyn, pwd->pw_uid,
|
||||
(gr = getgrnam(TTYGRPNAME)) ? gr->gr_gid : pwd->pw_gid))
|
||||
|
@ -13,6 +13,7 @@
|
||||
* warranties, including, without limitation, the implied warranties of
|
||||
* merchantibility and fitness for any particular purpose.
|
||||
************************************************************************/
|
||||
/* $FreeBSD$ */
|
||||
/*
|
||||
SYNOPSIS
|
||||
void login_fbtab(tty, uid, gid)
|
||||
@ -133,7 +134,7 @@ gid_t gid;
|
||||
|
||||
if (strcmp("/*", path + pathlen - 2) != 0) {
|
||||
/* clear flags of the device */
|
||||
if (chflags(path, 0) && errno != ENOENT)
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user