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 691040 Details for
Bug 906432
Corosync 1.4.1 does not support IPv6 double colon notation in /etc/corosync/corosync.conf totem section
[?]
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]
Proposed patch - part 2 - Handle unexpected closing brace
2013-01-31-0002-flatiron-Handle-unexpected-closing-brace-in-config-file.patch (text/plain), 2.64 KB, created by
Jan Friesse
on 2013-01-31 16:01:49 UTC
(
hide
)
Description:
Proposed patch - part 2 - Handle unexpected closing brace
Filename:
MIME Type:
Creator:
Jan Friesse
Created:
2013-01-31 16:01:49 UTC
Size:
2.64 KB
patch
obsolete
>From e59696d5fc102182518e7098883b6e2d8eab59a8 Mon Sep 17 00:00:00 2001 >From: Jan Friesse <jfriesse@redhat.com> >Date: Thu, 31 Jan 2013 16:54:12 +0100 >Subject: [PATCH 2/2] Handle unexpected closing brace in config file > >If configuration file contains closing brace before opening brace >at top level, configuration parsing is stopped and file is not >completely parsed. Solution is to detect extra closing brace and display >error. > >Signed-off-by: Jan Friesse <jfriesse@redhat.com> >Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com> >(backport from needle) >--- > exec/coroparse.c | 17 ++++++++++++----- > 1 files changed, 12 insertions(+), 5 deletions(-) > >diff --git a/exec/coroparse.c b/exec/coroparse.c >index ad4c1b9..7258567 100644 >--- a/exec/coroparse.c >+++ b/exec/coroparse.c >@@ -113,6 +113,7 @@ static int parse_section(FILE *fp, > struct objdb_iface_ver0 *objdb, > hdb_handle_t parent_handle, > const char **error_string, >+ int depth, > parser_check_item_f parser_check_item_call) > { > char line[512]; >@@ -169,7 +170,7 @@ static int parse_section(FILE *fp, > > objdb->object_create (parent_handle, &new_parent, > section, strlen (section)); >- if (parse_section(fp, objdb, new_parent, error_string, parser_check_item_call)) >+ if (parse_section(fp, objdb, new_parent, error_string, depth + 1, parser_check_item_call)) > return -1; > > continue ; >@@ -195,12 +196,18 @@ static int parse_section(FILE *fp, > } > > if (strchr_rs (line, '}')) { >+ if (depth == 0) { >+ *error_string = "parser error: Unexpected closing brace"; >+ >+ return -1; >+ } >+ > return 0; > } > } > > if (parent_handle != OBJECT_PARENT_HANDLE) { >- *error_string = "Missing closing brace"; >+ *error_string = "parser error: Missing closing brace"; > return -1; > } > >@@ -275,7 +282,7 @@ static int read_uidgid_files_into_objdb( > fp = fopen (filename, "r"); > if (fp == NULL) continue; > >- res = parse_section(fp, objdb, OBJECT_PARENT_HANDLE, error_string, parser_check_item_uidgid); >+ res = parse_section(fp, objdb, OBJECT_PARENT_HANDLE, error_string, 0, parser_check_item_uidgid); > > fclose (fp); > >@@ -332,7 +339,7 @@ static int read_service_files_into_objdb( > fp = fopen (filename, "r"); > if (fp == NULL) continue; > >- res = parse_section(fp, objdb, OBJECT_PARENT_HANDLE, error_string, NULL); >+ res = parse_section(fp, objdb, OBJECT_PARENT_HANDLE, error_string, 0, NULL); > > fclose (fp); > >@@ -375,7 +382,7 @@ static int read_config_file_into_objdb( > return -1; > } > >- res = parse_section(fp, objdb, OBJECT_PARENT_HANDLE, error_string, NULL); >+ res = parse_section(fp, objdb, OBJECT_PARENT_HANDLE, error_string, 0, NULL); > > fclose(fp); > >-- >1.7.1 >
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 906432
:
691039
| 691040