summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--core/opie-login/qdmdialogimpl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/opie-login/qdmdialogimpl.cpp b/core/opie-login/qdmdialogimpl.cpp
index 56f0fc0..5d4cd49 100644
--- a/core/opie-login/qdmdialogimpl.cpp
+++ b/core/opie-login/qdmdialogimpl.cpp
@@ -1,153 +1,153 @@
/**********************************************************************
** Copyright (C) 2001 LISA Systems
**
** This file is an additional part of Qtopia Environment.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** For further information contact info@lisa.de
**
**********************************************************************/
/*
* AUTHOR: Christian Rahn
* EMAIL: cdr@lisa.de
*
* $Id$
*/
#include "qdm_config.h"
#ifdef QT_QWS_LOGIN
#include <pwd.h>
#include <unistd.h>
#include <stdlib.h>
#include <iostream.h>
#include <assert.h>
#include <qlabel.h>
#include <qregexp.h>
#include <qdatetime.h>
#include <qmessagebox.h>
#include <qcombobox.h>
#include <qlineedit.h>
#include <qtranslator.h>
-#include <qpeapplication.h>
+#include <qpe/qpeapplication.h>
#include <qwsdisplay_qws.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/sem.h>
#include <sys/shm.h>
#include <sys/ipc.h>
-#include <global.h>
+#include <qpe/global.h>
#if defined(QT_QWS_LOGIN_USEPAM)
extern "C" {
#include <security/pam_appl.h>
}
#else
#define _XOPEN_SOURCE
#include <unistd.h>
#include <crypt.h>
#endif
#include "qdmdialogimpl.h"
#include "../launcher/inputmethods.h"
//----------------------------------------------------------------------------
//-- taken from semctl man page
#if defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)
//-- union semun is defined by including <sys/sem.h>
#else
//-- according to X/OPEN we have to define it ourselves
union semun {
int val; // value for SETVAL
struct semid_ds *buf; // buffer for IPC_STAT, IPC_SET
unsigned short int *array; // array for GETALL, SETALL
struct seminfo *__buf; // buffer for IPC_INFO
};
#endif
//----------------------------------------------------------------------------
static const int ShowClockFreq = 1;
QDM_SHOWNUSERS;
#ifdef QT_QWS_LOGIN_USEPAM
static const char *_PAM_SERVICE = "xdm";
static const char *PAM_password;
typedef const struct pam_message pam_message_type;
static int PAM_conv( int, pam_message_type **, struct pam_response **, void * );
static struct pam_conv PAM_conversation = {
&PAM_conv,
NULL
};
//----------------------------------------------------------------------------
static char *COPY_STRING( const char * s ) {
return (s) ? strdup(s) : (char *)NULL;
}
#define GET_MEM if (reply) realloc(reply, size);\
else reply = (struct pam_response *)malloc(size); \
if (!reply) return PAM_CONV_ERR; \
size += sizeof(struct pam_response)
static int PAM_conv( int num_msg, pam_message_type **msg,
struct pam_response **resp, void *)
{
int count = 0, replies = 0;
struct pam_response *reply = NULL;
int size = sizeof(struct pam_response);
for( count = 0; count < num_msg; count++ ) {
switch (msg[count]->msg_style) {
case PAM_PROMPT_ECHO_ON:
/* user name given to PAM already */
return PAM_CONV_ERR;
case PAM_PROMPT_ECHO_OFF:
/* wants password */
GET_MEM;
reply[replies].resp_retcode = PAM_SUCCESS;
reply[replies].resp = COPY_STRING(PAM_password);
replies++;
/* PAM frees resp */
break;
case PAM_TEXT_INFO:
break;
default:
/* unknown or PAM_ERROR_MSG */
if (reply) free (reply);
return PAM_CONV_ERR;
}
}
if (reply) *resp = reply;
return PAM_SUCCESS;
}