--- lightdm-1.19.3/src/session-child.c.1	2016-08-09 13:29:08.350328243 +0300
+++ lightdm-1.19.3/src/session-child.c	2016-08-09 13:33:09.165394372 +0300
@@ -346,6 +346,8 @@
         /* Write record to btmp database */
         if (authentication_result == PAM_AUTH_ERR)
         {
+/* We don't have btmp database */
+#ifndef __sun__
             struct utmpx ut;
             struct timeval tv;
 
@@ -366,6 +366,7 @@
             ut.ut_tv.tv_usec = tv.tv_usec;
 
             updwtmpx ("/var/log/btmp", &ut);
+#endif
 
 #if HAVE_LIBAUDIT
             audit_event (AUDIT_USER_LOGIN, username, -1, remote_host_name, tty, FALSE);
@@ -710,7 +710,7 @@
             if (!pututxline (&ut))
                 g_printerr ("Failed to write utmpx: %s\n", strerror (errno));
             endutxent ();
-            updwtmpx ("/var/log/wtmp", &ut);
+            updwtmpx ("/var/adm/wtmpx", &ut);
 
 #if HAVE_LIBAUDIT          
             audit_event (AUDIT_USER_LOGIN, username, uid, remote_host_name, tty, TRUE);
@@ -751,7 +751,7 @@
             if (!pututxline (&ut))
                 g_printerr ("Failed to write utmpx: %s\n", strerror (errno));
             endutxent ();
-            updwtmpx ("/var/log/wtmp", &ut);
+            updwtmpx ("/var/adm/wtmpx", &ut);
 
 #if HAVE_LIBAUDIT
             audit_event (AUDIT_USER_LOGOUT, username, uid, remote_host_name, tty, TRUE);