2023-07-21 13:12:16

by Yue Haibing

[permalink] [raw]
Subject: [PATCH -next] cred: Remove unsued extern declaration change_create_files_as()

Since commit 3a3b7ce93369 ("CRED: Allow kernel services to override LSM settings for task actions")
this is never used, so can be removed.

Signed-off-by: YueHaibing <[email protected]>
---
include/linux/cred.h | 1 -
1 file changed, 1 deletion(-)

diff --git a/include/linux/cred.h b/include/linux/cred.h
index 9ed9232af934..f923528d5cc4 100644
--- a/include/linux/cred.h
+++ b/include/linux/cred.h
@@ -164,7 +164,6 @@ extern void abort_creds(struct cred *);
extern const struct cred *override_creds(const struct cred *);
extern void revert_creds(const struct cred *);
extern struct cred *prepare_kernel_cred(struct task_struct *);
-extern int change_create_files_as(struct cred *, struct inode *);
extern int set_security_override(struct cred *, u32);
extern int set_security_override_from_ctx(struct cred *, const char *);
extern int set_create_files_as(struct cred *, struct inode *);
--
2.34.1



2023-07-21 21:53:42

by Paul Moore

[permalink] [raw]
Subject: Re: [PATCH -next] cred: Remove unsued extern declaration change_create_files_as()

On Fri, Jul 21, 2023 at 8:28 AM YueHaibing <[email protected]> wrote:
>
> Since commit 3a3b7ce93369 ("CRED: Allow kernel services to override LSM settings for task actions")
> this is never used, so can be removed.
>
> Signed-off-by: YueHaibing <[email protected]>
> ---
> include/linux/cred.h | 1 -
> 1 file changed, 1 deletion(-)

It's unclear to me who might merge this patch, but since the original
offending commit came via the LSM tree I figure the fix might as well
come via the LSM tree too. I just merged this into the lsm/next
branch, but if someone else really wants this to go up via their tree
that's fine with me.

Thanks for the patch YueHaibing.

> diff --git a/include/linux/cred.h b/include/linux/cred.h
> index 9ed9232af934..f923528d5cc4 100644
> --- a/include/linux/cred.h
> +++ b/include/linux/cred.h
> @@ -164,7 +164,6 @@ extern void abort_creds(struct cred *);
> extern const struct cred *override_creds(const struct cred *);
> extern void revert_creds(const struct cred *);
> extern struct cred *prepare_kernel_cred(struct task_struct *);
> -extern int change_create_files_as(struct cred *, struct inode *);
> extern int set_security_override(struct cred *, u32);
> extern int set_security_override_from_ctx(struct cred *, const char *);
> extern int set_create_files_as(struct cred *, struct inode *);
> --
> 2.34.1

--
paul-moore.com