Skip to content

Commit

Permalink
[fix](kerberos)avoid dangling pointer for kerberos's ticket cache whe…
Browse files Browse the repository at this point in the history
…n use tcmalloc (#32974)
  • Loading branch information
Yulei-Yang authored Mar 28, 2024
1 parent cf54fe5 commit 755f667
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion be/src/io/hdfs_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Status HDFSCommonBuilder::run_kinit() {
if (hdfs_kerberos_principal.empty() || hdfs_kerberos_keytab.empty()) {
return Status::InvalidArgument("Invalid hdfs_kerberos_principal or hdfs_kerberos_keytab");
}
std::string ticket_path = TICKET_CACHE_PATH + generate_uuid_string();
ticket_path = TICKET_CACHE_PATH + generate_uuid_string();
const char* krb_home = getenv("KRB_HOME");
std::string krb_home_str(krb_home ? krb_home : "");
fmt::memory_buffer kinit_command;
Expand Down
1 change: 1 addition & 0 deletions be/src/io/hdfs_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class HDFSCommonBuilder {
bool need_kinit {false};
std::string hdfs_kerberos_keytab;
std::string hdfs_kerberos_principal;
std::string ticket_path;
};

THdfsParams parse_properties(const std::map<std::string, std::string>& properties);
Expand Down

0 comments on commit 755f667

Please sign in to comment.