Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'tomoyo-pr-20230903' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1

Pull tomoyo updates from Tetsuo Handa:
"Three cleanup patches, no behavior changes"

* tag 'tomoyo-pr-20230903' of git://git.osdn.net/gitroot/tomoyo/tomoyo-test1:
tomoyo: remove unused function declaration
tomoyo: refactor deprecated strncpy
tomoyo: add format attributes to functions

+5 -7
+1
security/tomoyo/common.c
··· 184 184 * 185 185 * Returns nothing. 186 186 */ 187 + __printf(3, 4) 187 188 static void tomoyo_addprintf(char *buffer, int len, const char *fmt, ...) 188 189 { 189 190 va_list args;
+2 -4
security/tomoyo/common.h
··· 954 954 char *tomoyo_encode(const char *str); 955 955 char *tomoyo_encode2(const char *str, int str_len); 956 956 char *tomoyo_init_log(struct tomoyo_request_info *r, int len, const char *fmt, 957 - va_list args); 957 + va_list args) __printf(3, 0); 958 958 char *tomoyo_read_token(struct tomoyo_acl_param *param); 959 959 char *tomoyo_realpath_from_path(const struct path *path); 960 960 char *tomoyo_realpath_nofollow(const char *pathname); ··· 1037 1037 (const char *domainname); 1038 1038 struct tomoyo_profile *tomoyo_profile(const struct tomoyo_policy_namespace *ns, 1039 1039 const u8 profile); 1040 - unsigned int tomoyo_check_flags(const struct tomoyo_domain_info *domain, 1041 - const u8 index); 1042 1040 u8 tomoyo_parse_ulong(unsigned long *result, char **str); 1043 1041 void *tomoyo_commit_ok(void *data, const unsigned int size); 1044 1042 void __init tomoyo_load_builtin_policy(void); ··· 1065 1067 void tomoyo_write_log(struct tomoyo_request_info *r, const char *fmt, ...) 1066 1068 __printf(2, 3); 1067 1069 void tomoyo_write_log2(struct tomoyo_request_info *r, int len, const char *fmt, 1068 - va_list args); 1070 + va_list args) __printf(3, 0); 1069 1071 1070 1072 /********** External variable definitions. **********/ 1071 1073
+2 -3
security/tomoyo/domain.c
··· 784 784 if (!strcmp(domainname, "parent")) { 785 785 char *cp; 786 786 787 - strncpy(ee->tmp, old_domain->domainname->name, 788 - TOMOYO_EXEC_TMPSIZE - 1); 787 + strscpy(ee->tmp, old_domain->domainname->name, TOMOYO_EXEC_TMPSIZE); 789 788 cp = strrchr(ee->tmp, ' '); 790 789 if (cp) 791 790 *cp = '\0'; 792 791 } else if (*domainname == '<') 793 - strncpy(ee->tmp, domainname, TOMOYO_EXEC_TMPSIZE - 1); 792 + strscpy(ee->tmp, domainname, TOMOYO_EXEC_TMPSIZE); 794 793 else 795 794 snprintf(ee->tmp, TOMOYO_EXEC_TMPSIZE - 1, "%s %s", 796 795 old_domain->domainname->name, domainname);