File: 0001-Remove-newline-from-password-output.patch

package info (click to toggle)
unl0kr 2.0.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 10,916 kB
  • sloc: ansic: 107,289; python: 1,942; ruby: 443; sh: 295; javascript: 16; makefile: 10
file content (28 lines) | stat: -rw-r--r-- 1,074 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 20eba1c82a085678a5adb66bd39d70e2b3c8e216 Mon Sep 17 00:00:00 2001
From: undef <gitlab@undef.tools>
Date: Thu, 2 Mar 2023 08:34:04 +0000
Subject: Remove newline from password output
Forwarded: not-needed

The added newline breaks Debian's `keyscript` functionality which
expects just the password to be returned by the script.

This patch breaks the equivilent functionality in postmarketOS and
thus will not be applied upstream.
---
 main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: unl0kr/main.c
===================================================================
--- unl0kr.orig/main.c	2023-12-21 08:58:00.687000000 +0000
+++ unl0kr/main.c	2023-12-21 08:58:34.243000000 +0000
@@ -330,7 +330,7 @@
 
 static void print_password_and_exit(lv_obj_t *textarea) {
     /* Print the password to STDOUT */
-    printf("%s\n", lv_textarea_get_text(textarea));
+    printf("%s", lv_textarea_get_text(textarea));
 
     /* Clear the screen so that when the password field was unobscured, it cannot
      * leak via stale display buffers after we've exited */