Commit 0e4b8496 authored by Marcus Nordenberg's avatar Marcus Nordenberg Committed by Esteban Blanc

remove suid and user root on plc.This is insecure.

(cherry picked from commit fa961e0c2d715cfd24a3cce0b0af6f603a433690)
parent 1998989f
...@@ -821,21 +821,6 @@ void pkg_node::fetchFiles(bool distribute) ...@@ -821,21 +821,6 @@ void pkg_node::fetchFiles(bool distribute)
ofu << "mv pwr_pkg.dat $pwrp_load\n" ofu << "mv pwr_pkg.dat $pwrp_load\n"
<< "rm -r /tmp/pkg_build\n"; << "rm -r /tmp/pkg_build\n";
// Change owner to root of plc, to make modification of thread prio possible
ofu << "nname=`eval uname -n`\n"
<< "if [ \"$USER\" == \"root\" ]; then\n"
<< " chown root $pwrp_exe/plc_$nname_*\n"
<< " chmod g+w $pwrp_exe/plc_$nname_*\n"
<< " chmod u+s $pwrp_exe/plc_$nname_*\n"
<< "else\n"
<< " tst=`eval sudo -l | grep \" ALL\"`\n"
<< " if [ \"$tst\" != \"\" ]; then\n"
<< " sudo chown root $pwrp_exe/plc_$nname_*\n"
<< " sudo chmod g+w $pwrp_exe/plc_$nname_*\n"
<< " sudo chmod u+s $pwrp_exe/plc_$nname_*\n"
<< " fi\n"
<< "fi\n";
// Group should not have write access to .rhosts file // Group should not have write access to .rhosts file
ofu << "if [ -e $dir/.rhosts ]; then\n" ofu << "if [ -e $dir/.rhosts ]; then\n"
<< " if [ \"$USER\" == \"root\" ]; then\n" << " if [ \"$USER\" == \"root\" ]; then\n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment