Merge branch 'master' into next
This commit is contained in:
@@ -1117,27 +1117,6 @@ static int tomoyo_check_single_path_permission2(struct tomoyo_domain_info *
|
||||
return error;
|
||||
}
|
||||
|
||||
/**
|
||||
* tomoyo_check_file_perm - Check permission for sysctl()'s "read" and "write".
|
||||
*
|
||||
* @domain: Pointer to "struct tomoyo_domain_info".
|
||||
* @filename: Filename to check.
|
||||
* @perm: Mode ("read" or "write" or "read/write").
|
||||
* Returns 0 on success, negative value otherwise.
|
||||
*/
|
||||
int tomoyo_check_file_perm(struct tomoyo_domain_info *domain,
|
||||
const char *filename, const u8 perm)
|
||||
{
|
||||
struct tomoyo_path_info name;
|
||||
const u8 mode = tomoyo_check_flags(domain, TOMOYO_MAC_FOR_FILE);
|
||||
|
||||
if (!mode)
|
||||
return 0;
|
||||
name.name = filename;
|
||||
tomoyo_fill_path_info(&name);
|
||||
return tomoyo_check_file_perm2(domain, &name, perm, "sysctl", mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* tomoyo_check_exec_perm - Check permission for "execute".
|
||||
*
|
||||
|
Reference in New Issue
Block a user