mirror of
git://git.gnu.org.ua/pam-modules.git
synced 2025-04-29 01:49:53 +03:00
Bugfixes
git-svn-id: file:///svnroot/pam-modules/trunk@62 56984be4-0537-0410-a56c-fcb268c96130
This commit is contained in:
parent
cf85e27af5
commit
f9f6f80133
2 changed files with 33 additions and 36 deletions
|
@ -424,7 +424,7 @@ pam_sm_authenticate(pam_handle_t *pamh, int flags,
|
|||
int retval = PAM_AUTH_ERR;
|
||||
int rc;
|
||||
char *confdir;
|
||||
char *pwstr;
|
||||
char *pwstr = NULL;
|
||||
|
||||
/* parse arguments */
|
||||
if ((rc = _pam_parse(pamh, argc, argv)) != PAM_SUCCESS)
|
||||
|
|
|
@ -147,8 +147,7 @@ static void
|
|||
get_salt_from_scrambled (unsigned long *res, const char *password)
|
||||
{
|
||||
res[0] = res[1] = 0;
|
||||
while (*password)
|
||||
{
|
||||
while (*password) {
|
||||
unsigned long val = 0;
|
||||
unsigned i;
|
||||
|
||||
|
@ -165,8 +164,7 @@ scramble_password (unsigned long *result, const char *password)
|
|||
unsigned long nr = 1345345333L, add = 7, nr2 = 0x12345671L;
|
||||
unsigned long tmp;
|
||||
|
||||
for (; *password ; password++)
|
||||
{
|
||||
for (; *password ; password++) {
|
||||
if (*password == ' ' || *password == '\t')
|
||||
continue;
|
||||
tmp = (unsigned long) (unsigned char) *password;
|
||||
|
@ -185,8 +183,7 @@ mu_octet_to_hex (char *to, const unsigned char *str, unsigned len)
|
|||
const unsigned char *str_end= str + len;
|
||||
static char d[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
|
||||
for ( ; str != str_end; ++str)
|
||||
{
|
||||
for ( ; str != str_end; ++str) {
|
||||
*to++ = d[(*str & 0xF0) >> 4];
|
||||
*to++ = d[*str & 0x0F];
|
||||
}
|
||||
|
@ -237,7 +234,7 @@ mu_check_mysql_3x_password (const char *scrambled, const char *message)
|
|||
|
||||
/* Check whether a plaintext password MESSAGE matches MySQL scrambled password
|
||||
PASSWORD */
|
||||
int
|
||||
static int
|
||||
mu_check_mysql_scrambled_password (const char *scrambled, const char *message)
|
||||
{
|
||||
const char *p;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue