parse.y (73ee00cef531927e501f431bba76b48bd9edb661) | parse.y (92847ee1f364687be3ec9aed6e1837e0b3c349f5) |
---|---|
1%{ 2/*- 3 * Copyright (c) 2012 The FreeBSD Foundation 4 * All rights reserved. 5 * 6 * This software was developed by Edward Tomasz Napierala under sponsorship 7 * from the FreeBSD Foundation. 8 * --- 638 unchanged lines hidden (view full) --- 647 } 648 ap = auth_portal_new(target->t_auth_group, $2); 649 free($2); 650 if (ap == NULL) 651 return (1); 652 } 653 ; 654 | 1%{ 2/*- 3 * Copyright (c) 2012 The FreeBSD Foundation 4 * All rights reserved. 5 * 6 * This software was developed by Edward Tomasz Napierala under sponsorship 7 * from the FreeBSD Foundation. 8 * --- 638 unchanged lines hidden (view full) --- 647 } 648 ap = auth_portal_new(target->t_auth_group, $2); 649 free($2); 650 if (ap == NULL) 651 return (1); 652 } 653 ; 654 |
655target_portal_group: PORTAL_GROUP STR | 655target_portal_group: PORTAL_GROUP STR STR |
656 { | 656 { |
657 if (target->t_portal_group != NULL) { 658 log_warnx("portal-group for target \"%s\" " 659 "specified more than once", target->t_name); | 657 struct portal_group *tpg; 658 struct auth_group *tag; 659 struct port *tp; 660 661 tpg = portal_group_find(conf, $2); 662 if (tpg == NULL) { 663 log_warnx("unknown portal-group \"%s\" for target " 664 "\"%s\"", $2, target->t_name); |
660 free($2); | 665 free($2); |
666 free($3); |
|
661 return (1); 662 } | 667 return (1); 668 } |
663 target->t_portal_group = portal_group_find(conf, $2); 664 if (target->t_portal_group == NULL) { | 669 tag = auth_group_find(conf, $3); 670 if (tag == NULL) { 671 log_warnx("unknown auth-group \"%s\" for target " 672 "\"%s\"", $3, target->t_name); 673 free($2); 674 free($3); 675 return (1); 676 } 677 tp = port_new(conf, target, tpg); 678 if (tp == NULL) { 679 log_warnx("can't link portal-group \"%s\" to target " 680 "\"%s\"", $2, target->t_name); 681 free($2); 682 return (1); 683 } 684 tp->p_auth_group = tag; 685 free($2); 686 free($3); 687 } 688 | PORTAL_GROUP STR 689 { 690 struct portal_group *tpg; 691 struct port *tp; 692 693 tpg = portal_group_find(conf, $2); 694 if (tpg == NULL) { |
665 log_warnx("unknown portal-group \"%s\" for target " 666 "\"%s\"", $2, target->t_name); 667 free($2); 668 return (1); 669 } | 695 log_warnx("unknown portal-group \"%s\" for target " 696 "\"%s\"", $2, target->t_name); 697 free($2); 698 return (1); 699 } |
700 tp = port_new(conf, target, tpg); 701 if (tp == NULL) { 702 log_warnx("can't link portal-group \"%s\" to target " 703 "\"%s\"", $2, target->t_name); 704 free($2); 705 return (1); 706 } |
|
670 free($2); 671 } 672 ; 673 674target_redirect: REDIRECT STR 675 { 676 int error; 677 --- 296 unchanged lines hidden --- | 707 free($2); 708 } 709 ; 710 711target_redirect: REDIRECT STR 712 { 713 int error; 714 --- 296 unchanged lines hidden --- |