<div dir="ltr"><font size="4">Hello everyone:</font><div><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font size="4">While testing some syscalls tests on our device,based on debian rootfs, I got an error on many tests (running as "root" user).</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font size="4">Here is one of log:</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font size="1"><span style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><<<test_start>>></span><br style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><span style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal">tag=fchown03 stime=1478195083</span><br style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><span style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal">cmdline="fchown03"</span><br style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><span style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal">contacts=""</span><br style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><span style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal">analysis=exit</span><br style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><span style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><<<test_output>>></span><br style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><span style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal">fchown03    1  TBROK  :  tst_tmpdir.c:264: tst_tmpdir: mkdtemp(/tmp/ltp-cawz3S2QlX/fchNeMx77) failed: errno=EACCES(13): Permission denied</span><br style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><span style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal">fchown03    2  TBROK  :  tst_tmpdir.c:264: Remaining cases broken</span><br style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><span style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><<<execution_status>>></span><br style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><span style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal">initiation_status="ok"</span><br style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><span style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal">duration=0 termination_type=exited termination_id=2 corefile=no</span><br style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><span style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal">cutime=0 cstime=1</span><br style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><span style="font-family:"Microsoft YaHei",微软雅黑,sans-serif;white-space:normal"><<<test_end>>></span></font>
<font size="4">
After I trace the kerenel syscalls, found it do a setresuid operate, set uid to nobody.</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font size="4">I did test on my self C code, make that nobody did have no exec permission to mkdtemp. other normal user successed. </font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font size="4">So I pizzled that how to fix this error. need someone help me.</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font size="4"><br></font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"></pre></div></div>