Skip to content

Commit

Permalink
Restrict-qualify iolog_path_escapes like we do with check_iolog_path
Browse files Browse the repository at this point in the history
  • Loading branch information
AreaZR committed Aug 12, 2024
1 parent 1381a69 commit db1ca1f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions plugins/sudoers/iolog_path_escapes.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ strlcpy_no_slash(char * restrict dst, const char * restrict src, size_t size)
}

static size_t
fill_seq(char *str, size_t strsize, void *v)
fill_seq(char * restrict str, size_t strsize, void * restrict v)
{
#ifdef SUDOERS_NO_SEQ
debug_decl(fill_seq, SUDOERS_DEBUG_UTIL);
Expand All @@ -86,15 +86,15 @@ fill_seq(char *str, size_t strsize, void *v)
}

static size_t
fill_user(char *str, size_t strsize, void *v)
fill_user(char * restrict str, size_t strsize, void * restrict v)
{
struct sudoers_context *ctx = v;
debug_decl(fill_user, SUDOERS_DEBUG_UTIL);
debug_return_size_t(strlcpy_no_slash(str, ctx->user.name, strsize));
}

static size_t
fill_group(char *str, size_t strsize, void *v)
fill_group(char * restrict str, size_t strsize, void * restrict v)
{
struct sudoers_context *ctx = v;
struct group *grp;
Expand All @@ -111,15 +111,15 @@ fill_group(char *str, size_t strsize, void *v)
}

static size_t
fill_runas_user(char *str, size_t strsize, void *v)
fill_runas_user(char * restrict str, size_t strsize, void * restrict v)
{
struct sudoers_context *ctx = v;
debug_decl(fill_runas_user, SUDOERS_DEBUG_UTIL);
debug_return_size_t(strlcpy_no_slash(str, ctx->runas.pw->pw_name, strsize));
}

static size_t
fill_runas_group(char *str, size_t strsize, void *v)
fill_runas_group(char * restrict str, size_t strsize, void * restrict v)
{
struct sudoers_context *ctx = v;
struct group *grp;
Expand All @@ -141,15 +141,15 @@ fill_runas_group(char *str, size_t strsize, void *v)
}

static size_t
fill_hostname(char *str, size_t strsize, void *v)
fill_hostname(char * restrict str, size_t strsize, void * restrict v)
{
struct sudoers_context *ctx = v;
debug_decl(fill_hostname, SUDOERS_DEBUG_UTIL);
debug_return_size_t(strlcpy_no_slash(str, ctx->user.shost, strsize));
}

static size_t
fill_command(char *str, size_t strsize, void *v)
fill_command(char * restrict str, size_t strsize, void * restrict v)
{
struct sudoers_context *ctx = v;
debug_decl(fill_command, SUDOERS_DEBUG_UTIL);
Expand Down

0 comments on commit db1ca1f

Please sign in to comment.