Research
.
Skip Search Box

SELinux Mailing List

Re: Proposed change to install

From: Stephen Smalley <sds_at_epoch.ncsc.mil>
Date: Tue, 28 Dec 2004 13:43:07 -0500


On Tue, 2004-12-28 at 13:10, Daniel J Walsh wrote:
> Could add check to see if matchpathcon is failing for something other
> than EPERM, which maybe should be reported???

EACCES would be the common case, for processes that cannot read file_contexts. ENOENT is another possible frequent case, for files that match no entry or match <<none>> (if we change matchpathcon to return -1 with errno ENOENT for that case). The only other error (and the only one worth reporting) might be ENOMEM for memory allocation failures.

> Sounds good, that way we don't need to check.

Or check for ENOENT and ignore the error in that case. That is likely what we will want for restorecon once matchpathcon handles <<none>> internally.

> +static int setdefaultfilecon(const char *path) {

Might as well make this void and not return any error code as the caller doesn't use it anyway.

-- 
Stephen Smalley <sds@epoch.ncsc.mil>
National Security Agency


--
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.
Received on Tue 28 Dec 2004 - 13:48:48 EST
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service