Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1690529 - insights client runs userhelper (sudo), although insights-client is running as root
Summary: insights client runs userhelper (sudo), although insights-client is running a...
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat Insights
Classification: Red Hat
Component: Client
Version: unspecified
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: jcrafts
QA Contact: Jeff Needle
Kevin Blake
URL:
Whiteboard:
Depends On:
Blocks: 1122832
TreeView+ depends on / blocked
 
Reported: 2019-03-19 16:07 UTC by Oliver Falk
Modified: 2019-04-16 05:40 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)

Description Oliver Falk 2019-03-19 16:07:24 UTC
Description of problem:
Insights Client calls userhelper to run subscription-manager, although insights-client is running as root.


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


How reproducible: Always


Steps to Reproduce:
1. Start insights-client:
   # sudo systemctl start insights-client.service
2. Check logs:
   # sudo systemctl status insights-client.service

Actual results:

    # sudo systemctl status insights-client.service
    ● insights-client.service - Insights Client
       Loaded: loaded (/usr/lib/systemd/system/insights-client.service; static; vendor preset: disabled)
       Active: inactive (dead) since Mon 2019-03-18 13:15:58 UTC; 3min 14s ago
         Docs: man:insights-client(8)
      Process: 22335 ExecStartPost=/bin/bash -c echo 1G > /sys/fs/cgroup/memory/system.slice/insights-client.service/memory.soft_limit_in_bytes (code=exited, status=0/SUCCESS)
      Process: 22334 ExecStartPost=/bin/bash -c echo 2G > /sys/fs/cgroup/memory/system.slice/insights-client.service/memory.memsw.limit_in_bytes (code=exited, status=0/SUCCESS)
      Process: 22333 ExecStart=/usr/bin/insights-client --retry 3 (code=exited, status=0/SUCCESS)
     Main PID: 22333 (code=exited, status=0/SUCCESS)

    Mar 18 13:15:10 xxx insights-client[22333]: WARNING: Excluding data from files
    Mar 18 13:15:10 xxx insights-client[22333]: Starting to collect Insights data for xxx.xxx.xxxxxxx.com
    Mar 18 13:15:38 xxx userhelper[23427]: pam_timestamp(subscription-manager:session): updated timestamp file `/var/run/sudo/root/unknown'
    Mar 18 13:15:38 xxx userhelper[23430]: running '/usr/sbin/subscription-manager identity' with root privileges on behalf of 'root'
    Mar 18 13:15:39 xxx userhelper[23437]: pam_timestamp(subscription-manager:session): updated timestamp file `/var/run/sudo/root/unknown'
    Mar 18 13:15:39 xxx userhelper[23440]: running '/usr/sbin/subscription-manager release --show' with root privileges on behalf of 'root'
    Mar 18 13:15:40 xxx userhelper[23447]: pam_timestamp(subscription-manager:session): updated timestamp file `/var/run/sudo/root/unknown'
    Mar 18 13:15:40 xxx userhelper[23450]: running '/usr/sbin/subscription-manager repos --list-enabled' with root privileges on behalf of 'root'
    Mar 18 13:15:54 xxx insights-client[22333]: Uploading Insights data.
    Mar 18 13:15:58 xxx insights-client[22333]: Successfully uploaded report from f457fbb8-e3f3-4f4c-a029-f679caf8a227 to account 694947.



Expected results:

Insights Client shouldn't call userhelper if anyway running as root.


Additional info:
Customer case will be attached.


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