diff options
author | Darren Tucker <dtucker@zip.com.au> | 2010-09-10 10:30:25 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2010-09-10 10:30:25 +1000 |
commit | 50e3bab2421e41cbce9093c5047298ed7ad730cb (patch) | |
tree | 71685c126e1d7a76f59fe38c25af15a93efb835c | |
parent | c79ff0770e0ac1e0d9acc2741190cf7599bb6bd8 (diff) |
- (dtucker) [openbsd-compat/port-linux.c] Check is_selinux_enabled for exact
return code since it can apparently return -1 under some conditions. From
openssh bugs werbittewas de, ok djm@
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | openbsd-compat/port-linux.c | 4 |
2 files changed, 8 insertions, 3 deletions
@@ -1,4 +1,9 @@ | |||
1 | 20100931 | 1 | 2010910 |
2 | - (dtucker) [openbsd-compat/port-linux.c] Check is_selinux_enabled for exact | ||
3 | return code since it can apparently return -1 under some conditions. From | ||
4 | openssh bugs werbittewas de, ok djm@ | ||
5 | |||
6 | 20100831 | ||
2 | - OpenBSD CVS Sync | 7 | - OpenBSD CVS Sync |
3 | - jmc@cvs.openbsd.org 2010/08/08 19:36:30 | 8 | - jmc@cvs.openbsd.org 2010/08/08 19:36:30 |
4 | [ssh-keysign.8 ssh.1 sshd.8] | 9 | [ssh-keysign.8 ssh.1 sshd.8] |
diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c index 89b9a7340..86d16dc6e 100644 --- a/openbsd-compat/port-linux.c +++ b/openbsd-compat/port-linux.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: port-linux.c,v 1.8 2010/03/01 04:52:50 dtucker Exp $ */ | 1 | /* $Id: port-linux.c,v 1.9 2010/09/10 00:30:25 dtucker Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com> | 4 | * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com> |
@@ -45,7 +45,7 @@ ssh_selinux_enabled(void) | |||
45 | static int enabled = -1; | 45 | static int enabled = -1; |
46 | 46 | ||
47 | if (enabled == -1) { | 47 | if (enabled == -1) { |
48 | enabled = is_selinux_enabled(); | 48 | enabled = (is_selinux_enabled() == 1); |
49 | debug("SELinux support %s", enabled ? "enabled" : "disabled"); | 49 | debug("SELinux support %s", enabled ? "enabled" : "disabled"); |
50 | } | 50 | } |
51 | 51 | ||