Bug 1550745
Summary: | Running `rpm --setugids iputils` removes the capabilities flags from ping, arping and clockdiff | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Trevor Hemsley <trevor.hemsley> |
Component: | rpm | Assignee: | Pavlina Moravcova Varekova <pmoravco> |
Status: | CLOSED ERRATA | QA Contact: | Eva Mrakova <emrakova> |
Severity: | medium | Docs Contact: | Marie Hornickova <mdolezel> |
Priority: | medium | ||
Version: | 7.4 | CC: | dmach, emrakova, mdolezel, mdomonko, pasik, pmatilai, pmoravco |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | rpm-4.11.3-36.el7 | Doc Type: | Bug Fix |
Doc Text: |
.The `rpm` command now supports the `--setcaps` and `--restore` options
This update introduces the `--setcaps` and `--restore` options for the `rpm` command.
The `--setcaps` option sets capabilities of files in a required package. The syntax is as follows:
rpm --setcaps _PACKAGE_NAME_
The `--restore` option restores owner, group, permissions, and capabilities of files in a required package. The syntax is as follows:
rpm --restore _PACKAGE_NAME_
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2019-08-06 13:11:23 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: | |||
Bug Depends On: | |||
Bug Blocks: | 1630909, 1630918 |
Description
Trevor Hemsley
2018-03-02 00:01:37 UTC
Yes, --setugids strips suid/sgid bits and capabilities, just like chown/chgrp do because that's all --setugids does. Because of that, you need to run --setperms afterwards, but that's not capability-aware and there's no --setcaps at all. So this is actually expected behavior from the implementation POV, user expectations may differ... --setugids and --setperms seemed like nifty tricks with popt back in the turn of millenium, these days people expect more and there's a growing list of bugs and RFE's all of which require reimplementing the simplistic popt-hack with an actual C implementation. Very unlikely to happen in RHEL 7 though, --setcaps or such might be doable. Upstream commit here: https://github.com/rpm-software-management/rpm/commit/af1fcf0b0a7c093e3d926680fe73fcf2077fd57c Fix of the upstream commit: https://github.com/rpm-software-management/rpm/commit/b4178c979fff344a1c5142a305f274dd9aff8f45 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/RHEA-2019:2259 |