2 KAFS(3) UNIX Programmer's Manual KAFS(3)
5 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,
6 k
\bka
\baf
\bfs
\bs_
\b_s
\bse
\bet
\bt_
\b_v
\bve
\ber
\brb
\bbo
\bos
\bse
\be, k
\bka
\baf
\bfs
\bs_
\b_s
\bse
\bet
\btt
\bto
\bok
\bke
\ben
\bn_
\b_r
\brx
\bxk
\bka
\bad
\bd, k
\bka
\baf
\bfs
\bs_
\b_s
\bse
\bet
\btt
\bto
\bok
\bke
\ben
\bn, k
\bkr
\brb
\bb_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg,
7 k
\bkr
\brb
\bb_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg_
\b_u
\bui
\bid
\bd k
\bka
\baf
\bfs
\bs_
\b_s
\bse
\bet
\btt
\bto
\bok
\bke
\ben
\bn5
\b5, k
\bkr
\brb
\bb5
\b5_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg, k
\bkr
\brb
\bb5
\b5_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg_
\b_u
\bui
\bid
\bd - AFS library
9 L
\bLI
\bIB
\bBR
\bRA
\bAR
\bRY
\bY
10 AFS cache manager access library (libkafs, -lkafs)
12 S
\bSY
\bYN
\bNO
\bOP
\bPS
\bSI
\bIS
\bS
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_
\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\bES
\bSC
\bCR
\bRI
\bIP
\bPT
\bTI
\bIO
\bON
\bN
56 k
\bk_
\b_h
\bha
\bas
\bsa
\baf
\bfs
\bs() initializes some library internal structures, and tests for
57 the presence of AFS in the kernel, none of the other functions should be
58 called before k
\bk_
\b_h
\bha
\bas
\bsa
\baf
\bfs
\bs() is called, or if it fails.
60 k
\bka
\baf
\bfs
\bs_
\b_s
\bse
\bet
\bt_
\b_v
\bve
\ber
\brb
\bbo
\bos
\bse
\be() set a log function that will be called each time the
61 kafs library does something important so that the application using
62 libkafs can output verbose logging. Calling the function
63 _
\bk_
\ba_
\bf_
\bs_
\b__
\bs_
\be_
\bt_
\b__
\bv_
\be_
\br_
\bb_
\bo_
\bs_
\be with the function argument set to NULL will stop libkafs
64 from calling the logging function (if set).
67 k
\bka
\baf
\bfs
\bs_
\b_s
\bse
\bet
\btt
\bto
\bok
\bke
\ben
\bn_
\b_r
\brx
\bxk
\bka
\bad
\bd() set rxkad with the _
\bt_
\bo_
\bk_
\be_
\bn and _
\bt_
\bi_
\bc_
\bk_
\be_
\bt (that have the
68 length _
\bt_
\bi_
\bc_
\bk_
\be_
\bt_
\b__
\bl_
\be_
\bn) for a given _
\bc_
\be_
\bl_
\bl.
70 k
\bka
\baf
\bfs
\bs_
\b_s
\bse
\bet
\btt
\bto
\bok
\bke
\ben
\bn() and k
\bka
\baf
\bfs
\bs_
\b_s
\bse
\bet
\btt
\bto
\bok
\bke
\ben
\bn5
\b5() work the same way as
71 k
\bka
\baf
\bfs
\bs_
\b_s
\bse
\bet
\btt
\bto
\bok
\bke
\ben
\bn_
\b_r
\brx
\bxk
\bka
\bad
\bd() but internally converts the Kerberos 4 or 5 creden-
72 tial to a afs cleartoken and ticket.
74 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-
75 ets) for the specified _
\bc_
\be_
\bl_
\bl and _
\br_
\be_
\ba_
\bl_
\bm. If _
\bc_
\be_
\bl_
\bl is NULL, the local cell is
76 used. If _
\br_
\be_
\ba_
\bl_
\bm is NULL, the function tries to guess what realm to use.
77 Unless you have some good knowledge of what cell or realm to use, you
78 should pass NULL. k
\bkr
\brb
\bb_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg() will use the real user-id for the ViceId
79 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.
81 k
\bkr
\brb
\bb5
\b5_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg(), and k
\bkr
\brb
\bb5
\b5_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg_
\b_u
\bui
\bid
\bd() are the Kerberos 5 equivalents of
82 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().
84 k
\bkr
\brb
\bb5
\b5_
\b_a
\baf
\bfs
\bsl
\blo
\bog
\bg(), k
\bka
\baf
\bfs
\bs_
\b_s
\bse
\bet
\btt
\bto
\bok
\bke
\ben
\bn5
\b5() can be configured to behave diffrently
85 via a k
\bkr
\brb
\bb5
\b5_
\b_a
\bap
\bpp
\bpd
\bde
\bef
\bfa
\bau
\bul
\blt
\bt option afs-use-524 in _
\bk_
\br_
\bb_
\b5_
\b._
\bc_
\bo_
\bn_
\bf. Possible values
88 yes use the 524 server in the realm to convert the ticket
90 no use the Kerberos 5 ticket directly, can be used with if the afs
91 cell support 2b token.
94 convert the Kerberos 5 credential to a 2b token locally (the same
95 work as a 2b 524 server should have done).
100 SU.SE = { afs-use-524 = local }
101 PDC.KTH.SE = { afs-use-524 = yes }
104 libkafs will use the libkafs as application name when running the
105 k
\bkr
\brb
\bb5
\b5_
\b_a
\bap
\bpp
\bpd
\bde
\bef
\bfa
\bau
\bul
\blt
\bt function call.
107 The (uppercased) cellname is used as the realm to the k
\bkr
\brb
\bb5
\b5_
\b_a
\bap
\bpp
\bpd
\bde
\bef
\bfa
\bau
\bul
\blt
\bt
108 f
\bfu
\bun
\bnc
\bct
\bti
\bio
\bon
\bn.
\b.
110 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
111 more than _
\bl_
\be_
\bn characters is put in _
\bc_
\be_
\bl_
\bl.
113 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
114 function is equivalent to l
\blp
\bpi
\bio
\boc
\bct
\btl
\bl().
116 k
\bk_
\b_s
\bse
\bet
\btp
\bpa
\bag
\bg() initializes a new PAG.
118 k
\bk_
\b_u
\bun
\bnl
\blo
\bog
\bg() removes destroys all tokens in the current PAG.
120 R
\bRE
\bET
\bTU
\bUR
\bRN
\bN V
\bVA
\bAL
\bLU
\bUE
\bES
\bS
121 k
\bk_
\b_h
\bha
\bas
\bsa
\baf
\bfs
\bs() returns 1 if AFS is present in the kernel, 0 otherwise.
122 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-
123 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
124 k
\bk_
\b_u
\bun
\bnl
\blo
\bog
\bg() all return the value of the underlaying system call, 0 on suc-
127 E
\bEN
\bNV
\bVI
\bIR
\bRO
\bON
\bNM
\bME
\bEN
\bNT
\bT
128 The following environment variable affect the mode of operation of k
\bka
\baf
\bfs
\bs:
130 AFS_SYSCALL Normally, k
\bka
\baf
\bfs
\bs will try to figure out the correct system
131 call(s) that are used by AFS by itself. If it does not man-
132 age to do that, or does it incorrectly, you can set this
133 variable to the system call number or list of system call
134 numbers that should be used.
136 E
\bEX
\bXA
\bAM
\bMP
\bPL
\bLE
\bES
\bS
137 The following code from l
\blo
\bog
\bgi
\bin
\bn will obtain a new PAG and tokens for the
138 local cell and the cell of the users home directory.
143 if(k_afs_cell_of_file(pwd->pw_dir, cell, sizeof(cell)) == 0)
144 krb_afslog(cell, NULL);
145 krb_afslog(NULL, NULL);
148 E
\bER
\bRR
\bRO
\bOR
\bRS
\bS
149 If any of these functions (apart from k
\bk_
\b_h
\bha
\bas
\bsa
\baf
\bfs
\bs()) is called without AFS
150 being present in the kernel, the process will usually (depending on the
151 operating system) receive a SIGSYS signal.
153 S
\bSE
\bEE
\bE A
\bAL
\bLS
\bSO
\bO
154 Transarc Corporation, "File Server/Cache Manager Interface", _
\bA_
\bF_
\bS_
\b-_
\b3
155 _
\bP_
\br_
\bo_
\bg_
\br_
\ba_
\bm_
\bm_
\be_
\br_
\b'_
\bs _
\bR_
\be_
\bf_
\be_
\br_
\be_
\bn_
\bc_
\be, 1991.
157 krb5_appdefaults(3), krb5.conf(5)
160 AFS_SYSCALL has no effect under AIX.
162 HEIMDAL Mar 17, 2003 3