diff options
author | David Howells <dhowells@redhat.com> | 2007-04-26 18:57:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-04-26 18:57:07 -0400 |
commit | 00d3b7a4533e367b0dc2812a706db8f9f071c27f (patch) | |
tree | f0b1ae0266267cb2c54cb11aa61ad0758ce9c0f5 /fs/afs/fsclient.c | |
parent | 436058a49e0fb91c74454dbee9cfee6fb53b4336 (diff) |
[AFS]: Add security support.
Add security support to the AFS filesystem. Kerberos IV tickets are added as
RxRPC keys are added to the session keyring with the klog program. open() and
other VFS operations then find this ticket with request_key() and either use
it immediately (eg: mkdir, unlink) or attach it to a file descriptor (open).
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/afs/fsclient.c')
-rw-r--r-- | fs/afs/fsclient.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c index 167ca615c2e6..321b489aa90f 100644 --- a/fs/afs/fsclient.c +++ b/fs/afs/fsclient.c | |||
@@ -148,6 +148,7 @@ static int afs_deliver_fs_fetch_status(struct afs_call *call, | |||
148 | * FS.FetchStatus operation type | 148 | * FS.FetchStatus operation type |
149 | */ | 149 | */ |
150 | static const struct afs_call_type afs_RXFSFetchStatus = { | 150 | static const struct afs_call_type afs_RXFSFetchStatus = { |
151 | .name = "FS.FetchStatus", | ||
151 | .deliver = afs_deliver_fs_fetch_status, | 152 | .deliver = afs_deliver_fs_fetch_status, |
152 | .abort_to_error = afs_abort_to_error, | 153 | .abort_to_error = afs_abort_to_error, |
153 | .destructor = afs_flat_call_destructor, | 154 | .destructor = afs_flat_call_destructor, |
@@ -157,6 +158,7 @@ static const struct afs_call_type afs_RXFSFetchStatus = { | |||
157 | * fetch the status information for a file | 158 | * fetch the status information for a file |
158 | */ | 159 | */ |
159 | int afs_fs_fetch_file_status(struct afs_server *server, | 160 | int afs_fs_fetch_file_status(struct afs_server *server, |
161 | struct key *key, | ||
160 | struct afs_vnode *vnode, | 162 | struct afs_vnode *vnode, |
161 | struct afs_volsync *volsync, | 163 | struct afs_volsync *volsync, |
162 | const struct afs_wait_mode *wait_mode) | 164 | const struct afs_wait_mode *wait_mode) |
@@ -164,12 +166,13 @@ int afs_fs_fetch_file_status(struct afs_server *server, | |||
164 | struct afs_call *call; | 166 | struct afs_call *call; |
165 | __be32 *bp; | 167 | __be32 *bp; |
166 | 168 | ||
167 | _enter(""); | 169 | _enter(",%x,,,", key_serial(key)); |
168 | 170 | ||
169 | call = afs_alloc_flat_call(&afs_RXFSFetchStatus, 16, 120); | 171 | call = afs_alloc_flat_call(&afs_RXFSFetchStatus, 16, 120); |
170 | if (!call) | 172 | if (!call) |
171 | return -ENOMEM; | 173 | return -ENOMEM; |
172 | 174 | ||
175 | call->key = key; | ||
173 | call->reply = vnode; | 176 | call->reply = vnode; |
174 | call->reply2 = volsync; | 177 | call->reply2 = volsync; |
175 | call->service_id = FS_SERVICE; | 178 | call->service_id = FS_SERVICE; |
@@ -279,6 +282,7 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call, | |||
279 | * FS.FetchData operation type | 282 | * FS.FetchData operation type |
280 | */ | 283 | */ |
281 | static const struct afs_call_type afs_RXFSFetchData = { | 284 | static const struct afs_call_type afs_RXFSFetchData = { |
285 | .name = "FS.FetchData", | ||
282 | .deliver = afs_deliver_fs_fetch_data, | 286 | .deliver = afs_deliver_fs_fetch_data, |
283 | .abort_to_error = afs_abort_to_error, | 287 | .abort_to_error = afs_abort_to_error, |
284 | .destructor = afs_flat_call_destructor, | 288 | .destructor = afs_flat_call_destructor, |
@@ -288,6 +292,7 @@ static const struct afs_call_type afs_RXFSFetchData = { | |||
288 | * fetch data from a file | 292 | * fetch data from a file |
289 | */ | 293 | */ |
290 | int afs_fs_fetch_data(struct afs_server *server, | 294 | int afs_fs_fetch_data(struct afs_server *server, |
295 | struct key *key, | ||
291 | struct afs_vnode *vnode, | 296 | struct afs_vnode *vnode, |
292 | off_t offset, size_t length, | 297 | off_t offset, size_t length, |
293 | struct page *buffer, | 298 | struct page *buffer, |
@@ -303,6 +308,7 @@ int afs_fs_fetch_data(struct afs_server *server, | |||
303 | if (!call) | 308 | if (!call) |
304 | return -ENOMEM; | 309 | return -ENOMEM; |
305 | 310 | ||
311 | call->key = key; | ||
306 | call->reply = vnode; | 312 | call->reply = vnode; |
307 | call->reply2 = volsync; | 313 | call->reply2 = volsync; |
308 | call->reply3 = buffer; | 314 | call->reply3 = buffer; |
@@ -338,6 +344,7 @@ static int afs_deliver_fs_give_up_callbacks(struct afs_call *call, | |||
338 | * FS.GiveUpCallBacks operation type | 344 | * FS.GiveUpCallBacks operation type |
339 | */ | 345 | */ |
340 | static const struct afs_call_type afs_RXFSGiveUpCallBacks = { | 346 | static const struct afs_call_type afs_RXFSGiveUpCallBacks = { |
347 | .name = "FS.GiveUpCallBacks", | ||
341 | .deliver = afs_deliver_fs_give_up_callbacks, | 348 | .deliver = afs_deliver_fs_give_up_callbacks, |
342 | .abort_to_error = afs_abort_to_error, | 349 | .abort_to_error = afs_abort_to_error, |
343 | .destructor = afs_flat_call_destructor, | 350 | .destructor = afs_flat_call_destructor, |