2 * ircd_parser.y: A yacc/bison parser for ircd config files.
3 * This is part of ircu, an Internet Relay Chat server.
4 * The contents of this file are Copyright 2001 Diane Bruce,
5 * Andrew Miller, the ircd-hybrid team and the ircu team.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
20 * $Id: ircd_parser.y,v 1.56.2.5 2006/06/08 02:11:21 entrope Exp $
29 #include "ircd_features.h"
34 #include "ircd_alloc.h"
35 #include "ircd_chattr.h"
37 #include "ircd_reply.h"
38 #include "ircd_snprintf.h"
39 #include "ircd_string.h"
60 #include <arpa/inet.h>
61 #define MAX_STRINGS 80 /* Maximum number of feature params. */
62 extern struct LocalConf localConf;
63 extern struct DenyConf* denyConfList;
64 extern struct CRuleConf* cruleConfList;
65 extern struct ServerConf* serverConfList;
66 extern struct s_map* GlobalServiceMapList;
67 extern struct qline* GlobalQuarantineList;
68 extern struct sline* GlobalSList;
71 /* Now all the globals we need :/... */
72 int tping, tconn, maxlinks, sendq, port, invert, stringno, flags;
73 char *name, *pass, *host, *ip, *username, *origin, *hub_limit;
74 char *stringlist[MAX_STRINGS];
75 struct ConnectionClass *c_class;
76 struct DenyConf *dconf;
77 struct ServerConf *sconf;
81 struct Privs privs_dirty;
83 static void parse_error(char *pattern,...) {
84 static char error_buffer[1024];
87 ircd_vsnprintf(NULL, error_buffer, sizeof(error_buffer), pattern, vl);
89 yyerror(error_buffer);
163 /* and now a lot of privileges... */
164 %token TPRIV_CHAN_LIMIT TPRIV_MODE_LCHAN TPRIV_DEOP_LCHAN TPRIV_WALK_LCHAN
165 %token TPRIV_LOCAL_KILL TPRIV_REHASH TPRIV_RESTART TPRIV_DIE
166 %token TPRIV_GLINE TPRIV_LOCAL_GLINE TPRIV_LOCAL_JUPE TPRIV_LOCAL_BADCHAN
167 %token TPRIV_LOCAL_OPMODE TPRIV_OPMODE TPRIV_SET TPRIV_WHOX TPRIV_BADCHAN
168 %token TPRIV_SEE_CHAN TPRIV_SHOW_INVIS TPRIV_SHOW_ALL_INVIS TPRIV_PROPAGATE
169 %token TPRIV_UNLIMIT_QUERY TPRIV_DISPLAY TPRIV_SEE_OPERS TPRIV_WIDE_GLINE
170 %token TPRIV_FORCE_OPMODE TPRIV_FORCE_LOCAL_OPMODE TPRIV_APASS_OPMODE
171 %token TPRIV_LIST_CHAN
172 /* and some types... */
174 %type <num> timespec timefactor factoredtimes factoredtime
175 %type <num> expr yesorno privtype
185 /* Blocks in the config file... */
186 blocks: blocks block | block;
187 block: adminblock | generalblock | classblock | connectblock |
188 uworldblock | operblock | portblock | jupeblock | clientblock |
189 killblock | cruleblock | motdblock | featuresblock | quarantineblock |
190 pseudoblock | iauthblock | spoofblock | error ';';
192 /* The timespec, sizespec and expr was ripped straight from
194 timespec: expr | factoredtimes;
196 factoredtimes: factoredtimes factoredtime
201 factoredtime: expr timefactor
206 timefactor: SECONDS { $$ = 1; }
207 | MINUTES { $$ = 60; }
208 | HOURS { $$ = 60 * 60; }
209 | DAYS { $$ = 60 * 60 * 24; }
210 | WEEKS { $$ = 60 * 60 * 24 * 7; }
211 | MONTHS { $$ = 60 * 60 * 24 * 7 * 4; }
212 | YEARS { $$ = 60 * 60 * 24 * 365; }
213 | DECADES { $$ = 60 * 60 * 24 * 365 * 10; };
226 $$ = $1 * 1024 * 1024;
229 $$ = $1 * 1024 * 1024 * 1024;
232 $$ = $1 * 1024 * 1024 * 1024;
236 /* this is an arithmetic expression */
253 /* leave this out until we find why it makes BSD yacc dump core -larne
254 | '-' expr %prec NEG {
262 jupeblock: JUPE '{' jupeitems '}' ';' ;
263 jupeitems: jupeitem jupeitems | jupeitem;
265 jupenick: NICK '=' QSTRING ';'
271 generalblock: GENERAL
273 /* Zero out the vhost addresses, in case they were removed. */
274 memset(&VirtualHost_v4.addr, 0, sizeof(VirtualHost_v4.addr));
275 memset(&VirtualHost_v6.addr, 0, sizeof(VirtualHost_v6.addr));
276 } '{' generalitems '}' ';' {
277 if (localConf.name == NULL)
278 parse_error("Your General block must contain a name.");
279 if (localConf.numeric == 0)
280 parse_error("Your General block must contain a numeric (between 1 and 4095).");
282 generalitems: generalitem generalitems | generalitem;
283 generalitem: generalnumeric | generalname | generalvhost | generaldesc;
284 generalnumeric: NUMERIC '=' NUMBER ';'
286 if (localConf.numeric == 0)
287 localConf.numeric = $3;
288 else if (localConf.numeric != $3)
289 parse_error("Redefinition of server numeric %i (%i)", $3,
293 generalname: NAME '=' QSTRING ';'
295 if (localConf.name == NULL)
298 if (strcmp(localConf.name, $3))
299 parse_error("Redefinition of server name %s (%s)", $3,
305 generaldesc: DESCRIPTION '=' QSTRING ';'
307 MyFree(localConf.description);
308 localConf.description = $3;
309 ircd_strncpy(cli_info(&me), $3, REALLEN);
312 generalvhost: VHOST '=' QSTRING ';'
314 struct irc_in_addr addr;
315 if (!strcmp($3, "*")) {
316 /* This traditionally meant bind to all interfaces and connect
317 * from the default. */
318 } else if (!ircd_aton(&addr, $3))
319 parse_error("Invalid virtual host '%s'.", $3);
320 else if (irc_in_addr_is_ipv4(&addr))
321 memcpy(&VirtualHost_v4.addr, &addr, sizeof(addr));
323 memcpy(&VirtualHost_v6.addr, &addr, sizeof(addr));
329 MyFree(localConf.location1);
330 MyFree(localConf.location2);
331 MyFree(localConf.contact);
332 localConf.location1 = localConf.location2 = localConf.contact = NULL;
334 '{' adminitems '}' ';'
336 if (localConf.location1 == NULL)
337 DupString(localConf.location1, "");
338 if (localConf.location2 == NULL)
339 DupString(localConf.location2, "");
340 if (localConf.contact == NULL)
341 DupString(localConf.contact, "");
343 adminitems: adminitems adminitem | adminitem;
344 adminitem: adminlocation | admincontact;
345 adminlocation: LOCATION '=' QSTRING ';'
347 if (localConf.location1 == NULL)
348 localConf.location1 = $3;
349 else if (localConf.location2 == NULL)
350 localConf.location2 = $3;
351 else /* Otherwise just drop it. -A1kmm */
354 admincontact: CONTACT '=' QSTRING ';'
356 MyFree(localConf.contact);
357 localConf.contact = $3;
362 } '{' classitems '}' ';'
366 struct ConnectionClass *c_class;
367 add_class(name, tping, tconn, maxlinks, sendq);
368 c_class = find_class(name);
369 MyFree(c_class->default_umode);
370 c_class->default_umode = pass;
371 memcpy(&c_class->privs, &privs, sizeof(c_class->privs));
372 memcpy(&c_class->privs_dirty, &privs_dirty, sizeof(c_class->privs_dirty));
375 parse_error("Missing name in class block");
382 memset(&privs, 0, sizeof(privs));
383 memset(&privs_dirty, 0, sizeof(privs_dirty));
385 classitems: classitem classitems | classitem;
386 classitem: classname | classpingfreq | classconnfreq | classmaxlinks |
387 classsendq | classusermode | priv;
388 classname: NAME '=' QSTRING ';'
393 classpingfreq: PINGFREQ '=' timespec ';'
397 classconnfreq: CONNECTFREQ '=' timespec ';'
401 classmaxlinks: MAXLINKS '=' expr ';'
405 classsendq: SENDQ '=' sizespec ';'
409 classusermode: USERMODE '=' QSTRING ';'
415 connectblock: CONNECT
418 flags = CONF_AUTOCONNECT;
419 } '{' connectitems '}' ';'
421 struct ConfItem *aconf = NULL;
423 parse_error("Missing name in connect block");
424 else if (pass == NULL)
425 parse_error("Missing password in connect block");
426 else if (host == NULL)
427 parse_error("Missing host in connect block");
428 else if (strchr(host, '*') || strchr(host, '?'))
429 parse_error("Invalid host '%s' in connect block", host);
430 else if (c_class == NULL)
431 parse_error("Missing or non-existent class in connect block");
433 aconf = make_conf(CONF_SERVER);
435 aconf->origin_name = origin;
436 aconf->passwd = pass;
437 aconf->conn_class = c_class;
438 aconf->address.port = port;
440 aconf->maximum = maxlinks;
441 aconf->hub_limit = hub_limit;
442 aconf->flags = flags;
443 lookup_confhost(aconf);
452 name = pass = host = origin = hub_limit = NULL;
456 connectitems: connectitem connectitems | connectitem;
457 connectitem: connectname | connectpass | connectclass | connecthost
458 | connectport | connectvhost | connectleaf | connecthub
459 | connecthublimit | connectmaxhops | connectauto;
460 connectname: NAME '=' QSTRING ';'
465 connectpass: PASS '=' QSTRING ';'
470 connectclass: CLASS '=' QSTRING ';'
472 c_class = find_class($3);
474 parse_error("No such connection class '%s' for Connect block", $3);
477 connecthost: HOST '=' QSTRING ';'
482 connectport: PORT '=' NUMBER ';'
486 connectvhost: VHOST '=' QSTRING ';'
491 connectleaf: LEAF ';'
498 DupString(hub_limit, "*");
500 connecthublimit: HUB '=' QSTRING ';'
505 connectmaxhops: MAXHOPS '=' expr ';'
509 connectauto: AUTOCONNECT '=' YES ';' { flags |= CONF_AUTOCONNECT; }
510 | AUTOCONNECT '=' NO ';' { flags &= ~CONF_AUTOCONNECT; };
512 uworldblock: UWORLD '{' uworlditems '}' ';';
513 uworlditems: uworlditem uworlditems | uworlditem;
514 uworlditem: uworldname;
515 uworldname: NAME '=' QSTRING ';'
517 make_conf(CONF_UWORLD)->host = $3;
520 operblock: OPER '{' operitems '}' ';'
522 struct ConfItem *aconf = NULL;
524 parse_error("Missing name in operator block");
525 else if (pass == NULL)
526 parse_error("Missing password in operator block");
527 else if (host == NULL)
528 parse_error("Missing host in operator block");
529 else if (c_class == NULL)
530 parse_error("Invalid or missing class in operator block");
532 aconf = make_conf(CONF_OPERATOR);
534 aconf->passwd = pass;
535 conf_parse_userhost(aconf, host);
536 aconf->conn_class = c_class;
537 memcpy(&aconf->privs, &privs, sizeof(aconf->privs));
538 memcpy(&aconf->privs_dirty, &privs_dirty, sizeof(aconf->privs_dirty));
539 if (!FlagHas(&privs_dirty, PRIV_PROPAGATE)
540 && !FlagHas(&c_class->privs_dirty, PRIV_PROPAGATE))
541 parse_error("Operator block for %s and class %s have no LOCAL setting", name, c_class->cc_name);
548 name = pass = host = NULL;
550 memset(&privs, 0, sizeof(privs));
551 memset(&privs_dirty, 0, sizeof(privs_dirty));
553 operitems: operitem | operitems operitem;
554 operitem: opername | operpass | operhost | operclass | priv;
555 opername: NAME '=' QSTRING ';'
560 operpass: PASS '=' QSTRING ';'
565 operhost: HOST '=' QSTRING ';'
568 if (!strchr($3, '@'))
571 host = (char*) MyMalloc((uh_len = strlen($3)+3));
572 ircd_snprintf(0, host, uh_len, "*@%s", $3);
578 operclass: CLASS '=' QSTRING ';'
580 c_class = find_class($3);
582 parse_error("No such connection class '%s' for Operator block", $3);
586 priv: privtype '=' yesorno ';'
588 FlagSet(&privs_dirty, $1);
589 if (($3 == 1) ^ invert)
596 privtype: TPRIV_CHAN_LIMIT { $$ = PRIV_CHAN_LIMIT; } |
597 TPRIV_MODE_LCHAN { $$ = PRIV_MODE_LCHAN; } |
598 TPRIV_DEOP_LCHAN { $$ = PRIV_DEOP_LCHAN; } |
599 TPRIV_WALK_LCHAN { $$ = PRIV_WALK_LCHAN; } |
600 KILL { $$ = PRIV_KILL; } |
601 TPRIV_LOCAL_KILL { $$ = PRIV_LOCAL_KILL; } |
602 TPRIV_REHASH { $$ = PRIV_REHASH; } |
603 TPRIV_RESTART { $$ = PRIV_RESTART; } |
604 TPRIV_DIE { $$ = PRIV_DIE; } |
605 TPRIV_GLINE { $$ = PRIV_GLINE; } |
606 TPRIV_LOCAL_GLINE { $$ = PRIV_LOCAL_GLINE; } |
607 JUPE { $$ = PRIV_JUPE; } |
608 TPRIV_LOCAL_JUPE { $$ = PRIV_LOCAL_JUPE; } |
609 TPRIV_LOCAL_OPMODE { $$ = PRIV_LOCAL_OPMODE; } |
610 TPRIV_OPMODE { $$ = PRIV_OPMODE; }|
611 TPRIV_SET { $$ = PRIV_SET; } |
612 TPRIV_WHOX { $$ = PRIV_WHOX; } |
613 TPRIV_BADCHAN { $$ = PRIV_BADCHAN; } |
614 TPRIV_LOCAL_BADCHAN { $$ = PRIV_LOCAL_BADCHAN; } |
615 TPRIV_SEE_CHAN { $$ = PRIV_SEE_CHAN; } |
616 TPRIV_SHOW_INVIS { $$ = PRIV_SHOW_INVIS; } |
617 TPRIV_SHOW_ALL_INVIS { $$ = PRIV_SHOW_ALL_INVIS; } |
618 TPRIV_PROPAGATE { $$ = PRIV_PROPAGATE; } |
619 TPRIV_UNLIMIT_QUERY { $$ = PRIV_UNLIMIT_QUERY; } |
620 TPRIV_DISPLAY { $$ = PRIV_DISPLAY; } |
621 TPRIV_SEE_OPERS { $$ = PRIV_SEE_OPERS; } |
622 TPRIV_WIDE_GLINE { $$ = PRIV_WIDE_GLINE; } |
623 TPRIV_LIST_CHAN { $$ = PRIV_LIST_CHAN; } |
624 LOCAL { $$ = PRIV_PROPAGATE; invert = 1; } |
625 TPRIV_FORCE_OPMODE { $$ = PRIV_FORCE_OPMODE; } |
626 TPRIV_FORCE_LOCAL_OPMODE { $$ = PRIV_FORCE_LOCAL_OPMODE; } |
627 TPRIV_APASS_OPMODE { $$ = PRIV_APASS_OPMODE; } ;
629 yesorno: YES { $$ = 1; } | NO { $$ = 0; };
631 /* The port block... */
632 portblock: PORT '{' portitems '}' ';'
634 if (port > 0 && port <= 0xFFFF)
635 add_listener(port, host, pass, tconn, tping);
637 parse_error("Port %d is out of range", port);
641 port = tconn = tping = 0;
643 portitems: portitem portitems | portitem;
644 portitem: portnumber | portvhost | portmask | portserver | porthidden;
645 portnumber: PORT '=' NUMBER ';'
650 portvhost: VHOST '=' QSTRING ';'
656 portmask: MASK '=' QSTRING ';'
662 portserver: SERVER '=' YES ';'
665 } | SERVER '=' NO ';'
670 porthidden: HIDDEN '=' YES ';'
673 } | HIDDEN '=' NO ';'
683 '{' clientitems '}' ';'
685 struct ConfItem *aconf = 0;
686 struct irc_in_addr addr;
687 unsigned char addrbits = 0;
690 parse_error("Invalid or missing class in Client block");
691 else if (ip && !ipmask_parse(ip, &addr, &addrbits))
692 parse_error("Invalid IP address %s in Client block", ip);
694 aconf = make_conf(CONF_CLIENT);
695 aconf->username = username;
698 memcpy(&aconf->address.addr, &addr, sizeof(aconf->address.addr));
700 memset(&aconf->address.addr, 0, sizeof(aconf->address.addr));
701 aconf->address.port = port;
702 aconf->addrbits = addrbits;
704 aconf->conn_class = c_class;
705 aconf->maximum = maxlinks;
706 aconf->passwd = pass;
721 clientitems: clientitem clientitems | clientitem;
722 clientitem: clienthost | clientip | clientusername | clientclass | clientpass | clientmaxlinks | clientport;
723 clienthost: HOST '=' QSTRING ';'
725 char *sep = strchr($3, '@');
730 DupString(host, sep);
736 clientip: IP '=' QSTRING ';'
739 sep = strchr($3, '@');
750 clientusername: USERNAME '=' QSTRING ';'
755 clientclass: CLASS '=' QSTRING ';'
757 c_class = find_class($3);
759 parse_error("No such connection class '%s' for Client block", $3);
762 clientpass: PASS '=' QSTRING ';'
767 clientmaxlinks: MAXLINKS '=' expr ';'
771 clientport: PORT '=' expr ';'
778 dconf = (struct DenyConf*) MyCalloc(1, sizeof(*dconf));
779 } '{' killitems '}' ';'
781 if (dconf->usermask || dconf->hostmask ||dconf->realmask) {
782 dconf->next = denyConfList;
783 denyConfList = dconf;
787 MyFree(dconf->usermask);
788 MyFree(dconf->hostmask);
789 MyFree(dconf->realmask);
790 MyFree(dconf->message);
792 parse_error("Kill block must match on at least one of username, host or realname");
796 killitems: killitem killitems | killitem;
797 killitem: killuhost | killreal | killusername | killreasonfile | killreason;
798 killuhost: HOST '=' QSTRING ';'
801 MyFree(dconf->hostmask);
802 MyFree(dconf->usermask);
803 if ((h = strchr($3, '@')) == NULL)
805 DupString(dconf->usermask, "*");
806 dconf->hostmask = $3;
811 DupString(dconf->hostmask, h);
812 dconf->usermask = $3;
814 ipmask_parse(dconf->hostmask, &dconf->address, &dconf->bits);
817 killusername: USERNAME '=' QSTRING ';'
819 MyFree(dconf->usermask);
820 dconf->usermask = $3;
823 killreal: REAL '=' QSTRING ';'
825 MyFree(dconf->realmask);
826 dconf->realmask = $3;
829 killreason: REASON '=' QSTRING ';'
831 dconf->flags &= ~DENY_FLAGS_FILE;
832 MyFree(dconf->message);
836 killreasonfile: TFILE '=' QSTRING ';'
838 dconf->flags |= DENY_FLAGS_FILE;
839 MyFree(dconf->message);
846 } '{' cruleitems '}' ';'
848 struct CRuleNode *node = NULL;
850 parse_error("Missing host in crule block");
851 else if (pass == NULL)
852 parse_error("Missing rule in crule block");
853 else if ((node = crule_parse(pass)) == NULL)
854 parse_error("Invalid rule '%s' in crule block", pass);
857 struct CRuleConf *p = (struct CRuleConf*) MyMalloc(sizeof(*p));
862 p->next = cruleConfList;
874 cruleitems: cruleitem cruleitems | cruleitem;
875 cruleitem: cruleserver | crulerule | cruleall;
877 cruleserver: SERVER '=' QSTRING ';'
884 crulerule: RULE '=' QSTRING ';'
890 cruleall: ALL '=' YES ';'
898 motdblock: MOTD '{' motditems '}' ';'
900 if (host != NULL && pass != NULL)
901 motd_add(host, pass);
907 motditems: motditem motditems | motditem;
908 motditem: motdhost | motdfile;
909 motdhost: HOST '=' QSTRING ';'
914 motdfile: TFILE '=' QSTRING ';'
919 featuresblock: FEATURES '{' featureitems '}' ';';
920 featureitems: featureitems featureitem | featureitem;
926 } '=' stringlist ';' {
928 feature_set(NULL, (const char * const *)stringlist, stringno);
929 for (ii = 0; ii < stringno; ++ii)
930 MyFree(stringlist[ii]);
933 stringlist: stringlist extrastring | extrastring;
936 if (stringno < MAX_STRINGS)
937 stringlist[stringno++] = $1;
942 quarantineblock: QUARANTINE '{' quarantineitems '}' ';';
943 quarantineitems: quarantineitems quarantineitem | quarantineitem;
944 quarantineitem: QSTRING '=' QSTRING ';'
946 struct qline *qconf = MyCalloc(1, sizeof(*qconf));
949 qconf->next = GlobalQuarantineList;
950 GlobalQuarantineList = qconf;
953 pseudoblock: PSEUDO QSTRING '{'
955 smap = MyCalloc(1, sizeof(struct s_map));
963 parse_error("Missing name in pseudo %s block", smap->command);
964 else if (!smap->services)
965 parse_error("Missing nick in pseudo %s block", smap->command);
968 if (valid && register_mapping(smap))
970 smap->next = GlobalServiceMapList;
971 GlobalServiceMapList = smap;
980 pseudoitems: pseudoitem pseudoitems | pseudoitem;
981 pseudoitem: pseudoname | pseudoprepend | pseudonick | pseudoflags;
982 pseudoname: NAME '=' QSTRING ';'
987 pseudoprepend: PREPEND '=' QSTRING ';'
989 MyFree(smap->prepend);
992 pseudonick: NICK '=' QSTRING ';'
994 char *sep = strchr($3, '@');
997 size_t slen = strlen($3);
998 struct nick_host *nh = MyMalloc(sizeof(*nh) + slen);
999 memcpy(nh->nick, $3, slen + 1);
1000 nh->nicklen = sep - $3;
1001 nh->next = smap->services;
1002 smap->services = nh;
1006 pseudoflags: FAST ';'
1008 smap->flags |= SMAP_FAST;
1011 iauthblock: IAUTH '{' iauthitems '}' ';'
1013 auth_spawn(stringno, stringlist);
1014 while (stringno > 0)
1015 MyFree(stringlist[stringno--]);
1018 iauthitems: iauthitem iauthitems | iauthitem;
1019 iauthitem: iauthprogram;
1020 iauthprogram: PROGRAM '='
1022 while (stringno > 0)
1023 MyFree(stringlist[stringno--]);
1026 spoofblock: SPOOFHOST QSTRING '{'
1028 spoof = MyCalloc(1, sizeof(struct sline));
1029 spoof->spoofhost = $2;
1030 spoof->passwd = NULL;
1031 spoof->realhost = NULL;
1032 spoof->username = NULL;
1036 struct irc_in_addr ip;
1039 if (spoof->username == NULL && spoof->realhost) {
1040 parse_error("Username missing in spoofhost.");
1041 } else if (spoof->realhost == NULL && spoof->username) {
1042 parse_error("Realhost missing in spoofhost.");
1045 if (spoof->realhost) {
1046 if (!string_has_wildcards(spoof->realhost)) {
1047 if (ipmask_parse(spoof->realhost, &ip, &bits) != 0) {
1048 spoof->address = ip;
1050 spoof->flags = SLINE_FLAGS_IP;
1052 Debug((DEBUG_DEBUG, "S-Line: \"%s\" appears not to be a valid IP address, might be wildcarded.", spoof->realhost));
1053 spoof->flags = SLINE_FLAGS_HOSTNAME;
1056 spoof->flags = SLINE_FLAGS_HOSTNAME;
1061 spoof->next = GlobalSList;
1062 GlobalSList = spoof;
1067 spoofitems: spoofitem spoofitems | spoofitem;
1068 spoofitem: spoofpassword | spoofrealhost | spoofrealident;
1069 spoofpassword: PASS '=' QSTRING ';'
1071 MyFree(spoof->passwd);
1074 spoofrealhost: HOST '=' QSTRING ';'
1076 MyFree(spoof->realhost);
1077 spoof->realhost = $3;
1079 spoofrealident: USERNAME '=' QSTRING ';'
1081 MyFree(spoof->username);
1082 spoof->username = $3;