diff options
Diffstat (limited to 'openbsd-compat/port-linux.c')
-rw-r--r-- | openbsd-compat/port-linux.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c index 86a7146a6..744a404c8 100644 --- a/openbsd-compat/port-linux.c +++ b/openbsd-compat/port-linux.c | |||
@@ -222,6 +222,20 @@ ssh_selinux_change_context(const char *newname) | |||
222 | xfree(oldctx); | 222 | xfree(oldctx); |
223 | xfree(newctx); | 223 | xfree(newctx); |
224 | } | 224 | } |
225 | |||
226 | void | ||
227 | ssh_selinux_setfscreatecon(const char *path) | ||
228 | { | ||
229 | security_context_t context; | ||
230 | |||
231 | if (path == NULL) { | ||
232 | setfscreatecon(NULL); | ||
233 | return; | ||
234 | } | ||
235 | matchpathcon(path, 0700, &context); | ||
236 | setfscreatecon(context); | ||
237 | } | ||
238 | |||
225 | #endif /* WITH_SELINUX */ | 239 | #endif /* WITH_SELINUX */ |
226 | 240 | ||
227 | #ifdef LINUX_OOM_ADJUST | 241 | #ifdef LINUX_OOM_ADJUST |