All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Ignore whitespace at the beginning of option tags
@ 2016-01-28 22:38 Malahal Naineni
  2016-02-02 15:24 ` Steve Dickson
  0 siblings, 1 reply; 7+ messages in thread
From: Malahal Naineni @ 2016-01-28 22:38 UTC (permalink / raw)
  To: linux-nfs; +Cc: SteveD, Malahal Naineni

The following should work now:

[General]
	Domain = local.domain.edu

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
---
 cfg.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/cfg.c b/cfg.c
index c615d24..e0ab839 100644
--- a/cfg.c
+++ b/cfg.c
@@ -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;
       }
 
-- 
1.8.3.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] Ignore whitespace at the beginning of option tags
  2016-01-28 22:38 [PATCH] Ignore whitespace at the beginning of option tags Malahal Naineni
@ 2016-02-02 15:24 ` Steve Dickson
  2016-02-03 11:58   ` Benjamin Coddington
  0 siblings, 1 reply; 7+ messages in thread
From: Steve Dickson @ 2016-02-02 15:24 UTC (permalink / raw)
  To: Malahal Naineni, linux-nfs



On 01/28/2016 05:38 PM, Malahal Naineni wrote:
> The following should work now:
> 
> [General]
> 	Domain = local.domain.edu
> 
> Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
> ---
>  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.

>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/cfg.c b/cfg.c
> index c615d24..e0ab839 100644
> --- a/cfg.c
> +++ b/cfg.c
> @@ -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;
>        }
>  
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Ignore whitespace at the beginning of option tags
  2016-02-02 15:24 ` Steve Dickson
@ 2016-02-03 11:58   ` Benjamin Coddington
  2016-02-04 23:29     ` Malahal Naineni
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Coddington @ 2016-02-03 11:58 UTC (permalink / raw)
  To: Steve Dickson; +Cc: Malahal Naineni, linux-nfs, J. Bruce Fields

On Tue, 2 Feb 2016, Steve Dickson wrote:
>
> On 01/28/2016 05:38 PM, Malahal Naineni wrote:
> > The following should work now:
> >
> > [General]
> > 	Domain = local.domain.edu
> >
> > Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
> > ---
> >  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...

This is for libnfsidap..  cc-ing Bruce.

Ben

> >  1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/cfg.c b/cfg.c
> > index c615d24..e0ab839 100644
> > --- a/cfg.c
> > +++ b/cfg.c
> > @@ -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;
> >        }
> >
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Ignore whitespace at the beginning of option tags
  2016-02-03 11:58   ` Benjamin Coddington
@ 2016-02-04 23:29     ` Malahal Naineni
  2016-02-09 16:00       ` Steve Dickson
  0 siblings, 1 reply; 7+ messages in thread
From: Malahal Naineni @ 2016-02-04 23:29 UTC (permalink / raw)
  To: Benjamin Coddington; +Cc: Steve Dickson, linux-nfs, J. Bruce Fields

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.

Benjamin Coddington [bcodding@redhat.com] wrote:
> On Tue, 2 Feb 2016, Steve Dickson wrote:
> >
> > On 01/28/2016 05:38 PM, Malahal Naineni wrote:
> > > The following should work now:
> > >
> > > [General]
> > > 	Domain = local.domain.edu
> > >
> > > Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
> > > ---
> > >  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...
> 
> This is for libnfsidap..  cc-ing Bruce.
> 
> Ben
> 
> > >  1 file changed, 8 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/cfg.c b/cfg.c
> > > index c615d24..e0ab839 100644
> > > --- a/cfg.c
> > > +++ b/cfg.c
> > > @@ -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;
> > >        }
> > >
> > >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> > the body of a message to majordomo@vger.kernel.org
> > 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 majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Ignore whitespace at the beginning of option tags
  2016-02-04 23:29     ` Malahal Naineni
@ 2016-02-09 16:00       ` Steve Dickson
  2016-02-09 16:13         ` J. Bruce Fields
  2016-02-11 18:02         ` Malahal Naineni
  0 siblings, 2 replies; 7+ messages in thread
From: Steve Dickson @ 2016-02-09 16:00 UTC (permalink / raw)
  To: Benjamin Coddington, linux-nfs, J. Bruce Fields



On 02/04/2016 06:29 PM, Malahal Naineni wrote:
> 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.
 

> 
> Regards, Malahal.
> 
> Benjamin Coddington [bcodding@redhat.com] wrote:
>> On Tue, 2 Feb 2016, Steve Dickson wrote:
>>>
>>> On 01/28/2016 05:38 PM, Malahal Naineni wrote:
>>>> The following should work now:
>>>>
>>>> [General]
>>>> 	Domain = local.domain.edu
>>>>
>>>> Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
>>>> ---
>>>>  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...
>>
>> This is for libnfsidap..  cc-ing Bruce.
>>
>> Ben
>>
>>>>  1 file changed, 8 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/cfg.c b/cfg.c
>>>> index c615d24..e0ab839 100644
>>>> --- a/cfg.c
>>>> +++ b/cfg.c
>>>> @@ -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;
>>>>        }
>>>>
>>>>
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
>>> the body of a message to majordomo@vger.kernel.org
>>> 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 majordomo@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>>
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Ignore whitespace at the beginning of option tags
  2016-02-09 16:00       ` Steve Dickson
@ 2016-02-09 16:13         ` J. Bruce Fields
  2016-02-11 18:02         ` Malahal Naineni
  1 sibling, 0 replies; 7+ messages in thread
From: J. Bruce Fields @ 2016-02-09 16:13 UTC (permalink / raw)
  To: Steve Dickson; +Cc: Benjamin Coddington, linux-nfs

On Tue, Feb 09, 2016 at 11:00:50AM -0500, Steve Dickson wrote:
> 
> 
> On 02/04/2016 06:29 PM, Malahal Naineni wrote:
> > 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?

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Ignore whitespace at the beginning of option tags
  2016-02-09 16:00       ` Steve Dickson
  2016-02-09 16:13         ` J. Bruce Fields
@ 2016-02-11 18:02         ` Malahal Naineni
  1 sibling, 0 replies; 7+ messages in thread
From: Malahal Naineni @ 2016-02-11 18:02 UTC (permalink / raw)
  To: Steve Dickson; +Cc: Benjamin Coddington, linux-nfs, J. Bruce Fields

Steve Dickson [SteveD@redhat.com] wrote:
> 
> 
> On 02/04/2016 06:29 PM, Malahal Naineni wrote:
> > 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?

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-11 18:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-28 22:38 [PATCH] Ignore whitespace at the beginning of option tags Malahal Naineni
2016-02-02 15:24 ` Steve Dickson
2016-02-03 11:58   ` Benjamin Coddington
2016-02-04 23:29     ` Malahal Naineni
2016-02-09 16:00       ` Steve Dickson
2016-02-09 16:13         ` J. Bruce Fields
2016-02-11 18:02         ` Malahal Naineni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.