Skip to content

Commit

Permalink
Merge pull request #148 from yast/secure_boot_fix
Browse files Browse the repository at this point in the history
Secure boot fix
  • Loading branch information
jreidinger committed Aug 27, 2014
2 parents a6cf68a + 3756fa7 commit 1d58d60
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 18 deletions.
7 changes: 7 additions & 0 deletions package/yast2-bootloader.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Aug 27 07:53:45 UTC 2014 - jreidinger@suse.com

- do not reset secure boot to false at the end of installation in
case of incapable device (bnc#892032)
- 3.1.91

-------------------------------------------------------------------
Tue Aug 26 11:37:17 UTC 2014 - jreidinger@suse.com

Expand Down
2 changes: 1 addition & 1 deletion package/yast2-bootloader.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: yast2-bootloader
Version: 3.1.90
Version: 3.1.91
Release: 0

BuildRoot: %{_tmppath}/%{name}-%{version}-build
Expand Down
19 changes: 2 additions & 17 deletions src/modules/BootCommon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -893,22 +893,6 @@ def setLoaderType(bootloader)
nil
end

def checkSecureBoot
ret = false
sbvar = "/sys/firmware/efi/vars/SecureBoot-8be4df61-93ca-11d2-aa0d-00e098032b8c/data"
sbvar_avail = 0 ==
Convert.to_integer(
SCR.Execute(path(".target.bash"), Ops.add("test -e ", sbvar))
)

if sbvar_avail
cmd = Builtins.sformat("test `od -An -N1 -t u1 %1` -eq 1", sbvar)
ret = 0 == Convert.to_integer(SCR.Execute(path(".target.bash"), cmd))
end

ret
end

def getSystemSecureBootStatus(recheck)
return @secure_boot if !recheck && @secure_boot != nil

Expand All @@ -923,7 +907,8 @@ def getSystemSecureBootStatus(recheck)
end
end

@secure_boot = checkSecureBoot
# propose secure boot always to true (bnc#872054), otherwise respect user choice
@secure_boot = true if @secure_boot.nil?
@secure_boot
end

Expand Down

0 comments on commit 1d58d60

Please sign in to comment.