Commit Graph

1500 Commits

Author SHA1 Message Date
Steve Langasek
cebae05a6d Fix debian/rules syntax for arm64 build. 2019-02-10 21:09:14 -08:00
Steve Langasek
2fab563a95 Update VCS to point to salsa. 2019-02-10 21:06:28 -08:00
Steve Langasek
100e3b0cdb Update debian/watch. 2019-02-10 00:15:42 -08:00
Steve Langasek
ab4c731c1d * New upstream release.
- debian/patches/second-stage-path: dropped; the default loader path now
    includes an arch suffix.
  - debian/patches/sbsigntool-no-pesign: dropped; no longer needed.
* Drop remaining patches that were not being applied.
* Sync packaging from Ubuntu:
  - debian/copyright: Update upstream source location.
  - debian/control: add a Build-Depends on libelf-dev.
  - Enable arm64 build.
  - debian/patches/fixup_git.patch: don't run git in clean; we're not
    really in a git tree.
  - debian/rules, debian/shim.install: use the upstream install target as
    intended, and move files to the target directory using dh_install.
  - define RELEASE and COMMIT_ID for the snapshot.
  - Set ENABLE_HTTPBOOT to enable the HTTP Boot feature.
  - Update dh_auto_build/dh_auto_clean/dh_auto_install for new upstream
    options: set MAKELEVEL.
  - Define an EFI_ARCH variable, and use that for paths to shim. This
    makes it possible to build a shim for other architectures than amd64.
  - Set EFIDIR=$distro for dh_auto_install; that will let files be installed
    in the "right" final directories, and makes boot.csv for us.
  - Set ENABLE_SHIM_CERT, to keep using ephemeral self-signed certs built
    at compile-time for MokManager and fallback.
  - Set ENABLE_SBSIGN, to use sbsign instead of pesign for signing fallback
    and MokManager.
2019-02-09 21:32:44 -08:00
Steve Langasek
0d63079c7d null merge of the Ubuntu git history 2019-02-09 21:26:40 -08:00
Mathieu Trudel-Lapierre
9c12130f9c releasing package shim version 15+1533136590.3beb971-0ubuntu1 2018-08-22 14:47:35 -04:00
Mathieu Trudel-Lapierre
d2b378f8a4 Make sure we pass the right COMMIT_ID to build 2018-08-22 10:06:32 -04:00
Mathieu Trudel-Lapierre
637de4775e Update to new snapshot 2018-08-21 14:24:09 -04:00
Mathieu Trudel-Lapierre
7bf7a6d085 New upstream version 15+1533136590.3beb971 2018-08-21 14:22:44 -04:00
Mathieu Trudel-Lapierre
5f81bd7e08 Update upstream source from tag 'upstream/15+1533136590.3beb971'
Update to upstream version '15+1533136590.3beb971'
with Debian dir 26714b7953
2018-08-21 14:22:44 -04:00
Mathieu Trudel-Lapierre
3f6670a920 releasing package shim version 15+1531942534.dd3230d-0ubuntu1 2018-08-14 14:49:36 -04:00
Mathieu Trudel-Lapierre
ad536b8717 debian/patches/fixup_git.patch: don't run git in clean; we're not really in a git tree. 2018-07-24 18:13:48 -04:00
Mathieu Trudel-Lapierre
f42b58fc50 * debian/rules:
- define RELEASE and COMMIT_ID for the snapshot.
  - Set ENABLE_HTTPBOOT to enable the HTTP Boot feature.
2018-07-24 16:39:07 -04:00
Mathieu Trudel-Lapierre
0283a7456e debian/patches/abort_abort_abort.patch: dropped patch, included upstream. 2018-07-24 16:26:53 -04:00
Mathieu Trudel-Lapierre
25f42a7c60 New upstream snapshot. 2018-07-24 16:25:42 -04:00
Mathieu Trudel-Lapierre
f892ac6608 New upstream version 15+1531942534.dd3230d 2018-07-24 16:24:23 -04:00
Mathieu Trudel-Lapierre
ca6b857775 Update upstream source from tag 'upstream/15+1531942534.dd3230d'
Update to upstream version '15+1531942534.dd3230d'
with Debian dir 8b167be003
2018-07-24 16:24:23 -04:00
dann frazier
3802e1ad5a Enable arm64 build. 2018-04-24 12:40:56 -06:00
Steve Langasek
fac86c7403 Fix Vcs link. 2018-04-23 18:09:05 -07:00
Peter Jones
51413d1deb Bump version to 15 2018-04-05 14:49:17 -04:00
Peter Jones
77ebb3d676 Audit get_variable() calls for correct FreePool() use.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-05 14:49:17 -04:00
Peter Jones
36cf41a616 Fix get_variable() usage in setup_verbosity()
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-05 14:49:17 -04:00
Peter Jones
41be168919 Make setup_console(-1) do GetMode() and call it from setup_verbosity()
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-05 14:49:17 -04:00
Peter Jones
510474e72d Make handle_image() use console_print() not console_notify() on success
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-05 14:49:17 -04:00
Peter Jones
bbaa96cdb2 Fix lib/ rebuild-on-change dependencies in the Makefile
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-05 14:49:17 -04:00
Peter Jones
4ffcfdf4da Get rid of dprinta(), it's useless
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-05 14:09:46 -04:00
Peter Jones
15a3480417 tpm_log_event_raw(): be more careful about EFI_NOT_FOUND
Don't return EFI_NOT_FOUND from tpm_log_event*() unless we're in
REQUIRE_TPM mode.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-04 16:49:43 -04:00
Peter Jones
9ab48c0c25 Make the 'something has gone seriously wrong' message less ambiguous
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-04 16:49:43 -04:00
Peter Jones
9bee22310e read_header(): fix the case where signatures have been removed.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-04 16:49:43 -04:00
Peter Jones
ccf9e0efab Add another TODO for shim-16
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-04-04 16:49:43 -04:00
Peter Jones
91229b7703 Add some TODO items for shim-16
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-23 15:06:32 -04:00
Peter Jones
23322362f5 .travis.yml: update travis to get newer gnu-efi.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-23 15:06:32 -04:00
Peter Jones
cdbfb5a69e Revert "Allow shim to handle multiple trusted certificates"
This was merged before it was really ready - verify_trusted_cert needs
to check each certificate against vendor_dbx, "dbx", and "MokListX", or
else it can enable a blacklisted certificate accidentally.

