Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 305082 Details for
Bug 445880
autofs parses /etc/nsswitch.conf incorrectly
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to ignore nsswitch sources that aren't supported
autofs-5.0.3-nss-source-any.patch (text/plain), 4.21 KB, created by
Ian Kent
on 2008-05-12 06:15:45 UTC
(
hide
)
Description:
Patch to ignore nsswitch sources that aren't supported
Filename:
MIME Type:
Creator:
Ian Kent
Created:
2008-05-12 06:15:45 UTC
Size:
4.21 KB
patch
obsolete
>autofs-5.0.3 - ignore nsswitch sources that aren't supported > >From: Ian Kent <raven@themaw.net> > >Allow any source name in nsswitch and ignore those we don't support. >This has the side affect of also ignoring any action associated with >a source that isn't supported by autofs. >--- > > lib/nss_parse.y | 31 ++++++++++++++++--------------- > lib/nss_tok.l | 22 ++++++++++++---------- > 2 files changed, 28 insertions(+), 25 deletions(-) > > >diff --git a/lib/nss_parse.y b/lib/nss_parse.y >index 90b7d25..fa6958a 100644 >--- a/lib/nss_parse.y >+++ b/lib/nss_parse.y >@@ -64,7 +64,6 @@ char strval[128]; > %token <strval> SOURCE > %token <strval> STATUS > %token <strval> ACTION >-%token <strval> OTHER > > %start file > >@@ -83,7 +82,9 @@ sources: nss_source > > nss_source: SOURCE > { >- if (strcmp($1, "winbind")) >+ if (!strcmp($1, "files") || !strcmp($1, "yp") || >+ !strcmp($1, "nis") || !strcmp($1, "ldap") || >+ !strcmp($1, "nisplus") || !strcmp($1, "hesiod")) > src = add_source(nss_list, $1); > else > nss_ignore($1); >@@ -91,7 +92,9 @@ nss_source: SOURCE > { > enum nsswitch_status a; > >- if (strcmp($1, "winbind")) { >+ if (!strcmp($1, "files") || !strcmp($1, "yp") || >+ !strcmp($1, "nis") || !strcmp($1, "ldap") || >+ !strcmp($1, "nisplus") || !strcmp($1, "hesiod")) { > src = add_source(nss_list, $1); > for (a = 0; a < NSS_STATUS_MAX; a++) { > if (act[a].action != NSS_ACTION_UNKNOWN) { >@@ -101,12 +104,10 @@ nss_source: SOURCE > } > } 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; } >- | SOURCE LBRACKET OTHER { nss_error($3); YYABORT; } >- | SOURCE OTHER { nss_error("no opening bracket"); YYABORT; } >- | error OTHER { nss_error($2); YYABORT; }; >+} | SOURCE LBRACKET status_exp_list SOURCE { nss_error("missing close bracket"); YYABORT; } >+ | SOURCE LBRACKET status_exp_list NL { nss_error("missing close bracket"); YYABORT; } >+ | SOURCE LBRACKET SOURCE { nss_error($3); YYABORT; } >+ | error SOURCE { nss_error($2); YYABORT; }; > > status_exp_list: status_exp > | status_exp status_exp_list >@@ -117,17 +118,17 @@ status_exp: STATUS EQUAL ACTION > } | BANG STATUS EQUAL ACTION > { > set_action(act, $2, $4, 1); >-} | STATUS EQUAL OTHER {nss_error($3); YYABORT; } >- | STATUS OTHER {nss_error($2); YYABORT; } >- | BANG STATUS EQUAL OTHER {nss_error($4); YYABORT; } >- | BANG STATUS OTHER {nss_error($3); YYABORT; } >- | BANG OTHER {nss_error($2); YYABORT; }; >+} | STATUS EQUAL SOURCE {nss_error($3); YYABORT; } >+ | STATUS SOURCE {nss_error($2); YYABORT; } >+ | BANG STATUS EQUAL SOURCE {nss_error($4); YYABORT; } >+ | BANG STATUS SOURCE {nss_error($3); YYABORT; } >+ | BANG SOURCE {nss_error($2); YYABORT; }; > > %% > > static int nss_ignore(const char *s) > { >- logmsg("ignored invalid nsswitch config near [ %s ]", s); >+ logmsg("ignored unsupported autofs nsswitch source \"%s\"", s); > return(0); > } > >diff --git a/lib/nss_tok.l b/lib/nss_tok.l >index c435b63..1aede97 100644 >--- a/lib/nss_tok.l >+++ b/lib/nss_tok.l >@@ -62,13 +62,13 @@ extern unsigned int nss_automount_found; > > %option nounput > >-%x AUTOMOUNT >+%x AUTOMOUNT ACTIONSTR > > WS [[:blank:]]+ > > automount ([Aa][Uu][Tt][Oo][Mm][Oo][Uu][Nn][Tt]) > >-source files|yp|nis|nisplus|ldap|hesiod|winbind >+source [[:alnum:]@$%^&*()-+_":;?,<>./'{}~`]+ > > success ([Ss][Uu][Cc][Cc][Ee][Ss][Ss]) > notfound ([Nn][Oo][Tt][Ff][Oo][Uu][Nn][Dd]) >@@ -82,8 +82,6 @@ return ([Rr][Ee][Tt][Uu][Rr][Nn]) > > action ({continue}|{return}) > >-other [[:alnum:]@$%^&*()-+_":;?,<>./'{}~`]+ >- > %% > > ^{automount}: { >@@ -101,6 +99,14 @@ other [[:alnum:]@$%^&*()-+_":;?,<>./'{}~`]+ > return SOURCE; > } > >+ "[" { BEGIN(ACTIONSTR); yyless(0); } >+ >+ \n { BEGIN(INITIAL); return NL; } >+} >+ >+<ACTIONSTR>{ >+ {WS} { } >+ > {status} { > strcpy(nss_lval.strval, nss_text); > return STATUS; >@@ -112,15 +118,11 @@ other [[:alnum:]@$%^&*()-+_":;?,<>./'{}~`]+ > } > > "[" { return LBRACKET; } >- "]" { return RBRACKET; } >+ "]" { BEGIN(AUTOMOUNT); return RBRACKET; } > "=" { return EQUAL; } > "!" { return BANG; } > >- {other} { >- strcpy(nss_lval.strval, nss_text); >- return OTHER; >- } >- >+ . { BEGIN(AUTOMOUNT); yyless(0); } > \n { BEGIN(INITIAL); return NL; } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 445880
: 305082