Return-Path: X-Original-To: apmail-hadoop-common-commits-archive@www.apache.org Delivered-To: apmail-hadoop-common-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6695F173B1 for ; Fri, 24 Oct 2014 19:57:53 +0000 (UTC) Received: (qmail 460 invoked by uid 500); 24 Oct 2014 19:57:53 -0000 Delivered-To: apmail-hadoop-common-commits-archive@hadoop.apache.org Received: (qmail 396 invoked by uid 500); 24 Oct 2014 19:57:52 -0000 Mailing-List: contact common-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-commits@hadoop.apache.org Received: (qmail 387 invoked by uid 99); 24 Oct 2014 19:57:52 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Oct 2014 19:57:52 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 57142313DD9; Fri, 24 Oct 2014 19:57:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jianhe@apache.org To: common-commits@hadoop.apache.org Message-Id: <1064740d7fac45e18c50e05d2bfae63b@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: HADOOP-11228. Winutils task: unsecure path should not call AddNodeManagerAndUserACEsToObject. Contributed by Remus Rusanu (cherry picked from commit f7e89bb349d4512b47f94b545e3f489a85e851f0) Date: Fri, 24 Oct 2014 19:57:52 +0000 (UTC) Repository: hadoop Updated Branches: refs/heads/branch-2 5fb7660ad -> 299c9b456 HADOOP-11228. Winutils task: unsecure path should not call AddNodeManagerAndUserACEsToObject. Contributed by Remus Rusanu (cherry picked from commit f7e89bb349d4512b47f94b545e3f489a85e851f0) Conflicts: hadoop-common-project/hadoop-common/CHANGES.txt Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/299c9b45 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/299c9b45 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/299c9b45 Branch: refs/heads/branch-2 Commit: 299c9b456de1944181c8a54d9bd6033901718cc1 Parents: 5fb7660 Author: Jian He Authored: Fri Oct 24 12:48:57 2014 -0700 Committer: Jian He Committed: Fri Oct 24 12:54:00 2014 -0700 ---------------------------------------------------------------------- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../hadoop-common/src/main/winutils/task.c | 14 +++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/299c9b45/hadoop-common-project/hadoop-common/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 7ccc886..46a6426 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -661,6 +661,9 @@ Release 2.6.0 - UNRELEASED HADOOP-11122. Fix findbugs in ZK DelegationTokenSecretManagers. (Arun Suresh via kasha) + HADOOP-11228. Winutils task: unsecure path should not call + AddNodeManagerAndUserACEsToObject. (Remus Rusanu via jianhe) + Release 2.5.1 - 2014-09-05 INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/299c9b45/hadoop-common-project/hadoop-common/src/main/winutils/task.c ---------------------------------------------------------------------- diff --git a/hadoop-common-project/hadoop-common/src/main/winutils/task.c b/hadoop-common-project/hadoop-common/src/main/winutils/task.c index f0fc19a..bfdbd63 100644 --- a/hadoop-common-project/hadoop-common/src/main/winutils/task.c +++ b/hadoop-common-project/hadoop-common/src/main/winutils/task.c @@ -627,11 +627,13 @@ DWORD CreateTaskImpl(__in_opt HANDLE logonHandle, __in PCWSTR jobObjName,__in PC return dwErrorCode; } - dwErrorCode = AddNodeManagerAndUserACEsToObject(jobObject, userName, JOB_OBJECT_ALL_ACCESS); - if (dwErrorCode) { - ReportErrorCode(L"AddNodeManagerAndUserACEsToObject", dwErrorCode); - CloseHandle(jobObject); - return dwErrorCode; + if (logonHandle != NULL) { + dwErrorCode = AddNodeManagerAndUserACEsToObject(jobObject, userName, JOB_OBJECT_ALL_ACCESS); + if (dwErrorCode) { + ReportErrorCode(L"AddNodeManagerAndUserACEsToObject", dwErrorCode); + CloseHandle(jobObject); + return dwErrorCode; + } } if(AssignProcessToJobObject(jobObject, GetCurrentProcess()) == 0) @@ -706,6 +708,8 @@ DWORD CreateTaskImpl(__in_opt HANDLE logonHandle, __in PCWSTR jobObjName,__in PC dwErrorCode = GetLastError(); ReportErrorCode(L"CreateProcess", dwErrorCode); } + + // task create (w/o createAsUser) does not need the ACEs change on the process goto create_process_done; }