Gautham Banasandra created HDFS-15954:
-----------------------------------------

             Summary: Pass correct function for SASL callback
                 Key: HDFS-15954
                 URL: https://issues.apache.org/jira/browse/HDFS-15954
             Project: Hadoop HDFS
          Issue Type: Bug
          Components: libhdfs++
    Affects Versions: 3.4.0
            Reporter: Gautham Banasandra
            Assignee: Gautham Banasandra


It seems like an incorrect function type is passed as the callback for SASL. We 
get the following warnings during compilation -
{code}
/mnt/d/projects/apache/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/cyrus_sasl_engine.cc:
 In constructor ‘hdfs::CySaslEngine::CySaslEngine()’:
/mnt/d/projects/apache/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/cyrus_sasl_engine.cc:124:46:
 warning: cast between incompatible function types from ‘int (*)(void*, int, 
const char**, unsigned int*)’ to ‘hdfs::sasl_callback_ft’ {aka ‘int (*)()’} 
[-Wcast-function-type]
  124 |     { SASL_CB_USER,     (sasl_callback_ft) & get_name, this}, // userid 
for authZ
      |                                              ^~~~~~~~
/mnt/d/projects/apache/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/cyrus_sasl_engine.cc:125:46:
 warning: cast between incompatible function types from ‘int (*)(void*, int, 
const char**, unsigned int*)’ to ‘hdfs::sasl_callback_ft’ {aka ‘int (*)()’} 
[-Wcast-function-type]
  125 |     { SASL_CB_AUTHNAME, (sasl_callback_ft) & get_name, this}, // authid 
for authT
      |                                              ^~~~~~~~
/mnt/d/projects/apache/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/cyrus_sasl_engine.cc:126:46:
 warning: cast between incompatible function types from ‘int (*)(void*, int, 
const char**, const char**)’ to ‘hdfs::sasl_callback_ft’ {aka ‘int (*)()’} 
[-Wcast-function-type]
  126 |     { SASL_CB_GETREALM, (sasl_callback_ft) & getrealm, this}, // 
krb/gssapi realm
      |                                              ^~~~~~~~
/mnt/d/projects/apache/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/cyrus_sasl_engine.cc:
 At global scope:
/mnt/d/projects/apache/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/cyrus_sasl_engine.cc:423:41:
 warning: cast between incompatible function types from ‘int (*)(void*, int, 
const char*)’ to ‘hdfs::sasl_callback_ft’ {aka ‘int (*)()’} 
[-Wcast-function-type]
  423 |     { SASL_CB_LOG, (sasl_callback_ft) & sasl_my_log, NULL},
      |                                         ^~~~~~~~~~~
/mnt/d/projects/apache/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/cyrus_sasl_engine.cc:424:44:
 warning: cast between incompatible function types from ‘int (*)(void*, const 
char*, const char*, const char**, unsigned int*)’ to ‘hdfs::sasl_callback_ft’ 
{aka ‘int (*)()’} [-Wcast-function-type]
  424 |     { SASL_CB_GETOPT, (sasl_callback_ft) & sasl_getopt, NULL},
      |                                            ^~~~~~~~~~~
/mnt/d/projects/apache/hadoop/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/rpc/cyrus_sasl_engine.cc:425:45:
 warning: cast between incompatible function types from ‘int (*)(void*, const 
char**)’ to ‘hdfs::sasl_callback_ft’ {aka ‘int (*)()’} [-Wcast-function-type]
  425 |     { SASL_CB_GETPATH, (sasl_callback_ft) & get_path, NULL}, // to find 
th mechanisms
      |                                             ^~~~~~~~
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to