diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-08-05 23:36:21 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-08-05 23:36:21 +0000 |
commit | 044b16f4e9ae773187f4fee8a9a0a54f9a51f13f (patch) | |
tree | 58bc41e16535e0d0f61d51e6af15ce4128864fc9 /md5-crypt | |
parent | c59a94711c6a9d38811b828863076f39000831b4 (diff) |
update for 2.0.5pre1
Diffstat (limited to 'md5-crypt')
-rw-r--r-- | md5-crypt/Makefile | 10 | ||||
-rw-r--r-- | md5-crypt/md5-crypt.c | 57 | ||||
-rw-r--r-- | md5-crypt/onlymd5-entry.c | 1 |
3 files changed, 41 insertions, 27 deletions
diff --git a/md5-crypt/Makefile b/md5-crypt/Makefile index 6216ddb437..b52e1ef012 100644 --- a/md5-crypt/Makefile +++ b/md5-crypt/Makefile @@ -32,6 +32,11 @@ extra-libs-others := $(extra-libs) md5-routines := crypt-entry md5-crypt md5 libcrypt-routines := $(md5-routines) +libcrypt-map := libcrypt.map + +onlymd5-routines := onlymd5-entry md5-crypt md5 +distribute += onlymd5-entry.c +extra-objs := onlymd5-entry.o include ../Makeconfig @@ -41,6 +46,8 @@ ifeq ($(crypt-in-libc),yes) routines += $(libcrypt-routines) endif +$(objpfx)md5test: $(objpfx)md5.o + include ../Rules ifeq ($(build-shared),yes) @@ -60,7 +67,7 @@ endif define o-iterator-doit $(objpfx)$(patsubst %,$(libtype$o),md5crypt): \ - $(md5-routines:%=$(objpfx)%$o); $$(build-extra-lib) + $(onlymd5-routines:%=$(objpfx)%$o); $$(build-extra-lib) endef object-suffixes-left = $(object-suffixes) include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes)) @@ -69,3 +76,4 @@ include $(patsubst %,$(..)o-iterator.mk,$(object-suffixes)) # This ensures they will load libc.so for needed symbols if loaded by # a statically-linked program that hasn't already loaded it. $(objpfx)libcrypt.so: $(common-objpfx)libc.so +$(objpfx)libmd5crypt.so: $(common-objpfx)libc.so diff --git a/md5-crypt/md5-crypt.c b/md5-crypt/md5-crypt.c index 308366c4dd..6dd6740671 100644 --- a/md5-crypt/md5-crypt.c +++ b/md5-crypt/md5-crypt.c @@ -1,22 +1,22 @@ -/* md5-crypt - One way encryption based on MD5 sum. -Copyright (C) 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. -Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. - -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 of the -License, or (at your option) any later version. - -The GNU C Library is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Library General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ +/* One way encryption based on MD5 sum. + Copyright (C) 1996, 1997 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #include <errno.h> #include <stdlib.h> @@ -37,8 +37,11 @@ static const char b64t[64] = /* Prototypes for local functions. */ -extern char *md5_crypt_r __P ((const char *key, const char *salt, char *buffer, - int buflen)); +extern char *__md5_crypt_r __P ((const char *key, const char *salt, + char *buffer, int buflen)); +extern char *md5_crypt_r __P ((const char *key, const char *salt, + char *buffer, int buflen)); +extern char *__md5_crypt __P ((const char *key, const char *salt)); extern char *md5_crypt __P ((const char *key, const char *salt)); @@ -46,7 +49,7 @@ extern char *md5_crypt __P ((const char *key, const char *salt)); /* This entry point is equivalent to the `crypt' function in Unix libcs. */ char * -md5_crypt_r (key, salt, buffer, buflen) +__md5_crypt_r (key, salt, buffer, buflen) const char *key; const char *salt; char *buffer; @@ -155,10 +158,10 @@ md5_crypt_r (key, salt, buffer, buflen) /* Now we can construct the result string. It consists of three parts. */ - cp = stpncpy (buffer, md5_salt_prefix, MAX (0, buflen)); + cp = __stpncpy (buffer, md5_salt_prefix, MAX (0, buflen)); buflen -= sizeof (md5_salt_prefix); - cp = stpncpy (cp, salt, MIN ((size_t) buflen, salt_len)); + cp = __stpncpy (cp, salt, MIN ((size_t) buflen, salt_len)); buflen -= MIN ((size_t) buflen, salt_len); if (buflen > 0) @@ -201,10 +204,11 @@ md5_crypt_r (key, salt, buffer, buflen) return buffer; } +weak_alias (__md5_crypt_r, md5_crypt_r) char * -md5_crypt (key, salt) +__md5_crypt (key, salt) const char *key; const char *salt; { @@ -222,5 +226,6 @@ md5_crypt (key, salt) return NULL; } - return md5_crypt_r (key, salt, buffer, buflen); + return __md5_crypt_r (key, salt, buffer, buflen); } +weak_alias (__md5_crypt, md5_crypt) diff --git a/md5-crypt/onlymd5-entry.c b/md5-crypt/onlymd5-entry.c new file mode 100644 index 0000000000..d03fae9bd1 --- /dev/null +++ b/md5-crypt/onlymd5-entry.c @@ -0,0 +1 @@ +#include <sysdeps/generic/crypt-entry.c> |