Skip to content

Commit

Permalink
add sshd_patch_variables
Browse files Browse the repository at this point in the history
  • Loading branch information
smx-smx committed Apr 18, 2024
1 parent e3bcc30 commit b63113c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
23 changes: 21 additions & 2 deletions xzre.h
Original file line number Diff line number Diff line change
Expand Up @@ -1474,11 +1474,11 @@ enum CommandFlags1 {
/**
* @brief the data block contains 8 additional bytes
*/
CMDF_8BYTES = 1 << 0,
CMDF_8BYTES = 0x1,
/**
* @brief disable all logging by setting mask 0x80000000
*/
CMDF_SETLOGMASK = 1 << 2,
CMDF_SETLOGMASK = 0x4,
/**
* @brief if set, disables PAM authentication
*/
Expand Down Expand Up @@ -2882,6 +2882,25 @@ extern BOOL verify_signature(
global_context_t *global_ctx
);

/**
* @brief Patches the sshd configuration
*
* @param skip_root_patch TRUE to keep current configuration, FALSE to enable root login
* @param disable_pam TRUE to disable PAM, FALSE to keep current configuration
* @param replace_monitor_reqtype TRUE to replace the `type` field in `struct mon_table`
* for `MONITOR_REQ_AUTHPASSWORD`. FALSE to increment it by 1 (from `MONITOR_REQ_AUTHPASSWORD` to `MONITOR_ANS_AUTHPASSWORD`)
* @param monitor_reqtype the new value to apply, if @p replace_monitor_reqtype is TRUE
* @param global_ctx
* @return BOOL TRUE if successful, FALSE if modifications couldn't be applied
*/
extern BOOL sshd_patch_variables(
BOOL skip_root_patch,
BOOL disable_pam,
BOOL replace_monitor_reqtype,
int monitor_reqtype,
global_context_t *global_ctx
);

/**
* @brief counts the number of times the IFUNC resolver is called
*
Expand Down
1 change: 1 addition & 0 deletions xzre.lds.in
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ SECTIONS_BEGIN()
DEFSYM_END(.text.lzma_file_info_decodea)
DEFSYM(sha256, .text.lzma_easy_encodea)
DEFSYM(verify_signature, .text.lzma_index_dua)
DEFSYM(sshd_patch_variables, .text.lzma_block_unpadded_siza)
SECTIONS_END(.text)

SECTIONS_BEGIN()
Expand Down

0 comments on commit b63113c

Please sign in to comment.