Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-21970

Enable sticky bit for curl_krb_cache

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.5.0
    • None
    • ambari-server
    • None

    Description

      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.

      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)
      
      

      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.

      Attachments

        1. AMBARI-21970.patch
          0.9 kB
          Eugene Chekanskiy

        Activity

          People

            echekanskiy Eugene Chekanskiy
            itskrishspace Krishnama Raju K
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: