From 3105592febb579aa76004aad97d24f792978c253 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 16 Oct 2002 23:16:54 -0700 Subject: LSM: add #include to a lot of files as they all have security calls in them. This is needed for the next patches that change the way the security calls work. --- fs/exec.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/exec.c') diff --git a/fs/exec.c b/fs/exec.c index eef86f55c0cb..647a17e022b1 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include -- cgit v1.2.3 From 866f830972340ad6fedea9e9ef1143374fee7a24 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 17 Oct 2002 00:05:48 -0700 Subject: LSM: change all security bprm related calls to the new format. --- arch/ppc64/kernel/sys_ppc32.c | 7 +++---- arch/sparc64/kernel/sys_sparc32.c | 7 +++---- fs/exec.c | 15 ++++++--------- 3 files changed, 12 insertions(+), 17 deletions(-) (limited to 'fs/exec.c') diff --git a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c index 30f96d69f478..1feae46791fd 100644 --- a/arch/ppc64/kernel/sys_ppc32.c +++ b/arch/ppc64/kernel/sys_ppc32.c @@ -3518,8 +3518,7 @@ static int do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs * if ((retval = bprm.envc) < 0) goto out_mm; - retval = security_ops->bprm_alloc_security(&bprm); - if (retval) + if ((retval = security_bprm_alloc(&bprm))) goto out; retval = prepare_binprm(&bprm); @@ -3542,7 +3541,7 @@ static int do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs * retval = search_binary_handler(&bprm,regs); if (retval >= 0) { /* execve success */ - security_ops->bprm_free_security(&bprm); + security_bprm_free(&bprm); return retval; } @@ -3555,7 +3554,7 @@ out: } if (bprm.security) - security_ops->bprm_free_security(&bprm); + security_bprm_free(&bprm); out_mm: mmdrop(bprm.mm); diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index 9b62bbe3a655..79637daf95ab 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c @@ -2964,8 +2964,7 @@ do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs * regs) if ((retval = bprm.envc) < 0) goto out_mm; - retval = security_ops->bprm_alloc_security(&bprm); - if (retval) + if ((retval = security_bprm_alloc(&bprm))) goto out; retval = prepare_binprm(&bprm); @@ -2988,7 +2987,7 @@ do_execve32(char * filename, u32 * argv, u32 * envp, struct pt_regs * regs) retval = search_binary_handler(&bprm, regs); if (retval >= 0) { /* execve success */ - security_ops->bprm_free_security(&bprm); + security_bprm_free(&bprm); return retval; } @@ -3001,7 +3000,7 @@ out: } if (bprm.security) - security_ops->bprm_free_security(&bprm); + security_bprm_free(&bprm); out_mm: mmdrop(bprm.mm); diff --git a/fs/exec.c b/fs/exec.c index 647a17e022b1..26a485d62ce9 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -819,8 +819,7 @@ int prepare_binprm(struct linux_binprm *bprm) } /* fill in binprm security blob */ - retval = security_ops->bprm_set_security(bprm); - if (retval) + if ((retval = security_bprm_set(bprm))) return retval; memset(bprm->buf,0,BINPRM_BUF_SIZE); @@ -868,7 +867,7 @@ void compute_creds(struct linux_binprm *bprm) if(do_unlock) unlock_kernel(); - security_ops->bprm_compute_creds(bprm); + security_bprm_compute_creds(bprm); } void remove_arg_zero(struct linux_binprm *bprm) @@ -937,8 +936,7 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) } } #endif - retval = security_ops->bprm_check_security(bprm); - if (retval) + if ((retval = security_bprm_check(bprm))) return retval; /* kernel module loader fixup */ @@ -1034,8 +1032,7 @@ int do_execve(char * filename, char ** argv, char ** envp, struct pt_regs * regs if ((retval = bprm.envc) < 0) goto out_mm; - retval = security_ops->bprm_alloc_security(&bprm); - if (retval) + if ((retval = security_bprm_alloc(&bprm))) goto out; retval = prepare_binprm(&bprm); @@ -1058,7 +1055,7 @@ int do_execve(char * filename, char ** argv, char ** envp, struct pt_regs * regs retval = search_binary_handler(&bprm,regs); if (retval >= 0) { /* execve success */ - security_ops->bprm_free_security(&bprm); + security_bprm_free(&bprm); return retval; } @@ -1071,7 +1068,7 @@ out: } if (bprm.security) - security_ops->bprm_free_security(&bprm); + security_bprm_free(&bprm); out_mm: mmdrop(bprm.mm); -- cgit v1.2.3