* [LTP] [PATCH 21/21] network/nfsv4/acl: Second argument is execl should be a null-terminated array
@ 2012-01-03 13:26 Markos Chandras
2012-01-03 19:26 ` Garrett Cooper
0 siblings, 1 reply; 2+ messages in thread
From: Markos Chandras @ 2012-01-03 13:26 UTC (permalink / raw)
To: ltp-list
[-- Attachment #1: Type: text/plain, Size: 49 bytes --]
Hi, please review the attached patch
--
markos
[-- Attachment #2: 0021-network-nfsv4-acl-Second-argument-is-execl-should-be.patch --]
[-- Type: text/plain, Size: 1339 bytes --]
From d83355aa7d9c197a60a1f1c5e495fa049a2f1861 Mon Sep 17 00:00:00 2001
From: Markos Chandras <markos.chandras@imgtec.com>
Date: Thu, 22 Dec 2011 15:25:03 +0000
Subject: [PATCH 21/21] network/nfsv4/acl: Second argument is execl should be a null-terminated array
From exec manpage:
"The const char *arg and subsequent ellipses in the execl(), execlp(), and
execle() functions can be thought of as arg0, arg1, ..., argn. Together
they describe a list of one or more pointers to null-terminated strings
that represent the argument list available to the executed program". This
change will silence gcc warnings.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
testcases/network/nfsv4/acl/acl1.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/testcases/network/nfsv4/acl/acl1.c b/testcases/network/nfsv4/acl/acl1.c
index 18a92a0..5040eee 100644
--- a/testcases/network/nfsv4/acl/acl1.c
+++ b/testcases/network/nfsv4/acl/acl1.c
@@ -57,12 +57,13 @@ int do_file_op(char* filename) {
result = 0;
FILE *fptr;
char str[256] = "./";
+ const char execl_args[] = {'\0'};
fptr = malloc(sizeof(FILE));
uid = geteuid();
strcat(str, filename);
- exe = execl(str,NULL,NULL);
+ exe = execl(str,execl_args,NULL);
if (exe == -1 && errno!=EACCES)
result = result + OP_EXEC;
--
1.7.1
[-- Attachment #3: Type: text/plain, Size: 355 bytes --]
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH 21/21] network/nfsv4/acl: Second argument is execl should be a null-terminated array
2012-01-03 13:26 [LTP] [PATCH 21/21] network/nfsv4/acl: Second argument is execl should be a null-terminated array Markos Chandras
@ 2012-01-03 19:26 ` Garrett Cooper
0 siblings, 0 replies; 2+ messages in thread
From: Garrett Cooper @ 2012-01-03 19:26 UTC (permalink / raw)
To: Markos Chandras; +Cc: ltp-list
On Tue, Jan 3, 2012 at 5:26 AM, Markos Chandras
<Markos.Chandras@imgtec.com> wrote:
> Hi, please review the attached patch
You could always just do it like:
execl(..., { 0 }, ...);
Thanks,
-Garrett
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-01-03 19:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-03 13:26 [LTP] [PATCH 21/21] network/nfsv4/acl: Second argument is execl should be a null-terminated array Markos Chandras
2012-01-03 19:26 ` Garrett Cooper
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox