Cope with gnulib's new sc_prohibit_magic_number_exit rule.
* .x-sc_prohibit_magic_number_exit: New file, to add exemptions.
* Makefile.am (syntax_check_exceptions): Distribute it.
* lib/euidaccess-stat.c (main): Fix culprits.
* src/chcon.c (main): Likewise.
* src/runcon.c (main): Likewise.
* src/setuidgid.c (main): Likewise.
--- /dev/null
+configure.ac
+*.m4
+ChangeLog*
.x-sc_po_check \
.x-sc_program_name \
.x-sc_prohibit_atoi_atof \
+ .x-sc_prohibit_magic_number_exit \
.x-sc_prohibit_stat_st_blocks \
.x-sc_prohibit_strcmp \
.x-sc_prohibit_tab_based_indentation \
ok = euidaccess_stat (&st, mode);
printf ("%s: %s\n", file, ok ? "y" : "n");
- exit (0);
+ return 0;
}
#endif
if (reference_file && component_specified)
{
error (0, 0, _("conflicting security context specifiers given"));
- usage (1);
+ usage (EXIT_FAILURE);
}
if (recurse && preserve_root)
if (optind >= argc)
{
error (0, 0, _("you must specify -c, -t, -u, -l, -r, or context"));
- usage (1);
+ usage (EXIT_FAILURE);
}
context = argv[optind++];
}
if (optind >= argc)
{
error (0, 0, _("no command specified"));
- usage (1);
+ usage (EXIT_FAILURE);
}
if (is_selinux_enabled () != 1)
{
int n = mgetgroups (pwd->pw_name, pwd->pw_gid, &gids);
if (n <= 0)
- error (1, errno, _("failed to get groups for user %s"),
+ error (EXIT_FAILURE, errno, _("failed to get groups for user %s"),
quote (pwd->pw_name));
n_gids = n;
}