Bug 582929

Summary: mknod doesn't check for invalid mode
Product: [Community] Virtualization Tools Reporter: Yufang Zhang <yuzhang>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-12 12:26:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yufang Zhang 2010-04-16 07:48:34 UTC
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 19:12:09 UTC
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 22:25:37 UTC
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 12:42:28 UTC
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-21 00:31:20 UTC
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.