aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/osd_sec.h
diff options
context:
space:
mode:
authorBoaz Harrosh <bharrosh@panasas.com>2009-01-25 09:54:10 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-03-12 13:58:06 -0400
commitde258bf5e63863f42e0f9a7c5ffd29916a41e399 (patch)
treec90aa5f4dd86b61df7915864589562ef9fabe625 /include/scsi/osd_sec.h
parent82443a58d361123d418033e9e32ac29a842fce68 (diff)
[SCSI] libosd: OSDv1 Headers
Headers only patch. osd_protocol.h Contains a C-fied definition of the T10 OSD standard osd_types.h Contains CPU order common used types osd_initiator.h API definition of the osd_initiator library osd_sec.h Contains High level API for the security manager. [Note that checkpatch spews errors on things that are valid in this context and will not be fixed] Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Reviewed-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'include/scsi/osd_sec.h')
-rw-r--r--include/scsi/osd_sec.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/include/scsi/osd_sec.h b/include/scsi/osd_sec.h
new file mode 100644
index 000000000000..4c09fee8ae1e
--- /dev/null
+++ b/include/scsi/osd_sec.h
@@ -0,0 +1,45 @@
1/*
2 * osd_sec.h - OSD security manager API
3 *
4 * Copyright (C) 2008 Panasas Inc. All rights reserved.
5 *
6 * Authors:
7 * Boaz Harrosh <bharrosh@panasas.com>
8 * Benny Halevy <bhalevy@panasas.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License version 2
12 *
13 */
14#ifndef __OSD_SEC_H__
15#define __OSD_SEC_H__
16
17#include "osd_protocol.h"
18#include "osd_types.h"
19
20/*
21 * Contains types and constants of osd capabilities and security
22 * encoding/decoding.
23 * API is trying to keep security abstract so initiator of an object
24 * based pNFS client knows as little as possible about security and
25 * capabilities. It is the Server's osd-initiator place to know more.
26 * Also can be used by osd-target.
27 */
28void osd_sec_encode_caps(void *caps, ...);/* NI */
29void osd_sec_init_nosec_doall_caps(void *caps,
30 const struct osd_obj_id *obj, bool is_collection, const bool is_v1);
31
32bool osd_is_sec_alldata(struct osd_security_parameters *sec_params);
33
34/* Conditionally sign the CDB according to security setting in ocdb
35 * with cap_key */
36void osd_sec_sign_cdb(struct osd_cdb *ocdb, const u8 *cap_key);
37
38/* Unconditionally sign the BIO data with cap_key.
39 * Check for osd_is_sec_alldata() was done prior to calling this. */
40void osd_sec_sign_data(void *data_integ, struct bio *bio, const u8 *cap_key);
41
42/* Version independent copy of caps into the cdb */
43void osd_set_caps(struct osd_cdb *cdb, const void *caps);
44
45#endif /* ndef __OSD_SEC_H__ */