3
Kerberos credential store
4
Originally coded by Tim Miller / Brown University
5
Mods 1/92 By Peter Bosanko
7
Modified May 1994 by Julia Menapace and John Gilmore, Cygnus
13
extern OSErr fConstructErr;
15
OSErr CreatePrefFile();
16
OSErr WriteUser(); /* saves gUserName to prefs file */
18
/* Used internally... */
19
OSErr WritePref(short refnum, Handle dataHandle, OSType mapType, short resID,
21
OSErr WritePrefStr(short refnum, char *dataString, OSType mapType, short resID,
24
/*** Realm info routines: ***/
25
OSErr GetLocalRealm(char *lrealm); /* stuffs local realm in lrealm */
26
OSErr SetLocalRealm(const char *lrealm); /* sets local realm */
28
OSErr GetRealm(const char *host, char *realm); /* yields realm for given
30
OSErr AddRealmMap(const char *netorhost, const char *realm); /* says hosts
31
with this name or in this domain (if
32
begins with period) map to this realm
33
(provided no more specific map is
35
OSErr DeleteRealmMap(const char *netorhost); /* deletes realm map for the
36
net or net hostname */
37
OSErr GetNthRealmMap(const int n, char *netorhost, char *realm); /* yields
38
the Nth mapping of a net or host to
41
OSErr GetNthServer(const int n, const char *realm, const int mustadmin,
42
char *server); /* yields Nth (administrating if
43
mustadmin is true) server for
45
OSErr AddServerMap(const char *realm, const char *server,
46
const int isadmin); /* says this server services this
47
realm (administratively if isadmin) */
48
OSErr DeleteServerMap(const char *realm, const char *server); /* deletes
49
the map of this realm to this server */
50
OSErr GetNthServerMap(const int n, char *realm, char *server, int *admin);
51
/* yields Nth realm-server mapping */
53
OSErr OpenPrefsFile(short *refnum); /* open (create if necessary) prefs file
55
OSErr WriteRealmMap();
56
OSErr WriteServerMap();