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 1336565 - Pulseaudio fails with "Failed to create secure directory:" when it doesn't need to
Summary: Pulseaudio fails with "Failed to create secure directory:" when it doesn't ne...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pulseaudio
Version: 6.9
Hardware: All
OS: All
unspecified
low
Target Milestone: rc
: ---
Assignee: Wim Taymans
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-16 21:59 UTC by Marc Mengel
Modified: 2017-03-21 09:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1442155 (view as bug list)
Environment:
Last Closed: 2017-03-21 09:33:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch with recommended fix (693 bytes, patch)
2016-05-16 21:59 UTC, Marc Mengel
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0614 0 normal SHIPPED_LIVE pulseaudio bug fix update 2017-03-21 12:27:48 UTC

Description Marc Mengel 2016-05-16 21:59:18 UTC
Created attachment 1158100 [details]
Patch with recommended fix

Description of problem:

On an NFS mounted home area, where chgrp is effectively ignored,
pulseaudio fails to start because it can't change the group id
on a directory it already made mode 0700.

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

pulseaudio-0.9.21-21

How reproducible:


Steps to Reproduce:
1. Get an NFS mounted home directory where chgrp doesn't do anything
2. run "pulseaudio"


Actual results:

Error:
Failed to create secure directory


Expected results:

Audio daemon starts, so you can play sounds.


Additional info:
If you look at the strace output:

stat("/nashome/m/mengel", {st_mode=S_IFDIR|S_ISGID|0755, st_size=124928, ...}) = 0
getuid()                                = 1733
umask(077)                              = 022
mkdir("/nashome/m/mengel/.pulse", 0700) = -1 EEXIST (File exists)
umask(022)                              = 077
open("/nashome/m/mengel/.pulse", O_RDONLY|O_NOCTTY|O_NOFOLLOW|O_CLOEXEC) = 4
fstat(4, {st_mode=S_IFDIR|0700, st_size=2048, ...}) = 0
getuid()                                = 1733
getgid()                                = 500
fchown(4, 1733, 500)                    = -1 EPERM (Operation not permitted)
fchmod(4, 0700)                         = 0
close(4)                                = 0
lstat("/nashome/m/mengel/.pulse", {st_mode=S_IFDIR|0700, st_size=2048, ...}) = 0
rmdir("/nashome/m/mengel/.pulse")       = -1 ENOTEMPTY (Directory not empty)
ioctl(2, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
write(2, "E: core-util.c: \33[1;31mFailed to"..., 80) = 80
close(3)                                = 0
exit_group(1)                           = ?
+++ exited with 1 +++

You can see that it re-stats the directory after trying to rebuild it,
and fails because the fchmod is ignored.

So basically, it ought not care what the group-id's are when it's making 
the directory mode 0700; it's moot.  The attached patch only checks
the group-id if the mode has group bits set in it; so it still checks if
it is in shared-daemon mode and doing group pulseaudio, but not if it's 0700
for a single user.

Comment 7 errata-xmlrpc 2017-03-21 09:33:17 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://rhn.redhat.com/errata/RHBA-2017-0614.html


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