Bug 1409527 - sd_journal_has_{runtime,persistent}_files APIs are not usable by applications
Summary: sd_journal_has_{runtime,persistent}_files APIs are not usable by applications
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.4
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Michal Sekletar
QA Contact: Branislav Blaškovič
Depends On:
Blocks: 1088021 74systemd
TreeView+ depends on / blocked
Reported: 2017-01-02 12:17 UTC by Michal Sekletar
Modified: 2021-03-11 14:53 UTC (History)
3 users (show)

Fixed In Version: systemd-219-31.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2017-08-01 09:12:22 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2297 0 normal SHIPPED_LIVE systemd bug fix and enhancement update 2017-08-01 12:40:16 UTC

Description Michal Sekletar 2017-01-02 12:17:47 UTC
Description of problem:
In commit https://github.com/lnykryn/systemd-rhel/commit/5ec508cc5c13d831c93ce98d84b1d9cedb0117a7 we have added two new APIs. These APIs are now used internally from journalctl. Despite being marked as _public_, we do not export them because they've never been added to respective .sym file. There are applications that would like to make use of them, e.g. rsyslog's imjournal module.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. yum install -y systemd-devel
2. cat > /tmp/sd-journal-has-persistent-files.c << EOF
#include <stdio.h>
#include <systemd/sd-journal.h>

int main() {
        int r;
        sd_journal *j;
        sd_journal_open(&j, SD_JOURNAL_LOCAL_ONLY);
        r = sd_journal_has_persistent_files(j);
        return r;
3. gcc /tmp/sd-journal-has-persistent-files.c -lsystemd
4. ./a.out
5. echo $?

Actual results:
Compilation (step 3) returns following error,
/tmp/cco975MF.o: In function `main':
sd-journal-has-persistent.c:(.text+0x21): undefined reference to `sd_journal_has_persistent_files'
collect2: error: ld returned 1 exit status

Expected results:
Compilation and execution are successful

Additional info:
We need to backport https://github.com/systemd/systemd/commit/9a07f779bbeacc3358d405f6cf583506aaf655ae or came up with similar patch due to different versioning between upstream and RHEL7.

Comment 1 Michal Sekletar 2017-01-05 08:35:59 UTC

Comment 2 Lukáš Nykrýn 2017-01-12 09:54:59 UTC
fix merged to upstream staging branch ->
-> post

Comment 5 errata-xmlrpc 2017-08-01 09:12:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.