hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject incubator-hawq git commit: HAWQ-64. fix NULL pointer error in function ExtractPrincipalFromTicketCache
Date Mon, 19 Oct 2015 09:49:21 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 571e7cfc9 -> cf81985f7


HAWQ-64. fix NULL pointer error in function ExtractPrincipalFromTicketCache


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

Branch: refs/heads/master
Commit: cf81985f75a22f250158215af30dd7d5ca4e1a62
Parents: 571e7cf
Author: Wen Lin <wlin@pivotal.io>
Authored: Mon Oct 19 17:54:12 2015 +0800
Committer: Wen Lin <wlin@pivotal.io>
Committed: Mon Oct 19 17:54:12 2015 +0800

----------------------------------------------------------------------
 .../resourcebroker/resourcebroker_LIBYARN_proc.c          | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/cf81985f/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c
----------------------------------------------------------------------
diff --git a/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c b/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c
index ecb9e92..7e0e23f 100644
--- a/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c
+++ b/src/backend/resourcemanager/resourcebroker/resourcebroker_LIBYARN_proc.c
@@ -312,12 +312,12 @@ char * ExtractPrincipalFromTicketCache(const char* cache)
     /*
      * refresh kerberos ticket
      */
-	if (!login()) {
-		elog(WARNING, "Cannot login kerberos.");
-		return NULL;
-	}
+    if (!login()) {
+        elog(WARNING, "Cannot login kerberos.");
+        return NULL;
+    }
 
-	if (!cache) {
+    if (cache) {
         if (0 != setenv("KRB5CCNAME", cache, 1)) {
             elog(WARNING, "Cannot set env parameter \"KRB5CCNAME\" when extract principal
from cache:%s", cache);
             return NULL;


Mime
View raw message