extern char *krb5_config_file; /* extern so can be set at
load/runtime */
-static char *
-strsave(string)
-char *string;
-{
- register char *cp;
- cp = malloc(strlen(string)+1);
- if (cp)
- (void) strcpy(cp, string);
- return(cp);
-}
-
krb5_error_code
krb5_get_krbhst(realm, hostlist)
krb5_data *realm;
retval = KRB5_CONFIG_BADFORMAT;
break;
}
- rethlist[hlindex] = strsave(&filebuf[realm->length+1]);
+ rethlist[hlindex] = strdup(&filebuf[realm->length+1]);
if (!rethlist[hlindex]) {
for (--hlindex; hlindex >= 0; hlindex--)
free(rethlist[hlindex]);
#include <netdb.h>
#include <ctype.h>
-#ifndef HAVE_STRDUP
-static char *
-strdup(s)
-register char *s;
-{
- register char *ret;
- if (ret = (char *)malloc(strlen(s)+1))
- strcpy(ret, s);
- return(ret);
-}
-#endif
-
krb5_error_code
krb5_sname_to_principal(DECLARG(const char *,hostname),
DECLARG(const char *,sname),