* src/fileio.c (Ffile_selinux_context): Context functions may return null.
This commit is contained in:
parent
84716442f0
commit
45841e65c9
2 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
|||
2010-05-01 Karel Klíč <kklic@redhat.com>
|
||||
|
||||
* fileio.c (Ffile_selinux_context): Context functions may return null.
|
||||
|
||||
2010-04-30 Dan Nicolaescu <dann@ics.uci.edu>
|
||||
|
||||
* s/gnu.h (POSIX_SIGNALS):
|
||||
|
|
12
src/fileio.c
12
src/fileio.c
|
@ -2918,10 +2918,14 @@ if file does not exist, is not accessible, or SELinux is disabled */)
|
|||
if (conlength > 0)
|
||||
{
|
||||
context = context_new (con);
|
||||
values[0] = build_string (context_user_get (context));
|
||||
values[1] = build_string (context_role_get (context));
|
||||
values[2] = build_string (context_type_get (context));
|
||||
values[3] = build_string (context_range_get (context));
|
||||
if (context_user_get (context))
|
||||
values[0] = build_string (context_user_get (context));
|
||||
if (context_role_get (context))
|
||||
values[1] = build_string (context_role_get (context));
|
||||
if (context_type_get (context))
|
||||
values[2] = build_string (context_type_get (context));
|
||||
if (context_range_get (context))
|
||||
values[3] = build_string (context_range_get (context));
|
||||
context_free (context);
|
||||
}
|
||||
if (con)
|
||||
|
|
Loading…
Add table
Reference in a new issue