From: Markos Chandras <Markos.Chandras@imgtec.com>
To: ltp-list@lists.sourceforge.net
Subject: [LTP] [PATCH 21/21] network/nfsv4/acl: Second argument is execl should be a null-terminated array
Date: Tue, 3 Jan 2012 13:26:10 +0000 [thread overview]
Message-ID: <4F0301F2.7070809@imgtec.com> (raw)
[-- 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
next reply other threads:[~2012-01-03 13:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-03 13:26 Markos Chandras [this message]
2012-01-03 19:26 ` [LTP] [PATCH 21/21] network/nfsv4/acl: Second argument is execl should be a null-terminated array Garrett Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F0301F2.7070809@imgtec.com \
--to=markos.chandras@imgtec.com \
--cc=ltp-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.