Signup
Search Linux manpages For:  

matchpathcon(3) -- Linux man page

 

NAME

matchpathcon - get the default security context for the specified file from the policy.

 

SYNOPSIS

#include <selinux/selinux.h>

int matchpathcon(const char *path, mode_t mode, security_context_t *con);
void set_matchpathcon_printf(void (*f)(const char *fmt, ...));

 

DESCRIPTION


matchpathcon matches the specified pathname and mode against the file contexts configuration and sets the security context "con" to refer to the resulting context. "mode" can be 0 to disable mode matching, but should be provided whenever possible, as it may affect the matching. Note:
   Caller must free returned security context "con" using freecon.

set_matchpathcon_printf

Set the function used by matchpathcon when displaying errors about the file_contexts configuration. If not set, then this defaults to fprintf(stderr, fmt, ...).


 

RETURN VALUE

Returns 0 on success or -1 otherwise.

 

SEE ALSO

freecon(3), setfilecon(3), setfscreatecon(3)


 
LINUX MAN PAGES
Man1 -- User Commands (Intro)
Man2 -- System Calls (Intro)
Man3 -- Library Functions (Intro)
Man4 -- Special Files (Intro)
Man5 -- File Formats (Intro)
Man6 -- Games (Intro)
Man7 -- Miscellaneous (Intro)
Man8 -- Administration (Intro)
Mann -- TCL Functions (not available)


WEB HOSTING SHOWCASE




 
Cheap Web HostingBudget Web HostingEcommerce Web Hosting
Link to UsLink ExchangeAdvertisePrivacy PolicyTerms Of ServiceAbout UsContact UsSitemap
Copyright © 2006 - 2012 Broadband Media, Inc. All rights reserved.