diff options
author | robak <robak@FreeBSD.org> | 2014-11-15 08:26:18 +0800 |
---|---|---|
committer | robak <robak@FreeBSD.org> | 2014-11-15 08:26:18 +0800 |
commit | 332f94cd476d75bdde2a02b1ef3d1afdc4d9f111 (patch) | |
tree | c71a140d6e37a58f2024bc48a6836e67f6c92e5f /net/xrdp | |
parent | b2eb310863791bce80263635b38ac15128bf6d20 (diff) | |
download | freebsd-ports-gnome-332f94cd476d75bdde2a02b1ef3d1afdc4d9f111.tar.gz freebsd-ports-gnome-332f94cd476d75bdde2a02b1ef3d1afdc4d9f111.tar.zst freebsd-ports-gnome-332f94cd476d75bdde2a02b1ef3d1afdc4d9f111.zip |
net/xrdp: fix PAM authentication issue
- Fix PAM authentication failure after recent base update
- Replace local patch with new patch from upstream
- Rename patch files, remove dirrms, use @sample, some plist fixes
PR: 194474
Submitted by: Koichiro Iwao <meta+ports@vmeta.jp>
Approved by: mentors (implicit)
Diffstat (limited to 'net/xrdp')
-rw-r--r-- | net/xrdp/Makefile | 2 | ||||
-rw-r--r-- | net/xrdp/files/patch-common__os_calls.c | 18 | ||||
-rw-r--r-- | net/xrdp/files/patch-sesman__session.c (renamed from net/xrdp/files/patch-sesman__session_1.patch) | 0 | ||||
-rw-r--r-- | net/xrdp/files/patch-sesman__verify_user_pam.c | 19 | ||||
-rw-r--r-- | net/xrdp/pkg-plist | 45 |
5 files changed, 53 insertions, 31 deletions
diff --git a/net/xrdp/Makefile b/net/xrdp/Makefile index fe82d36f79a7..a0183e598a86 100644 --- a/net/xrdp/Makefile +++ b/net/xrdp/Makefile @@ -3,7 +3,7 @@ PORTNAME= xrdp PORTVERSION= 0.6.1 -PORTREVISION= 4 +PORTREVISION= 5 PORTEPOCH= 1 CATEGORIES= net MASTER_SITES= GH diff --git a/net/xrdp/files/patch-common__os_calls.c b/net/xrdp/files/patch-common__os_calls.c index d1c16a43d7da..f74ccade0be1 100644 --- a/net/xrdp/files/patch-common__os_calls.c +++ b/net/xrdp/files/patch-common__os_calls.c @@ -1,11 +1,17 @@ ---- common/os_calls.c.orig 2011-03-12 16:10:35.000000000 +0900 -+++ common/os_calls.c 2011-03-12 16:34:05.000000000 +0900 -@@ -1987,6 +1987,8 @@ - g_clearenv(void) +diff --git common/os_calls.c common/os_calls.c +index 692dc01..7075ee3 100644 +--- common/os_calls.c ++++ common/os_calls.c +@@ -2115,8 +2115,12 @@ g_clearenv(void) { #if defined(_WIN32) -+#elif defined(__FreeBSD__) -+ environ[0] = NULL; #else ++#if defined(BSD) ++ environ[0] = 0; ++#else environ = 0; #endif ++#endif + } + + /*****************************************************************************/ diff --git a/net/xrdp/files/patch-sesman__session_1.patch b/net/xrdp/files/patch-sesman__session.c index abdd76be1381..abdd76be1381 100644 --- a/net/xrdp/files/patch-sesman__session_1.patch +++ b/net/xrdp/files/patch-sesman__session.c diff --git a/net/xrdp/files/patch-sesman__verify_user_pam.c b/net/xrdp/files/patch-sesman__verify_user_pam.c new file mode 100644 index 000000000000..5ce5ed33ba43 --- /dev/null +++ b/net/xrdp/files/patch-sesman__verify_user_pam.c @@ -0,0 +1,19 @@ +diff --git sesman/verify_user_pam.c sesman/verify_user_pam.c +index e3d8596..281e297 100644 +--- sesman/verify_user_pam.c ++++ sesman/verify_user_pam.c +@@ -117,6 +117,14 @@ auth_userpass(char* user, char* pass) + g_free(auth_info); + return 0; + } ++ ++ error = pam_set_item(auth_info->ph, PAM_TTY, service_name); ++ if (error != PAM_SUCCESS) ++ { ++ g_printf("pam_set_item failed: %s\r\n", ++ pam_strerror(auth_info->ph, error)); ++ } ++ + error = pam_authenticate(auth_info->ph, 0); + if (error != PAM_SUCCESS) + { diff --git a/net/xrdp/pkg-plist b/net/xrdp/pkg-plist index 4fa253e88063..9734a1af338c 100644 --- a/net/xrdp/pkg-plist +++ b/net/xrdp/pkg-plist @@ -39,24 +39,24 @@ man/man8/xrdp-sesman.8.gz man/man8/xrdp-sesrun.8.gz man/man8/xrdp.8.gz etc/pam.d/xrdp-sesman -etc/xrdp/km-0407.ini -etc/xrdp/km-0409.ini -etc/xrdp/km-040c.ini -etc/xrdp/km-0410.ini -etc/xrdp/km-0419.ini -etc/xrdp/km-041d.ini -%%JP106%%etc/xrdp/km-0411.ini -%%JP106%%etc/xrdp/km-e0010411.ini -%%JP106%%etc/xrdp/km-e0200411.ini -%%JP106%%etc/xrdp/km-e0210411.ini +%%ETCDIR%%/km-0407.ini +%%ETCDIR%%/km-0409.ini +%%ETCDIR%%/km-040c.ini +%%ETCDIR%%/km-0410.ini +%%ETCDIR%%/km-0419.ini +%%ETCDIR%%/km-041d.ini +%%JP106%%%%ETCDIR%%/km-0411.ini +%%JP106%%%%ETCDIR%%/km-e0010411.ini +%%JP106%%%%ETCDIR%%/km-e0200411.ini +%%JP106%%%%ETCDIR%%/km-e0210411.ini @unexec if cmp -s %D/etc/xrdp/rsakeys.ini.sample %D/etc/xrdp/rsakeys.ini; then rm -f %D/etc/xrdp/rsakeys.ini; fi @unexec if cmp -s %D/etc/xrdp/sesman.ini.sample %D/etc/xrdp/sesman.ini; then rm -f %D/etc/xrdp/sesman.ini; fi @unexec if cmp -s %D/etc/xrdp/startwm.sh.sample %D/etc/xrdp/startwm.sh; then rm -f %D/etc/xrdp/startwm.sh; fi @unexec if cmp -s %D/etc/xrdp/xrdp.ini.sample %D/etc/xrdp/xrdp.ini; then rm -f %D/etc/xrdp/xrdp.ini; fi -etc/xrdp/rsakeys.ini.sample -etc/xrdp/sesman.ini.sample -etc/xrdp/startwm.sh.sample -etc/xrdp/xrdp.ini.sample +@sample %%ETCDIR%%/rsakeys.ini.sample +@sample %%ETCDIR%%/sesman.ini.sample +@sample %%ETCDIR%%/startwm.sh.sample +@sample %%ETCDIR%%/xrdp.ini.sample @exec [ -f %D/etc/xrdp/sesman.ini ] || cp -p %D/etc/xrdp/sesman.ini.sample %D/etc/xrdp/sesman.ini @exec [ -f %D/etc/xrdp/startwm.sh ] || cp -p %D/etc/xrdp/startwm.sh.sample %D/etc/xrdp/startwm.sh @exec [ -f %D/etc/xrdp/xrdp.ini ] || cp -p %D/etc/xrdp/xrdp.ini.sample %D/etc/xrdp/xrdp.ini @@ -64,13 +64,10 @@ sbin/xrdp sbin/xrdp-chansrv sbin/xrdp-sesman sbin/xrdp-sessvc -share/xrdp/ad24b.bmp -share/xrdp/ad256.bmp -share/xrdp/cursor0.cur -share/xrdp/cursor1.cur -share/xrdp/sans-10.fv1 -share/xrdp/xrdp24b.bmp -share/xrdp/xrdp256.bmp -@dirrm share/xrdp -@dirrm lib/xrdp -@dirrmtry etc/xrdp +%%DATADIR%%/ad24b.bmp +%%DATADIR%%/ad256.bmp +%%DATADIR%%/cursor0.cur +%%DATADIR%%/cursor1.cur +%%DATADIR%%/sans-10.fv1 +%%DATADIR%%/xrdp24b.bmp +%%DATADIR%%/xrdp256.bmp |