diff options
Diffstat (limited to 'openbsd-compat')
-rw-r--r-- | openbsd-compat/port-linux.c | 21 | ||||
-rw-r--r-- | openbsd-compat/port-linux.h | 2 |
2 files changed, 11 insertions, 12 deletions
diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c index a2498dc15..dc8b1fa55 100644 --- a/openbsd-compat/port-linux.c +++ b/openbsd-compat/port-linux.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: port-linux.c,v 1.11 2011/01/17 07:50:24 dtucker Exp $ */ | 1 | /* $Id: port-linux.c,v 1.11.4.2 2011/02/04 00:43:08 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com> | 4 | * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com> |
@@ -222,17 +222,16 @@ ssh_selinux_change_context(const char *newname) | |||
222 | void | 222 | void |
223 | ssh_selinux_setfscreatecon(const char *path) | 223 | ssh_selinux_setfscreatecon(const char *path) |
224 | { | 224 | { |
225 | security_context_t context; | 225 | security_context_t context; |
226 | 226 | ||
227 | if (!ssh_selinux_enabled()) | 227 | if (!ssh_selinux_enabled()) |
228 | return; | 228 | return; |
229 | 229 | if (path == NULL) { | |
230 | if (path == NULL) { | 230 | setfscreatecon(NULL); |
231 | setfscreatecon(NULL); | 231 | return; |
232 | return; | 232 | } |
233 | } | 233 | if (matchpathcon(path, 0700, &context) == 0) |
234 | if (matchpathcon(path, 0700, &context) == 0) | 234 | setfscreatecon(context); |
235 | setfscreatecon(context); | ||
236 | } | 235 | } |
237 | 236 | ||
238 | #endif /* WITH_SELINUX */ | 237 | #endif /* WITH_SELINUX */ |
diff --git a/openbsd-compat/port-linux.h b/openbsd-compat/port-linux.h index 8ed5587ee..3804fa2d1 100644 --- a/openbsd-compat/port-linux.h +++ b/openbsd-compat/port-linux.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: port-linux.h,v 1.4 2009/12/08 02:39:48 dtucker Exp $ */ | 1 | /* $Id: port-linux.h,v 1.4.10.1 2011/02/04 00:42:21 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2006 Damien Miller <djm@openbsd.org> | 4 | * Copyright (c) 2006 Damien Miller <djm@openbsd.org> |