Skip to content

Commit a139804

Browse files
committed
hook: Suppress a const warning for setfilecon
It's historical baggage that `security_context_t` isn't just a typedef for *const* `char*` as far as I know.
1 parent 5ab1f47 commit a139804

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/systemdhook.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ static int prestart(const char *rootfs,
410410
}
411411

412412
if (strcmp("", mount_label)) {
413-
rc = setfilecon(journal_dir, mount_label);
413+
rc = setfilecon(journal_dir, (security_context_t)mount_label);
414414
if (rc < 0) {
415415
pr_perror("Failed to set journal dir selinux context");
416416
return -1;

0 commit comments

Comments
 (0)