DragonFly BSD
DragonFly bugs List (threaded) for 2009-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

[issue1570] HAMMER: you can newfs a mounted hammer device


From: "Antonio Huete Jimenez \(via DragonFly issue tracker\)" <sinknull@xxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 18 Oct 2009 19:08:45 +0000

Antonio Huete Jimenez <tuxillo@quantumachine.net> added the comment:

Finally I did last changes by request:
http://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff/87b0928085ae33591193b69255bd35cc46e5a5ed

I've tested it and it seems to work:

Writing to R/O is permitted.
-------------------------------------------------
vmware# mount -o ro /dev/da0s1d /mnt/test/
vmware# ./testwrite da0s1d
Opened /dev/da0s1d for writing: fd 3

Writing to R/W not allowed
-------------------------------------
vmware# umount /mnt/test/
vmware# mount -o rw /dev/da0s1d /mnt/test/
vmware# ./testwrite ad0s1a
/dev/ad0s1a opening failed
open: Device busy

When securelevel set >= 1, no writing allowed
-------------------------------------------------
vmware# umount /mnt/test/
vmware# mount -o ro /dev/da0s1d /mnt/test/
vmware# sysctl kern.securelevel=1
kern.securelevel: -1 -> 1
vmware# ./testwrite da0s1d
/dev/da0s1d opening failed
open: Operation not permitted

_____________________________________________________
DragonFly issue tracker <bugs@lists.dragonflybsd.org>
<http://bugs.dragonflybsd.org/issue1570>
_____________________________________________________



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]