Bug 1268314

Summary: journalctl --file does load file which has backslash in filename
Product: Red Hat Enterprise Linux 7 Reporter: Branislav Blaškovič <bblaskov>
Component: systemdAssignee: systemd-maint
Status: CLOSED WONTFIX QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.3CC: systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-15 07:37:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Branislav Blaškovič 2015-10-02 13:40:14 UTC
Description of problem:
systemd-journal-remote --url http://... generated .journal files which looks like this:
    remote-localhost\:19531\\x2f.journal
I just found out that it is not so easy to load this journal via journalctl --file.

If you use  bash autocomplete (tab) on this filename, it generates:
    # journalctl --file /var/log/journal/remote/remote-localhost\:19531\\x2f.journal 
    Failed to add paths: No such file or directory
I also tried:
   # journalctl --file '/var/log/journal/remote/remote-localhost\:19531\x2f.journal'
   Failed to add paths: No such file or directory
The only working variant is:
   # journalctl --file /var/log/journal/remote/remote-localhost\:19531\\\\x2f.journal
This is really odd.



Version-Release number of selected component (if applicable):
systemd-219-17.el7.x86_64


Steps to Reproduce:
    1. touch a\\b.journal
    2. journalctl --file a\\b.journal

Actual results:
    Failed to add paths: No such file or directory


Expected results:
    journalctl can find this file

Additional info:
    I think, bug is somewhere in shared/util.c - function glob_extend().

Comment 4 RHEL Program Management 2020-12-15 07:37:14 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.