Skip to content

Commit

Permalink
system-plugin: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateo Cindrić committed Aug 6, 2022
1 parent c431dea commit e1b8427
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/system/api/authentication/change.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ int system_authentication_user_apply_changes(system_ctx_t *ctx)
}

// after user changes handle authentication changes

#else
goto error_out;
#endif

goto out;
Expand Down
10 changes: 6 additions & 4 deletions src/system/api/authentication/store.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ int system_authentication_store_user_authorized_key(system_ctx_t *ctx, const cha
}
ssh_dir = opendir(ssh_path_buffer);
if (ssh_dir) {
LL_FOREACH (head, iter){
LL_FOREACH(head, iter)
{
char ssh_data_buffer[PATH_MAX] = {0};
if (snprintf(key_path_buffer, sizeof(key_path_buffer), "%s/%s", ssh_path_buffer, iter->key.name) < 0) {
goto error_out;
Expand All @@ -290,7 +291,8 @@ int system_authentication_store_user_authorized_key(system_ctx_t *ctx, const cha
SRPLG_LOG_ERR(PLUGIN_NAME, "mkdir() error (%d)", error);
goto error_out;
}
LL_FOREACH (head, iter){
LL_FOREACH(head, iter)
{
char ssh_data_buffer[PATH_MAX] = {0};
if (snprintf(key_path_buffer, sizeof(key_path_buffer), "%s/%s", ssh_path_buffer, iter->key.name) < 0) {
goto error_out;
Expand All @@ -303,8 +305,8 @@ int system_authentication_store_user_authorized_key(system_ctx_t *ctx, const cha
fclose(destFile);
}
} else {
SRPLG_LOG_ERR(PLUGIN_NAME, "opendir() failed");
goto error_out;
SRPLG_LOG_ERR(PLUGIN_NAME, "opendir() failed");
goto error_out;
}

goto out;
Expand Down

0 comments on commit e1b8427

Please sign in to comment.