From: danw Date: Thu, 13 Aug 1998 18:23:41 +0000 (+0000) Subject: EncryptID is no longer used anywhere. move RemoveHyphens to fixname.c X-Git-Url: http://andersk.mit.edu/gitweb/moira.git/commitdiff_plain/33b0f7c36f8cc2d4b5711e525026679a566e68a9 EncryptID is no longer used anywhere. move RemoveHyphens to fixname.c and remove idno.c --- diff --git a/lib/Makefile.in b/lib/Makefile.in index 0a70061a..34a51f7c 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -3,7 +3,7 @@ SHELL=/bin/sh CC=@CC@ -CPPFLAGS=@CPPFLAGS@ @CRYPT_CPPFLAGS@ +CPPFLAGS=@CPPFLAGS@ CFLAGS=@CFLAGS@ DEFS=@DEFS@ ALL_CFLAGS=$(CPPFLAGS) $(CFLAGS) $(DEFS) @@ -16,7 +16,7 @@ SRCTOP=@top_srcdir@ BUILDTOP=.. OBJS= critical.o fixhost.o fixname.o gdss_convert.o gdss_et.o \ - hash.o idno.o kname_unparse.o krb_et.o mr_access.o mr_auth.o \ + hash.o kname_unparse.o krb_et.o mr_access.o mr_auth.o \ mr_call.o mr_connect.o mr_et.o mr_init.o mr_ops.o mr_query.o \ nfsparttype.o sq.o strs.o ureg_err.o diff --git a/lib/fixname.c b/lib/fixname.c index 178f3fea..26e880e2 100644 --- a/lib/fixname.c +++ b/lib/fixname.c @@ -147,3 +147,17 @@ void GetMidInit(char *nm, char *mi) *mi++ = *nm; *mi = '\0'; } + +/* Function Name: RemoveHyphens + * Description: Removes all hyphens from the string passed to it. + * Arguments: str - the string to remove the hyphens from + * Returns: none + */ + +void RemoveHyphens(char *str) +{ + char *hyphen; + + while ((hyphen = strchr(str, '-'))) + strcpy(hyphen, hyphen + 1); +} diff --git a/lib/idno.c b/lib/idno.c deleted file mode 100644 index 66d0fa49..00000000 --- a/lib/idno.c +++ /dev/null @@ -1,56 +0,0 @@ -/* $Id$ - * - * Routines to deal with MIT IDs - * - * Copyright (C) 1988-1998 by the Massachusetts Institute of Technology. - * For copying and distribution information, please see the file - * . - */ - -#include -#include - -#include -#include - -#ifdef HAVE_CRYPT_H -#include -#else -#include -#endif - -/* Function Name: RemoveHyphens - * Description: Removes all hyphens from the string passed to it. - * Arguments: str - the string to remove the hyphes from - * Returns: none - */ - -void RemoveHyphens(char *str) -{ - char *hyphen; - - while ((hyphen = strchr(str, '-'))) - strcpy(hyphen, hyphen + 1); -} - - -/* Function Name: EncryptMITID - * Description: Encrypts an mit ID number. - * Arguments: sbuf - the buffer to return the encrypted number in. - * idnumber - the id number (string). - * first, last - name of the person. - * Returns: none. - */ - -void EncryptID(char *sbuf, char *idnumber, char *first, char *last) -{ - char salt[3]; - - RemoveHyphens(idnumber); - salt[0] = tolower(last[0]); - salt[1] = tolower(first[0]); - salt[2] = '\0'; - - strcpy(sbuf, crypt(&idnumber[2], salt)); -} -