Skip to content
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

Apparent dev mode typo in supervisor-main.c++ #98

Closed
jjlee opened this issue Aug 24, 2014 · 2 comments
Closed

Apparent dev mode typo in supervisor-main.c++ #98

jjlee opened this issue Aug 24, 2014 · 2 comments
Labels

Comments

@jjlee
Copy link

jjlee commented Aug 24, 2014

This only affects dev mode, if anything.

I don't know the code and absolutely don't know if this is a real problem, but it jumped out at me that the three lines starting here (in 41725ab) are identical. Some kind of macro magic or a typo?

https://github.com/sandstorm-io/sandstorm/blob/master/src/sandstorm/supervisor-main.c++#L992

Cheers

@kentonv
Copy link
Member

kentonv commented Aug 24, 2014

@amluto Looks like you wrote the same filter rule three times? Is that a mistake?

CHECK_SECCOMP(seccomp_rule_add(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(ptrace), 1,
  SCMP_A0(SCMP_CMP_EQ, PTRACE_POKEUSER)));
CHECK_SECCOMP(seccomp_rule_add(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(ptrace), 1,
  SCMP_A0(SCMP_CMP_EQ, PTRACE_POKEUSER)));
CHECK_SECCOMP(seccomp_rule_add(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(ptrace), 1,
  SCMP_A0(SCMP_CMP_EQ, PTRACE_POKEUSER)));

@amluto
Copy link
Contributor

amluto commented Aug 24, 2014

Looks like a typo to me.

@kentonv kentonv added the bug label Sep 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants