* src/login.c: Explicitly tag the end of the #ifdef RLOGIN

sections.
This commit is contained in:
nekral-guest 2008-09-20 20:03:04 +00:00
parent 29d4533047
commit 11c7543c76
2 changed files with 10 additions and 8 deletions

View File

@ -6,6 +6,8 @@
conditional). conditional).
* src/login.c: Check that no username is specified with -r. * src/login.c: Check that no username is specified with -r.
* src/login.c: Make sure a username is specified with -f. * src/login.c: Make sure a username is specified with -f.
* src/login.c: Explicitly tag the end of the #ifdef RLOGIN
sections.
2008-09-20 Nicolas François <nicolas.francois@centraliens.net> 2008-09-20 Nicolas François <nicolas.francois@centraliens.net>

View File

@ -100,9 +100,9 @@ static bool fflg = false;
#ifdef RLOGIN #ifdef RLOGIN
static bool rflg = false; static bool rflg = false;
#else #else /* RLOGIN */
#define rflg false #define rflg false
#endif #endif /* !RLOGIN */
static bool hflg = false; static bool hflg = false;
static bool preauth_flag = false; static bool preauth_flag = false;
@ -157,7 +157,7 @@ static void usage (void)
fprintf (stderr, _(" %s [-p] [-h host] [-f name]\n"), Prog); fprintf (stderr, _(" %s [-p] [-h host] [-f name]\n"), Prog);
#ifdef RLOGIN #ifdef RLOGIN
fprintf (stderr, _(" %s [-p] -r host\n"), Prog); fprintf (stderr, _(" %s [-p] -r host\n"), Prog);
#endif #endif /* RLOGIN */
exit (1); exit (1);
} }
@ -298,7 +298,7 @@ static void process_flags (int argc, char *const *argv)
hostname = optarg; hostname = optarg;
reason = PW_RLOGIN; reason = PW_RLOGIN;
break; break;
#endif #endif /* RLOGIN */
case 'p': case 'p':
pflg = true; pflg = true;
break; break;
@ -315,7 +315,7 @@ static void process_flags (int argc, char *const *argv)
if (rflg && (hflg || fflg)) { if (rflg && (hflg || fflg)) {
usage (); usage ();
} }
#endif #endif /* RLOGIN */
/* /*
* Allow authentication bypass only if real UID is zero. * Allow authentication bypass only if real UID is zero.
@ -428,7 +428,7 @@ int main (int argc, char **argv)
#ifdef RLOGIN #ifdef RLOGIN
char term[128] = ""; char term[128] = "";
#endif #endif /* RLOGIN */
#if defined(HAVE_STRFTIME) && !defined(USE_PAM) #if defined(HAVE_STRFTIME) && !defined(USE_PAM)
char ptime[80]; char ptime[80];
#endif #endif
@ -545,7 +545,7 @@ int main (int argc, char **argv)
username = NULL; username = NULL;
} }
} }
#endif #endif /* RLOGIN */
OPENLOG ("login"); OPENLOG ("login");
@ -584,7 +584,7 @@ int main (int argc, char **argv)
if (term[0] != '\0') { if (term[0] != '\0') {
addenv ("TERM", term); addenv ("TERM", term);
} else } else
#endif #endif /* RLOGIN */
{ {
/* preserve TERM from getty */ /* preserve TERM from getty */
if (!pflg) { if (!pflg) {