New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start: fix death signal #2058

Merged
merged 2 commits into from Dec 22, 2017

Conversation

2 participants
@brauner
Member

brauner commented Dec 22, 2017

On set{g,u}id() the kernel does:

/* dumpability changes */
if (!uid_eq(old->euid, new->euid) ||
    !gid_eq(old->egid, new->egid) ||
    !uid_eq(old->fsuid, new->fsuid) ||
    !gid_eq(old->fsgid, new->fsgid) ||
    !cred_cap_issubset(old, new)) {
	if (task->mm)
		set_dumpable(task->mm, suid_dumpable);
	task->pdeath_signal = 0;
	smp_wmb();
}

which means we need to re-enable the deat signal after the set{g,u}id().

Signed-off-by: Christian Brauner christian.brauner@ubuntu.com

brauner added some commits Dec 22, 2017

start: fix death signal
On set{g,u}id() the kernel does:

 	/* dumpability changes */
	if (!uid_eq(old->euid, new->euid) ||
	    !gid_eq(old->egid, new->egid) ||
	    !uid_eq(old->fsuid, new->fsuid) ||
	    !gid_eq(old->fsgid, new->fsgid) ||
	    !cred_cap_issubset(old, new)) {
		if (task->mm)
			set_dumpable(task->mm, suid_dumpable);
		task->pdeath_signal = 0;
		smp_wmb();
	}

which means we need to re-enable the deat signal after the set{g,u}id().

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
start: handle setting death signal smarter
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>

@hallyn hallyn merged commit c326c19 into lxc:master Dec 22, 2017

4 checks passed

Branch target Branch target is correct
Details
Signed-off-by All commits signed-off
Details
Testsuite Testsuite passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment