security.c (bbb20089a3275a19e475dbc21320c3742e3ca423) | security.c (1ee65e37e904b959c24404139f5752edc66319d5) |
---|---|
1/* 2 * Security plug functions 3 * 4 * Copyright (C) 2001 WireX Communications, Inc <chris@wirex.com> 5 * Copyright (C) 2001-2002 Greg Kroah-Hartman <greg@kroah.com> 6 * Copyright (C) 2001 Networks Associates Technology, Inc <ssmalley@nai.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 110 unchanged lines hidden (view full) --- 119 120 security_ops = ops; 121 122 return 0; 123} 124 125/* Security operations */ 126 | 1/* 2 * Security plug functions 3 * 4 * Copyright (C) 2001 WireX Communications, Inc <chris@wirex.com> 5 * Copyright (C) 2001-2002 Greg Kroah-Hartman <greg@kroah.com> 6 * Copyright (C) 2001 Networks Associates Technology, Inc <ssmalley@nai.com> 7 * 8 * This program is free software; you can redistribute it and/or modify --- 110 unchanged lines hidden (view full) --- 119 120 security_ops = ops; 121 122 return 0; 123} 124 125/* Security operations */ 126 |
127int security_ptrace_may_access(struct task_struct *child, unsigned int mode) | 127int security_ptrace_access_check(struct task_struct *child, unsigned int mode) |
128{ | 128{ |
129 return security_ops->ptrace_may_access(child, mode); | 129 return security_ops->ptrace_access_check(child, mode); |
130} 131 132int security_ptrace_traceme(struct task_struct *parent) 133{ 134 return security_ops->ptrace_traceme(parent); 135} 136 137int security_capget(struct task_struct *target, --- 541 unchanged lines hidden (view full) --- 679 return security_ops->dentry_open(file, cred); 680} 681 682int security_task_create(unsigned long clone_flags) 683{ 684 return security_ops->task_create(clone_flags); 685} 686 | 130} 131 132int security_ptrace_traceme(struct task_struct *parent) 133{ 134 return security_ops->ptrace_traceme(parent); 135} 136 137int security_capget(struct task_struct *target, --- 541 unchanged lines hidden (view full) --- 679 return security_ops->dentry_open(file, cred); 680} 681 682int security_task_create(unsigned long clone_flags) 683{ 684 return security_ops->task_create(clone_flags); 685} 686 |
687int security_cred_alloc_blank(struct cred *cred, gfp_t gfp) 688{ 689 return security_ops->cred_alloc_blank(cred, gfp); 690} 691 |
|
687void security_cred_free(struct cred *cred) 688{ 689 security_ops->cred_free(cred); 690} 691 692int security_prepare_creds(struct cred *new, const struct cred *old, gfp_t gfp) 693{ 694 return security_ops->cred_prepare(new, old, gfp); 695} 696 697void security_commit_creds(struct cred *new, const struct cred *old) 698{ 699 security_ops->cred_commit(new, old); 700} 701 | 692void security_cred_free(struct cred *cred) 693{ 694 security_ops->cred_free(cred); 695} 696 697int security_prepare_creds(struct cred *new, const struct cred *old, gfp_t gfp) 698{ 699 return security_ops->cred_prepare(new, old, gfp); 700} 701 702void security_commit_creds(struct cred *new, const struct cred *old) 703{ 704 security_ops->cred_commit(new, old); 705} 706 |
707void security_transfer_creds(struct cred *new, const struct cred *old) 708{ 709 security_ops->cred_transfer(new, old); 710} 711 |
|
702int security_kernel_act_as(struct cred *new, u32 secid) 703{ 704 return security_ops->kernel_act_as(new, secid); 705} 706 707int security_kernel_create_files_as(struct cred *new, struct inode *inode) 708{ 709 return security_ops->kernel_create_files_as(new, inode); 710} 711 | 712int security_kernel_act_as(struct cred *new, u32 secid) 713{ 714 return security_ops->kernel_act_as(new, secid); 715} 716 717int security_kernel_create_files_as(struct cred *new, struct inode *inode) 718{ 719 return security_ops->kernel_create_files_as(new, inode); 720} 721 |
722int security_kernel_module_request(void) 723{ 724 return security_ops->kernel_module_request(); 725} 726 |
|
712int security_task_setuid(uid_t id0, uid_t id1, uid_t id2, int flags) 713{ 714 return security_ops->task_setuid(id0, id1, id2, flags); 715} 716 717int security_task_fix_setuid(struct cred *new, const struct cred *old, 718 int flags) 719{ --- 234 unchanged lines hidden (view full) --- 954EXPORT_SYMBOL(security_secctx_to_secid); 955 956void security_release_secctx(char *secdata, u32 seclen) 957{ 958 security_ops->release_secctx(secdata, seclen); 959} 960EXPORT_SYMBOL(security_release_secctx); 961 | 727int security_task_setuid(uid_t id0, uid_t id1, uid_t id2, int flags) 728{ 729 return security_ops->task_setuid(id0, id1, id2, flags); 730} 731 732int security_task_fix_setuid(struct cred *new, const struct cred *old, 733 int flags) 734{ --- 234 unchanged lines hidden (view full) --- 969EXPORT_SYMBOL(security_secctx_to_secid); 970 971void security_release_secctx(char *secdata, u32 seclen) 972{ 973 security_ops->release_secctx(secdata, seclen); 974} 975EXPORT_SYMBOL(security_release_secctx); 976 |
977int security_inode_notifysecctx(struct inode *inode, void *ctx, u32 ctxlen) 978{ 979 return security_ops->inode_notifysecctx(inode, ctx, ctxlen); 980} 981EXPORT_SYMBOL(security_inode_notifysecctx); 982 983int security_inode_setsecctx(struct dentry *dentry, void *ctx, u32 ctxlen) 984{ 985 return security_ops->inode_setsecctx(dentry, ctx, ctxlen); 986} 987EXPORT_SYMBOL(security_inode_setsecctx); 988 989int security_inode_getsecctx(struct inode *inode, void **ctx, u32 *ctxlen) 990{ 991 return security_ops->inode_getsecctx(inode, ctx, ctxlen); 992} 993EXPORT_SYMBOL(security_inode_getsecctx); 994 |
|
962#ifdef CONFIG_SECURITY_NETWORK 963 964int security_unix_stream_connect(struct socket *sock, struct socket *other, 965 struct sock *newsk) 966{ 967 return security_ops->unix_stream_connect(sock, other, newsk); 968} 969EXPORT_SYMBOL(security_unix_stream_connect); --- 137 unchanged lines hidden (view full) --- 1107} 1108 1109void security_inet_conn_established(struct sock *sk, 1110 struct sk_buff *skb) 1111{ 1112 security_ops->inet_conn_established(sk, skb); 1113} 1114 | 995#ifdef CONFIG_SECURITY_NETWORK 996 997int security_unix_stream_connect(struct socket *sock, struct socket *other, 998 struct sock *newsk) 999{ 1000 return security_ops->unix_stream_connect(sock, other, newsk); 1001} 1002EXPORT_SYMBOL(security_unix_stream_connect); --- 137 unchanged lines hidden (view full) --- 1140} 1141 1142void security_inet_conn_established(struct sock *sk, 1143 struct sk_buff *skb) 1144{ 1145 security_ops->inet_conn_established(sk, skb); 1146} 1147 |
1148int security_tun_dev_create(void) 1149{ 1150 return security_ops->tun_dev_create(); 1151} 1152EXPORT_SYMBOL(security_tun_dev_create); 1153 1154void security_tun_dev_post_create(struct sock *sk) 1155{ 1156 return security_ops->tun_dev_post_create(sk); 1157} 1158EXPORT_SYMBOL(security_tun_dev_post_create); 1159 1160int security_tun_dev_attach(struct sock *sk) 1161{ 1162 return security_ops->tun_dev_attach(sk); 1163} 1164EXPORT_SYMBOL(security_tun_dev_attach); 1165 |
|
1115#endif /* CONFIG_SECURITY_NETWORK */ 1116 1117#ifdef CONFIG_SECURITY_NETWORK_XFRM 1118 1119int security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, struct xfrm_user_sec_ctx *sec_ctx) 1120{ 1121 return security_ops->xfrm_policy_alloc_security(ctxp, sec_ctx); 1122} --- 90 unchanged lines hidden (view full) --- 1213 return security_ops->key_permission(key_ref, cred, perm); 1214} 1215 1216int security_key_getsecurity(struct key *key, char **_buffer) 1217{ 1218 return security_ops->key_getsecurity(key, _buffer); 1219} 1220 | 1166#endif /* CONFIG_SECURITY_NETWORK */ 1167 1168#ifdef CONFIG_SECURITY_NETWORK_XFRM 1169 1170int security_xfrm_policy_alloc(struct xfrm_sec_ctx **ctxp, struct xfrm_user_sec_ctx *sec_ctx) 1171{ 1172 return security_ops->xfrm_policy_alloc_security(ctxp, sec_ctx); 1173} --- 90 unchanged lines hidden (view full) --- 1264 return security_ops->key_permission(key_ref, cred, perm); 1265} 1266 1267int security_key_getsecurity(struct key *key, char **_buffer) 1268{ 1269 return security_ops->key_getsecurity(key, _buffer); 1270} 1271 |
1272int security_key_session_to_parent(const struct cred *cred, 1273 const struct cred *parent_cred, 1274 struct key *key) 1275{ 1276 return security_ops->key_session_to_parent(cred, parent_cred, key); 1277} 1278 |
|
1221#endif /* CONFIG_KEYS */ 1222 1223#ifdef CONFIG_AUDIT 1224 1225int security_audit_rule_init(u32 field, u32 op, char *rulestr, void **lsmrule) 1226{ 1227 return security_ops->audit_rule_init(field, op, rulestr, lsmrule); 1228} --- 18 unchanged lines hidden --- | 1279#endif /* CONFIG_KEYS */ 1280 1281#ifdef CONFIG_AUDIT 1282 1283int security_audit_rule_init(u32 field, u32 op, char *rulestr, void **lsmrule) 1284{ 1285 return security_ops->audit_rule_init(field, op, rulestr, lsmrule); 1286} --- 18 unchanged lines hidden --- |