FreeBSD Bugzilla – Attachment 190571 Details for
Bug 225859
net/xrdp-devel: backport patch from upstream #1030
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
patch
patch-xrdp-0.9.5_1.txt (text/plain), 2.38 KB, created by
Koichiro Iwao
on 2018-02-13 08:52:32 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Koichiro Iwao
Created:
2018-02-13 08:52:32 UTC
Size:
2.38 KB
patch
obsolete
>diff --git net/xrdp-devel/Makefile net/xrdp-devel/Makefile >index 0ab9ee9..b04b858 100644 >--- net/xrdp-devel/Makefile >+++ net/xrdp-devel/Makefile >@@ -4,6 +4,7 @@ > PORTNAME= xrdp > PORTVERSION= 0.9.5 > DISTVERSIONPREFIX= v >+PORTREVISION= 1 > PORTEPOCH= 1 > CATEGORIES= net > PKGNAMESUFFIX= -devel >diff --git net/xrdp-devel/files/patch-upstream-issue-1030 net/xrdp-devel/files/patch-upstream-issue-1030 >new file mode 100644 >index 0000000..6689c30 >--- /dev/null >+++ net/xrdp-devel/files/patch-upstream-issue-1030 >@@ -0,0 +1,54 @@ >+--- sesman/session.c.orig 2017-12-27 14:40:24 UTC >++++ sesman/session.c >+@@ -484,22 +484,40 @@ session_start_fork(tbus data, tui8 type, >+ * $OpenBSD: session.c,v 1.252 2010/03/07 11:57:13 dtucker Exp $ >+ * with some ideas about BSD process grouping to xrdp >+ */ >++ pid_t bsdsespid = g_fork(); >+ >+- /** >+- * Create a new session and process group since the 4.4BSD >+- * setlogin() affects the entire process group >+- */ >+- if (g_setsid() < 0) >++ if (bsdsespid == -1) >+ { >+- log_message(LOG_LEVEL_ERROR, >+- "setsid failed - pid %d", g_getpid()); >++ } >++ else if (bsdsespid == 0) /* BSD session leader */ >++ { >++ /** >++ * Create a new session and process group since the 4.4BSD >++ * setlogin() affects the entire process group >++ */ >++ if (g_setsid() < 0) >++ { >++ log_message(LOG_LEVEL_ERROR, >++ "setsid failed - pid %d", g_getpid()); >++ } >++ >++ if (g_setlogin(s->username) < 0) >++ { >++ log_message(LOG_LEVEL_ERROR, >++ "setlogin failed for user %s - pid %d", s->username, >++ g_getpid()); >++ } >+ } >+ >+- if (g_setlogin(s->username) < 0) >++ g_waitpid(bsdsespid); >++ >++ if (bsdsespid > 0) >+ { >+- log_message(LOG_LEVEL_ERROR, >+- "setlogin failed for user %s - pid %d", s->username, >+- g_getpid()); >++ g_exit(0); >++ /* >++ * intermediate sesman should exit here after WM exits. >++ * do not execure the following codes. >++ */ >+ } >+ #endif >+ window_manager_pid = g_fork(); /* parent becomes X,
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 Raw
Flags:
meta
:
maintainer-approval+
Actions:
View
Attachments on
bug 225859
: 190571