Bug 582929 - mknod doesn't check for invalid mode
mknod doesn't check for invalid mode
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-16 03:48 EDT by Yufang Zhang
Modified: 2010-05-20 20:31 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-12 08:26:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Yufang Zhang 2010-04-16 03:48:34 EDT
Description of problem:
When create device file via mknod with invalid mode, it just succeeds but not reports any error. This is quite like the situation in BZ #582901.

Version-Release number of selected component (if applicable):
libguestfs-1.0.85-1.fc12.3.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. ><fs> mknod-b 066666  8 1 /sd
mknod_b 28086 8 1 "/sd"
send_to_daemon: 0x25eb050 g->state = 3, n = 48
recv_from_daemon: 0x25eb050 g->state = 3, size_rtn = 0x7fffdb87b84c, buf_rtn = 0x7fffdb87b840
proc 135 (mknod_b) took 0.03 seconds

2. ><fs> ll /sd
ll "/sd"
send_to_daemon: 0x25eb050 g->state = 3, n = 36
recv_from_daemon: 0x25eb050 g->state = 3, size_rtn = 0x7fffdb87b86c, buf_rtn = 0x7fffdb87b860
ls -la /sysroot/sd
proc 5 (ll) took 0.00 seconds
brwSr-Sr-- 1 root root 8, 1 Apr 16 07:45 /sysroot/sd

3.
  
Actual results:


Expected results:
When you use a invalid mode, mknod should exit and report error.

Additional info:
Comment 2 Fedora Update System 2010-04-20 15:12:09 EDT
libguestfs-1.2.3-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/libguestfs-1.2.3-1.el5
Comment 3 Fedora Update System 2010-04-20 18:25:37 EDT
libguestfs-1.2.3-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/libguestfs-1.2.3-1.fc13
Comment 4 Fedora Update System 2010-04-21 08:42:28 EDT
libguestfs-1.2.3-1.fc12.6 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/libguestfs-1.2.3-1.fc12.6
Comment 5 Fedora Update System 2010-05-20 20:31:20 EDT
libguestfs-1.2.3-1.el5 has been pushed to the Fedora EPEL 5 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.