Warner Losh
b144e70a33
Remove $FreeBSD$: two-line nroff pattern
...
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
Similar commit in main:
(cherry picked from commit fa9896e082
)
2023-08-23 11:43:31 -06:00
Warner Losh
023fc80ee3
Remove $FreeBSD$: one-line sh pattern
...
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
Similar commit in main:
(cherry picked from commit d0b2dbfa0e
)
2023-08-23 11:43:30 -06:00
Warner Losh
3d497e17eb
Remove $FreeBSD$: one-line .c pattern
...
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
Similar commit in main:
(cherry picked from commit 1d386b48a5
)
2023-08-23 11:43:26 -06:00
Warner Losh
17da660ad5
Remove $FreeBSD$: two-line .h pattern
...
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
Similar commit in main:
(cherry picked from commit b3e7694832
)
2023-08-23 11:43:21 -06:00
Warner Losh
caa41f6417
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
...
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix
(cherry picked from commit 4d846d260e
)
2023-07-25 09:13:49 -06:00
Eric van Gyzen
f3629ca2f5
uefisign: handle empty sections
...
loader.efi has an empty set_Xfic section. Handle it correctly.
```
Sections:
Idx Name Size VMA LMA File off Algn
[...]
3 set_Xcom 00000168 00000000000d4000 00000000000d4000 000d0e00 2**2
CONTENTS, ALLOC, LOAD, DATA
4 set_Xfic 00000000 00000000000d4168 00000000000d4168 00000000 2**2
ALLOC, LOAD, DATA
5 .sdata 00000448 00000000000d5000 00000000000d5000 000d1000 2**2
CONTENTS, ALLOC, LOAD, DATA
[...]
```
Reviewed by: trasz, dab
Reported by: andy.y.liu@dell.com
Tested by: andy.y.liu@dell.com
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D29606
(cherry picked from commit 12db51d208
)
2022-03-02 15:56:30 -06:00
Eric van Gyzen
858c11b39c
uefisign: fix handling of errors from child proc
...
Close the unused pipe file descriptors so the parent will notice if
the child exits prematurely. Previously, the parent would block
forever on a read from the pipe.
$ uefisign -c foo.cert -k foo.key -o loader.efi loader.efi.unsigned
uefisign: section points inside the headers
load: 0.06 cmd: uefisign 4502 [piperd] 7.25r 0.00u 0.00s 0% 5968k
... _sleep+0x1be pipe_read+0x3d6 kern_readv+0x8c sys_read+0x83 ...
Reviewed by: trasz
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D29605
(cherry picked from commit 9e6158d274
)
2022-03-02 15:56:29 -06:00
Xin LI
abc1489bcb
usr.sbin/uefisign: prevent specifying certificate, key or output
...
multiple times.
(cherry picked from commit 6234a0bfc8
)
2021-04-19 17:59:58 -07:00
Edward Tomasz Napierala
bce7ee9d41
Drop "All rights reserved" from all my stuff. This includes
...
Foundation copyrights, approved by emaste@. It does not include
files which carry other people's copyrights; if you're one
of those people, feel free to make similar change.
Reviewed by: emaste, imp, gbe (manpages)
Differential Revision: https://reviews.freebsd.org/D26980
2020-10-28 13:46:11 +00:00
Edward Tomasz Napierala
28930b94b2
Stop hardcoding WARNS in uefisign(8).
...
MFC after: 2 weeks
Sponsored by: DARPA
2020-04-01 15:10:26 +00:00
Marcin Wojtas
c97ed06a4b
Fix alignment issue in uefisign
...
The pe_certificate structure has to be aligned to 8 bytes. [1]
Since this is now checked in edk2, any binaries signed with
older version of this tool will fail verification.
References:
[1] https://docs.microsoft.com/en-us/windows/desktop/Debug/pe-format#the-attribute-certificate-table-image-only
Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: trasz
Obtained from: Semihalf
Sponsored by: Stormshield
Differential Revision: https://reviews.freebsd.org/D18554
2018-12-19 22:47:37 +00:00
Jung-uk Kim
6bd321e62b
Make uefisign(8) buildable.
2018-09-19 07:10:28 +00:00
Mariusz Zaborski
1afab1fe21
Use capsicum helpers in fstype and ctld.
...
Reviewed by: trasz
2018-07-15 17:21:19 +00:00
Edward Tomasz Napierala
1aa6f9aea2
Add SPDX identifiers for uefisign(8) sources.
...
MFC after: 2 weeks
2018-01-24 16:33:33 +00:00
Bryan Drewery
ea825d0274
DIRDEPS_BUILD: Update dependencies.
...
Sponsored by: Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Ed Maste
bd24e9a105
uefisign: Remove backwards-compatibility sys/capability.h support
...
uefisign previously included sys/capability.h or sys/capsicum.h based
on __FreeBSD_version in order to facilitate development on the stable
branch. The Capsicum header is now installed as sys/capsicum.h in
stable/10 and FreeBSD 10.3, so there's no need for the backwards
compatibility support.
Reviewed by: trasz
Sponsored by: The FreeBSD Foundation
2016-09-19 16:07:32 +00:00
Bryan Drewery
b1f92fa229
META MODE: Update dependencies with 'the-lot' and add missing directories.
...
This is not properly respecting WITHOUT or ARCH dependencies in target/.
Doing so requires a massive effort to rework targets/ to do so. A
better approach will be to either include the SUBDIR Makefiles directly
and map to DIRDEPS or just dynamically lookup the SUBDIR. These lose
the benefit of having a userland/lib, userland/libexec, etc, though and
results in a massive package. The current implementation of targets/ is
very unmaintainable.
Currently rescue/rescue and sys/modules are still not connected.
Sponsored by: EMC / Isilon Storage Division
2015-12-01 05:23:19 +00:00
Eitan Adler
463a577b27
Fix a ton of speelling errors
...
arc lint is helpful
Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com
Differential Revision: https://reviews.freebsd.org/D3337
2015-10-21 05:37:09 +00:00
Edward Tomasz Napierala
d79b323ba9
uefisign(8) ships with 10.2.
...
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
2015-07-18 12:03:17 +00:00
Edward Tomasz Napierala
8dca98d787
Remove the warning about invalid PE checksum; apparently nothing
...
cares about those checksums anyway.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
2015-05-20 09:40:34 +00:00
Edward Tomasz Napierala
54ba3522ae
Use LIBADD.
...
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
2015-02-26 15:48:20 +00:00
Edward Tomasz Napierala
e595e65b8a
Add uefisign(8), UEFI Secure Boot signing utility.
...
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
2015-02-26 09:15:24 +00:00