pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/48313: x11vnc - unable to log back in with -forever -unixpw



>Number:         48313
>Category:       pkg
>Synopsis:       x11vnc - unable to log back in with -forever -unixpw
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 16 05:20:00 +0000 2013
>Originator:     Nat Sloss
>Release:        pkgsrc-2013Q2
>Organization:
>Environment:
NetBSD test 6.1.1_PATCH NetBSD 6.1.1_PATCH (HPMICROSERVER) #1: Fri Sep 27 
19:34:11 EST 2013  build@test:/usr/src/sys/arch/i386/compile/obj/HPMICROSERVER 
i386
>Description:
If you start x11vnc with -http -unixpw -forever -ssl -display :0 -auth guess

Also commenting out 
auth            sufficient      pam_self.so             no_warn
in pam.d/su which is a requirement for x11vnc -unixpw option, you can login 
using the webserved applet http://localhost:5800
and you will be presented with a login screen.

Supply your login and password and you can connect, however close the 
connection and open it again and attempt to login with the same credentials or 
another valid account and it wont work.  It says something like Login failed, 
and after three tries is says permission denied and closes the connection.  You 
won't be able to log back in.

In the logs the only unusual thing is that it says it cannot open a pty.

After looking through the source I found there is a define IS_BSD in unixpw.c 
and if set it will only attempt to open /dev/pty* which is no good if your 
running ptyfs.  If IS_BSD is undefined then it will use /dev/pts/* and one can 
still set an environment variable "BSD_PTY" and it will use /dev/pty*.

>How-To-Repeat:
Refer to above.
>Fix:
Apply this patch:

--- /dev/null   2013-10-16 04:03:11.000000000 +1100
+++ pkgsrc/x11/x11vnc/patches/patch-x11vnc_unixpw.c     2013-10-15 
20:10:50.000000000 +1100
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- x11vnc/unixpw.c.orig       2011-08-10 22:31:32.000000000 +0000
++++ x11vnc/unixpw.c
+@@ -85,7 +85,7 @@ extern char *crypt(const char*, const ch
+ #include <sys/stropts.h>
+ #endif
+ 
+-#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
++#if defined(__OpenBSD__) || defined(__FreeBSD__)
+ #define IS_BSD
+ #endif
+ #if (defined(__MACH__) && defined(__APPLE__))

Regards,

Nat.



Home | Main Index | Thread Index | Old Index