-Subproject commit fdf0468198631a456406edc09983972edb8fa5c4
+Subproject commit cb432e7d6144c99da594f1fbce8ec8fd939745a0
if (file_context == NULL || ! STREQ (context_string, file_context))
{
int fail = (affect_symlink_referent
- ? setfileconat (fd, file, se_const (context_string))
- : lsetfileconat (fd, file, se_const (context_string)));
+ ? setfileconat (fd, file, context_string)
+ : lsetfileconat (fd, file, context_string));
if (fail)
{
{
specified_context = argv[optind++];
if (0 < is_selinux_enabled ()
- && security_check_context (se_const (specified_context)) < 0)
+ && security_check_context (specified_context) < 0)
die (EXIT_FAILURE, errno, _("invalid context: %s"),
quote (specified_context));
}
if (scontext && !restorecon (NULL, dst_path, 0))
error (...);
*/
- if (scontext && setfscreatecon (se_const (scontext)) < 0)
+ if (scontext && setfscreatecon (scontext) < 0)
die (EXIT_FAILURE, errno,
_("failed to set default file creation context to %s"),
quote (scontext));
die (EXIT_FAILURE, 0,
_("cannot set target context and preserve it"));
- if (scontext && setfscreatecon (se_const (scontext)) < 0)
+ if (scontext && setfscreatecon (scontext) < 0)
die (EXIT_FAILURE, errno,
_("failed to set default file creation context to %s"),
quote (scontext));
if (is_smack_enabled ())
ret = smack_set_label_for_self (scontext);
else
- ret = setfscreatecon (se_const (scontext));
+ ret = setfscreatecon (scontext);
if (ret < 0)
die (EXIT_FAILURE, errno,
if (is_smack_enabled ())
ret = smack_set_label_for_self (scontext);
else
- ret = setfscreatecon (se_const (scontext));
+ ret = setfscreatecon (scontext);
if (ret < 0)
die (EXIT_FAILURE, errno,
if (is_smack_enabled ())
ret = smack_set_label_for_self (scontext);
else
- ret = setfscreatecon (se_const (scontext));
+ ret = setfscreatecon (scontext);
if (ret < 0)
die (EXIT_FAILURE, errno,
# define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
#endif
-/* Avoid const warnings by casting to more portable type.
- This is to cater for the incorrect const function declarations
- in selinux.h before libselinux-2.3 (May 2014).
- When version >= 2.3 is ubiquitous remove this function. */
-static inline char * se_const (char const * sctx) { return (char *) sctx; }
-
/* Return true if ERR is ENOTSUP or EOPNOTSUPP, otherwise false.
This wrapper function avoids the redundant 'or'd comparison on
systems like Linux for which they have the same value. It also