Skip to contentSkip to conversation

libselinux segfault, if file_contexts file does not exist

PATCH Applied Daniel J Walsh 2 participants 2 messages Sep 27, 2007 SELinux security module

lore
Share & tools
lore
#0 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

https://bugzilla.redhat.com/show_bug.cgi?id=308851
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFG+/CWrlYvE4MpobMRAi7+AKCzBc906xJDXvve+tvemuBY8tFe4QCgk78j CZzAvmikWfld43QZSJbdIRA=
=D2ho
-----END PGP SIGNATURE-----

src/matchpathcon.c +4 -2
diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.35/src/matchpathcon.c
@@ -305,8 +306,10 @@
 
 void matchpathcon_fini(void)
 {
-	selabel_close(hnd);
-	hnd = NULL;
+	if (hnd) {
+		selabel_close(hnd);
+		hnd = NULL;
+	}
 }
 
 int matchpathcon(const char *name, mode_t mode, security_context_t * con)
Applied
#1 lore raw
Quoted 9 lines · Daniel J Walsh

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

https://bugzilla.redhat.com/show_bug.cgi?id=308851
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

Quoted 5 lines

iD8DBQFG+/CWrlYvE4MpobMRAi7+AKCzBc906xJDXvve+tvemuBY8tFe4QCgk78j CZzAvmikWfld43QZSJbdIRA=
=D2ho
-----END PGP SIGNATURE-----

Thanks, applied.

Signature · 7 lines
Eamon Walsh <[email protected]>
National Security Agency

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.