~ubuntu-branches/ubuntu/karmic/dante/karmic

« back to all changes in this revision

Viewing changes to dlib/config_parse.y

  • Committer: Bazaar Package Importer
  • Author(s): Adrian Bridgett
  • Date: 2003-11-15 18:59:33 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20031115185933-vkxgk8f226ovwmrh
Tags: 1.1.14-2
improve extended descriptions (closes: #209510, #210116)

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
#include "yacconfig.h"
49
49
 
50
50
static const char rcsid[] =
51
 
"$Id: config_parse.y,v 1.180 2001/12/12 14:42:10 karls Exp $";
 
51
"$Id: config_parse.y,v 1.183 2002/05/01 12:35:14 michaels Exp $";
52
52
 
53
53
__BEGIN_DECLS
54
54
 
202
202
%type   <string> serverinit serverconfig
203
203
%type   <string> userids user_privileged user_unprivileged user_libwrap
204
204
%type   <uid>           userid
 
205
%type   <string> childstate
205
206
 
206
207
%token  <string> CLIENTRULE
207
208
%token  <string> INTERNAL EXTERNAL EXTERNAL_ROTATION
214
215
%token  <string> USERNAME
215
216
%token  <string> USER_PRIVILEGED USER_UNPRIVILEGED USER_LIBWRAP
216
217
%token  <string> LOGOUTPUT LOGFILE
 
218
%token  <string> CHILD_MAXIDLENUMBER
217
219
 
218
220
        /* route */
219
221
%type   <string> route
307
309
        |       logoutput
308
310
        |       serveroption
309
311
        |       userids
 
312
        |       childstate
310
313
        ;
311
314
 
312
315
serveroption:   compatibility
568
571
        |       logoutputdevice logoutputdevices
569
572
        ;
570
573
 
 
574
childstate:
 
575
        CHILD_MAXIDLENUMBER ':' NUMBER {
 
576
#if SOCKS_SERVER
 
577
                if (atoi($3) < SOCKD_FREESLOTS)
 
578
                        yyerror("child.maxidlenumber can't be less than SOCKD_FREESLOTS (%d)",
 
579
                        SOCKD_FREESLOTS);
 
580
 
 
581
                sockscf.child.maxidlenumber = atoi($3);
 
582
#endif
 
583
        }
 
584
        ;
 
585
 
 
586
 
571
587
userids:        user_privileged
572
588
        |       user_unprivileged
573
589
        |       user_libwrap
771
787
 
772
788
 
773
789
ruleoption:     option
774
 
        |       bandwidth { checkmodule("bandwidth"); }
 
790
        |       bandwidth {
 
791
#if SOCKS_SERVER
 
792
                        checkmodule("bandwidth");
 
793
#endif
 
794
        }
775
795
        |       command
776
796
        |       protocol
777
797
        |       proxyprotocol
778
 
        |       redirect        { checkmodule("redirect"); }
 
798
        |       redirect        {
 
799
#if SOCKS_SERVER
 
800
                        checkmodule("redirect");
 
801
#endif
 
802
        }
779
803
        ;
780
804
 
781
805
ruleoptions:    { $$ = NULL; }
864
888
                if ((rule.bw = (bw_t *)malloc(sizeof(*rule.bw))) == NULL)
865
889
                        serr(EXIT_FAILURE, NOMEM);
866
890
                *rule.bw = bwmeminit;
867
 
                rule.bw->maxbps = atoi($3);
 
891
                if ((rule.bw->maxbps = atoi($3)) <= 0)
 
892
                        yyerror("bandwidth value must be greater than 0");
 
893
                        
868
894
#endif /* SOCKS_SERVER */
869
895
        }
870
896
        ;