public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH v2] security/dirtyc0w: Get and set umask in setup
@ 2020-03-30  2:45 Zou Wei
  2020-03-30  3:02 ` Xiao Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Zou Wei @ 2020-03-30  2:45 UTC (permalink / raw)
  To: ltp

v2:
Clear current umask by umask(0) in setup()

Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
 testcases/kernel/security/dirtyc0w/dirtyc0w.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testcases/kernel/security/dirtyc0w/dirtyc0w.c b/testcases/kernel/security/dirtyc0w/dirtyc0w.c
index a0a81b6..6455f9c 100644
--- a/testcases/kernel/security/dirtyc0w/dirtyc0w.c
+++ b/testcases/kernel/security/dirtyc0w/dirtyc0w.c
@@ -45,6 +45,8 @@ static void setup(void)
 {
 	struct passwd *pw;

+	umask(0);
+
 	pw = SAFE_GETPWNAM("nobody");

 	nobody_uid = pw->pw_uid;
--
2.6.2


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

* [LTP] [PATCH v2] security/dirtyc0w: Get and set umask in setup
  2020-03-30  2:45 [LTP] [PATCH v2] security/dirtyc0w: Get and set umask in setup Zou Wei
@ 2020-03-30  3:02 ` Xiao Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Xiao Yang @ 2020-03-30  3:02 UTC (permalink / raw)
  To: ltp

On 2020/3/30 10:45, Zou Wei wrote:
> v2:
> Clear current umask by umask(0) in setup()
Hi Zou,

1) needs to update the subject as well.
2) add some commit message to describe the issue.

Thanks,
Xiao Yang
>
> Signed-off-by: Zou Wei<zou_wei@huawei.com>
> ---
>   testcases/kernel/security/dirtyc0w/dirtyc0w.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/testcases/kernel/security/dirtyc0w/dirtyc0w.c b/testcases/kernel/security/dirtyc0w/dirtyc0w.c
> index a0a81b6..6455f9c 100644
> --- a/testcases/kernel/security/dirtyc0w/dirtyc0w.c
> +++ b/testcases/kernel/security/dirtyc0w/dirtyc0w.c
> @@ -45,6 +45,8 @@ static void setup(void)
>   {
>   	struct passwd *pw;
>
> +	umask(0);
> +
>   	pw = SAFE_GETPWNAM("nobody");
>
>   	nobody_uid = pw->pw_uid;
> --
> 2.6.2
>
>




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

end of thread, other threads:[~2020-03-30  3:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-30  2:45 [LTP] [PATCH v2] security/dirtyc0w: Get and set umask in setup Zou Wei
2020-03-30  3:02 ` Xiao Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox