Skip to content

Conversation

@cgzones
Copy link
Contributor

@cgzones cgzones commented Oct 30, 2024

No description provided.

@ssahani
Copy link
Collaborator

ssahani commented Nov 5, 2024

needs rebase .

OPEN_SSL_CERTIFICATE_AUTH_MODE_WARN = 1 << 3,
OPEN_SSL_CERTIFICATE_AUTH_MODE_MAX = 1 << 4,
OPEN_SSL_CERTIFICATE_AUTH_MODE_INVALID = -1,
} OpenSSLCertificateAuthMode;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's used by the parser. If we give anything which is not expected parser will set it to invalid. Hence we require this in the enum.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my testing it doesn't:

The default value gets set via

r = manager_new(arg_save_state, arg_cursor, &m);

at
.auth_mode = OPEN_SSL_CERTIFICATE_AUTH_MODE_DENY,
.

And afterwards the configuration file is parsed at

r = manager_parse_config_file(m);

and if TLSCertificateAuthMode= is not specified the value does not change and on an invalid setting, e.g. the empty TLSCertificateAuthMode=, the parser will issue [/etc/systemd/netlogd.conf:4] Failed to parse 'TLSCertificateAuthMode=', ignoring..

In case StructuredData= is set, actually use it and do not override it
with the SYSLOG_STRUCTURED_DATA= parsed data.

Fixes: 205dbe6 ("Actually respect UseSysLogStructuredData= and UseSysLogMsgId= settings")
@ssahani ssahani merged commit 4561586 into systemd:main Nov 6, 2024
1 check passed
@cgzones cgzones deleted the config branch November 6, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants