Skip to content

Commit

Permalink
console: added parameter UsePamAuthentication
Browse files Browse the repository at this point in the history
  • Loading branch information
franku committed Jul 13, 2018
1 parent e15c558 commit a2df140
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/src/console/console.cc
Expand Up @@ -1442,9 +1442,11 @@ int main(int argc, char *argv[])

sendit(errmsg);

if (!ConsolePamAuthenticate(stdin, UA_sock)) {
TerminateConsole(0);
return 1;
if (dir && dir->use_pam_authentication) {
if (!ConsolePamAuthenticate(stdin, UA_sock)) {
TerminateConsole(0);
return 1;
}
}

Dmsg0(40, "Opened connection with Director daemon\n");
Expand Down
1 change: 1 addition & 0 deletions core/src/console/console_conf.cc
Expand Up @@ -96,6 +96,7 @@ static ResourceItem dir_items[] = {
{ "Address", CFG_TYPE_STR, ITEM(res_dir.address), 0, 0, NULL, NULL, NULL },
{ "Password", CFG_TYPE_MD5PASSWORD, ITEM(res_dir.password), 0, CFG_ITEM_REQUIRED, NULL, NULL, NULL },
{ "HeartbeatInterval", CFG_TYPE_TIME, ITEM(res_dir.heartbeat_interval), 0, CFG_ITEM_DEFAULT, "0", NULL, NULL },
{ "UsePamAuthentication", CFG_TYPE_BOOL, ITEM(res_dir.use_pam_authentication), 0, CFG_ITEM_DEFAULT, "false", NULL, NULL },
TLS_COMMON_CONFIG(res_dir),
TLS_CERT_CONFIG(res_dir),
TLS_PSK_CONFIG(res_dir),
Expand Down
1 change: 1 addition & 0 deletions core/src/console/console_conf.h
Expand Up @@ -72,6 +72,7 @@ class DirectorResource : public TlsResource {
uint32_t DIRport; /**< UA server port */
char *address; /**< UA server address */
utime_t heartbeat_interval; /**< Interval to send heartbeats to Dir */
bool use_pam_authentication; /**< Use Pam authentication instead of password */
DirectorResource() : TlsResource() {}
};

Expand Down

0 comments on commit a2df140

Please sign in to comment.