summaryrefslogtreecommitdiffstats
path: root/usr.bin/login
diff options
context:
space:
mode:
authorsheldonh <sheldonh@FreeBSD.org>2000-04-13 09:39:29 +0000
committersheldonh <sheldonh@FreeBSD.org>2000-04-13 09:39:29 +0000
commit2ae0158f085cf00f299f186fcafe16ac23d89d1f (patch)
tree45786ff2764960715675840b8007bed3a382116a /usr.bin/login
parentd4928b4139a958b5a3904db68758babe8c1b5f9a (diff)
downloadFreeBSD-src-2ae0158f085cf00f299f186fcafe16ac23d89d1f.zip
FreeBSD-src-2ae0158f085cf00f299f186fcafe16ac23d89d1f.tar.gz
Do not issue a warning when chflags() fails with EOPNOTSUPP.
PR: 17875 Submitted by: Bjoern Fischer <bfischer@Techfak.Uni-Bielefeld.DE>
Diffstat (limited to 'usr.bin/login')
-rw-r--r--usr.bin/login/login.c2
-rw-r--r--usr.bin/login/login_fbtab.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/login/login.c b/usr.bin/login/login.c
index c0f6792..2a0faaf 100644
--- a/usr.bin/login/login.c
+++ b/usr.bin/login/login.c
@@ -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))
diff --git a/usr.bin/login/login_fbtab.c b/usr.bin/login/login_fbtab.c
index e747850..ab718cd 100644
--- a/usr.bin/login/login_fbtab.c
+++ b/usr.bin/login/login_fbtab.c
@@ -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);
OpenPOWER on IntegriCloud