30c30
< * $FreeBSD: stable/10/usr.sbin/ctld/parse.y 263723 2014-03-25 12:10:30Z trasz $
---
> * $FreeBSD: stable/10/usr.sbin/ctld/parse.y 263724 2014-03-25 12:12:37Z trasz $
60,63c60,63
< %token ALIAS AUTH_GROUP BACKEND BLOCKSIZE CHAP CHAP_MUTUAL CLOSING_BRACKET
< %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
---
> %token ALIAS AUTH_GROUP AUTH_TYPE BACKEND BLOCKSIZE CHAP CHAP_MUTUAL
> %token CLOSING_BRACKET DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP INITIATOR_NAME
> %token INITIATOR_PORTAL LISTEN LISTEN_ISER LUN MAXPROC NUM OPENING_BRACKET
> %token OPTION PATH PIDFILE PORTAL_GROUP SERIAL SIZE STR TARGET TIMEOUT
147a148,149
> auth_group_auth_type
> |
156a159,169
> auth_group_auth_type: AUTH_TYPE STR
> {
> int error;
>
> error = auth_group_set_type_str(auth_group, $2);
> free($2);
> if (error != 0)
> return (1);
> }
> ;
>
301a315,316
> target_auth_type
> |
333c348
< log_warnx("cannot mix auth-group with explicit "
---
> log_warnx("cannot use both auth-group and explicit "
347a363,388
> target_auth_type: AUTH_TYPE STR
> {
> int error;
>
> if (target->t_auth_group != NULL) {
> if (target->t_auth_group->ag_name != NULL) {
> log_warnx("cannot use both auth-group and "
> "auth-type for target \"%s\"",
> target->t_name);
> 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;
> }
> error = auth_group_set_type_str(target->t_auth_group, $2);
> free($2);
> if (error != 0)
> return (1);
> }
> ;
>
354,355c395,396
< log_warnx("cannot mix auth-group with explicit "
< "authorisations for target \"%s\"",
---
> log_warnx("cannot use both auth-group and "
> "chap for target \"%s\"",
384,385c425,426
< log_warnx("cannot mix auth-group with explicit "
< "authorisations for target \"%s\"",
---
> log_warnx("cannot use both auth-group and "
> "chap-mutual for target \"%s\"",
421c462
< log_warnx("cannot mix auth-group with "
---
> log_warnx("cannot use both auth-group and "
448c489
< log_warnx("cannot mix auth-group with "
---
> log_warnx("cannot use both auth-group and "
< * $FreeBSD: stable/10/usr.sbin/ctld/parse.y 263723 2014-03-25 12:10:30Z trasz $
---
> * $FreeBSD: stable/10/usr.sbin/ctld/parse.y 263724 2014-03-25 12:12:37Z trasz $
60,63c60,63
< %token ALIAS AUTH_GROUP BACKEND BLOCKSIZE CHAP CHAP_MUTUAL CLOSING_BRACKET
< %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
---
> %token ALIAS AUTH_GROUP AUTH_TYPE BACKEND BLOCKSIZE CHAP CHAP_MUTUAL
> %token CLOSING_BRACKET DEBUG DEVICE_ID DISCOVERY_AUTH_GROUP INITIATOR_NAME
> %token INITIATOR_PORTAL LISTEN LISTEN_ISER LUN MAXPROC NUM OPENING_BRACKET
> %token OPTION PATH PIDFILE PORTAL_GROUP SERIAL SIZE STR TARGET TIMEOUT
147a148,149
> auth_group_auth_type
> |
156a159,169
> auth_group_auth_type: AUTH_TYPE STR
> {
> int error;
>
> error = auth_group_set_type_str(auth_group, $2);
> free($2);
> if (error != 0)
> return (1);
> }
> ;
>
301a315,316
> target_auth_type
> |
333c348
< log_warnx("cannot mix auth-group with explicit "
---
> log_warnx("cannot use both auth-group and explicit "
347a363,388
> target_auth_type: AUTH_TYPE STR
> {
> int error;
>
> if (target->t_auth_group != NULL) {
> if (target->t_auth_group->ag_name != NULL) {
> log_warnx("cannot use both auth-group and "
> "auth-type for target \"%s\"",
> target->t_name);
> 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;
> }
> error = auth_group_set_type_str(target->t_auth_group, $2);
> free($2);
> if (error != 0)
> return (1);
> }
> ;
>
354,355c395,396
< log_warnx("cannot mix auth-group with explicit "
< "authorisations for target \"%s\"",
---
> log_warnx("cannot use both auth-group and "
> "chap for target \"%s\"",
384,385c425,426
< log_warnx("cannot mix auth-group with explicit "
< "authorisations for target \"%s\"",
---
> log_warnx("cannot use both auth-group and "
> "chap-mutual for target \"%s\"",
421c462
< log_warnx("cannot mix auth-group with "
---
> log_warnx("cannot use both auth-group and "
448c489
< log_warnx("cannot mix auth-group with "
---
> log_warnx("cannot use both auth-group and "