Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two small fixes #532

Merged
merged 2 commits into from
Dec 19, 2024
Merged

Two small fixes #532

merged 2 commits into from
Dec 19, 2024

Conversation

bluca
Copy link
Member

@bluca bluca commented Dec 15, 2024

No description provided.

@jrybar-rh
Copy link
Member

jrybar-rh commented Dec 17, 2024

The change in pkcheck is welcome, but what's the rationale for the return value?
Also, it seems that the change breaks e.g.:

pid_late = polkit_unix_process_get_pid (POLKIT_UNIX_PROCESS (process));

The allowed values start at 0, so glib complains:

GLib-GObject-CRITICAL **: 15:46:56.302: value -1 of type 'gint' is invalid or out of range for property 'pid' of type 'gint'
Error opening `/proc/0/cmdline': Failed to open file ?/proc/0/cmdline?: No such file or directory
@bluca
Copy link
Member Author

bluca commented Dec 17, 2024

The property is defined with a min var of 0, so there's a warning printed as the commit id shows:

See for example here where it's passed directly to g_variant_new_uint32:

https://github.com/polkit-org/polkit/blob/main/src/polkit/polkitsubject.c#L313

I've fixed that one case, everything else checks <= 0 for validity

@bluca
Copy link
Member Author

bluca commented Dec 18, 2024

Can we merge this, then? Thanks

@jrybar-rh
Copy link
Member

Can we merge this, then? Thanks

We sure can and we probably will, on today's meeting :)

@jrybar-rh jrybar-rh merged commit 9cb761d into polkit-org:main Dec 19, 2024
30 checks passed
@bluca bluca deleted the fixes branch December 19, 2024 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants