removed krb5_get_lrealm
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1977 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,28 +1,3 @@
|
|||||||
#include "krb5_locl.h"
|
#include "krb5_locl.h"
|
||||||
|
|
||||||
RCSID("$Id$");
|
RCSID("$Id$");
|
||||||
|
|
||||||
krb5_error_code
|
|
||||||
krb5_get_lrealm(char **realm)
|
|
||||||
{
|
|
||||||
FILE *F;
|
|
||||||
char s[128];
|
|
||||||
char *p, *q;
|
|
||||||
F = fopen("/etc/krb5.conf", "r");
|
|
||||||
while(fgets(s, 128, F)){
|
|
||||||
if((p = strstr(s, "default_realm"))){
|
|
||||||
p = strchr(p, '=');
|
|
||||||
p++;
|
|
||||||
while(isspace(*p)) p++;
|
|
||||||
q = p;
|
|
||||||
while(isalnum(*p) || strchr("_.-", *p)) p++;
|
|
||||||
*p=0;
|
|
||||||
*realm = strdup(q);
|
|
||||||
fclose(F);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fclose(F);
|
|
||||||
*realm = 0;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user