Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 194

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

diff --git a/lib/nss_parse.y b/lib/nss_parse.y
index bc12c73..6be243e 100644
--- a/lib/nss_parse.y
+++ b/lib/nss_parse.y
@@ -51,6 +51,7 @@ extern int nss_lineno;
 extern int nss_lex(void);
 extern FILE *nss_in;
 
+static int nss_ignore(const char *s);
 static int nss_error(const char *s);
 
 %}
@@ -82,18 +83,24 @@ sources: nss_source
 
 nss_source: SOURCE
 {
-	src = add_source(nss_list, $1);
+	if (strcmp($1, "winbind"))
+		src = add_source(nss_list, $1);
+	else
+		nss_ignore($1);
 } | SOURCE LBRACKET status_exp_list RBRACKET
 {
 	enum nsswitch_status a;
 
-	src = add_source(nss_list, $1);
-	for (a = 0; a < NSS_STATUS_MAX; a++) {
-		if (act[a].action != NSS_ACTION_UNKNOWN) {
-			src->action[a].action = act[a].action;
-			src->action[a].negated = act[a].negated;
+	if (strcmp($1, "winbind")) {
+		src = add_source(nss_list, $1);
+		for (a = 0; a < NSS_STATUS_MAX; a++) {
+			if (act[a].action != NSS_ACTION_UNKNOWN) {
+				src->action[a].action = act[a].action;
+				src->action[a].negated = act[a].negated;
+			}
 		}
-	}
+	} else
+		nss_ignore($1);
 } | SOURCE LBRACKET status_exp_list SOURCE { nss_error($4); YYABORT; }
   | SOURCE LBRACKET status_exp_list OTHER { nss_error($4); YYABORT; }
   | SOURCE LBRACKET status_exp_list NL { nss_error("no closing bracket"); YYABORT; }
@@ -118,6 +125,12 @@ status_exp: STATUS EQUAL ACTION
 
 %%
 
+static int nss_ignore(const char *s)
+{
+	msg("ignored invalid nsswitch config near [ %s ]", s);
+	return(0);
+}
+
 static int nss_error(const char *s)
 {
 	msg("syntax error in nsswitch config near [ %s ]\n", s);
diff --git a/lib/nss_tok.l b/lib/nss_tok.l
index dea8203..597fc76 100644
--- a/lib/nss_tok.l
+++ b/lib/nss_tok.l
@@ -68,7 +68,7 @@ WS		[[:blank:]]+
 
 automount	([Aa][Uu][Tt][Oo][Mm][Oo][Uu][Nn][Tt])
 
-source		files|yp|nis|nisplus|ldap|hesiod
+source		files|yp|nis|nisplus|ldap|hesiod|winbind
 
 success		([Ss][Uu][Cc][Cc][Ee][Ss][Ss])
 notfound	([Nn][Oo][Tt][Ff][Oo][Uu][Nn][Dd])