This service will be undergoing maintenance at 20:00 UTC, 2017-04-03. It is expected to last about 30 minutes
Bug 236746 - xfs_quota tries to open devicefiles & pipes
xfs_quota tries to open devicefiles & pipes
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: xfsprogs (Show other bugs)
6
All Linux
medium Severity medium
: ---
: ---
Assigned To: Eric Sandeen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-17 10:39 EDT by Leo Baltus
Modified: 2007-11-30 17:12 EST (History)
2 users (show)

See Also:
Fixed In Version: 2.8.21-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-08-24 01:36:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Fixes input of a projectid which starts whith a digit (469 bytes, patch)
2007-04-18 12:26 EDT, Leo Baltus
no flags Details | Diff
Fixes this bug (for me) (790 bytes, patch)
2007-04-18 12:28 EDT, Leo Baltus
no flags Details | Diff

  None (edit)
Description Leo Baltus 2007-04-17 10:39:29 EDT
Description of problem:
xfs_quota -x -c "project -s $name" opens divices pipes etc., not smart

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

How reproducible:
always.


Steps to Reproduce:
cat <<eof >/etc/projects
1:/d/1/foo
eof

cat <<eof >/etc/projid
bar:1
eof
mkdir -p /d/1
mklv --size 1G  -n quotatest rootvg
mkfs -t xfs -f /dev/rootvg/quotatest
mount -o prjquota /dev/rootvg/quotatest /d/1
mkdir -p /d/1/foo
mknod /d/1/foo/null c 1 3
mknod /d/1/foo/pipe p 
xfs_quota -x -c 'project -s naam1' /d/1
xfs_quota: cannot get flags on /d/1/foo/null: Inappropriate ioctl for device
<xfs_quota hangs on pipe>

strace:
open("/d/1/foo/pipe", O_RDONLY|O_NOCTTY|O_LARGEFILE <unfinished ...>

  
Actual results:


Expected results:


Additional info:
Comment 1 Leo Baltus 2007-04-18 12:26:09 EDT
Created attachment 152924 [details]
Fixes input of a projectid which starts whith a digit

xfs_quota -x -c "project -s 123foo" would result in a lookup for directories
belonging to project 123
Comment 2 Leo Baltus 2007-04-18 12:28:52 EDT
Created attachment 152925 [details]
Fixes this bug (for me)

I have added a lstat and a check routine to prevent devices, sockets, fifos and
symlinks from beeing opened, instead it reports
xfs_quota: skipping special file /d/0/foo/bar
Comment 3 Eric Sandeen 2007-04-19 22:44:10 EDT
see also http://oss.sgi.com/bugzilla/show_bug.cgi?id=754
Comment 4 Donald Douwsma 2007-05-17 04:04:44 EDT
This has been fixed upstream. 
Currently available in cvs at oss.sgi.com and will be 
in next xfsprogs tarball. 

Modid:  master-melb:xfs-cmds:28597a
xfsprogs/doc/CHANGES - 1.238 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsprogs/doc/CHANGES.diff?r1=text&tr1=1.238&r2=text&tr2=1.237&f=h
xfsprogs/quota/project.c - 1.5 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-cmds/xfsprogs/quota/project.c.diff?r1=text&tr1=1.5&r2=text&tr2=1.4&f=h
Comment 5 Eric Sandeen 2007-07-05 15:12:42 EDT
I've put xfsprogs-2.6.21, which containst his fix, into the devel cvs
repository, see http://koji.fedoraproject.org/koji/buildinfo?buildID=10460

I'll get it out to FC updates at some point...

Thanks,

-Eric
Comment 6 Fedora Update System 2007-07-27 01:52:25 EDT
xfsprogs-2.8.21-1.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
Comment 7 Fedora Update System 2007-08-24 01:36:03 EDT
xfsprogs-2.8.21-1.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.

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