Deleted Added
full compact
30c30
< * $FreeBSD: stable/10/usr.sbin/ctld/parse.y 263715 2014-03-25 11:45:03Z trasz $
---
> * $FreeBSD: stable/10/usr.sbin/ctld/parse.y 263720 2014-03-25 12:01:55Z trasz $
61,63c61,63
< %token DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP LISTEN LISTEN_ISER LUN MAXPROC NUM
< %token OPENING_BRACKET OPTION PATH PIDFILE PORTAL_GROUP SERIAL SIZE STR TARGET
< %token TIMEOUT
---
> %token DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP INITIATOR_NAME INITIATOR_PORTAL
> %token LISTEN LISTEN_ISER LUN MAXPROC NUM OPENING_BRACKET OPTION PATH PIDFILE
> %token PORTAL_GROUP SERIAL SIZE STR TARGET TIMEOUT
150a151,154
> |
> auth_group_initiator_name
> |
> auth_group_initiator_portal
178a183,204
> auth_group_initiator_name: INITIATOR_NAME STR
> {
> const struct auth_name *an;
>
> an = auth_name_new(auth_group, $2);
> free($2);
> if (an == NULL)
> return (1);
> }
> ;
>
> auth_group_initiator_portal: INITIATOR_PORTAL STR
> {
> const struct auth_portal *ap;
>
> ap = auth_portal_new(auth_group, $2);
> free($2);
> if (ap == NULL)
> return (1);
> }
> ;
>
279a306,309
> initiator_name_statement
> |
> initiator_portal_statement
> |
384a415,468
> initiator_name_statement: INITIATOR_NAME STR
> {
> const struct auth_name *an;
>
> if (target->t_auth_group != NULL) {
> if (target->t_auth_group->ag_name != NULL) {
> log_warnx("cannot mix auth-group with "
> "initiator-name for target \"%s\"",
> target->t_iqn);
> free($2);
> return (1);
> }
> } else {
> target->t_auth_group = auth_group_new(conf, NULL);
> if (target->t_auth_group == NULL) {
> free($2);
> return (1);
> }
> target->t_auth_group->ag_target = target;
> }
> an = auth_name_new(target->t_auth_group, $2);
> free($2);
> if (an == NULL)
> return (1);
> }
> ;
>
> initiator_portal_statement: INITIATOR_PORTAL STR
> {
> const struct auth_portal *ap;
>
> if (target->t_auth_group != NULL) {
> if (target->t_auth_group->ag_name != NULL) {
> log_warnx("cannot mix auth-group with "
> "initiator-portal for target \"%s\"",
> target->t_iqn);
> free($2);
> return (1);
> }
> } else {
> target->t_auth_group = auth_group_new(conf, NULL);
> if (target->t_auth_group == NULL) {
> free($2);
> return (1);
> }
> target->t_auth_group->ag_target = target;
> }
> ap = auth_portal_new(target->t_auth_group, $2);
> free($2);
> if (ap == NULL)
> return (1);
> }
> ;
>