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
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.4
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Michal Sekletar
QA Contact: Branislav Blaškovič
URL:
Whiteboard:
Depends On:
Blocks: 1088021 74systemd
TreeView+ depends on / blocked
 
Reported: 2017-01-02 12:17 UTC by Michal Sekletar
Modified: 2017-08-01 09:12 UTC (History)
3 users (show)

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


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2297 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):
systemd-219-30.el7_3.6

How reproducible:
always

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);
        
        sd_journal_close(j);
        
        return r;
}
EOF
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
https://github.com/lnykryn/systemd-rhel/pull/75

Comment 2 Lukáš Nykrýn 2017-01-12 09:54:59 UTC
fix merged to upstream staging branch ->
https://github.com/lnykryn/systemd-rhel/commit/0bf93125d4833bcdb7d187543581e4a6c14de159
-> 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.

https://access.redhat.com/errata/RHBA-2017:2297


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