[pbs-devel] applied: [PATCH proxmox-mail-forward] pbs user config: allow parsing unknown sections

Wolfgang Bumiller w.bumiller at proxmox.com
Mon Nov 28 09:33:09 CET 2022


applied, thanks

On Fri, Nov 25, 2022 at 04:15:36PM +0100, Fiona Ebner wrote:
> Previously, configs with entries for tokens could not be parsed
> successfully, so extracting the mail for the root user failed.
> 
> Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
> ---
> 
> Dependency bump for proxmox-section-config needed.
> 
>  src/main.rs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/main.rs b/src/main.rs
> index d53a1b4..f3d4193 100644
> --- a/src/main.rs
> +++ b/src/main.rs
> @@ -46,7 +46,7 @@ fn normalize_for_return(s: Option<&str>) -> Option<String> {
>  
>  /// Extract the root user's email address from the PBS user config.
>  fn get_pbs_mail_to(content: &str) -> Option<String> {
> -    let mut config = SectionConfig::new(&DUMMY_ID_SCHEMA);
> +    let mut config = SectionConfig::new(&DUMMY_ID_SCHEMA).allow_unknown_sections(true);
>      let user_plugin = SectionConfigPlugin::new(
>          "user".to_string(),
>          Some("userid".to_string()),
> -- 
> 2.30.2





More information about the pbs-devel mailing list