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 58853200D15 for ; Wed, 20 Sep 2017 15:15:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 56FCF1609E1; Wed, 20 Sep 2017 13:15:06 +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 978B11609E2 for ; Wed, 20 Sep 2017 15:15:05 +0200 (CEST) Received: (qmail 85194 invoked by uid 500); 20 Sep 2017 13:15:04 -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 85185 invoked by uid 99); 20 Sep 2017 13:15:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Sep 2017 13:15:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5BC4B1A3BCE for ; Wed, 20 Sep 2017 13:15:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-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-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id xJjAQXjynChZ for ; Wed, 20 Sep 2017 13:15:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 2286561127 for ; Wed, 20 Sep 2017 13:15:02 +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 92C41E0EF5 for ; Wed, 20 Sep 2017 13:15:01 +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 039E9218FC for ; Wed, 20 Sep 2017 13:15:01 +0000 (UTC) Date: Wed, 20 Sep 2017 13:15:01 +0000 (UTC) From: "Dmitry Lysnichenko (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:15:06 -0000 [ https://issues.apache.org/jira/browse/AMBARI-21970?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16173160#comment-16173160 ] Dmitry Lysnichenko commented on AMBARI-21970: --------------------------------------------- +1 > 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)