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 1410086 - Race condition when creating /var/log/sudo-io directory
Summary: Race condition when creating /var/log/sudo-io directory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sudo
Version: 7.4
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Daniel Kopeček
QA Contact: Dalibor Pospíšil
URL:
Whiteboard:
Depends On: sudo-rhel7.4-rebase
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-04 12:34 UTC by Patrik Kis
Modified: 2017-08-01 17:27 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1365156
Environment:
Last Closed: 2017-08-01 17:03:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2017 0 normal SHIPPED_LIVE sudo bug fix and enhancement update 2017-08-01 18:02:36 UTC

Description Patrik Kis 2017-01-04 12:34:30 UTC
The problem seems also exists with RHEL-7 version of sudo. Please consider ot fix it.

+++ This bug was initially created as a clone of Bug #1365156 +++

Description of problem:
Customer said that when enabling sudo I/O logging the first commands executed at the same time fails with message "unable to mkdir", i.e. 

Aug  6 20:00:09 <HOSTNAME> sudo:   e6oper : unable to mkdir /var/log/sudo-io : File exists ; TTY=unknown ; PWD=/home/xxx ; USER=root ; COMMAND=/bin/su - ftpzpa --session-command -C /local/adapter/sstpat/tools/KACONSAP_I_01.sh Stop ProcessDown
Aug  6 20:00:09 <HOSTNAME> sudo:   e6oper : TTY=unknown ; PWD=/home/xxxx ; USER=root ; TSID=000001 ; COMMAND=/bin/su - ftpzpa --session-command -C /local/adapter/sstpat/tools/ECONSAP_I_01.sh Stop ProcessDown


Based on the source code, two processes possibility getting to the following point at the same time:

       if (stat(path, &sb) != 0) {
            if (mkdir(path, S_IRWXU) != 0)
                log_fatal(USE_ERRNO, _("unable to mkdir %s"), path);

(taken from plugins/sudoers/iolog.c).

Both processes verify that the directory doesn't exist, 1st process create the directory, the second process mkdir fails.

Comment 1 Tomas Sykora 2017-02-21 10:55:45 UTC
This will be fixed by the rebase in 7.4.

Comment 5 errata-xmlrpc 2017-08-01 17:03:40 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/RHBA-2017:2017

Comment 6 errata-xmlrpc 2017-08-01 17:27:35 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/RHBA-2017:2017


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