ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vbrodets...@apache.org
Subject ambari git commit: AMBARI-18859. Keytab files where the owner is not explicitly set should be owned by the user executing ambari-agent.(vbrodetskyi)
Date Mon, 14 Nov 2016 11:29:53 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 2d2ecf9cd -> f1c0c6ade


AMBARI-18859. Keytab files where the owner is not explicitly set should be owned by the user
executing ambari-agent.(vbrodetskyi)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f1c0c6ad
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f1c0c6ad
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f1c0c6ad

Branch: refs/heads/branch-2.5
Commit: f1c0c6ade9bada3d1c98150fdad7da8a70209454
Parents: 2d2ecf9
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Sun Nov 13 21:40:21 2016 +0200
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Sun Nov 13 21:40:21 2016 +0200

----------------------------------------------------------------------
 .../KERBEROS/1.10.3-10/package/scripts/kerberos_common.py         | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c0c6ad/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/kerberos_common.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/kerberos_common.py
b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/kerberos_common.py
index e06b13f..3d09e70 100644
--- a/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/kerberos_common.py
+++ b/ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/kerberos_common.py
@@ -18,6 +18,7 @@ limitations under the License.
 """
 
 import base64
+import getpass
 import os
 import string
 import subprocess
@@ -379,6 +380,8 @@ class KerberosScript(Script):
               Directory(head, create_parents = True, mode=0755, owner="root", group="root")
 
             owner = get_property_value(item, 'keytab_file_owner_name')
+            if not owner:
+              owner = getpass.getuser()
             owner_access = get_property_value(item, 'keytab_file_owner_access')
             group = get_property_value(item, 'keytab_file_group_name')
             group_access = get_property_value(item, 'keytab_file_group_access')


Mime
View raw message