| 
									
										
										
										
											2011-08-18 18:07:44 -04:00
										 |  |  | /*
 | 
					
						
							|  |  |  |  * Copyright (C) 2011 IBM Corporation | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Author: | 
					
						
							|  |  |  |  * Mimi Zohar <zohar@us.ibm.com> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is free software; you can redistribute it and/or modify | 
					
						
							|  |  |  |  * it under the terms of the GNU General Public License as published by | 
					
						
							|  |  |  |  * the Free Software Foundation, version 2 of the License. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <linux/module.h>
 | 
					
						
							|  |  |  | #include <linux/xattr.h>
 | 
					
						
							| 
									
										
										
										
											2013-10-10 15:56:13 +09:00
										 |  |  | #include <linux/evm.h>
 | 
					
						
							| 
									
										
										
										
											2011-08-18 18:07:44 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-10-10 15:56:13 +09:00
										 |  |  | int posix_xattr_acl(const char *xattr) | 
					
						
							| 
									
										
										
										
											2011-08-18 18:07:44 -04:00
										 |  |  | { | 
					
						
							|  |  |  | 	int xattr_len = strlen(xattr); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	if ((strlen(XATTR_NAME_POSIX_ACL_ACCESS) == xattr_len) | 
					
						
							|  |  |  | 	     && (strncmp(XATTR_NAME_POSIX_ACL_ACCESS, xattr, xattr_len) == 0)) | 
					
						
							|  |  |  | 		return 1; | 
					
						
							|  |  |  | 	if ((strlen(XATTR_NAME_POSIX_ACL_DEFAULT) == xattr_len) | 
					
						
							|  |  |  | 	     && (strncmp(XATTR_NAME_POSIX_ACL_DEFAULT, xattr, xattr_len) == 0)) | 
					
						
							|  |  |  | 		return 1; | 
					
						
							|  |  |  | 	return 0; | 
					
						
							|  |  |  | } |