Project

General

Profile

Actions

Bug #1572

closed

DFBSD 2.5.0 - securelevel not working?

Added by ahuete.devel about 15 years ago. Updated about 15 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hi all,

Maybe I'm doing something wrong, but securelevel(8) seems to be non-working.
I've done the following:

  1. grep secure /etc/rc.conf
    kern_securelevel="2"
  2. sysctl kern.securelevel
    kern.securelevel: 2
  3. ktrace ./od
    Descriptor is 3
  4. kdump -f ./ktrace.out
    ...
    892 od CALL open(0x8048687,O_RDWR,<unused>0x804977c)
    892 od NAMI "/dev/da0s1d"
    892 od RET open 3
    ...

I could open it for read-write! Following the definition in the
manpage for secure level 2:

"2 Highly secure mode - same as secure mode, plus disks may not be
opened for writing (except by mount(2)) whether mounted or not.
This level precludes tampering with file systems by unmounting
them, but also inhibits running newfs(8) while the system is multi-
user."

Am I missing something or securelevel is not working here?

Cheers,
Antonio Huete

Actions #1

Updated by alexh about 15 years ago

Is anything else related to securelevel not working? I might have broken
something related to that when rewriting the disk subsystem.
Am a bit busy at the time, so I won't be able to look at it for a few days.

Cheers,
Alex Hornung

Actions #2

Updated by tuxillo about 15 years ago

Hi,

Can you please review this commit? It fixes the issue here, but maybe I'm
missing something.

http://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commit/890fd790e7c4db3805995b2f77c4392e95062b02

Actions #3

Updated by tuxillo about 15 years ago

Actions #4

Updated by tuxillo about 15 years ago

Committed a fix in d894b0eb3f9e4c41a183cdbfa6c59de4208958a4

Actions #5

Updated by thomas.nikolajsen about 15 years ago

Update status; issue fixed, as noted in prev. msg.

Actions

Also available in: Atom PDF