Skip to content

Commit

Permalink
x11/ly: Fix coredumps on STABLE
Browse files Browse the repository at this point in the history
Obtained via: private email
  • Loading branch information
Tom R authored and neelchauhan committed Oct 17, 2021
1 parent eaeb6e4 commit b358f7e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
1 change: 1 addition & 0 deletions x11/ly/Makefile
@@ -1,6 +1,7 @@
PORTNAME= ly
DISTVERSIONPREFIX= v
DISTVERSION= 0.5.2
PORTREVISION= 1
CATEGORIES= x11

MAINTAINER= nc@FreeBSD.org
Expand Down
27 changes: 20 additions & 7 deletions x11/ly/files/patch-src_login.c
@@ -1,5 +1,6 @@
--- src/login.c.orig 2020-02-03 07:51:05 UTC
+++ src/login.c
diff -ru bak.ly-0.5.2/src/login.c ly-0.5.2/src/login.c
--- src/login.c 2021-10-16 23:20:01.325733000 -0400
+++ src/login.c 2021-10-16 23:21:46.738595000 -0400
@@ -18,7 +18,7 @@
#include <sys/stat.h>
#include <sys/wait.h>
Expand All @@ -9,7 +10,19 @@
#include <xcb/xcb.h>

int get_free_display()
@@ -243,9 +243,15 @@ void env_init(struct passwd* pwd)
@@ -213,6 +213,11 @@
// clean env
environ[0] = NULL;

+ if (lang == NULL)
+ {
+ lang = "C.UTF-8";
+ }
+
if (term != NULL)
{
setenv("TERM", term, 1);
@@ -243,9 +248,15 @@

void env_xdg(const char* tty_id, const enum display_server display_server)
{
Expand All @@ -28,7 +41,7 @@
setenv("XDG_SESSION_CLASS", "user", 0);
setenv("XDG_SEAT", "seat0", 0);
setenv("XDG_VTNR", tty_id, 0);
@@ -271,8 +277,8 @@ void env_xdg(const char* tty_id, const enum display_se
@@ -271,8 +282,8 @@
}
}

Expand All @@ -39,7 +52,7 @@
char *username,
pid_t display_pid
) {
@@ -283,24 +289,23 @@ void add_utmp_entry(
@@ -283,24 +294,23 @@
/* only correct for ptys named /dev/tty[pqr][0-9a-z] */
strcpy(entry->ut_id, ttyname(STDIN_FILENO) + strlen("/dev/tty"));

Expand Down Expand Up @@ -76,7 +89,7 @@
}

void xauth(const char* display_name, const char* shell, const char* dir)
@@ -581,7 +586,7 @@ void auth(
@@ -581,7 +591,7 @@
char vt[5];

snprintf(tty_id, 3, "%d", config.tty);
Expand All @@ -85,7 +98,7 @@

// set env
env_init(pwd);
@@ -636,13 +641,13 @@ void auth(
@@ -636,13 +646,13 @@
}

// add utmp audit
Expand Down

0 comments on commit b358f7e

Please sign in to comment.