Skip to content

Commit

Permalink
lib-dropbear: do not call disallow_core
Browse files Browse the repository at this point in the history
Presumably for safety purposes, dropbear sets the maximum size of a core
dump for its process to zero, thus disabling it.
My guess is that it's done to avoid leaks of any sort.

Unikraft, however, does not seem to implement the concept of core dumps.
Attempting to set this limit will result in a non-harmless message
saying "Unsupported resource". It doesn't break anything but I thought
that it would be nice to get rid of this confusing message.

Resource limits that are supported in Unikraft can be seen here:
https://github.com/unikraft/unikraft/blob/254bfe2748749336d077ba43153d8751d6faf1d9/lib/posix-process/deprecated.c#L327
  • Loading branch information
extinctpotato committed Nov 29, 2023
1 parent 020a737 commit 7ca88fe
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions lib/lib-dropbear/patches/0001-Do-not-call-disallow_core.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
From 6018a0c5e28d774a70d74526c2015234d31ebb7e Mon Sep 17 00:00:00 2001
From: Adam Olech <me@aole.ch>
Date: Wed, 29 Nov 2023 01:02:07 +0100
Subject: [PATCH] Do not call disallow_core

---
svr-main.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/svr-main.c b/svr-main.c
index 9234361..dd939d1 100644
--- a/svr-main.c
+++ b/svr-main.c
@@ -53,8 +53,6 @@ int main(int argc, char ** argv)
_dropbear_exit = svr_dropbear_exit;
_dropbear_log = svr_dropbear_log;

- disallow_core();
-
if (argc < 1) {
dropbear_exit("Bad argc");
}
--
2.43.0

0 comments on commit 7ca88fe

Please sign in to comment.