|
|
1.1 root 1: There is a man page for authmgr(8) with the authmgr paper in
2: /usr/cohrs/paper.
3:
4: If you want to add a new challenge box type to authmgr, follow
5: these steps.
6:
7: 1) create a new .c file, containing two procedures, a foochal
8: procedure and a foocomp procedure (assuming foo is the type
9: of challenge box you are adding).
10:
11: char*
12: foochal(kp)
13: struct keyinfo *kp;
14: char *login;
15: {
16: return "the challenge string, up to 60 characters login";
17: }
18:
19: int
20: foocomp(kp, response)
21: struct keyinfo *kp;
22: char *response;
23: {
24: if(response is correct)
25: return 0;
26: else
27: return 1;
28: }
29:
30: struct keyinfo is defined in "authmgr.h", so you'll want to include
31: this. Look at atalla.c for an example. Note that you can define
32: static variables if you want foochal to save stuff that foocomp
33: uses later.
34:
35: 2) Add foo.o to the Makefile OBJS line.
36:
37: 3) Edit keytypes.c, and, in the "keytypemap" structure, add an
38: entry for the foo box, for example:
39: "foo", foochal, foocomp, /* a foo encryption box */
40:
41: Put this entry just before the line that says "0, 0, 0". Don't
42: put it first, no matter what!
43:
44: Also, on the lines just before the keytypemap structure, add
45: external refs to foochal and foocomp (look at the atalla lines
46: if you need examples).
47:
48: 4) make authmgr
49:
50: You should now be able to add lines in the keys file of type "foo",
51: and the foochal and foocomp routines should be used to make the
52: challenge and compare the response with the correct response.
53:
54: If foochal ever returns a NULL pointer, authmgr assumes that it
55: should prompt the user for a "Password: " instead of a normal
56: challenge. Take care to not return NULL if this isn't what you want.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.