summaryrefslogtreecommitdiff
path: root/src/gs-auth-pam.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gs-auth-pam.c')
-rw-r--r--src/gs-auth-pam.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gs-auth-pam.c b/src/gs-auth-pam.c
index 3ca3e42..ae9cea0 100644
--- a/src/gs-auth-pam.c
+++ b/src/gs-auth-pam.c
@@ -509,9 +509,10 @@ set_pam_error (GError **error,
}
-static int
-gs_auth_thread_func (int auth_operation_fd)
+static gpointer
+gs_auth_thread_func (gpointer data)
{
+ int auth_operation_fd;
static const int flags = 0;
int status;
int status2;
@@ -519,6 +520,8 @@ gs_auth_thread_func (int auth_operation_fd)
sigset_t set;
const void *p;
+ auth_operation_fd = GPOINTER_TO_INT (data);
+
timeout.tv_sec = 0;
timeout.tv_nsec = 1;
@@ -602,7 +605,7 @@ done:
*/
close (auth_operation_fd);
- return status;
+ return GINT_TO_POINTER (status);
}
static gboolean
@@ -664,7 +667,7 @@ gs_auth_pam_verify_user (pam_handle_t *handle,
(GIOFunc) gs_auth_loop_quit, &thread_done);
auth_thread = g_thread_new ("auththread",
- (GThreadFunc) gs_auth_thread_func,
+ gs_auth_thread_func,
GINT_TO_POINTER (auth_operation_fds[1]));
if (auth_thread == NULL)