Commit b14aac08 authored by Paul Eggert's avatar Paul Eggert

* fileio.c (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer

signedness issues.
parent fd4ead52
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
(Fexpand_file_name): Likewise. In particular, newdir might (Fexpand_file_name): Likewise. In particular, newdir might
point at constant storage, so make it a const pointer. point at constant storage, so make it a const pointer.
(Fmake_directory_internal, Fread_file_name): Remove unused vars. (Fmake_directory_internal, Fread_file_name): Remove unused vars.
(Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
signedness issues.
* minibuf.c (choose_minibuf_frame_1): Now static. * minibuf.c (choose_minibuf_frame_1): Now static.
(Ftry_completion, Fall_completions): Rename or remove locals (Ftry_completion, Fall_completions): Rename or remove locals
...@@ -2756,7 +2756,7 @@ if file does not exist, is not accessible, or SELinux is disabled */) ...@@ -2756,7 +2756,7 @@ if file does not exist, is not accessible, or SELinux is disabled */)
#if HAVE_LIBSELINUX #if HAVE_LIBSELINUX
if (is_selinux_enabled ()) if (is_selinux_enabled ())
{ {
conlength = lgetfilecon (SDATA (absname), &con); conlength = lgetfilecon (SSDATA (absname), &con);
if (conlength > 0) if (conlength > 0)
{ {
context = context_new (con); context = context_new (con);
...@@ -2811,34 +2811,35 @@ is disabled. */) ...@@ -2811,34 +2811,35 @@ is disabled. */)
if (is_selinux_enabled ()) if (is_selinux_enabled ())
{ {
/* Get current file context. */ /* Get current file context. */
conlength = lgetfilecon (SDATA (encoded_absname), &con); conlength = lgetfilecon (SSDATA (encoded_absname), &con);
if (conlength > 0) if (conlength > 0)
{ {
parsed_con = context_new (con); parsed_con = context_new (con);
/* Change the parts defined in the parameter.*/ /* Change the parts defined in the parameter.*/
if (STRINGP (user)) if (STRINGP (user))
{ {
if (context_user_set (parsed_con, SDATA (user))) if (context_user_set (parsed_con, SSDATA (user)))
error ("Doing context_user_set"); error ("Doing context_user_set");
} }
if (STRINGP (role)) if (STRINGP (role))
{ {
if (context_role_set (parsed_con, SDATA (role))) if (context_role_set (parsed_con, SSDATA (role)))
error ("Doing context_role_set"); error ("Doing context_role_set");
} }
if (STRINGP (type)) if (STRINGP (type))
{ {
if (context_type_set (parsed_con, SDATA (type))) if (context_type_set (parsed_con, SSDATA (type)))
error ("Doing context_type_set"); error ("Doing context_type_set");
} }
if (STRINGP (range)) if (STRINGP (range))
{ {
if (context_range_set (parsed_con, SDATA (range))) if (context_range_set (parsed_con, SSDATA (range)))
error ("Doing context_range_set"); error ("Doing context_range_set");
} }
/* Set the modified context back to the file. */ /* 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) if (fail)
report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil)); report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment