Remove unused backpoiters from security objects.
Signed-off-by: James Morris <jmorris@namei.org>
if (!tsec)
return -ENOMEM;
if (!tsec)
return -ENOMEM;
tsec->osid = tsec->sid = tsec->ptrace_sid = SECINITSID_UNLABELED;
task->security = tsec;
tsec->osid = tsec->sid = tsec->ptrace_sid = SECINITSID_UNLABELED;
task->security = tsec;
if (!fsec)
return -ENOMEM;
if (!fsec)
return -ENOMEM;
fsec->sid = tsec->sid;
fsec->fown_sid = tsec->sid;
file->f_security = fsec;
fsec->sid = tsec->sid;
fsec->fown_sid = tsec->sid;
file->f_security = fsec;
if (!ssec)
return -ENOMEM;
if (!ssec)
return -ENOMEM;
ssec->peer_sid = SECINITSID_UNLABELED;
ssec->sid = SECINITSID_UNLABELED;
sk->sk_security = ssec;
ssec->peer_sid = SECINITSID_UNLABELED;
ssec->sid = SECINITSID_UNLABELED;
sk->sk_security = ssec;
if (!bsec)
return -ENOMEM;
if (!bsec)
return -ENOMEM;
bsec->sid = SECINITSID_UNLABELED;
bsec->set = 0;
bsec->sid = SECINITSID_UNLABELED;
bsec->set = 0;
return -ENOMEM;
isec->sclass = sclass;
return -ENOMEM;
isec->sclass = sclass;
isec->sid = tsec->sid;
perm->security = isec;
isec->sid = tsec->sid;
perm->security = isec;
if (!msec)
return -ENOMEM;
if (!msec)
return -ENOMEM;
msec->sid = SECINITSID_UNLABELED;
msg->security = msec;
msec->sid = SECINITSID_UNLABELED;
msg->security = msec;
if (!ksec)
return -ENOMEM;
if (!ksec)
return -ENOMEM;
if (tsec->keycreate_sid)
ksec->sid = tsec->keycreate_sid;
else
if (tsec->keycreate_sid)
ksec->sid = tsec->keycreate_sid;
else
#include "avc.h"
struct task_security_struct {
#include "avc.h"
struct task_security_struct {
- struct task_struct *task; /* back pointer to task object */
u32 osid; /* SID prior to last execve */
u32 sid; /* current SID */
u32 exec_sid; /* exec SID */
u32 osid; /* SID prior to last execve */
u32 sid; /* current SID */
u32 exec_sid; /* exec SID */
};
struct file_security_struct {
};
struct file_security_struct {
- struct file *file; /* back pointer to file object */
u32 sid; /* SID of open file description */
u32 fown_sid; /* SID of file owner (for SIGIO) */
u32 isid; /* SID of inode at the time of file open */
u32 sid; /* SID of open file description */
u32 fown_sid; /* SID of file owner (for SIGIO) */
u32 isid; /* SID of inode at the time of file open */
};
struct msg_security_struct {
};
struct msg_security_struct {
- struct msg_msg *msg; /* back pointer */
u32 sid; /* SID of message */
};
struct ipc_security_struct {
u32 sid; /* SID of message */
};
struct ipc_security_struct {
- struct kern_ipc_perm *ipc_perm; /* back pointer */
u16 sclass; /* security class of this object */
u32 sid; /* SID of IPC resource */
};
struct bprm_security_struct {
u16 sclass; /* security class of this object */
u32 sid; /* SID of IPC resource */
};
struct bprm_security_struct {
- struct linux_binprm *bprm; /* back pointer to bprm object */
u32 sid; /* SID for transformed process */
unsigned char set;
u32 sid; /* SID for transformed process */
unsigned char set;
};
struct sk_security_struct {
};
struct sk_security_struct {
- struct sock *sk; /* back pointer to sk object */
u32 sid; /* SID of this object */
u32 peer_sid; /* SID of peer */
u16 sclass; /* sock security class */
u32 sid; /* SID of this object */
u32 peer_sid; /* SID of peer */
u16 sclass; /* sock security class */
};
struct key_security_struct {
};
struct key_security_struct {
- struct key *obj; /* back pointer */
u32 sid; /* SID of key */
};
u32 sid; /* SID of key */
};