Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-15954

Pass correct function for SASL callback

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.4.0
    • None
    • libhdfs++
    • None

    Description

      It seems like an incorrect function type is passed as the callback for SASL. We get the following warnings during compilation -

      /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
            |                                             ^~~~~~~~
      

      Attachments

        Activity

          People

            gaurava Gautham Banasandra
            gaurava Gautham Banasandra
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: