Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 149649f41 -> c7f652553


TRAFODION [1944] Check status of authentication and authorization via a CLI call

The SQL_EXEC_GetAuthState_Internal CLI request has been changed to
SQL_EXEC_GetAuthState and moved from SQLCLIdev.h to sqlcli.h so it is available
to external callers.


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

Branch: refs/heads/master
Commit: 3900ebb804440aef67700db165c19fc70dfdab87
Parents: 119d471
Author: Roberta Marton <[email protected]>
Authored: Wed Apr 20 18:08:44 2016 +0000
Committer: Roberta Marton <[email protected]>
Committed: Wed Apr 20 18:08:44 2016 +0000

----------------------------------------------------------------------
 core/sql/cli/CliExtern.cpp  | 2 +-
 core/sql/cli/SQLCLIdev.h    | 7 -------
 core/sql/cli/sqlcli.h       | 6 ++++++
 core/sql/sqlci/SqlciEnv.cpp | 8 ++++----
 4 files changed, 11 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/3900ebb8/core/sql/cli/CliExtern.cpp
----------------------------------------------------------------------
diff --git a/core/sql/cli/CliExtern.cpp b/core/sql/cli/CliExtern.cpp
index 201c257..3a8503d 100644
--- a/core/sql/cli/CliExtern.cpp
+++ b/core/sql/cli/CliExtern.cpp
@@ -4612,7 +4612,7 @@ Lng32 SQL_EXEC_GetDatabaseUserID_Internal (/*IN*/   char  
 *string_value,
 }
 
 SQLCLI_LIB_FUNC
-Int32 SQL_EXEC_GetAuthState_Internal(
+Int32 SQL_EXEC_GetAuthState(
    /*OUT*/  bool & authenticationEnabled,
    /*OUT*/  bool & authorizationEnabled,
    /*OUT*/  bool & authorizationReady,

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/3900ebb8/core/sql/cli/SQLCLIdev.h
----------------------------------------------------------------------
diff --git a/core/sql/cli/SQLCLIdev.h b/core/sql/cli/SQLCLIdev.h
index 8cf2bde..ad580c5 100644
--- a/core/sql/cli/SQLCLIdev.h
+++ b/core/sql/cli/SQLCLIdev.h
@@ -932,13 +932,6 @@ SQLCLI_LIB_FUNC Lng32 SQL_EXEC_SetSessionAttr_Internal (
     /*IN OPTIONAL*/            Lng32 numeric_value,
     /*IN OPTIONAL*/            char  *string_value);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetAuthState_Internal(
-   /*OUT*/  bool & authenticationEnabled,
-   /*OUT*/  bool & authorizationEnabled,
-   /*OUT*/  bool & authorizationReady,
-   /*OUT*/  bool & auditingEnabled);
-
-
 SQLCLI_LIB_FUNC Lng32 SQL_EXEC_SetErrorCodeInRTS(
                 /*IN*/ SQLSTMT_ID * statement_id,
                /*IN*/ Lng32     sqlErrorCode);  

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/3900ebb8/core/sql/cli/sqlcli.h
----------------------------------------------------------------------
diff --git a/core/sql/cli/sqlcli.h b/core/sql/cli/sqlcli.h
index e68bc30..871989d 100644
--- a/core/sql/cli/sqlcli.h
+++ b/core/sql/cli/sqlcli.h
@@ -1956,6 +1956,12 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_SETAUTHID(
                /* OUT OPTIONAL  role len*/ short *primaryRoleLen,
                 /* OUT OPTIONAL userRedefTime*/ Int64 *redefTime); // NA_64BIT
 
+SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetAuthState(
+   /*OUT*/  bool & authenticationEnabled,
+   /*OUT*/  bool & authorizationEnabled,
+   /*OUT*/  bool & authorizationReady,
+   /*OUT*/  bool & auditingEnabled);
+
 SQLCLI_LIB_FUNC Int32 SQL_EXEC_DecodeAndFormatKey(
                /*IN*/void    * RCB_Pointer_Addr,    
               /*IN*/void    * KeyAddr,             

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/3900ebb8/core/sql/sqlci/SqlciEnv.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlci/SqlciEnv.cpp b/core/sql/sqlci/SqlciEnv.cpp
index 28268c8..9c14e0d 100644
--- a/core/sql/sqlci/SqlciEnv.cpp
+++ b/core/sql/sqlci/SqlciEnv.cpp
@@ -1371,10 +1371,10 @@ Int32 SqlciEnv::getAuthState(bool 
&authenticationEnabled,
   HandleCLIErrorInit();
 
   Int32 localUID = 0;
-  Int32 rc = SQL_EXEC_GetAuthState_Internal(authenticationEnabled,
-                                            authorizationEnabled,
-                                            authorizationReady,
-                                            auditingEnabled);
+  Int32 rc = SQL_EXEC_GetAuthState(authenticationEnabled,
+                                   authorizationEnabled,
+                                   authorizationReady,
+                                   auditingEnabled);
   HandleCLIError(rc, this);
 
   return rc;

Reply via email to