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 890102 Details for
Bug 573785
udev silently ignoring errors
[?]
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]
Log syntax errors in key,value pairs
udev-095-syntax-errors.patch (text/plain), 1.68 KB, created by
Michal Sekletar
on 2014-04-26 19:35:32 UTC
(
hide
)
Description:
Log syntax errors in key,value pairs
Filename:
MIME Type:
Creator:
Michal Sekletar
Created:
2014-04-26 19:35:32 UTC
Size:
1.68 KB
patch
obsolete
>diff -up udev-095/udev_rules_parse.c.syntax_errors udev-095/udev_rules_parse.c >--- udev-095/udev_rules_parse.c.syntax_errors 2014-04-26 20:11:25.868790138 +0200 >+++ udev-095/udev_rules_parse.c 2014-04-26 20:22:23.435557056 +0200 >@@ -80,7 +80,7 @@ next: > return rule; > } > >-static int get_key(char **line, char **key, enum key_operation *operation, char **value) >+static int get_key(char *filename, unsigned int lineno, char **line, char **key, enum key_operation *operation, char **value) > { > char *linepos; > char *temp; >@@ -144,8 +144,11 @@ static int get_key(char **line, char **k > *operation = KEY_OP_ASSIGN_FINAL; > linepos += 2; > dbg("operator=assign_final"); >- } else >+ } else { >+ temp[0] = '\0'; >+ dbg("invalid syntax in '%s:%u' : unknown operation after key='%s'\n", filename, lineno, *key); > return -1; >+ } > > /* terminate key */ > temp[0] = '\0'; >@@ -160,13 +163,18 @@ static int get_key(char **line, char **k > /* get the value*/ > if (linepos[0] == '"') > linepos++; >- else >+ else { >+ dbg("invalid syntax in '%s:%u' : missing start quote in value after key='%s'\n", filename, lineno, *key); > return -1; >+ } > *value = linepos; > > temp = strchr(linepos, '"'); >- if (!temp) >+ if (!temp) { >+ dbg("invalid syntax in '%s:%u' : missing end quote in value after key='%s'\n", filename, lineno, *key); > return -1; >+ } >+ > temp[0] = '\0'; > temp++; > dbg("value='%s'", *value); >@@ -259,7 +267,7 @@ static int add_to_rules(struct udev_rule > char *value; > enum key_operation operation = KEY_OP_UNSET; > >- retval = get_key(&linepos, &key, &operation, &value); >+ retval = get_key(filename, lineno, &linepos, &key, &operation, &value); > if (retval) > break; >
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 573785
: 890102