aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-03-14 19:50:36 -0700
committerPaul Eggert2011-03-14 19:50:36 -0700
commitb14aac08d08c5f17dc27e8d2cc1cc76b33e92c62 (patch)
tree5170a6c5a9cdaa5d9d1a00e4bc1645426daa0b62 /src
parentfd4ead52062abcb8d8356595708229d83021f042 (diff)
downloademacs-b14aac08d08c5f17dc27e8d2cc1cc76b33e92c62.tar.gz
emacs-b14aac08d08c5f17dc27e8d2cc1cc76b33e92c62.zip
* fileio.c (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
signedness issues.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog2
-rw-r--r--src/fileio.c15
2 files changed, 10 insertions, 7 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 567fe22a941..aa21fb17c85 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -7,6 +7,8 @@
7 (Fexpand_file_name): Likewise. In particular, newdir might 7 (Fexpand_file_name): Likewise. In particular, newdir might
8 point at constant storage, so make it a const pointer. 8 point at constant storage, so make it a const pointer.
9 (Fmake_directory_internal, Fread_file_name): Remove unused vars. 9 (Fmake_directory_internal, Fread_file_name): Remove unused vars.
10 (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
11 signedness issues.
10 12
11 * minibuf.c (choose_minibuf_frame_1): Now static. 13 * minibuf.c (choose_minibuf_frame_1): Now static.
12 (Ftry_completion, Fall_completions): Rename or remove locals 14 (Ftry_completion, Fall_completions): Rename or remove locals
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 */)
2756#if HAVE_LIBSELINUX 2756#if HAVE_LIBSELINUX
2757 if (is_selinux_enabled ()) 2757 if (is_selinux_enabled ())
2758 { 2758 {
2759 conlength = lgetfilecon (SDATA (absname), &con); 2759 conlength = lgetfilecon (SSDATA (absname), &con);
2760 if (conlength > 0) 2760 if (conlength > 0)
2761 { 2761 {
2762 context = context_new (con); 2762 context = context_new (con);
@@ -2811,34 +2811,35 @@ is disabled. */)
2811 if (is_selinux_enabled ()) 2811 if (is_selinux_enabled ())
2812 { 2812 {
2813 /* Get current file context. */ 2813 /* Get current file context. */
2814 conlength = lgetfilecon (SDATA (encoded_absname), &con); 2814 conlength = lgetfilecon (SSDATA (encoded_absname), &con);
2815 if (conlength > 0) 2815 if (conlength > 0)
2816 { 2816 {
2817 parsed_con = context_new (con); 2817 parsed_con = context_new (con);
2818 /* Change the parts defined in the parameter.*/ 2818 /* Change the parts defined in the parameter.*/
2819 if (STRINGP (user)) 2819 if (STRINGP (user))
2820 { 2820 {
2821 if (context_user_set (parsed_con, SDATA (user))) 2821 if (context_user_set (parsed_con, SSDATA (user)))
2822 error ("Doing context_user_set"); 2822 error ("Doing context_user_set");
2823 } 2823 }
2824 if (STRINGP (role)) 2824 if (STRINGP (role))
2825 { 2825 {
2826 if (context_role_set (parsed_con, SDATA (role))) 2826 if (context_role_set (parsed_con, SSDATA (role)))
2827 error ("Doing context_role_set"); 2827 error ("Doing context_role_set");
2828 } 2828 }
2829 if (STRINGP (type)) 2829 if (STRINGP (type))
2830 { 2830 {
2831 if (context_type_set (parsed_con, SDATA (type))) 2831 if (context_type_set (parsed_con, SSDATA (type)))
2832 error ("Doing context_type_set"); 2832 error ("Doing context_type_set");
2833 } 2833 }
2834 if (STRINGP (range)) 2834 if (STRINGP (range))
2835 { 2835 {
2836 if (context_range_set (parsed_con, SDATA (range))) 2836 if (context_range_set (parsed_con, SSDATA (range)))
2837 error ("Doing context_range_set"); 2837 error ("Doing context_range_set");
2838 } 2838 }
2839 2839
2840 /* Set the modified context back to the file. */ 2840 /* Set the modified context back to the file. */
2841 fail = lsetfilecon (SDATA (encoded_absname), context_str (parsed_con)); 2841 fail = lsetfilecon (SSDATA (encoded_absname),
2842 context_str (parsed_con));
2842 if (fail) 2843 if (fail)
2843 report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil)); 2844 report_file_error ("Doing lsetfilecon", Fcons (absname, Qnil));
2844 2845