> On Oct. 18, 2014, 2:50 p.m., Ben Mahler wrote: > > src/tests/slave_tests.cpp, line 528 > > <https://reviews.apache.org/r/26894/diff/1/?file=724949#file724949line528> > > > > Hm.. this doesn't look like the right usage of shell=false (which > > should use the `arguments` field): > > > > > > https://github.com/apache/mesos/blob/0.20.1/include/mesos/mesos.proto#L238 > > R.B. Boyer wrote: > FYI "shell=false" with arguments is broken until this is merged: > https://reviews.apache.org/r/26622/ > > Niklas Nielsen wrote: > You are right - we need to introduce a helper program then (I can't think > of a way to run the `test` program and whoami at the same time without a > shell). > So in short, it would be a helper program that does getuid and compares > it with the user entry from the argument given: './test-running-user nobody' > Ben, how does that sound? > > Ben Mahler wrote: > That would work but does seem unfortunate. What if we just run > '/usr/bin/whoami' and inspect the sandbox stdout for 'nobody'? Not sure if > there are other tests that do this. Note that we'd probably need os::which or > the like to determine where 'whoami' is.
The new patch use a helper program and runs without a shell. Let me know if that works. - Niklas ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/26894/#review57283 ----------------------------------------------------------- On Nov. 19, 2014, 8:53 a.m., Niklas Nielsen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/26894/ > ----------------------------------------------------------- > > (Updated Nov. 19, 2014, 8:53 a.m.) > > > Review request for mesos and Ben Mahler. > > > Bugs: MESOS-1359 > https://issues.apache.org/jira/browse/MESOS-1359 > > > Repository: mesos-git > > > Description > ------- > > The 'nobody' user is restricted on some systems from shell access and broke > the task.user tests (which have been disabled since then). > With the command.shell field, the test can run the command directly. > > > Diffs > ----- > > src/Makefile.am 0fe7dd067b80cfe802201482eed63a30ac8dcbd4 > src/tests/active_user_test_helper.cpp PRE-CREATION > src/tests/slave_tests.cpp 4675dac95e7a9964bdf22259b85d6dd0081af708 > > Diff: https://reviews.apache.org/r/26894/diff/ > > > Testing > ------- > > make check on linux as root > > > Thanks, > > Niklas Nielsen > >
