Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A8EC1200D0C for ; Wed, 20 Sep 2017 15:29:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A738F1609E2; Wed, 20 Sep 2017 13:29:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E71451609E1 for ; Wed, 20 Sep 2017 15:29:07 +0200 (CEST) Received: (qmail 72370 invoked by uid 500); 20 Sep 2017 13:29:07 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 72361 invoked by uid 99); 20 Sep 2017 13:29:07 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Sep 2017 13:29:07 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A0F37D29E4 for ; Wed, 20 Sep 2017 13:29:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id diVHvK0_SKZR for ; Wed, 20 Sep 2017 13:29:05 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 9235C60EAD for ; Wed, 20 Sep 2017 13:29:05 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5EF16E0288 for ; Wed, 20 Sep 2017 13:29:04 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id B2014218F6 for ; Wed, 20 Sep 2017 13:29:02 +0000 (UTC) Date: Wed, 20 Sep 2017 13:29:02 +0000 (UTC) From: "Eugene Chekanskiy (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-21970) Enable sticky bit for curl_krb_cache MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 20 Sep 2017 13:29:08 -0000 [ https://issues.apache.org/jira/browse/AMBARI-21970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16173174#comment-16173174 ] Eugene Chekanskiy commented on AMBARI-21970: -------------------------------------------- 412c6ca..629f3ee branch-2.6 -> branch-2.6 260c75f..8b9370a trunk -> trunk > Enable sticky bit for curl_krb_cache > ------------------------------------ > > Key: AMBARI-21970 > URL: https://issues.apache.org/jira/browse/AMBARI-21970 > Project: Ambari > Issue Type: Bug > Components: ambari-server > Affects Versions: 2.5.0 > Reporter: Krishnama Raju K > Assignee: Eugene Chekanskiy > Priority: Minor > Attachments: AMBARI-21970.patch > > > In secure environment, we see that "/var/lib/ambari-agent/tmp" has sticky bit enabled. Trying to enable such permissions ( sticky bit or any other permissions ) for "curl_krb_request.py" is being over written after few seconds. > It is observed that the chmod permissions set in "curl_krb_request.py" enforces periodic 0777 as shown in below snippet. > {code:java} > curl_krb_cache_path = os.path.join(tmp_dir, "curl_krb_cache") > if not os.path.exists(curl_krb_cache_path): > os.makedirs(curl_krb_cache_path) > os.chmod(curl_krb_cache_path, 0777) > {code} > Ref: https://github.com/apache/ambari/blob/trunk/ambari-common/src/main/python/resource_management/libraries/functions/curl_krb_request.py > Hence, code changes need to be done for setting the sticky bit to prevent access from users who did not create the specific file. -- This message was sent by Atlassian JIRA (v6.4.14#64029)