mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	ima: Use strscpy instead of strlcpy
strlcpy is deprecated, use its safer replacement. Signed-off-by: Petr Vorel <pvorel@suse.cz> Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
		
							parent
							
								
									61868acb07
								
							
						
					
					
						commit
						cc4299ea03
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		|  | @ -403,7 +403,7 @@ const char *ima_d_path(const struct path *path, char **pathbuf, char *namebuf) | |||
| 	} | ||||
| 
 | ||||
| 	if (!pathname) { | ||||
| 		strlcpy(namebuf, path->dentry->d_name.name, NAME_MAX); | ||||
| 		strscpy(namebuf, path->dentry->d_name.name, NAME_MAX); | ||||
| 		pathname = namebuf; | ||||
| 	} | ||||
| 
 | ||||
|  |  | |||
|  | @ -870,7 +870,7 @@ static int __init ima_init_arch_policy(void) | |||
| 		char rule[255]; | ||||
| 		int result; | ||||
| 
 | ||||
| 		result = strlcpy(rule, *rules, sizeof(rule)); | ||||
| 		result = strscpy(rule, *rules, sizeof(rule)); | ||||
| 
 | ||||
| 		INIT_LIST_HEAD(&arch_policy_entry[i].list); | ||||
| 		result = ima_parse_rule(rule, &arch_policy_entry[i]); | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Petr Vorel
						Petr Vorel