Ignore whitespace at the beginning of option tags
Subsystems (2)
PATCH 1/1 Ignore whitespace at the beginning of option tags
The following should work now:
[General]
Domain = local.domain.edu
--- cfg.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
cfg.c +8 -1
@@ -210,6 +210,7 @@ static void conf_parse_line (int trans, char *line, size_t sz) { char *val; +char *tag;size_t i;int j;static char *section =0 ;
@@ -262,8 +263,14 @@ conf_parse_line (int trans, char *line, size_t sz)/* Skip trailing whitespace, if any */ for (j = sz - (val - line) -1 ; j >0 &&isspace (val[j]); j--) val[j] ='\0' ; + +/* Skip beginning white space */ + tag = line; +while (isspace (*tag)) + tag++; +/* XXX Perhaps should we not ignore errors? */ -conf_set (trans, section, line, val,0 ,0 ); +conf_set (trans, section, tag, val,0 ,0 );return ; }
Signature · 1 line
1.8.3.1
Quoted 8 lines · Malahal Naineni
The following should work now:
[General]
Domain = local.domain.eduSigned-off-by Malahal Naineni <[email protected]>--- cfg.c | 9 ++++++++-
Ok.. I give... :-) What is this patch relative to? There is a conf_parse_line() in support/nfs/conffile.c but there is no cfg.c file in nfs-utils... and this patch does not apply...
steved.
Quoted 31 lines
1 file changed, 8 insertions(+), 1 deletion(-)cfg.c +8
-1@@ -210,6 +210,7 @@ static void conf_parse_line (int trans, char *line, size_t sz) { char *val; +char *tag;size_t i;int j;static char *section =0 ;@@ -262,8 +263,14 @@ conf_parse_line (int trans, char *line, size_t sz)/* Skip trailing whitespace, if any */ for (j = sz - (val - line) -1 ; j >0 &&isspace (val[j]); j--) val[j] ='\0' ; + +/* Skip beginning white space */ + tag = line; +while (isspace (*tag)) + tag++; +/* XXX Perhaps should we not ignore errors? */ -conf_set (trans, section, line, val,0 ,0 ); +conf_set (trans, section, tag, val,0 ,0 );return ; }
Quoted 7 lines · Steve Dickson
Quoted 5 lines · Malahal Naineni
The following should work now:
[General]
Domain = local.domain.edu
Quoted 7 lines
Quoted 3 lines
Signed-off-by Malahal Naineni <[email protected]>--- cfg.c | 9 ++++++++-Ok.. I give... :-) What is this patch relative to? There is a
conf_parse_line()insupport/nfs/conffile.cbut there is nocfg.cfile in nfs-utils... and this patch does not apply...
This is for libnfsidap.. cc-ing Bruce.
Ben
Quoted 36 lines
Quoted 21 lines
1 file changed, 8 insertions(+), 1 deletion(-)cfg.c +3
-0@@ -210,6 +210,7 @@ static void conf_parse_line (int trans, char *line, size_t sz) { char *val; +char *tag;size_t i;int j;static char *section =0 ;@@ -262,8 +263,14 @@ conf_parse_line (int trans, char *line, size_t sz)/* Skip trailing whitespace, if any */ for (j = sz - (val - line) -1 ; j >0 &&isspace (val[j]); j--) val[j] ='\0' ; + +/* Skip beginning white space */ cfg.c conf_parse_line (int trans, char *line, size_t sz) · line 276
Quoted 10 lines
cfg.c +5
-1+ tag = line; +while (isspace (*tag)) + tag++; +/* XXX Perhaps should we not ignore errors? */ -conf_set (trans, section, line, val,0 ,0 ); +conf_set (trans, section, tag, val,0 ,0 );return ; }--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Sorry Steve, Ben is right. It is based on "git://git.linux-nfs.org/projects/steved/libnfsidmap.git"
Do I need to re-clone my repo with something else?
Regards, Malahal.
Quoted 61 lines · Benjamin Coddington [[email protected]] wrote:
Quoted 7 lines · Steve Dickson
Quoted 5 lines · Malahal Naineni
The following should work now:
[General]
Domain = local.domain.eduQuoted 7 lines
Quoted 3 lines
Signed-off-by Malahal Naineni <[email protected]>--- cfg.c | 9 ++++++++-Ok.. I give... :-) What is this patch relative to? There is a
conf_parse_line()insupport/nfs/conffile.cbut there is nocfg.cfile in nfs-utils... and this patch does not apply...This is for libnfsidap.. cc-ing Bruce.
Ben
Quoted 27 lines
Quoted 27 lines
1 file changed, 8 insertions(+), 1 deletion(-)cfg.c +8
-1@@ -210,6 +210,7 @@ static void conf_parse_line (int trans, char *line, size_t sz) { char *val; +char *tag;size_t i;int j;static char *section =0 ;@@ -262,8 +263,14 @@ conf_parse_line (int trans, char *line, size_t sz)/* Skip trailing whitespace, if any */ for (j = sz - (val - line) -1 ; j >0 &&isspace (val[j]); j--) val[j] ='\0' ; + +/* Skip beginning white space */ + tag = line; +while (isspace (*tag)) + tag++; +/* XXX Perhaps should we not ignore errors? */ -conf_set (trans, section, line, val,0 ,0 ); +conf_set (trans, section, tag, val,0 ,0 );Quoted 9 lines
cfg.c conf_parse_line (int trans, char *line, size_t sz) · line 276
Quoted 4 lines
cfg.c +0
-0return ; }--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 4 lines · Malahal Naineni
Sorry Steve, Ben is right. It is based on "
git://git.linux-nfs.org/projects/steved/libnfsidmap.git"Do I need to re-clone my repo with something else?
No... You are good... Committed!
I'm thinking we should probably roll libnfsidmap into nfs-utils as a .a lib... The only binary using it, to my knowledge, is rpc.idmapd and I don't think we really want anybody else using it...
Thoughts?
steved.
Quoted 66 lines
Regards, Malahal.
Quoted 61 lines · Benjamin Coddington [[email protected]] wrote:
Quoted 7 lines · Steve Dickson
Quoted 5 lines · Malahal Naineni
The following should work now:
[General]
Domain = local.domain.eduQuoted 7 lines
Quoted 3 lines
Signed-off-by Malahal Naineni <[email protected]>--- cfg.c | 9 ++++++++-Ok.. I give... :-) What is this patch relative to? There is a
conf_parse_line()insupport/nfs/conffile.cbut there is nocfg.cfile in nfs-utils... and this patch does not apply...This is for libnfsidap.. cc-ing Bruce.
Ben
Quoted 27 lines
Quoted 27 lines
1 file changed, 8 insertions(+), 1 deletion(-)cfg.c +8
-1@@ -210,6 +210,7 @@ static void conf_parse_line (int trans, char *line, size_t sz) { char *val; +char *tag;size_t i;int j;static char *section =0 ;@@ -262,8 +263,14 @@ conf_parse_line (int trans, char *line, size_t sz)/* Skip trailing whitespace, if any */ for (j = sz - (val - line) -1 ; j >0 &&isspace (val[j]); j--) val[j] ='\0' ; + +/* Skip beginning white space */ + tag = line; +while (isspace (*tag)) + tag++; +/* XXX Perhaps should we not ignore errors? */ -conf_set (trans, section, line, val,0 ,0 ); +conf_set (trans, section, tag, val,0 ,0 );Quoted 9 lines
cfg.c conf_parse_line (int trans, char *line, size_t sz) · line 276
Quoted 4 lines
cfg.c +0
-0return ; }--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 7 lines · Steve Dickson
Quoted 4 lines · Malahal Naineni
Sorry Steve, Ben is right. It is based on "
git://git.linux-nfs.org/projects/steved/libnfsidmap.git"Do I need to re-clone my repo with something else?
Quoted 8 lines
No... You are good... Committed!
I'm thinking we should probably roll libnfsidmap into nfs-utils as a .a lib... The only binary using it, to my knowledge, is rpc.idmapd and I don't think we really want anybody else using it...
Thoughts?
Fine by me.
The original motivation was to support POSIX<->NFSv4 ACL mapping in libacl. That never went anywhere, so I think we can forget about it.
Sorry for being unresponsive here. I'm happy about anything that takes libnfsidmap off my hands....
--b.
Quoted 7 lines · Steve Dickson [[email protected]] wrote:
Quoted 4 lines · Malahal Naineni
Sorry Steve, Ben is right. It is based on "
git://git.linux-nfs.org/projects/steved/libnfsidmap.git"Do I need to re-clone my repo with something else?
Quoted 8 lines
No... You are good... Committed!
I'm thinking we should probably roll libnfsidmap into nfs-utils as a .a lib... The only binary using it, to my knowledge, is rpc.idmapd and I don't think we really want anybody else using it...
Thoughts?
libnfsidmap.so is used by nfs-ganesha project where I found the issue, so please keep it as DSO. I don't mind folding the code into nfs-utils project though. nfs-ganesha does need nfs-utils rpms, so nfs-ganesha should be good as long as it is a DSO.
Regards, Malahal.