Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
b14aac08
Commit
b14aac08
authored
Mar 14, 2011
by
Paul Eggert
Browse files
* fileio.c (Ffile_selinux_context, Fset_file_selinux_context): Fix pointer
signedness issues.
parent
fd4ead52
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
src/ChangeLog
src/ChangeLog
+2
-0
src/fileio.c
src/fileio.c
+8
-7
No files found.
src/ChangeLog
View file @
b14aac08
...
...
@@ -7,6 +7,8 @@
(Fexpand_file_name): Likewise. In particular, newdir might
point at constant storage, so make it a const pointer.
(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.
(Ftry_completion, Fall_completions): Rename or remove locals
src/fileio.c
View file @
b14aac08
...
...
@@ -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
(
S
SDATA
(
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
(
S
SDATA
(
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
,
S
SDATA
(
user
)))
error
(
"Doing context_user_set"
);
}
if
(
STRINGP
(
role
))
{
if
(
context_role_set
(
parsed_con
,
SDATA
(
role
)))
if
(
context_role_set
(
parsed_con
,
S
SDATA
(
role
)))
error
(
"Doing context_role_set"
);
}
if
(
STRINGP
(
type
))
{
if
(
context_type_set
(
parsed_con
,
SDATA
(
type
)))
if
(
context_type_set
(
parsed_con
,
S
SDATA
(
type
)))
error
(
"Doing context_type_set"
);
}
if
(
STRINGP
(
range
))
{
if
(
context_range_set
(
parsed_con
,
SDATA
(
range
)))
if
(
context_range_set
(
parsed_con
,
S
SDATA
(
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
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment