selinux/*: -Wunused-parameter fixes
runsv: make it NOMMU-capable function old new delta startservice 291 313 +22 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 22/0) Total: 22 bytes
This commit is contained in:
parent
4866e905d7
commit
592d4fe772
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Automatically generated make config: don't edit
|
# Automatically generated make config: don't edit
|
||||||
# Busybox version: 1.10.0.svn
|
# Busybox version: 1.10.0.svn
|
||||||
# Sat Mar 15 20:36:24 2008
|
# Sat Mar 15 22:51:03 2008
|
||||||
#
|
#
|
||||||
CONFIG_HAVE_DOT_CONFIG=y
|
CONFIG_HAVE_DOT_CONFIG=y
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ CONFIG_FEATURE_PIDFILE=y
|
|||||||
CONFIG_FEATURE_SUID=y
|
CONFIG_FEATURE_SUID=y
|
||||||
CONFIG_FEATURE_SUID_CONFIG=y
|
CONFIG_FEATURE_SUID_CONFIG=y
|
||||||
CONFIG_FEATURE_SUID_CONFIG_QUIET=y
|
CONFIG_FEATURE_SUID_CONFIG_QUIET=y
|
||||||
# CONFIG_SELINUX is not set
|
CONFIG_SELINUX=y
|
||||||
CONFIG_FEATURE_PREFER_APPLETS=y
|
CONFIG_FEATURE_PREFER_APPLETS=y
|
||||||
CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
|
CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
|
||||||
CONFIG_FEATURE_SYSLOG=y
|
CONFIG_FEATURE_SYSLOG=y
|
||||||
@ -356,7 +356,7 @@ CONFIG_FEATURE_FIND_PRUNE=y
|
|||||||
CONFIG_FEATURE_FIND_DELETE=y
|
CONFIG_FEATURE_FIND_DELETE=y
|
||||||
CONFIG_FEATURE_FIND_PATH=y
|
CONFIG_FEATURE_FIND_PATH=y
|
||||||
CONFIG_FEATURE_FIND_REGEX=y
|
CONFIG_FEATURE_FIND_REGEX=y
|
||||||
# CONFIG_FEATURE_FIND_CONTEXT is not set
|
CONFIG_FEATURE_FIND_CONTEXT=y
|
||||||
CONFIG_GREP=y
|
CONFIG_GREP=y
|
||||||
CONFIG_FEATURE_GREP_EGREP_ALIAS=y
|
CONFIG_FEATURE_GREP_EGREP_ALIAS=y
|
||||||
CONFIG_FEATURE_GREP_FGREP_ALIAS=y
|
CONFIG_FEATURE_GREP_FGREP_ALIAS=y
|
||||||
@ -474,8 +474,8 @@ CONFIG_MKFS_MINIX=y
|
|||||||
CONFIG_FEATURE_MINIX2=y
|
CONFIG_FEATURE_MINIX2=y
|
||||||
CONFIG_GETOPT=y
|
CONFIG_GETOPT=y
|
||||||
CONFIG_HEXDUMP=y
|
CONFIG_HEXDUMP=y
|
||||||
CONFIG_HD=y
|
|
||||||
CONFIG_FEATURE_HEXDUMP_REVERSE=y
|
CONFIG_FEATURE_HEXDUMP_REVERSE=y
|
||||||
|
CONFIG_HD=y
|
||||||
CONFIG_HWCLOCK=y
|
CONFIG_HWCLOCK=y
|
||||||
CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
|
CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
|
||||||
CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
|
CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
|
||||||
@ -550,7 +550,7 @@ CONFIG_FEATURE_MOUNT_LOOP=y
|
|||||||
# Miscellaneous Utilities
|
# Miscellaneous Utilities
|
||||||
#
|
#
|
||||||
CONFIG_ADJTIMEX=y
|
CONFIG_ADJTIMEX=y
|
||||||
# CONFIG_BBCONFIG is not set
|
CONFIG_BBCONFIG=y
|
||||||
CONFIG_CHAT=y
|
CONFIG_CHAT=y
|
||||||
CONFIG_FEATURE_CHAT_NOFAIL=y
|
CONFIG_FEATURE_CHAT_NOFAIL=y
|
||||||
CONFIG_FEATURE_CHAT_TTY_HIFI=y
|
CONFIG_FEATURE_CHAT_TTY_HIFI=y
|
||||||
@ -745,7 +745,7 @@ CONFIG_PKILL=y
|
|||||||
CONFIG_PS=y
|
CONFIG_PS=y
|
||||||
CONFIG_FEATURE_PS_WIDE=y
|
CONFIG_FEATURE_PS_WIDE=y
|
||||||
CONFIG_FEATURE_PS_TIME=y
|
CONFIG_FEATURE_PS_TIME=y
|
||||||
# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set
|
CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS=y
|
||||||
CONFIG_RENICE=y
|
CONFIG_RENICE=y
|
||||||
CONFIG_BB_SYSCTL=y
|
CONFIG_BB_SYSCTL=y
|
||||||
CONFIG_TOP=y
|
CONFIG_TOP=y
|
||||||
@ -812,7 +812,7 @@ CONFIG_LOGGER=y
|
|||||||
#
|
#
|
||||||
# Runit Utilities
|
# Runit Utilities
|
||||||
#
|
#
|
||||||
# CONFIG_RUNSV is not set
|
CONFIG_RUNSV=y
|
||||||
CONFIG_RUNSVDIR=y
|
CONFIG_RUNSVDIR=y
|
||||||
CONFIG_SV=y
|
CONFIG_SV=y
|
||||||
CONFIG_SVLOGD=y
|
CONFIG_SVLOGD=y
|
||||||
@ -821,21 +821,25 @@ CONFIG_SETUIDGID=y
|
|||||||
CONFIG_ENVUIDGID=y
|
CONFIG_ENVUIDGID=y
|
||||||
CONFIG_ENVDIR=y
|
CONFIG_ENVDIR=y
|
||||||
CONFIG_SOFTLIMIT=y
|
CONFIG_SOFTLIMIT=y
|
||||||
# CONFIG_CHCON is not set
|
|
||||||
# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
|
#
|
||||||
# CONFIG_GETENFORCE is not set
|
# Selinux Utilities
|
||||||
# CONFIG_GETSEBOOL is not set
|
#
|
||||||
# CONFIG_LOAD_POLICY is not set
|
CONFIG_CHCON=y
|
||||||
# CONFIG_MATCHPATHCON is not set
|
CONFIG_FEATURE_CHCON_LONG_OPTIONS=y
|
||||||
# CONFIG_RESTORECON is not set
|
CONFIG_GETENFORCE=y
|
||||||
# CONFIG_RUNCON is not set
|
CONFIG_GETSEBOOL=y
|
||||||
# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
|
CONFIG_LOAD_POLICY=y
|
||||||
# CONFIG_SELINUXENABLED is not set
|
CONFIG_MATCHPATHCON=y
|
||||||
# CONFIG_SETENFORCE is not set
|
CONFIG_RESTORECON=y
|
||||||
# CONFIG_SETFILES is not set
|
CONFIG_RUNCON=y
|
||||||
# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
|
CONFIG_FEATURE_RUNCON_LONG_OPTIONS=y
|
||||||
# CONFIG_SETSEBOOL is not set
|
CONFIG_SELINUXENABLED=y
|
||||||
# CONFIG_SESTATUS is not set
|
CONFIG_SETENFORCE=y
|
||||||
|
CONFIG_SETFILES=y
|
||||||
|
CONFIG_FEATURE_SETFILES_CHECK_OPTION=y
|
||||||
|
CONFIG_SETSEBOOL=y
|
||||||
|
CONFIG_SESTATUS=y
|
||||||
|
|
||||||
#
|
#
|
||||||
# Print Utilities
|
# Print Utilities
|
||||||
|
@ -256,15 +256,16 @@ static unsigned custom(struct svdir *s, char c)
|
|||||||
|
|
||||||
if (s->islog) return 0;
|
if (s->islog) return 0;
|
||||||
strcpy(a, "control/?");
|
strcpy(a, "control/?");
|
||||||
a[8] = c;
|
a[8] = c; /* replace '?' */
|
||||||
if (stat(a, &st) == 0) {
|
if (stat(a, &st) == 0) {
|
||||||
if (st.st_mode & S_IXUSR) {
|
if (st.st_mode & S_IXUSR) {
|
||||||
pid = fork();
|
pid = vfork();
|
||||||
if (pid == -1) {
|
if (pid == -1) {
|
||||||
warn_cannot("fork for control/?");
|
warn_cannot("vfork for control/?");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (!pid) {
|
if (!pid) {
|
||||||
|
/* child */
|
||||||
if (haslog && dup2(logpipe.wr, 1) == -1)
|
if (haslog && dup2(logpipe.wr, 1) == -1)
|
||||||
warn_cannot("setup stdout for control/?");
|
warn_cannot("setup stdout for control/?");
|
||||||
prog[0] = a;
|
prog[0] = a;
|
||||||
@ -272,6 +273,7 @@ static unsigned custom(struct svdir *s, char c)
|
|||||||
execv(a, prog);
|
execv(a, prog);
|
||||||
fatal_cannot("run control/?");
|
fatal_cannot("run control/?");
|
||||||
}
|
}
|
||||||
|
/* parent */
|
||||||
while (safe_waitpid(pid, &w, 0) == -1) {
|
while (safe_waitpid(pid, &w, 0) == -1) {
|
||||||
warn_cannot("wait for child control/?");
|
warn_cannot("wait for child control/?");
|
||||||
return 0;
|
return 0;
|
||||||
@ -318,8 +320,8 @@ static void startservice(struct svdir *s)
|
|||||||
|
|
||||||
if (s->pid != 0)
|
if (s->pid != 0)
|
||||||
stopservice(s); /* should never happen */
|
stopservice(s); /* should never happen */
|
||||||
while ((p = fork()) == -1) {
|
while ((p = vfork()) == -1) {
|
||||||
warn_cannot("fork, sleeping");
|
warn_cannot("vfork, sleeping");
|
||||||
sleep(5);
|
sleep(5);
|
||||||
}
|
}
|
||||||
if (p == 0) {
|
if (p == 0) {
|
||||||
@ -344,6 +346,7 @@ static void startservice(struct svdir *s)
|
|||||||
execvp(*run, run);
|
execvp(*run, run);
|
||||||
fatal2_cannot(s->islog ? "start log/" : "start ", *run);
|
fatal2_cannot(s->islog ? "start log/" : "start ", *run);
|
||||||
}
|
}
|
||||||
|
/* parent */
|
||||||
if (s->state != S_FINISH) {
|
if (s->state != S_FINISH) {
|
||||||
gettimeofday_ns(&s->start);
|
gettimeofday_ns(&s->start);
|
||||||
s->state = S_RUN;
|
s->state = S_RUN;
|
||||||
|
@ -28,7 +28,11 @@ static char *type = NULL;
|
|||||||
static char *range = NULL;
|
static char *range = NULL;
|
||||||
static char *specified_context = NULL;
|
static char *specified_context = NULL;
|
||||||
|
|
||||||
static int change_filedir_context(const char *fname, struct stat *stbuf, void *userData, int depth)
|
static int change_filedir_context(
|
||||||
|
const char *fname,
|
||||||
|
struct stat *stbuf ATTRIBUTE_UNUSED,
|
||||||
|
void *userData ATTRIBUTE_UNUSED,
|
||||||
|
int depth ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
context_t context = NULL;
|
context_t context = NULL;
|
||||||
security_context_t file_context = NULL;
|
security_context_t file_context = NULL;
|
||||||
@ -121,7 +125,7 @@ static const char chcon_longopts[] ALIGN1 =
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int chcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
int chcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||||
int chcon_main(int argc, char **argv)
|
int chcon_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||||
{
|
{
|
||||||
char *reference_file;
|
char *reference_file;
|
||||||
char *fname;
|
char *fname;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include "libbb.h"
|
#include "libbb.h"
|
||||||
|
|
||||||
int getenforce_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
int getenforce_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||||
int getenforce_main(int argc, char **argv)
|
int getenforce_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "libbb.h"
|
#include "libbb.h"
|
||||||
|
|
||||||
int load_policy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
int load_policy_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||||
int load_policy_main(int argc, char **argv)
|
int load_policy_main(int argc, char **argv ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ static int print_matchpathcon(char *path, int noprint)
|
|||||||
#define OPT_VERIFY (1<<4) /* -V */
|
#define OPT_VERIFY (1<<4) /* -V */
|
||||||
|
|
||||||
int matchpathcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
int matchpathcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||||
int matchpathcon_main(int argc, char **argv)
|
int matchpathcon_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||||
{
|
{
|
||||||
int error = 0;
|
int error = 0;
|
||||||
unsigned opts;
|
unsigned opts;
|
||||||
|
@ -88,7 +88,7 @@ static const char runcon_longopts[] ALIGN1 =
|
|||||||
#define OPTS_CONTEXT_COMPONENT (OPTS_ROLE | OPTS_TYPE | OPTS_USER | OPTS_RANGE)
|
#define OPTS_CONTEXT_COMPONENT (OPTS_ROLE | OPTS_TYPE | OPTS_USER | OPTS_RANGE)
|
||||||
|
|
||||||
int runcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
int runcon_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||||
int runcon_main(int argc, char **argv)
|
int runcon_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||||
{
|
{
|
||||||
char *role = NULL;
|
char *role = NULL;
|
||||||
char *range = NULL;
|
char *range = NULL;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "libbb.h"
|
#include "libbb.h"
|
||||||
|
|
||||||
int selinuxenabled_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
int selinuxenabled_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||||
int selinuxenabled_main(int argc, char **argv)
|
int selinuxenabled_main(int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
return !is_selinux_enabled();
|
return !is_selinux_enabled();
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ static void display_verbose(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int sestatus_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
int sestatus_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||||
int sestatus_main(int argc, char **argv)
|
int sestatus_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||||
{
|
{
|
||||||
unsigned opts;
|
unsigned opts;
|
||||||
const char *pol_path;
|
const char *pol_path;
|
||||||
|
@ -99,7 +99,7 @@ enum {
|
|||||||
#define FLAG_R (option_mask32 & OPT_R)
|
#define FLAG_R (option_mask32 & OPT_R)
|
||||||
|
|
||||||
|
|
||||||
static void qprintf(const char *fmt, ...)
|
static void qprintf(const char *fmt ATTRIBUTE_UNUSED, ...)
|
||||||
{
|
{
|
||||||
/* quiet, do nothing */
|
/* quiet, do nothing */
|
||||||
}
|
}
|
||||||
@ -391,8 +391,11 @@ static int restore(const char *file)
|
|||||||
* This function is called by recursive_action on each file during
|
* This function is called by recursive_action on each file during
|
||||||
* the directory traversal.
|
* the directory traversal.
|
||||||
*/
|
*/
|
||||||
static int apply_spec(const char *file,
|
static int apply_spec(
|
||||||
struct stat *sb, void *userData, int depth)
|
const char *file,
|
||||||
|
struct stat *sb,
|
||||||
|
void *userData ATTRIBUTE_UNUSED,
|
||||||
|
int depth ATTRIBUTE_UNUSED)
|
||||||
{
|
{
|
||||||
if (!follow_mounts) {
|
if (!follow_mounts) {
|
||||||
/* setfiles does not process across different mount points */
|
/* setfiles does not process across different mount points */
|
||||||
|
Loading…
Reference in New Issue
Block a user