Handle matchpathcon() failing with ENOENT
* Wed Sep 29 2010 Miloslav Trmač <mitr@redhat.com> - 0.56.18-2 - Handle matchpathcon() failing with ENOENT Resolves: #631717
This commit is contained in:
parent
b9e82f71f2
commit
b5a19ade39
30
libuser-0.56.18-matchpathcon.patch
Normal file
30
libuser-0.56.18-matchpathcon.patch
Normal file
@ -0,0 +1,30 @@
|
||||
Handle matchpathcon() failing with ENOENT.
|
||||
|
||||
2010-09-29 Miloslav Trmač <mitr@redhat.com>
|
||||
|
||||
* lib/util.c (lu_util_fscreate_for_path): Handle cases when a path is
|
||||
not in the matchpathcon database.
|
||||
|
||||
diff -r cf42457692b4 -r 2744aecc92b1 lib/util.c
|
||||
--- a/lib/util.c Mon Sep 27 19:27:26 2010 +0200
|
||||
+++ b/lib/util.c Wed Sep 29 23:02:56 2010 +0200
|
||||
@@ -756,10 +756,15 @@
|
||||
security_context_t ctx;
|
||||
|
||||
if (matchpathcon(path, mode, &ctx) < 0) {
|
||||
- lu_error_new(error, lu_error_stat,
|
||||
- _("couldn't determine security context "
|
||||
- "for `%s': %s"), path, strerror(errno));
|
||||
- return FALSE;
|
||||
+ if (errno == ENOENT)
|
||||
+ ctx = NULL;
|
||||
+ else {
|
||||
+ lu_error_new(error, lu_error_stat,
|
||||
+ _("couldn't determine security "
|
||||
+ "context for `%s': %s"), path,
|
||||
+ strerror(errno));
|
||||
+ return FALSE;
|
||||
+ }
|
||||
}
|
||||
if (setfscreatecon(ctx) < 0) {
|
||||
lu_error_new(error, lu_error_generic,
|
@ -2,13 +2,15 @@
|
||||
|
||||
Name: libuser
|
||||
Version: 0.56.18
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Group: System Environment/Base
|
||||
License: LGPLv2+
|
||||
URL: https://fedorahosted.org/libuser/
|
||||
Source: https://fedorahosted.org/releases/l/i/libuser/libuser-%{version}.tar.xz
|
||||
# Upstream commit 276fa0a3078b431e18289285f84a77381b89726c
|
||||
Patch0: libuser-0.56.17-crypt_style.patch
|
||||
# Upstream commit 2744aecc92b1f0c78d19022bf9e8107450544e18
|
||||
Patch1: libuser-0.56.18-matchpathcon.patch
|
||||
BuildRequires: glib2-devel, linuxdoc-tools, pam-devel, popt-devel, python2-devel
|
||||
BuildRequires: cyrus-sasl-devel, libselinux-devel, openldap-devel
|
||||
# To make sure the configure script can find it
|
||||
@ -46,6 +48,7 @@ administering user and group accounts.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .crypt_style
|
||||
%patch1 -p1 -b .matchpathcon
|
||||
|
||||
%build
|
||||
%configure --with-selinux --with-ldap --with-html-dir=%{_datadir}/gtk-doc/html
|
||||
@ -101,6 +104,10 @@ python -c "import libuser"
|
||||
%{_datadir}/gtk-doc/html/*
|
||||
|
||||
%changelog
|
||||
* Wed Sep 29 2010 Miloslav Trmač <mitr@redhat.com> - 0.56.18-2
|
||||
- Handle matchpathcon() failing with ENOENT
|
||||
Resolves: #631717
|
||||
|
||||
* Tue Sep 14 2010 Miloslav Trmač <mitr@redhat.com> - 0.56.18-1
|
||||
- Update to libuser-0.56.18
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user