summaryrefslogtreecommitdiff
path: root/Ports/stress-ng/patches/0006-disable-lchown-calls-from-sysbadaddr.patch
blob: d0722321b3ff820825b1f7ae38fac30e0784cf67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From 1c2a6348c19fa42e45c43a73b34c37db83391d5c Mon Sep 17 00:00:00 2001
From: Brian Gianforcaro <b.gianfo@gmail.com>
Date: Mon, 27 Dec 2021 23:28:58 -0800
Subject: [PATCH 06/14] serenity: Disable lchown() calls from sysbadaddr
 stressor on Serenity

Serenity doesn't have an lchown implementation yet.
---
 stress-sysbadaddr.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/stress-sysbadaddr.c b/stress-sysbadaddr.c
index 8d0481b..18166f3 100644
--- a/stress-sysbadaddr.c
+++ b/stress-sysbadaddr.c
@@ -424,10 +424,12 @@ static int bad_ioctl(void *addr)
 }
 #endif
 
+#ifndef __serenity__
 static int bad_lchown(void *addr)
 {
 	return lchown((char *)addr, getuid(), getgid());
 }
+#endif
 
 static int bad_link(void *addr)
 {
@@ -856,7 +858,9 @@ static stress_bad_syscall_t bad_syscalls[] = {
 #if defined(TCGETS)
 	bad_ioctl,
 #endif
+#ifndef __serenity__
 	bad_lchown,
+#endif
 	bad_link,
 	bad_lstat,
 #if defined(HAVE_MADVISE)
-- 
2.32.0