Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bc36e21

Browse files
authored
Merge pull request PacktPublishing#1 from gregbuchholz/lkm_script_perms
The "lkm" script fails on dmesg permissions
2 parents be3ac7a + fe3d8d8 commit bc36e21

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lkm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,7 @@ runcmd "make || exit 1"
4949
}
5050

5151
runcmd "sudo insmod ./$1.ko && lsmod|grep $1"
52-
runcmd dmesg
52+
# Ubuntu 20.10 onward has enabled CONFIG_SECURITY_DMESG_RESTRICT ! That's good for security
53+
# So we need to 'sudo' dmesg; thanks to @gregbuchholz for pointing this out
54+
runcmd "sudo dmesg"
5355
exit 0

0 commit comments

Comments
 (0)