summaryrefslogtreecommitdiffstats
path: root/libcrypt
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-08-21 04:56:08 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-08-21 04:56:08 +0000
commitf8f10650d874ab9c491f2914d78a49422fbd983c (patch)
treee847704b0bd9de20eb9696dad2905663744d9c54 /libcrypt
parent08a1ecd221e5d6377f2835bda704dfc5ce40d78a (diff)
downloaduClibc-alpine-f8f10650d874ab9c491f2914d78a49422fbd983c.tar.bz2
uClibc-alpine-f8f10650d874ab9c491f2914d78a49422fbd983c.tar.xz
Merge from trunk.
Diffstat (limited to 'libcrypt')
-rw-r--r--libcrypt/Makefile.in1
-rw-r--r--libcrypt/crypt.c6
-rw-r--r--libcrypt/md5.c15
3 files changed, 12 insertions, 10 deletions
diff --git a/libcrypt/Makefile.in b/libcrypt/Makefile.in
index 0d84b6f10..3ebcd85ed 100644
--- a/libcrypt/Makefile.in
+++ b/libcrypt/Makefile.in
@@ -1,6 +1,5 @@
# Makefile for uClibc
#
-# Copyright (C) 2000 by Lineo, inc.
# Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
#
# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
diff --git a/libcrypt/crypt.c b/libcrypt/crypt.c
index a64b4a556..5d8215fac 100644
--- a/libcrypt/crypt.c
+++ b/libcrypt/crypt.c
@@ -1,13 +1,9 @@
/* vi: set sw=4 ts=4: */
/*
* crypt() for uClibc
- *
- * Copyright (C) 2000 by Lineo, inc. and Erik Andersen
- * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
- *
+ * Copyright (C) 2000-2006 by Erik Andersen <andersen@uclibc.org>
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
-/* Written by Erik Andersen <andersen@uclibc.org> */
#define __FORCE_GLIBC
#include <crypt.h>
diff --git a/libcrypt/md5.c b/libcrypt/md5.c
index 989d4482c..412c8bfb5 100644
--- a/libcrypt/md5.c
+++ b/libcrypt/md5.c
@@ -94,12 +94,19 @@ static void __md5_Final (unsigned char [16], struct MD5Context *);
static void __md5_Transform __P((u_int32_t [4], const unsigned char [64]));
-static const char __md5__magic[] = "$1$"; /* This string is magic for this algorithm. Having
+static const unsigned char __md5__magic[] = "$1$"; /* This string is magic for this algorithm. Having
it this way, we can get better later on */
static const unsigned char __md5_itoa64[] = /* 0 ... 63 => ascii - 64 */
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
+/* shut up gcc-4.x signed warnings */
+#define strcpy(dst,src) strcpy((char*)dst,(char*)src)
+#define strlen(s) strlen((char*)s)
+#define strncat(dst,src,n) strncat((char*)dst,(char*)src,n)
+#define strncmp(s1,s2,n) strncmp((char*)s1,(char*)s2,n)
+
+
#ifdef i386
#define __md5_Encode memcpy
@@ -531,11 +538,11 @@ static void __md5_to64( char *s, unsigned long v, int n)
* Use MD5 for what it is best at...
*/
-char * __md5_crypt( const char *pw, const char *salt) attribute_hidden;
-char * __md5_crypt( const char *pw, const char *salt)
+char * __md5_crypt( const unsigned char *pw, const unsigned char *salt) attribute_hidden;
+char * __md5_crypt( const unsigned char *pw, const unsigned char *salt)
{
/* Static stuff */
- static const char *sp, *ep;
+ static const unsigned char *sp, *ep;
static char passwd[120], *p;
unsigned char final[17]; /* final[16] exists only to aid in looping */