summaryrefslogtreecommitdiff
path: root/src/fileio.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-03-14 19:50:36 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-03-14 19:50:36 -0700
commitb14aac08d08c5f17dc27e8d2cc1cc76b33e92c62 (patch)
tree5170a6c5a9cdaa5d9d1a00e4bc1645426daa0b62 /src/fileio.c
parentfd4ead52062abcb8d8356595708229d83021f042 (diff)
downloademacs-b14aac08d08c5f17dc27e8d2cc1cc76b33e92c62.tar.gz
emacs-b14aac08d08c5f17dc27e8d2cc1cc76b33e92c62.tar.bz2
emacs-b14aac08d08c5f17dc27e8d2cc1cc76b33e92c62.zip
* fileio.c (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
signedness issues.
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/fileio.c b/src/fileio.c
index b99311445b3..b4e28702029 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2756,7 +2756,7 @@ if file does not exist, is not accessible, or SELinux is disabled */)
#if HAVE_LIBSELINUX
if (is_selinux_enabled ())
{
- conlength = lgetfilecon (SDATA (absname), &con);
+ conlength = lgetfilecon (SSDATA (absname), &con);
if (conlength > 0)
{
context = context_new (con);
@@ -2811,34 +2811,35 @@ is disabled. */)
if (is_selinux_enabled ())
{
/* Get current file context. */
- conlength = lgetfilecon (SDATA (encoded_absname), &con);
+ conlength = lgetfilecon (SSDATA (encoded_absname), &con);
if (conlength > 0)
{
parsed_con = context_new (con);
/* Change the parts defined in the parameter.*/
if (STRINGP (user))
{
- if (context_user_set (parsed_con, SDATA (user)))
+ if (context_user_set (parsed_con, SSDATA (user)))
error ("Doing context_user_set");
}
if (STRINGP (role))
{
- if (context_role_set (parsed_con, SDATA (role)))
+ if (context_role_set (parsed_con, SSDATA (role)))
error ("Doing context_role_set");
}
if (STRINGP (type))
{
- if (context_type_set (parsed_con, SDATA (type)))
+ if (context_type_set (parsed_con, SSDATA (type)))
error ("Doing context_type_set");
}
if (STRINGP (range))
{
- if (context_range_set (parsed_con, SDATA (range)))
+ if (context_range_set (parsed_con, SSDATA (range)))
error ("Doing context_range_set");
}
/* Set the modified context back to the file. */
- fail = lsetfilecon (SDATA (encoded_absname), context_str (parsed_con));
+ fail = lsetfilecon (SSDATA (encoded_absname),
+ context_str (parsed_con));
if (fail)
report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil));