ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nc...@apache.org
Subject [19/25] 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 18:24:20 GMT
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/f1200b72
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f1200b72
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f1200b72

Branch: refs/heads/branch-feature-AMBARI-18634
Commit: f1200b729b2b055cb87a676dffb6dd8d68d9a865
Parents: 9dfb7e9
Author: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Authored: Sun Nov 13 21:42:16 2016 +0200
Committer: Vitaly Brodetskyi <vbrodetskyi@hortonworks.com>
Committed: Sun Nov 13 21:42:16 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/f1200b72/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 e2b97ca..5db62c5 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
@@ -385,6 +386,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