Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
levy5307 committed Aug 19, 2020
1 parent 8d584da commit f4f1d5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/runtime/security/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
#include "kinit_context.h"

#include <dsn/dist/fmt_logging.h>
#include <dsn/utility/flags.h>

namespace dsn {
namespace security {
extern char *FLAGS_krb5_config;
extern char *FLAGS_krb5_keytab;
DSN_DECLARE_string(krb5_config);
DSN_DECLARE_string(krb5_keytab);

/***
* set kerberos envs(for more details:
Expand Down
5 changes: 2 additions & 3 deletions src/runtime/security/kinit_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class kinit_context
// keytab file with absolute path
krb5_keytab _keytab;
// credential cache
// TODO(zlw): reuse ticket from ccache
krb5_ccache _ccache;
krb5_get_init_creds_opt *_opt = nullptr;

Expand Down Expand Up @@ -158,9 +159,7 @@ void kinit_context::init_krb5_ctx()
static std::once_flag once;
std::call_once(once, [&]() {
int64_t err = krb5_init_context(&_krb5_context);
if (err != 0) {
dassert_f(false, "init kerberos context failed, with kerberos error_code = {}", err);
}
dcheck_eq(err, 0);
});
}

Expand Down

0 comments on commit f4f1d5d

Please sign in to comment.