This reverts commit 8721bbe6fb.
2018-03-23 13:55:57 -04:00
Peter Jones
f391e44516 Revert "MokManager: stop using StrnCat"
This reverts commit 6aa5a62515.

Everything Hans said was correct.  But StrnCat() is in gnu-efi 3.0.8,
and using just StrCpy() here confuses coverity.  I'd rather have a CI
page that's not completely full of chaff, but a little bit of redundancy
in the code.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-20 16:28:57 -04:00
Peter Jones
ad6f1747b5 Fix i386 pointer type error.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-19 14:27:58 -04:00
Peter Jones
d737c0273d Avoid a minor scan-build complaint.
scan-build doesn't like it when we assign return values but don't use
them.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-15 11:23:26 -04:00
Peter Jones
138deeff23 Work around clang bugs for scan-build.
I don't think the x86 binaries clang builds will actually work unless
they just infer -maccumulate-outgoing-args from __attribute__((__ms_abi__),
but it's nice to have the analyzer working.

Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-15 11:23:26 -04:00
Peter Jones
bfb6bd7b83 travis: Fix a typo
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-14 18:41:59 -04:00
Peter Jones
8843e6e60d Fix the working directory we start in.
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-14 18:38:50 -04:00
Peter Jones
06ddb2e8f5 Add some configs for CI using github+travis+docker
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-14 18:10:48 -04:00
Michael Brown
8721bbe6fb Allow shim to handle multiple trusted certificates
Allow shim to perform verification against a list of trusted
certificates by simply concatenating the DER files.

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
2018-03-14 13:48:07 -04:00
Michael Brown
d7daa70e0d Allow memory allocated by handle_image() to be freed
There is currently no way for a caller of handle_image() to free the
memory allocated to hold the relocated executable.  Fix by adding the
allocated memory address and number of pages as returned parameters
from handle_image().

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
2018-03-14 13:47:52 -04:00
Michael Brown
0a4c7d5af3 Remove global entry_point variable
Treat entry_point as a returned parameter from handle_image(), rather
than using a global variable.

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
2018-03-14 13:46:19 -04:00
Michael Brown
5b6253c98e Do not modify original image
relocate_coff() currently modifies the PE header within the raw data.
This appears to be unnecessary, and causes a verification failure if a
second attempt is made to verify the same data buffer.

Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
2018-03-14 13:44:45 -04:00
Hans de Goede
6aa5a62515 MokManager: stop using StrnCat
StrnCat is not available in gnu-efi-3.0.5 (I did not check if it does
actually exists in 3.0.6). Moreover using strcat on a buffer where we've
just done: "buf[0] = '\0'" is a bit silly, we might as well drop the 0
termination and just use strcpy.

It seems there also is no StrnCpy in gnu-efi-3.0.5, but we are passing in
a pointer to the end of file_name minus 4, so strcpy will consume only
4 bytes anyways and there is no need for the "n".

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2018-03-13 15:40:44 -04:00
Hans de Goede
7faf9e86c3 console: Fix indentation
The manual merge of the "console: Do not set EFI console to textmode until
something is printed" patch has lead to a bunch of tabs being replaced
with 7 spaces. This commit fixes this.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2018-03-13 15:40:35 -04:00
Hans de Goede
1ff4a36a23 console: Do not set EFI console to textmode until something is printed
Remove the setup_console(1) calls from shim and instead make lib/console.c
make that call when necessary. This avoids shim forcing the EFI console to
switch to text-mode if nothing is printed.

This commit also modifies MokManager to work the same way for consistency,
even though MokManager will always print something.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2018-03-12 18:00:41 -04:00
Hans de Goede
42b1d8832f console: Move setup_console() definition to higher in the file
This is a preparation patch for making setup_console() private.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2018-03-12 18:00:41 -04:00
Hans de Goede
1fe31ee1b4 console: Add console_print and console_print_at helpers
This is a preparation commit for removing the setup_console(1) calls from
MokManager and shim so that we don't force the EFI console to switch to
text-mode.

This commit replaces all direct calls to Print / PrintAt with calls to
the new helpers (no functional changes) so that we can delay calling
setup_console(1) till the first Print call in a follow-up patch.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2018-03-12 18:00:41 -04:00
Peter Jones
d3b7ba1b09 Fix syntastic config for include/
Signed-off-by: Peter Jones <pjones@redhat.com>
2018-03-12 18:00:41 -04:00