Skip to content

Rename follow-up and gcc warning fix - #14813

Merged
yuwata merged 4 commits into
systemd:masterfrom
keszybz:renames-and-null-printf
Feb 7, 2020
Merged

yuwata merged 4 commits into
systemd:masterfrom
keszybz:renames-and-null-printf

Conversation

@keszybz

@keszybz keszybz commented Feb 6, 2020

Copy link
Copy Markdown
Member

No description provided.

Follow-up for ca58d00. I messed
up the "ing" suffix in the regex when doing the initial patch.
../src/core/selinux-access.c: In function ‘mac_selinux_generic_access_check’:
../src/basic/log.h:223:27: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
../src/core/selinux-access.c:235:85: note: format string is defined here
  235 |                         log_warning_errno(errno, "SELinux getcon_raw failed (tclass=%s perm=%s): %m", tclass, permission);
      |                                                                                     ^~

I wonder why nobody ever noticed this.

Fixes systemd#14691 (other issues listed in that ticket have already been fixed).
Instead of setting the bus error structure and then freeing it, let's only set
it if used. If we will ignore the selinux denial, say ", ignore" to make this
clear. Also, use _cleanup_ to avoid gotos.
@keszybz keszybz added this to the v245 milestone Feb 6, 2020
@anitazha anitazha added 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 Feb 7, 2020
@anitazha

anitazha commented Feb 7, 2020

Copy link
Copy Markdown
Member

I wonder why nobody ever noticed this.

Not sure if its our build settings or what, but I feel like gcc should have warned about this when I was building (or maybe the CI should flag this?). But on master I get no warnings :/

Anyways the PR LGTM

@yuwata yuwata added ci-failure-appears-unrelated 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 Feb 7, 2020
@yuwata
yuwata merged commit 1e5e89d into systemd:master Feb 7, 2020
@keszybz
keszybz deleted the renames-and-null-printf branch February 7, 2020 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants