Three cleanup patches, no behavior changes.
tomoyo: remove unused function declaration tomoyo: refactor deprecated strncpy tomoyo: add format attributes to functions security/tomoyo/common.c | 1 + security/tomoyo/common.h | 6 ++---- security/tomoyo/domain.c | 5 ++--- 3 files changed, 5 insertions(+), 7 deletions(-) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJk9FxlAAoJEEJfEo0MZPUqVKUP/REOtWjsfI9xZUCA3c9Hx3xs Y6f5sqNLE5hv0/xDAh56Z438Ikk+TJ5+K5rouK6WqBAgaJS1JpmUZ/fgpAKUWYbU AmRUSdxPJX1Ujepyc44tY2pGny7c4BK1Wt8FJ47WW3bh/HJ50b76L7iNvx0B2UCj sf0JmUE34C7LvlSaQMlbfJKHCaOVKL6CLhLBKuKt+eGeOfiqOuB49Wu17tezk99Y 1ct6c+Pr5aGZt7PsArMaRYvY9z/1kywFla5O/kMBisJmset6cJQg8IoRtdw0Uhfw Egi/hwvpO102Q/SEqk7IYw7cOkXAl5t9bwz9PCJTE8laEB52vSO6n6b0BaZEM9jA V3U0fV/p+Xfca5WkOc+6wd6NDu6vCnx9q9baiOZRBiXjkK7wZidzaeuZnXzpRpAo MLGSv59VkABqLBQH3ZOYh9icFoZ/o+jp3XP4zAP7/dx6Sp5g+IdlYuM/UpyO8S5U u2LX6UTukoAbTOpWt2m2mMQCTzoJI0LN7n2wur4+ukiYKuzddZzYfWPROAbyqrbS utW8KcKnDIHpWy1V3M3W9izqhZAYn4EBPAso1xyhCsHLN+KyuqJCYhjrKFAepJjF iKJWzycG1J3gKpw3hhAxUGcCmtRVjduFpam19kkNEro667hCUDLOx274jGY6LCgu bjy6eMVvQTliXj6E0+dW =2qhs -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
5c5e0e8120
|
@ -184,6 +184,7 @@ static bool tomoyo_manage_by_non_root;
|
|||
*
|
||||
* Returns nothing.
|
||||
*/
|
||||
__printf(3, 4)
|
||||
static void tomoyo_addprintf(char *buffer, int len, const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
|
|
@ -954,7 +954,7 @@ bool tomoyo_str_starts(char **src, const char *find);
|
|||
char *tomoyo_encode(const char *str);
|
||||
char *tomoyo_encode2(const char *str, int str_len);
|
||||
char *tomoyo_init_log(struct tomoyo_request_info *r, int len, const char *fmt,
|
||||
va_list args);
|
||||
va_list args) __printf(3, 0);
|
||||
char *tomoyo_read_token(struct tomoyo_acl_param *param);
|
||||
char *tomoyo_realpath_from_path(const struct path *path);
|
||||
char *tomoyo_realpath_nofollow(const char *pathname);
|
||||
|
@ -1037,8 +1037,6 @@ struct tomoyo_policy_namespace *tomoyo_assign_namespace
|
|||
(const char *domainname);
|
||||
struct tomoyo_profile *tomoyo_profile(const struct tomoyo_policy_namespace *ns,
|
||||
const u8 profile);
|
||||
unsigned int tomoyo_check_flags(const struct tomoyo_domain_info *domain,
|
||||
const u8 index);
|
||||
u8 tomoyo_parse_ulong(unsigned long *result, char **str);
|
||||
void *tomoyo_commit_ok(void *data, const unsigned int size);
|
||||
void __init tomoyo_load_builtin_policy(void);
|
||||
|
@ -1067,7 +1065,7 @@ void tomoyo_warn_oom(const char *function);
|
|||
void tomoyo_write_log(struct tomoyo_request_info *r, const char *fmt, ...)
|
||||
__printf(2, 3);
|
||||
void tomoyo_write_log2(struct tomoyo_request_info *r, int len, const char *fmt,
|
||||
va_list args);
|
||||
va_list args) __printf(3, 0);
|
||||
|
||||
/********** External variable definitions. **********/
|
||||
|
||||
|
|
|
@ -784,13 +784,12 @@ retry:
|
|||
if (!strcmp(domainname, "parent")) {
|
||||
char *cp;
|
||||
|
||||
strncpy(ee->tmp, old_domain->domainname->name,
|
||||
TOMOYO_EXEC_TMPSIZE - 1);
|
||||
strscpy(ee->tmp, old_domain->domainname->name, TOMOYO_EXEC_TMPSIZE);
|
||||
cp = strrchr(ee->tmp, ' ');
|
||||
if (cp)
|
||||
*cp = '\0';
|
||||
} else if (*domainname == '<')
|
||||
strncpy(ee->tmp, domainname, TOMOYO_EXEC_TMPSIZE - 1);
|
||||
strscpy(ee->tmp, domainname, TOMOYO_EXEC_TMPSIZE);
|
||||
else
|
||||
snprintf(ee->tmp, TOMOYO_EXEC_TMPSIZE - 1, "%s %s",
|
||||
old_domain->domainname->name, domainname);
|
||||
|
|
Loading…
Reference in New Issue