RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1421207 - radiusd does not work with log file specified by -l option
Summary: radiusd does not work with log file specified by -l option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: freeradius
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Nikolai Kondrashov
QA Contact: Jaroslav Aster
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-10 15:38 UTC by Jaroslav Aster
Modified: 2019-03-06 01:09 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 20:38:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1954 0 normal SHIPPED_LIVE freeradius bug fix and enhancement update 2017-08-01 18:29:54 UTC

Description Jaroslav Aster 2017-02-10 15:38:19 UTC
Description of problem:

radiusd does not work with log file specified by -l option. It is a regression, older version works fine.


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

freeradius-3.0.12-1.el7_3


How reproducible:

100%


Steps to Reproduce:

# ls -l /tmp/radius.log
ls: cannot access /tmp/radius.log: No such file or directory
# radiusd -X -l /tmp/radius.log
radiusd: Cannot change ownership of log file /tmp/radius.log: Operation not permitted
# ls -l /tmp/radius.log
-rw-r-----. 1 root root 3665 Feb 10 10:21 /tmp/radius.log

Workaround is create log file first and then change its ownership to radiusd:radiusd.

# touch /tmp/radius.log
# chown radiusd:radiusd /tmp/radius.log
# radiusd -X -l /tmp/radius.log
^C

It appears that radiusd first creates log file as user who run it, write some messages into the log file, then switch to user and group radiusd and then, tries to change ownership of the log file.

strace output:

...
...
setgroups(1, [95])                      = 0
setgid(95)                              = 0
mkdir("/var/log/radius", 0700)          = -1 EEXIST (File exists)
geteuid()                               = 0
setresuid(4294967295, 95, 0)            = 0
geteuid()                               = 95
setrlimit(RLIMIT_CORE, {rlim_cur=0, rlim_max=0}) = 0
fchown(3, 95, 95)                       = -1 EPERM (Operation not permitted)


Actual results:

radiusd does not work with given log file.


Expected results:

radius works with given log file.

Comment 3 Nikolai Kondrashov 2017-02-16 14:05:06 UTC
Issue reported upstream:
https://github.com/FreeRADIUS/freeradius-server/issues/1914

Comment 4 Nikolai Kondrashov 2017-02-16 18:18:19 UTC
Upstream has fixed the issue.

Comment 5 Jaroslav Aster 2017-02-17 13:13:30 UTC
It was fast. Thanks.

Comment 8 errata-xmlrpc 2017-08-01 20:38:04 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/RHEA-2017:1954


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