diff options
Diffstat (limited to '')
-rw-r--r-- | src/regress/lib/libc/sys/t_revoke.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/regress/lib/libc/sys/t_revoke.c b/src/regress/lib/libc/sys/t_revoke.c index ad54f814d1..7640c2d871 100644 --- a/src/regress/lib/libc/sys/t_revoke.c +++ b/src/regress/lib/libc/sys/t_revoke.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: t_revoke.c,v 1.1.1.1 2019/11/19 19:57:04 bluhm Exp $ */ | 1 | /* $OpenBSD: t_revoke.c,v 1.2 2020/11/09 23:18:51 bluhm Exp $ */ |
2 | /* $NetBSD: t_revoke.c,v 1.2 2017/01/13 21:15:57 christos Exp $ */ | 2 | /* $NetBSD: t_revoke.c,v 1.2 2017/01/13 21:15:57 christos Exp $ */ |
3 | 3 | ||
4 | /*- | 4 | /*- |
@@ -118,8 +118,11 @@ ATF_TC_BODY(revoke_err, tc) | |||
118 | ATF_REQUIRE_ERRNO(ENAMETOOLONG, revoke(buf) == -1); | 118 | ATF_REQUIRE_ERRNO(ENAMETOOLONG, revoke(buf) == -1); |
119 | 119 | ||
120 | errno = 0; | 120 | errno = 0; |
121 | /* Adjusted for OpenBSD, initially EPERM */ | 121 | #ifdef __OpenBSD__ |
122 | ATF_REQUIRE_ERRNO(ENOTTY, revoke("/etc/passwd") == -1); | 122 | ATF_REQUIRE_ERRNO(ENOTTY, revoke("/etc/passwd") == -1); |
123 | #else | ||
124 | ATF_REQUIRE_ERRNO(EPERM, revoke("/etc/passwd") == -1); | ||
125 | #endif | ||
123 | 126 | ||
124 | errno = 0; | 127 | errno = 0; |
125 | ATF_REQUIRE_ERRNO(ENOENT, revoke("/etc/xxx/yyy") == -1); | 128 | ATF_REQUIRE_ERRNO(ENOENT, revoke("/etc/xxx/yyy") == -1); |
@@ -184,15 +187,15 @@ ATF_TC_CLEANUP(revoke_perm, tc) | |||
184 | ATF_TP_ADD_TCS(tp) | 187 | ATF_TP_ADD_TCS(tp) |
185 | { | 188 | { |
186 | 189 | ||
187 | /* | 190 | #ifndef __OpenBSD__ |
188 | * Adjusted for OpenBSD, revoke only on ttys supported | 191 | /* OpenBSD supports revoke only on ttys */ |
189 | * ATF_TP_ADD_TC(tp, revoke_basic); | 192 | ATF_TP_ADD_TC(tp, revoke_basic); |
190 | */ | 193 | #endif |
191 | ATF_TP_ADD_TC(tp, revoke_err); | 194 | ATF_TP_ADD_TC(tp, revoke_err); |
192 | /* | 195 | #ifndef __OpenBSD__ |
193 | * Adjusted for OpenBSD, revoke only on ttys supported | 196 | /* OpenBSD supports revoke only on ttys */ |
194 | * ATF_TP_ADD_TC(tp, revoke_perm); | 197 | ATF_TP_ADD_TC(tp, revoke_perm); |
195 | */ | 198 | #endif |
196 | 199 | ||
197 | return atf_no_error(); | 200 | return atf_no_error(); |
198 | } | 201 | } |