/*
- * $Id: uams_pam.c,v 1.15.2.1 2003-09-03 20:40:50 didg Exp $
+ * $Id: uams_pam.c,v 1.15.2.1.2.1 2003-09-09 16:42:20 didg Exp $
*
* Copyright (c) 1990,1993 Regents of The University of Michigan.
* Copyright (c) 1999 Adrian Sun (asun@u.washington.edu)
#include <atalk/logger.h>
#include <security/pam_appl.h>
+#include <atalk/unicode.h>
#include <atalk/afp.h>
#include <atalk/uam.h>
static char *PAM_username;
static char *PAM_password;
+extern void append(void *, const char *, int);
+
/* PAM conversation function
* Here we assume (for now, at least) that echo on means login name, and
* echo off means password.
ibuf += len;
username[ len ] = '\0';
+
+ len = convert_charset(CH_MAC, CH_UNIX, username, len, username, ulen, 0);
+
+
if ((unsigned long) ibuf & 1) /* pad character */
++ibuf;
return (login(obj, username, ulen, uam_pwd, ibuf, ibuflen, rbuf, rbuflen));
}
memcpy(username, uname +2, len );
username[ len ] = '\0';
+
+ len = convert_charset(CH_UTF8_MAC, CH_UNIX, username, len, username, ulen, 0);
return (login(obj, username, ulen, uam_pwd, ibuf, ibuflen, rbuf, rbuflen));
}