summaryrefslogtreecommitdiff
path: root/loginutils/login.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-04-21 11:09:40 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-04-21 11:09:40 +0000
commit5e34ff29bcc870936ab18172f438a34d042d4e03 (patch)
treea5e7a528f2f916eb883f1161eadceacdf2dca4be /loginutils/login.c
parent8b814b4a349e2262c0ad25793b05206a14651ebb (diff)
downloadbusybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.tar.gz
busybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.tar.bz2
busybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.zip
*: 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/login.c')
-rw-r--r--loginutils/login.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index d57d529c0..31b25a43e 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -285,8 +285,8 @@ int login_main(int argc UNUSED_PARAM, char **argv)
285 char *opt_host = opt_host; /* for compiler */ 285 char *opt_host = opt_host; /* for compiler */
286 char *opt_user = opt_user; /* for compiler */ 286 char *opt_user = opt_user; /* for compiler */
287 char *full_tty; 287 char *full_tty;
288 USE_SELINUX(security_context_t user_sid = NULL;) 288 IF_SELINUX(security_context_t user_sid = NULL;)
289 USE_FEATURE_UTMP(struct utmp utent;) 289 IF_FEATURE_UTMP(struct utmp utent;)
290#if ENABLE_PAM 290#if ENABLE_PAM
291 int pamret; 291 int pamret;
292 pam_handle_t *pamh; 292 pam_handle_t *pamh;
@@ -333,7 +333,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
333 read_or_build_utent(&utent, run_by_root); 333 read_or_build_utent(&utent, run_by_root);
334 334
335 if (opt & LOGIN_OPT_h) { 335 if (opt & LOGIN_OPT_h) {
336 USE_FEATURE_UTMP(safe_strncpy(utent.ut_host, opt_host, sizeof(utent.ut_host));) 336 IF_FEATURE_UTMP(safe_strncpy(utent.ut_host, opt_host, sizeof(utent.ut_host));)
337 fromhost = xasprintf(" on '%s' from '%s'", short_tty, opt_host); 337 fromhost = xasprintf(" on '%s' from '%s'", short_tty, opt_host);
338 } else { 338 } else {
339 fromhost = xasprintf(" on '%s'", short_tty); 339 fromhost = xasprintf(" on '%s'", short_tty);
@@ -457,7 +457,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
457 457
458 write_utent(&utent, username); 458 write_utent(&utent, username);
459 459
460 USE_SELINUX(initselinux(username, full_tty, &user_sid)); 460 IF_SELINUX(initselinux(username, full_tty, &user_sid));
461 461
462 /* Try these, but don't complain if they fail. 462 /* Try these, but don't complain if they fail.
463 * _f_chown is safe wrt race t=ttyname(0);...;chown(t); */ 463 * _f_chown is safe wrt race t=ttyname(0);...;chown(t); */
@@ -482,7 +482,7 @@ int login_main(int argc UNUSED_PARAM, char **argv)
482 482
483 /* well, a simple setexeccon() here would do the job as well, 483 /* well, a simple setexeccon() here would do the job as well,
484 * but let's play the game for now */ 484 * but let's play the game for now */
485 USE_SELINUX(set_current_security_context(user_sid);) 485 IF_SELINUX(set_current_security_context(user_sid);)
486 486
487 // util-linux login also does: 487 // util-linux login also does:
488 // /* start new session */ 488 // /* start new session */