summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ctld/ctld.h
diff options
context:
space:
mode:
authortrasz <trasz@FreeBSD.org>2014-03-25 12:01:55 +0000
committertrasz <trasz@FreeBSD.org>2014-03-25 12:01:55 +0000
commitc67809725b91564418db05d81c4defd4948baa01 (patch)
tree8f32ea3fb07ad18a77ceef48d79fdb7f6a75212e /usr.sbin/ctld/ctld.h
parentcf1ffe3cac870ee6ad26c728c25900ce607b3839 (diff)
downloadFreeBSD-src-c67809725b91564418db05d81c4defd4948baa01.zip
FreeBSD-src-c67809725b91564418db05d81c4defd4948baa01.tar.gz
MFC r261754:
Implement initiator-name and initiator-portal restrictions. Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'usr.sbin/ctld/ctld.h')
-rw-r--r--usr.sbin/ctld/ctld.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h
index 3557978..ef1731f 100644
--- a/usr.sbin/ctld/ctld.h
+++ b/usr.sbin/ctld/ctld.h
@@ -53,6 +53,18 @@ struct auth {
char *a_mutual_secret;
};
+struct auth_name {
+ TAILQ_ENTRY(auth_name) an_next;
+ struct auth_group *an_auth_group;
+ char *an_initator_name;
+};
+
+struct auth_portal {
+ TAILQ_ENTRY(auth_portal) ap_next;
+ struct auth_group *ap_auth_group;
+ char *ap_initator_portal;
+};
+
#define AG_TYPE_UNKNOWN 0
#define AG_TYPE_NO_AUTHENTICATION 1
#define AG_TYPE_CHAP 2
@@ -65,6 +77,8 @@ struct auth_group {
struct target *ag_target;
int ag_type;
TAILQ_HEAD(, auth) ag_auths;
+ TAILQ_HEAD(, auth_name) ag_names;
+ TAILQ_HEAD(, auth_portal) ag_portals;
};
struct portal {
@@ -192,6 +206,18 @@ const struct auth *auth_new_chap_mutual(struct auth_group *ag,
const struct auth *auth_find(struct auth_group *ag,
const char *user);
+const struct auth_name *auth_name_new(struct auth_group *ag,
+ const char *initiator_name);
+bool auth_name_defined(const struct auth_group *ag);
+const struct auth_name *auth_name_find(const struct auth_group *ag,
+ const char *initiator_name);
+
+const struct auth_portal *auth_portal_new(struct auth_group *ag,
+ const char *initiator_portal);
+bool auth_portal_defined(const struct auth_group *ag);
+const struct auth_portal *auth_portal_find(const struct auth_group *ag,
+ const char *initiator_portal);
+
struct portal_group *portal_group_new(struct conf *conf, const char *name);
void portal_group_delete(struct portal_group *pg);
struct portal_group *portal_group_find(struct conf *conf, const char *name);
OpenPOWER on IntegriCloud