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.

cred: remove unused set_security_override_from_ctx()

The function set_security_override_from_ctx() has no in-tree callers
since 6.14. Remove it.

Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
[PM: subject tweak, merge fuzz]
Signed-off-by: Paul Moore <paul@paul-moore.com>

authored by

Casey Schaufler and committed by
Paul Moore
5547598e 2d38a4e3

-24
-1
include/linux/cred.h
··· 164 164 return rcu_dereference_raw(init_task.cred); 165 165 } 166 166 extern int set_security_override(struct cred *, u32); 167 - extern int set_security_override_from_ctx(struct cred *, const char *); 168 167 extern int set_create_files_as(struct cred *, struct inode *); 169 168 extern int cred_fscmp(const struct cred *, const struct cred *); 170 169 extern void __init cred_init(void);
-23
kernel/cred.c
··· 621 621 EXPORT_SYMBOL(set_security_override); 622 622 623 623 /** 624 - * set_security_override_from_ctx - Set the security ID in a set of credentials 625 - * @new: The credentials to alter 626 - * @secctx: The LSM security context to generate the security ID from. 627 - * 628 - * Set the LSM security ID in a set of credentials so that the subjective 629 - * security is overridden when an alternative set of credentials is used. The 630 - * security ID is specified in string form as a security context to be 631 - * interpreted by the LSM. 632 - */ 633 - int set_security_override_from_ctx(struct cred *new, const char *secctx) 634 - { 635 - u32 secid; 636 - int ret; 637 - 638 - ret = security_secctx_to_secid(secctx, strlen(secctx), &secid); 639 - if (ret < 0) 640 - return ret; 641 - 642 - return set_security_override(new, secid); 643 - } 644 - EXPORT_SYMBOL(set_security_override_from_ctx); 645 - 646 - /** 647 624 * set_create_files_as - Set the LSM file create context in a set of credentials 648 625 * @new: The credentials to alter 649 626 * @inode: The inode to take the context from