Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 586128 Details for
Bug 691502
sys-apps/systemd-243_rc1-r1 - systemd-cryptsetup-generator: Assertion 'keyspec' failed
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch based on fix at github
fef716b28be6e866b8afe995805d5ebe2af6bbfa.patch (text/plain), 1.70 KB, created by
Ferry
on 2019-08-08 13:54:27 UTC
(
hide
)
Description:
Patch based on fix at github
Filename:
MIME Type:
Creator:
Ferry
Created:
2019-08-08 13:54:27 UTC
Size:
1.70 KB
patch
obsolete
>From fef716b28be6e866b8afe995805d5ebe2af6bbfa Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl> >Date: Thu, 1 Aug 2019 08:15:43 +0200 >Subject: [PATCH] cryptsetup: don't assert on variable which is optional > >https://github.com/systemd/systemd/commit/50d2eba27b9bfc77ef6b40e5721713846815418b#commitcomment-34519739 > >In add_crypttab_devices() split_keyspec is called on the keyfile argument, >which may be NULL. >--- > src/cryptsetup/cryptsetup-generator.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c >index 84483143945..4815ded753f 100644 >--- a/src/cryptsetup/cryptsetup-generator.c >+++ b/src/cryptsetup/cryptsetup-generator.c >@@ -50,10 +50,14 @@ static int split_keyspec(const char *keyspec, char **keyfile, char **key > _cleanup_free_ char *keyfile = NULL, *keydev = NULL; > char *c; > >- assert(keyspec); > assert(keyfile); > assert(keydev); > >+ if (!keyspec) { >+ *keyfile = *keydev = NULL; >+ return 0; >+ } >+ > c = strrchr(keyspec, ':'); > if (c) { > keyfile = strndup(keyspec, c-keyspec); >@@ -567,7 +571,7 @@ static int add_crypttab_devices(void) { > } > > for (;;) { >- _cleanup_free_ char *line = NULL, *name = NULL, *device = NULL, *keydev = NULL, *keyfile = NULL, *keyspec = NULL, *options = NULL; >+ _cleanup_free_ char *line = NULL, *name = NULL, *device = NULL, *keyspec = NULL, *options = NULL, *keyfile = NULL, *keydev = NULL; > crypto_device *d = NULL; > char *l, *uuid; > int k;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 691502
: 586128