Author: shv Date: Tue Jun 5 06:31:25 2012 New Revision: 1346254 URL: http://svn.apache.org/viewvc?rev=1346254&view=rev Log: MAPREDUCE-2103. Additional changes to task-controller.c Contributed by Benoy Antony.
Modified: hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt hadoop/common/branches/branch-0.22/mapreduce/src/c++/task-controller/impl/task-controller.c Modified: hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt?rev=1346254&r1=1346253&r2=1346254&view=diff ============================================================================== --- hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt (original) +++ hadoop/common/branches/branch-0.22/mapreduce/CHANGES.txt Tue Jun 5 06:31:25 2012 @@ -56,6 +56,9 @@ Release 0.22.1 - Unreleased MAPREDUCE-2377. task-controller fails to parse configuration if it doesn't end in \n. (Todd Lipcon and Benoy Antony via shv) + MAPREDUCE-2103. Additional changes to task-controller.c + (Benoy Antony via shv) + Release 0.22.0 - 2011-11-29 INCOMPATIBLE CHANGES Modified: hadoop/common/branches/branch-0.22/mapreduce/src/c++/task-controller/impl/task-controller.c URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-0.22/mapreduce/src/c%2B%2B/task-controller/impl/task-controller.c?rev=1346254&r1=1346253&r2=1346254&view=diff ============================================================================== --- hadoop/common/branches/branch-0.22/mapreduce/src/c++/task-controller/impl/task-controller.c (original) +++ hadoop/common/branches/branch-0.22/mapreduce/src/c++/task-controller/impl/task-controller.c Tue Jun 5 06:31:25 2012 @@ -97,8 +97,8 @@ char* get_executable() { * promisable. For this, we need task-controller binary to * * be user-owned by root * * be group-owned by a configured special group. - * * others do not have any permissions - * * be setuid/setgid + * * others do not have write/execute permissions + * * be setuid */ int check_taskcontroller_permissions(char *executable_file) { @@ -135,16 +135,16 @@ int check_taskcontroller_permissions(cha return -1; } - // check others do not have read/write/execute permissions - if ((filestat.st_mode & S_IROTH) == S_IROTH || (filestat.st_mode & S_IWOTH) - == S_IWOTH || (filestat.st_mode & S_IXOTH) == S_IXOTH) { + // check others do not have write/execute permissions + if ((filestat.st_mode & S_IWOTH) == S_IWOTH || + (filestat.st_mode & S_IXOTH) == S_IXOTH) { fprintf(LOGFILE, - "The task-controller binary should not have read or write or" + "The task-controller binary should not have write or" " execute for others.\n"); return -1; } - // Binary should be setuid/setgid executable + // Binary should be setuid executable if ((filestat.st_mode & S_ISUID) == 0) { fprintf(LOGFILE, "The task-controller binary should be set setuid.\n"); return -1;