- skip the setfscreatecon() if fopen() is passed "rb" as the open mode (part of #819115)

This commit is contained in:
Nalin Dahyabhai 2012-05-07 17:28:51 -04:00
parent 2057747130
commit cd92a2cbb4
2 changed files with 8 additions and 3 deletions

View File

@ -465,9 +465,9 @@ which we used earlier, is some improvement.
--- krb5/src/util/support/selinux.c
+++ krb5/src/util/support/selinux.c
@@ -0,0 +1,372 @@
@@ -0,0 +1,373 @@
+/*
+ * Copyright 2007,2008,2009,2011 Red Hat, Inc. All Rights Reserved.
+ * Copyright 2007,2008,2009,2011,2012 Red Hat, Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
@ -718,7 +718,8 @@ which we used earlier, is some improvement.
+ int errno_save;
+ security_context_t ctx;
+
+ if (strcmp(mode, "r") == 0) {
+ if ((strcmp(mode, "r") == 0) ||
+ (strcmp(mode, "rb") == 0)) {
+ return fopen(path, mode);
+ }
+

View File

@ -745,6 +745,10 @@ exit 0
%{_sbindir}/uuserver
%changelog
* Mon May 7 2012 Nalin Dahyabhai <nalin@redhat.com>
- skip the setfscreatecon() if fopen() is passed "rb" as the open mode (part
of #819115)
* Tue May 1 2012 Nalin Dahyabhai <nalin@redhat.com> 1.10.1-3
- have -server require /usr/share/dict/words, which we set as the default
dict_file in kdc.conf (#817089)