---
lib/master_tok.l | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
--- autofs-5.0.2.orig/lib/master_tok.l
+++ autofs-5.0.2/lib/master_tok.l
@@ -77,6 +77,7 @@ int my_yyinput(char *, int);
char buff[1024];
char *bptr;
char *optr = buff;
+unsigned int tlen;
%}
@@ -190,13 +191,27 @@ OPTNTOUT (-n{OPTWS}|-n{OPTWS}={OPTWS}|--
{OPTWS}\\\n{OPTWS} {}
{MULTI} {
- strcpy(master_lval.strtype, master_text);
- return(MULTITYPE);
+ tlen = master_leng - 1;
+ if (bptr != buff && isblank(master_text[tlen])) {
+ strncat(buff, master_text, tlen);
+ bptr += tlen;
+ yyless(tlen);
+ } else {
+ strcpy(master_lval.strtype, master_text);
+ return(MULTITYPE);
+ }
}
- {MTYPE} {
- strcpy(master_lval.strtype, master_text);
- return(MAPTYPE);
+ {MTYPE}/({DNSERVERSTR}|{DNATTRSTR}=)? {
+ tlen = master_leng - 1;
+ if (bptr != buff && isblank(master_text[tlen])) {
+ strncat(buff, master_text, tlen);
+ bptr += tlen;
+ yyless(tlen);
+ } else {
+ strcpy(master_lval.strtype, master_text);
+ return(MAPTYPE);
+ }
}
{MULTISEP} { return(DDASH); }
@@ -226,7 +241,7 @@ OPTNTOUT (-n{OPTWS}|-n{OPTWS}={OPTWS}|--
yyless(0);
}
- {DNSERVERSTR} {
+ {DNSERVERSTR}{DNATTRSTR} {
BEGIN(DNSTR);
yyless(0);
}