~ubuntu-branches/ubuntu/trusty/haproxy/trusty-updates

« back to all changes in this revision

Viewing changes to src/acl.c

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Cornet
  • Date: 2009-10-19 22:31:45 UTC
  • mfrom: (1.2.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20091019223145-rymupk5njs544bvp
ImportĀ upstreamĀ versionĀ 1.3.22

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#include <common/standard.h>
20
20
 
21
21
#include <proto/acl.h>
 
22
#include <proto/log.h>
22
23
 
23
24
/* The capabilities of filtering hooks describe the type of information
24
25
 * available to each of them.
761
762
        if (!acl_expr)
762
763
                goto out_return;
763
764
 
 
765
        /* Check for args beginning with an opening parenthesis just after the
 
766
         * subject, as this is almost certainly a typo. Right now we can only
 
767
         * emit a warning, so let's do so.
 
768
         */
 
769
        if (!strchr(args[1], '(') && *args[2] == '(')
 
770
                Warning("parsing acl '%s' :\n"
 
771
                        "  matching '%s' for pattern '%s' is likely a mistake and probably\n"
 
772
                        "  not what you want. Maybe you need to remove the extraneous space before '('.\n"
 
773
                        "  If you are really sure this is not an error, please insert '--' between the\n"
 
774
                        "  match and the pattern to make this warning message disappear.\n",
 
775
                        args[0], args[1], args[2]);
 
776
 
764
777
        cur_acl = find_acl_by_name(args[0], known_acl);
765
778
        if (!cur_acl) {
766
779
                name = strdup(args[0]);
847
860
                goto out_free_name;
848
861
 
849
862
        cur_acl->name = name;
 
863
        cur_acl->requires |= acl_expr->kw->requires;
850
864
        LIST_INIT(&cur_acl->expr);
851
865
        LIST_ADDQ(&cur_acl->expr, &acl_expr->list);
852
866
        if (known_acl)