fix accumulated whitespace and indentation damage

This commit is contained in:
Denis Vlasenko
2007-03-20 11:30:28 +00:00
parent e84aeb5bcb
commit c86e052b81
23 changed files with 145 additions and 145 deletions

View File

@@ -51,7 +51,7 @@ int cp_main(int argc, char **argv)
if (flags & OPT_H) ... // deref command-line params only
*/
#if ENABLE_SELINUX
#if ENABLE_SELINUX
if (flags & FILEUTILS_PRESERVE_SECURITY_CONTEXT) {
selinux_or_die();
}

View File

@@ -48,7 +48,7 @@ int id_main(int argc, char **argv)
unsigned long flags;
short status;
#if ENABLE_SELINUX
security_context_t scontext;
security_context_t scontext;
#endif
/* Don't allow -n -r -nr -ug -rug -nug -rnug */
/* Don't allow more than one username */
@@ -78,26 +78,26 @@ int id_main(int argc, char **argv)
puts((flags & JUST_USER) ? bb_getpwuid(NULL, uid, -1 ) : bb_getgrgid(NULL, gid, -1 ));
} else {
if (flags & JUST_USER) {
printf("%u\n", uid);
}
if (flags & JUST_GROUP) {
printf("%u\n", gid);
}
}
printf("%u\n", uid);
}
if (flags & JUST_GROUP) {
printf("%u\n", gid);
}
}
#if ENABLE_SELINUX
if (flags & JUST_CONTEXT) {
if (flags & JUST_CONTEXT) {
selinux_or_die();
if (argc - optind == 1) {
bb_error_msg_and_die("user name can't be passed with -Z");
}
if (getcon(&scontext)) {
bb_error_msg_and_die("can't get process context");
}
printf("%s\n", scontext);
}
#endif
if (argc - optind == 1) {
bb_error_msg_and_die("user name can't be passed with -Z");
}
if (getcon(&scontext)) {
bb_error_msg_and_die("can't get process context");
}
printf("%s\n", scontext);
}
#endif
/* exit */
fflush_stdout_and_exit(EXIT_SUCCESS);
}

View File

@@ -41,7 +41,7 @@ static void setdefaultfilecon(const char *path) {
if (!is_selinux_enabled()) {
return;
}
}
if (lstat(path, &s) != 0) {
return;
}
@@ -101,7 +101,7 @@ int install_main(int argc, char **argv)
/* -c exists for backwards compatibility, it's needed */
flags = getopt32(argc, argv, "cdpsg:m:o:" USE_SELINUX("Z:"), &gid_str, &mode_str, &uid_str USE_SELINUX(, &scontext));
#if ENABLE_SELINUX
if (flags & OPT_PRESERVE_SECURITY_CONTEXT) {
use_default_selinux_context = 0;

View File

@@ -770,7 +770,7 @@ static const unsigned opt_flags[] = {
#if ENABLE_FEATURE_AUTOWIDTH
0, 0, /* T, w - ignored */
#endif
#if ENABLE_SELINUX
#if ENABLE_SELINUX
LIST_MODEBITS|LIST_ID_NAME|LIST_CONTEXT, /* Z */
#endif
(1U<<31)

View File

@@ -118,7 +118,7 @@ DO_MOVE:
copy_flag = FILEUTILS_RECUR | FILEUTILS_PRESERVE_STATUS;
#if ENABLE_SELINUX
copy_flag |= FILEUTILS_PRESERVE_SECURITY_CONTEXT;
#endif
#endif
if ((copy_file(*argv, dest, copy_flag) >= 0) &&
(remove_file(*argv, FILEUTILS_RECUR | FILEUTILS_FORCE) >= 0)) {
goto RET_0;

View File

@@ -416,7 +416,7 @@ static int do_statfs(char const *filename, char const *format)
format = (flags & OPT_TERSE
? (flags & OPT_SELINUX ? "%n %i %l %t %s %b %f %a %c %d %C\n":
"%n %i %l %t %s %b %f %a %c %d\n")
: (flags & OPT_SELINUX ?
: (flags & OPT_SELINUX ?
" File: \"%n\"\n"
" ID: %-8i Namelen: %-7l Type: %T\n"
"Block size: %-10s\n"
@@ -531,7 +531,7 @@ static int do_stat(char const *filename, char const *format)
}
#else
if (flags & OPT_TERSE) {
format = (flags & OPT_SELINUX ?
format = (flags & OPT_SELINUX ?
"%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o %C\n":
"%n %s %b %f %u %g %D %i %h %t %T %X %Y %Z %o\n");
} else {