diff options
author | trasz <trasz@FreeBSD.org> | 2014-02-11 11:08:04 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2014-02-11 11:08:04 +0000 |
commit | fec3636fbdc2e427a2cc2fa123981ec14a638897 (patch) | |
tree | f51dedf1cfe734349e231d42297d4f3be11dbfae /usr.sbin/ctld/ctld.h | |
parent | b84432b20cfa69f9c2d4d1bbe92ddf04e101e92d (diff) | |
download | FreeBSD-src-fec3636fbdc2e427a2cc2fa123981ec14a638897.zip FreeBSD-src-fec3636fbdc2e427a2cc2fa123981ec14a638897.tar.gz |
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.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/usr.sbin/ctld/ctld.h b/usr.sbin/ctld/ctld.h index 08b8c7d..1b1b30d 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); |