tlog-rec fails in error when started from a confined user

Solution Verified - Updated -

Issue

  • When trying to execute tlog-rec to record some commands and the user is confined (e.g. to staff_u), the following errors are seen but no AVCs are recorded and the command doesn't execute:

    [staff@vm-rhel8 ~]$ id -Z
    staff_u:staff_r:staff_t:s0-s0:c0.c1023
    
    [staff@vm-rhel8 ~]$ tlog-rec -o log.out echo hello
    Locale charset is ANSI_X3.4-1968 (ASCII)
    Assuming locale environment is lost and charset is UTF-8
    Failed adding a utmp record
    Success
    Failed removing utmp record
    Failed setting up the I/O tap
    

    Here above we can see error messages and no "hello" being displayed, which indicates the command didn't execute at all.

Environment

  • Red Hat Enterprise Linux 8 and 9
    • tlog-rec

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content