All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Brindle <jbrindle@tresys.com>
To: Daniel J Walsh <dwalsh@redhat.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>, SE Linux <selinux@tycho.nsa.gov>
Subject: Re: Patch for restorecond to not report an error if filesystem does not support XATTR
Date: Thu, 30 Nov 2006 11:25:24 -0500	[thread overview]
Message-ID: <456F05F4.8090507@tresys.com> (raw)
In-Reply-To: <456E073D.8050109@redhat.com>

Daniel J Walsh wrote:
> Caused by NFS Home directories.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> 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);

It sounds like this is caused by configuration errors, why wouldn't it 
check that the files/dirs being watched have xattr support before adding 
them to the watch list?


--
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.

  reply	other threads:[~2006-11-30 16:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-29 22:18 Patch for restorecond to not report an error if filesystem does not support XATTR Daniel J Walsh
2006-11-30 16:25 ` Joshua Brindle [this message]
2006-11-30 17:06   ` Daniel J Walsh
2006-11-30 18:15     ` Joshua Brindle
2006-11-30 19:02       ` Stephen Smalley
2006-12-02  3:37         ` Joshua Brindle
2006-12-04 20:10           ` Stephen Smalley
2006-12-06 17:19 ` Karl MacMillan
2006-12-12 18:18   ` Stephen Smalley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=456F05F4.8090507@tresys.com \
    --to=jbrindle@tresys.com \
    --cc=dwalsh@redhat.com \
    --cc=sds@tycho.nsa.gov \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.