From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <456E073D.8050109@redhat.com> Date: Wed, 29 Nov 2006 17:18:37 -0500 From: Daniel J Walsh MIME-Version: 1.0 To: Stephen Smalley , Joshua Brindle , SE Linux Subject: Patch for restorecond to not report an error if filesystem does not support XATTR Content-Type: multipart/mixed; boundary="------------040800030205040102070001" Sender: owner-selinux@tycho.nsa.gov List-Id: selinux@tycho.nsa.gov This is a multi-part message in MIME format. --------------040800030205040102070001 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Caused by NFS Home directories. --------------040800030205040102070001 Content-Type: text/x-patch; name="restorecond-eopnotsupp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="restorecond-eopnotsupp.patch" diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-1.33.5/restorecond/restorecond.c --- nsapolicycoreutils/restorecond/restorecond.c 2006-11-16 17:14:28.000000000 -0500 +++ policycoreutils-1.33.5/restorecond/restorecond.c 2006-11-29 12:44:06.000000000 -0500 @@ -210,9 +210,10 @@ } if (fsetfilecon(fd, scontext) < 0) { - syslog(LOG_ERR, - "set context %s->%s failed:'%s'\n", - filename, scontext, strerror(errno)); + if (errno != EOPNOTSUPP) + syslog(LOG_ERR, + "set context %s->%s failed:'%s'\n", + filename, scontext, strerror(errno)); if (retcontext >= 0) free(prev_context); free(scontext); @@ -225,8 +226,9 @@ if (retcontext >= 0) free(prev_context); } else { - syslog(LOG_ERR, "get context on %s failed: '%s'\n", - filename, strerror(errno)); + if (errno != EOPNOTSUPP) + syslog(LOG_ERR, "get context on %s failed: '%s'\n", + filename, strerror(errno)); } free(scontext); close(fd); --------------040800030205040102070001-- -- This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with the words "unsubscribe selinux" without quotes as the message.