# Re: \[PATCH v2 3/8\] exec: Convert security\_bprm\_set\_creds into security\_bprm\_repopulate\_creds

- From: Eric W. Biederman \<hidden\>
- Date: 2020-05-20 12:44:47 
- List: linux-security-module
- Page: https://ratatoskr.run/linux-security-module/2020/05/180378
- Thread: https://ratatoskr.run/linux-fsdevel/2020/05/180378/t.md

```text
James Morris [ref] writes:

> On Mon, 18 May 2020, Eric W. Biederman wrote:
>
>> diff --git a/fs/exec.c b/fs/exec.c
>> index 9e70da47f8d9..8e3b93d51d31 100644
>> --- a/fs/exec.c
>> +++ b/fs/exec.c
>> @@ -1366,7 +1366,7 @@ int begin_new_exec(struct linux_binprm * bprm)
>>  	 * the final state of setuid/setgid/fscaps can be merged into the
>>  	 * secureexec flag.
>>  	 */
>> -	bprm->secureexec |= bprm->cap_elevated;
>> +	bprm->secureexec |= bprm->active_secureexec;
>
> Which kernel tree are these patches for? Seems like begin_new_exec() is 
> from a prerequisite patchset.

The base is:
git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace.git exec-next

I should have mentioned.  I am several round deep in cleaning up exec
already.

begin_new_exec is essentially forget_old_exec.

Eric


```
