summaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
authorDenis Vlasenko2009-04-21 11:09:40 +0000
committerDenis Vlasenko2009-04-21 11:09:40 +0000
commit5e34ff29bcc870936ab18172f438a34d042d4e03 (patch)
treea5e7a528f2f916eb883f1161eadceacdf2dca4be /loginutils
parent8b814b4a349e2262c0ad25793b05206a14651ebb (diff)
downloadbusybox-5e34ff29bcc870936ab18172f438a34d042d4e03.zip
busybox-5e34ff29bcc870936ab18172f438a34d042d4e03.tar.gz
*: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/chpasswd.c2
-rw-r--r--loginutils/login.c10
-rw-r--r--loginutils/su.c4
-rw-r--r--loginutils/sulogin.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/loginutils/chpasswd.c b/loginutils/chpasswd.c
index 4bffbe8..68b3980 100644
--- a/loginutils/chpasswd.c
+++ b/loginutils/chpasswd.c
@@ -29,7 +29,7 @@ int chpasswd_main(int argc UNUSED_PARAM, char **argv)
bb_error_msg_and_die(bb_msg_perm_denied_are_you_root);
opt_complementary = "m--e:e--m";
- USE_GETOPT_LONG(applet_long_options = chpasswd_longopts;)
+ IF_GETOPT_LONG(applet_long_options = chpasswd_longopts;)
opt = getopt32(argv, "em");
while ((name = xmalloc_fgetline(stdin)) != NULL) {
diff --git a/loginutils/login.c b/loginutils/login.c
index d57d529..31b25a4 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -285,8 +285,8 @@ int login_main(int argc UNUSED_PARAM, char **argv)
char *opt_host = opt_host; /* for compiler */
char *opt_user = opt_user; /* for compiler */
char *full_tty;
- USE_SELINUX(security_context_t user_sid = NULL;)
- USE_FEATURE_UTMP(struct utmp utent;)
+ IF_SELINUX(security_context_t user_sid = NULL;)
+ IF_FEATURE_UTMP(struct utmp utent;)
#if ENABLE_PAM
int pamret;
pam_handle_t *pamh;
@@ -333,7 +333,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
read_or_build_utent(&utent, run_by_root);
if (opt & LOGIN_OPT_h) {
- USE_FEATURE_UTMP(safe_strncpy(utent.ut_host, opt_host, sizeof(utent.ut_host));)
+ IF_FEATURE_UTMP(safe_strncpy(utent.ut_host, opt_host, sizeof(utent.ut_host));)
fromhost = xasprintf(" on '%s' from '%s'", short_tty, opt_host);
} else {
fromhost = xasprintf(" on '%s'", short_tty);
@@ -457,7 +457,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
write_utent(&utent, username);
- USE_SELINUX(initselinux(username, full_tty, &user_sid));
+ IF_SELINUX(initselinux(username, full_tty, &user_sid));
/* Try these, but don't complain if they fail.
* _f_chown is safe wrt race t=ttyname(0);...;chown(t); */
@@ -482,7 +482,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
/* well, a simple setexeccon() here would do the job as well,
* but let's play the game for now */
- USE_SELINUX(set_current_security_context(user_sid);)
+ IF_SELINUX(set_current_security_context(user_sid);)
// util-linux login also does:
// /* start new session */
diff --git a/loginutils/su.c b/loginutils/su.c
index de8c18d..a8b852b 100644
--- a/loginutils/su.c
+++ b/loginutils/su.c
@@ -43,7 +43,7 @@ int su_main(int argc UNUSED_PARAM, char **argv)
the user, especially if someone su's from a su-shell.
But getlogin can fail -- usually due to lack of utmp entry.
in this case resort to getpwuid. */
- old_user = xstrdup(USE_FEATURE_UTMP(getlogin() ? : ) (pw = getpwuid(cur_uid)) ? pw->pw_name : "");
+ old_user = xstrdup(IF_FEATURE_UTMP(getlogin() ? : ) (pw = getpwuid(cur_uid)) ? pw->pw_name : "");
tty = xmalloc_ttyname(2) ? : "none";
openlog(applet_name, 0, LOG_AUTH);
}
@@ -91,7 +91,7 @@ int su_main(int argc UNUSED_PARAM, char **argv)
change_identity(pw);
/* setup_environment params: shell, clear_env, change_env, pw */
setup_environment(opt_shell, flags & SU_OPT_l, !(flags & SU_OPT_mp), pw);
- USE_SELINUX(set_current_security_context(NULL);)
+ IF_SELINUX(set_current_security_context(NULL);)
/* Never returns */
run_shell(opt_shell, flags & SU_OPT_l, opt_command, (const char**)argv);
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c
index 4ffefe9..77eff9f 100644
--- a/loginutils/sulogin.c
+++ b/loginutils/sulogin.c
@@ -99,7 +99,7 @@ int sulogin_main(int argc UNUSED_PARAM, char **argv)
bb_info_msg("System Maintenance Mode");
- USE_SELINUX(renew_current_security_context());
+ IF_SELINUX(renew_current_security_context());
shell = getenv("SUSHELL");
if (!shell)