Skip to content

Commit

Permalink
Amended if clauses for ssh_elevate_credential/ssh_credential Test
Browse files Browse the repository at this point in the history
In manage_sql.c:
  Amended the if clause for the Test if the ssh_credential
  differs from the ssh_elevate_credential in functions
  "create_target(...)" and "modify_target(...)".
  • Loading branch information
jhelmold committed Jun 24, 2021
1 parent 211a9aa commit fbae05b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -30669,7 +30669,7 @@ create_target (const char* name, const char* asset_hosts_filter,
if (ssh_elevate_credential && (!ssh_credential))
return 14;

if (ssh_elevate_credential == ssh_credential)
if (ssh_credential && (ssh_elevate_credential == ssh_credential))
return 15;

sql_begin_immediate ();
Expand Down Expand Up @@ -31158,7 +31158,7 @@ modify_target (const char *target_id, const char *name, const char *hosts,
return 24;
}

if (ssh_elevate_credential_id == ssh_credential_id)
if (ssh_credential_id && (ssh_elevate_credential_id == ssh_credential_id))
{
sql_rollback ();
return 25;
Expand Down

0 comments on commit fbae05b

Please sign in to comment.