Patchwork [2/2] shadow: remove grpconv argc check

login
register
mail settings
Submitter Martin Donnelly
Date Feb. 27, 2013, 12:58 p.m.
Message ID <63c4fc136f2bd29337c20a277af9f8996d237bfe.1361890071.git.martin.donnelly@ge.com>
Download mbox | patch
Permalink /patch/45199/
State Accepted
Commit cef8f6b6c657121b47173f64b16354ee1ad458ab
Headers show

Comments

Martin Donnelly - Feb. 27, 2013, 12:58 p.m.
The patched version of grpconv takes arguments but the check on
argc was not removed. This patch removes this check which
otherwise results in a spurious warning during rootfs creation.

Signed-off-by: Martin Donnelly <martin.donnelly@ge.com>
---
 .../shadow/files/add_root_cmd_options.patch        |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
Saul Wold - Feb. 28, 2013, 4:44 a.m.
On 02/27/2013 04:58 AM, Martin Donnelly wrote:
> The patched version of grpconv takes arguments but the check on
> argc was not removed. This patch removes this check which
> otherwise results in a spurious warning during rootfs creation.
>
> Signed-off-by: Martin Donnelly <martin.donnelly@ge.com>
> ---
>   .../shadow/files/add_root_cmd_options.patch        |   12 +++++++++++-
>   1 files changed, 11 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-extended/shadow/files/add_root_cmd_options.patch b/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
> index 5edd3b8..ab87e35 100644
> --- a/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
> +++ b/meta/recipes-extended/shadow/files/add_root_cmd_options.patch

This patch needs a header also with Upstream-Status: Signed-off-by: and 
a brief explaination (if needed).

Please review:

http://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines

Thanks
	Sau!

> @@ -528,7 +528,17 @@ diff -urN shadow-4.1.4.3.orig//src/grpconv.c shadow-4.1.4.3//src/grpconv.c
>    int main (int argc, char **argv)
>    {
>    	const struct group *gr;
> -@@ -100,6 +183,8 @@
> +@@ -89,9 +172,6 @@
> + 	const struct sgrp *sg;
> + 	struct sgrp sgent;
> +
> +-	if (1 != argc) {
> +-		(void) fputs (_("Usage: grpconv\n"), stderr);
> +-	}
> + 	Prog = Basename (argv[0]);
> +
> + 	(void) setlocale (LC_ALL, "");
> +@@ -100,6 +180,8 @@
>
>    	OPENLOG ("grpconv");
>
>
Martin Donnelly - Feb. 28, 2013, 3:18 p.m.
On 28/02/2013 04:44, Saul Wold wrote:
> On 02/27/2013 04:58 AM, Martin Donnelly wrote:
>> The patched version of grpconv takes arguments but the check on
>> argc was not removed. This patch removes this check which
>> otherwise results in a spurious warning during rootfs creation.
>>
>> Signed-off-by: Martin Donnelly <martin.donnelly@ge.com>
>> ---
>>   .../shadow/files/add_root_cmd_options.patch        |   12 +++++++++++-
>>   1 files changed, 11 insertions(+), 1 deletions(-)
>>
>> diff --git
>> a/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
>> b/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
>> index 5edd3b8..ab87e35 100644
>> --- a/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
>> +++ b/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
>
> This patch needs a header also with Upstream-Status: Signed-off-by: and
> a brief explaination (if needed).
>

The existing patch already has the header and Upstream-Status in it, my 
patch to it simply makes the behaviour of the modified pwconv and 
grpconv in shadow-native consistent. I'll resend this patch with the 
Signed-off-by added to the header if you still want that?

Thanks

Martin

Patch

diff --git a/meta/recipes-extended/shadow/files/add_root_cmd_options.patch b/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
index 5edd3b8..ab87e35 100644
--- a/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
+++ b/meta/recipes-extended/shadow/files/add_root_cmd_options.patch
@@ -528,7 +528,17 @@  diff -urN shadow-4.1.4.3.orig//src/grpconv.c shadow-4.1.4.3//src/grpconv.c
  int main (int argc, char **argv)
  {
  	const struct group *gr;
-@@ -100,6 +183,8 @@
+@@ -89,9 +172,6 @@
+ 	const struct sgrp *sg;
+ 	struct sgrp sgent;
+ 
+-	if (1 != argc) {
+-		(void) fputs (_("Usage: grpconv\n"), stderr);
+-	}
+ 	Prog = Basename (argv[0]);
+ 
+ 	(void) setlocale (LC_ALL, "");
+@@ -100,6 +180,8 @@
  
  	OPENLOG ("grpconv");