Mercurial > emacs
diff src/fileio.c @ 108184:f4b0e5358091
* src/fileio.c (Ffile_selinux_context): Context functions may return null.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Fri, 30 Apr 2010 19:58:41 -0700 |
parents | 12062a99ca8d |
children | 261591829d04 |
line wrap: on
line diff
--- a/src/fileio.c Fri Apr 30 22:19:40 2010 -0400 +++ b/src/fileio.c Fri Apr 30 19:58:41 2010 -0700 @@ -2918,10 +2918,14 @@ 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)