1 KAFS(3) NetBSD Programmer's Manual KAFS(3)
4 k
\bk_
\b_h
\bha
\bas
\bsa
\baf
\bfs
\bs, k
\bk_
\b_p
\bpi
\bio
\boc
\bct
\btl
\bl, k
\bk_
\b_u
\bun
\bnl
\blo
\bog
\bg, k
\bk_
\b_s
\bse
\bet
\btp
\bpa
\bag
\bg, k
\bk_
\b_a
\baf
\bfs
\bs_
\b_c
\bce
\bel
\bll
\bl_
\b_o
\bof
\bf_
\b_f
\bfi
\bil
\ble
\be, k
\bkr
\brb
\bb_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg,
5 k
\bkr
\brb
\bb_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg_
\b_u
\bui
\bid
\bd - AFS library
7 L
\bLI
\bIB
\bBR
\bRA
\bAR
\bRY
\bY
8 AFS cache manager access library (libkafs, -lkafs)
10 S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
11 #
\b#i
\bin
\bnc
\bcl
\blu
\bud
\bde
\be <
\b<k
\bka
\baf
\bfs
\bs.
\b.h
\bh>
\b>
14 k
\bk_
\b_a
\baf
\bfs
\bs_
\b_c
\bce
\bel
\bll
\bl_
\b_o
\bof
\bf_
\b_f
\bfi
\bil
\ble
\be(_
\bc_
\bo_
\bn_
\bs_
\bt _
\bc_
\bh_
\ba_
\br _
\b*_
\bp_
\ba_
\bt_
\bh, _
\bc_
\bh_
\ba_
\br _
\b*_
\bc_
\be_
\bl_
\bl, _
\bi_
\bn_
\bt _
\bl_
\be_
\bn);
17 k
\bk_
\b_h
\bha
\bas
\bsa
\baf
\bfs
\bs();
20 k
\bk_
\b_p
\bpi
\bio
\boc
\bct
\btl
\bl(_
\bc_
\bh_
\ba_
\br _
\b*_
\ba_
\b__
\bp_
\ba_
\bt_
\bh, _
\bi_
\bn_
\bt _
\bo_
\b__
\bo_
\bp_
\bc_
\bo_
\bd_
\be, _
\bs_
\bt_
\br_
\bu_
\bc_
\bt _
\bV_
\bi_
\bc_
\be_
\bI_
\bo_
\bc_
\bt_
\bl _
\b*_
\ba_
\b__
\bp_
\ba_
\br_
\ba_
\bm_
\bs_
\bP,
21 _
\bi_
\bn_
\bt _
\ba_
\b__
\bf_
\bo_
\bl_
\bl_
\bo_
\bw_
\bS_
\by_
\bm_
\bl_
\bi_
\bn_
\bk_
\bs);
24 k
\bk_
\b_s
\bse
\bet
\btp
\bpa
\bag
\bg();
27 k
\bk_
\b_u
\bun
\bnl
\blo
\bog
\bg();
30 k
\bkr
\brb
\bb_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg(_
\bc_
\bh_
\ba_
\br _
\b*_
\bc_
\be_
\bl_
\bl, _
\bc_
\bh_
\ba_
\br _
\b*_
\br_
\be_
\ba_
\bl_
\bm);
33 k
\bkr
\brb
\bb_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg_
\b_u
\bui
\bid
\bd(_
\bc_
\bh_
\ba_
\br _
\b*_
\bc_
\be_
\bl_
\bl, _
\bc_
\bh_
\ba_
\br _
\b*_
\br_
\be_
\ba_
\bl_
\bm, _
\bu_
\bi_
\bd_
\b__
\bt _
\bu_
\bi_
\bd);
35 D
\bDE
\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
36 k
\bk_
\b_h
\bha
\bas
\bsa
\baf
\bfs
\bs() initializes some library internal structures, and tests for
37 the presence of AFS in the kernel, none of the other functions should be
38 called before k
\bk_
\b_h
\bha
\bas
\bsa
\baf
\bfs
\bs() is called, or if it fails.
40 k
\bkr
\brb
\bb_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg(), and k
\bkr
\brb
\bb_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg_
\b_u
\bui
\bid
\bd() obtains new tokens (and possibly tick-
41 ets) for the specified _
\bc_
\be_
\bl_
\bl and _
\br_
\be_
\ba_
\bl_
\bm. If _
\bc_
\be_
\bl_
\bl is NULL, the local cell
42 is used. If _
\br_
\be_
\ba_
\bl_
\bm is NULL, the function tries to guess what realm to use.
43 Unless you have some good knowledge of what cell or realm to use, you
44 should pass NULL. k
\bkr
\brb
\bb_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg() will use the real user-id for the ViceId
45 field in the token, k
\bkr
\brb
\bb_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg_
\b_u
\bui
\bid
\bd() will use _
\bu_
\bi_
\bd.
47 k
\bk_
\b_a
\baf
\bfs
\bs_
\b_c
\bce
\bel
\bll
\bl_
\b_o
\bof
\bf_
\b_f
\bfi
\bil
\ble
\be() will in _
\bc_
\be_
\bl_
\bl return the cell of a specified file, no
48 more than _
\bl_
\be_
\bn characters is put in _
\bc_
\be_
\bl_
\bl.
50 k
\bk_
\b_p
\bpi
\bio
\boc
\bct
\btl
\bl() does a p
\bpi
\bio
\boc
\bct
\btl
\bl() syscall with the specified arguments. This
51 function is equivalent to l
\blp
\bpi
\bio
\boc
\bct
\btl
\bl().
53 k
\bk_
\b_s
\bse
\bet
\btp
\bpa
\bag
\bg() initializes a new PAG.
55 k
\bk_
\b_u
\bun
\bnl
\blo
\bog
\bg() removes destroys all tokens in the current PAG.
57 R
\bRE
\bET
\bTU
\bUR
\bRN
\bN V
\bVA
\bAL
\bLU
\bUE
\bES
\bS
58 k
\bk_
\b_h
\bha
\bas
\bsa
\baf
\bfs
\bs() returns 1 if AFS is present in the kernel, 0 otherwise.
59 k
\bkr
\brb
\bb_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg() and k
\bkr
\brb
\bb_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg_
\b_u
\bui
\bid
\bd() returns 0 on success, or a kerberos er-
60 ror number on failure. k
\bk_
\b_a
\baf
\bfs
\bs_
\b_c
\bce
\bel
\bll
\bl_
\b_o
\bof
\bf_
\b_f
\bfi
\bil
\ble
\be(), k
\bk_
\b_p
\bpi
\bio
\boc
\bct
\btl
\bl(), k
\bk_
\b_s
\bse
\bet
\btp
\bpa
\bag
\bg(), and
61 k
\bk_
\b_u
\bun
\bnl
\blo
\bog
\bg() all return the value of the underlaying system call, 0 on suc-
64 E
\bEN
\bNV
\bVI
\bIR
\bRO
\bON
\bNM
\bME
\bEN
\bNT
\bT
65 The following environment variable affect the mode of operation of k
\bka
\baf
\bfs
\bs:
67 AFS_SYSCALL Normally, k
\bka
\baf
\bfs
\bs will try to figure out the correct system
68 call(s) that are used by AFS by itself. If it does not man-
69 age to do that, or does it incorrectly, you can set this
70 variable to the system call number or list of system call
71 numbers that should be used.
73 E
\bEX
\bXA
\bAM
\bMP
\bPL
\bLE
\bES
\bS
74 The following code from l
\blo
\bog
\bgi
\bin
\bn will obtain a new PAG and tokens for the
75 local cell and the cell of the users home directory.
80 if(k_afs_cell_of_file(pwd->pw_dir, cell, sizeof(cell)) == 0)
81 krb_afslog(cell, NULL);
82 krb_afslog(NULL, NULL);
85 E
\bER
\bRR
\bRO
\bOR
\bRS
\bS
86 If any of these functions (apart from k
\bk_
\b_h
\bha
\bas
\bsa
\baf
\bfs
\bs()) is called without AFS
87 beeing present in the kernel, the process will usually (depending on the
88 operating system) receive a SIGSYS signal.
90 S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
91 Transarc Corporation, "File Server/Cache Manager Interface", _
\bA_
\bF_
\bS_
\b-_
\b3
92 _
\bP_
\br_
\bo_
\bg_
\br_
\ba_
\bm_
\bm_
\be_
\br_
\b'_
\bs _
\bR_
\be_
\bf_
\be_
\br_
\be_
\bn_
\bc_
\be, 1991.
95 AFS_SYSCALL has no effect under AIX.