You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by wl...@apache.org on 2015/10/19 11:49:21 UTC
incubator-hawq git commit: HAWQ-64. fix NULL pointer error in
function ExtractPrincipalFromTicketCache
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 <wl...@pivotal.io>
Authored: Mon Oct 19 17:54:12 2015 +0800
Committer: Wen Lin <wl...@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;