Skip to content

varlink: varlink_error_invalid_parameter(...) always returns EINVAL - #22750

Merged
yuwata merged 1 commit into
systemd:mainfrom
vchillara:varlink-error-invalid-param-fix
Mar 17, 2022
Merged

yuwata merged 1 commit into
systemd:mainfrom
vchillara:varlink-error-invalid-param-fix

Conversation

@vchillara

Copy link
Copy Markdown
Contributor

varlink_error(...) expects a json object as the third parameter. Passing a string variant causes
parameter sanitization to fail, and it returns -EINVAL. Pass object variant instead.

Comment thread src/shared/varlink.c Resolved
Comment thread src/shared/varlink.c Resolved
@poettering poettering added reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks varlink labels Mar 15, 2022
Comment thread src/shared/varlink.c Resolved
Comment thread src/shared/varlink.c Resolved
@vchillara
vchillara force-pushed the varlink-error-invalid-param-fix branch from 06b2e53 to 50bf6d3 Compare March 16, 2022 08:56
@vchillara
vchillara requested review from poettering and yuwata March 16, 2022 09:01
@vchillara
vchillara force-pushed the varlink-error-invalid-param-fix branch from 50bf6d3 to 7db0e13 Compare March 16, 2022 11:27
@vchillara
vchillara requested a review from bluca March 16, 2022 11:29
Comment thread src/shared/varlink.c Resolved
@vchillara
vchillara force-pushed the varlink-error-invalid-param-fix branch from 7db0e13 to 5af1bdb Compare March 16, 2022 11:35
@bluca bluca added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed reviewed/needs-rework 🔨 PR has been reviewed and needs another round of reworks labels Mar 16, 2022
@poettering poettering added good-to-merge/with-minor-suggestions and removed good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed labels Mar 16, 2022
@poettering

Copy link
Copy Markdown
Member

looks good, just one minor simplifcation please

varlink_error(...) expects a json object as the third parameter. Passing a string variant causes
parameter sanitization to fail, and it returns -EINVAL. Pass object variant instead.
@vchillara
vchillara force-pushed the varlink-error-invalid-param-fix branch from 5af1bdb to 2facb54 Compare March 17, 2022 06:20
@bluca bluca added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed good-to-merge/with-minor-suggestions labels Mar 17, 2022
@poettering

Copy link
Copy Markdown
Member

lgtm, too

@yuwata
yuwata merged commit e8aba09 into systemd:main Mar 17, 2022
@keszybz keszybz removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

5 participants