Bug 221181 - exportfs doesn't produce any output
exportfs doesn't produce any output
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: selinux-policy-targeted (Show other bugs)
5.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-01-02 14:26 EST by Jeff Layton
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version: RC
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-02-07 21:05:51 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Layton 2007-01-02 14:26:56 EST
The latest version of exportfs in both rhel5 beta and in fc6 doesn't produce any
output. Some sample output:

# showmount -e
Export list for foo.example.com:
/scratch bar.example.com
# exportfs

...the really odd thing is that if I do:

# exportfs | cat
/scratch        bar.example.com

then I get output, so it seems to be something with the output being to a terminal.
Comment 2 RHEL Product and Program Management 2007-01-02 14:40:38 EST
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Jeff Layton 2007-01-02 15:09:30 EST
This is starting to look like a packaging issue. I rebuilt the package on my
workstation and installed it, and it did the exact same thing (no output). Then,
when I go down into the actual build tree and use the unstripped exportfs
binary, it works fine.

If I strip and prelink the binary, it still works fine, so it doesn't seem like
that's the problem.

Also, I'm testing this on x86_64, need to get a normal x86 box and see if it
shows the same problem.
Comment 4 Jeff Layton 2007-01-02 15:55:54 EST
i386 on rhel5 seems to show the same issue, but i386 on fc6 does not.

Comment 5 Jeff Layton 2007-01-02 17:16:38 EST
excerpt from strace of "failing" exportfs command:

fstat64(1, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 3), ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfd5f6f0) = -1 ENOTTY (Inappropriate
ioctl for device)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f6a000
write(1, "/scratch      \ttleilax.poochiere"..., 107) = 107
exit_group(0)                           = ?

excerpt from strace of "working" exportfs command:

fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f18000
write(1, "/scratch      \ttleilax.poochiere"..., 39/scratch            
tleilax.poochiereds.net
) = 39
exit_group(0)                           = ?

I think the fstat and ioctl discrepancy is what's at issue here.
Comment 6 Jeff Layton 2007-01-03 13:44:49 EST
The issue seems to be due to selinux.

When I run "setenforce 0", then it works just fine. I'm not getting any avc
messages in the ring buffer, however so it's not clear to me that this is a
policy issue.
Comment 7 Daniel Walsh 2007-01-05 16:44:06 EST
Fixed in  selinux-policy-2.4.6-24

You should be able to chcon -t sbin_t /usr/sbin/exportfs
Comment 9 RHEL Product and Program Management 2007-02-07 21:05:51 EST
A package has been built which should help the problem described in 
this bug report. This report is therefore being closed with a resolution 
of CURRENTRELEASE. You may reopen this bug report if the solution does 
not work for you.

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