summaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/getty.c19
-rw-r--r--loginutils/sulogin.c8
2 files changed, 10 insertions, 17 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c
index db9a150..e8643ef 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -113,15 +113,6 @@ extern void updwtmp(const char *filename, const struct utmp *ut);
#endif
/*
- * This program tries to not use the standard-i/o library. This keeps the
- * executable small on systems that do not have shared libraries (System V
- * Release <3).
- */
-#ifndef BUFSIZ
-#define BUFSIZ 1024
-#endif
-
- /*
* When multiple baud rates are specified on the command line, the first one
* we will try is the first one specified.
*/
@@ -744,12 +735,12 @@ static void next_speed(struct termio *tp, struct options *op)
/* return NULL on failure, logname on success */
static char *get_logname(struct options *op, struct chardata *cp, struct termio *tp)
{
- static char logname[BUFSIZ];
+#define logname bb_common_bufsiz1
char *bp;
- char c; /* input character, full eight bits */
- char ascval; /* low 7 bits of input character */
- int bits; /* # of "1" bits per character */
- int mask; /* mask with 1 bit up */
+ char c; /* input character, full eight bits */
+ char ascval; /* low 7 bits of input character */
+ int bits; /* # of "1" bits per character */
+ int mask; /* mask with 1 bit up */
static char *erase[] = { /* backspace-space-backspace */
"\010\040\010", /* space parity */
"\010\040\010", /* odd parity */
diff --git a/loginutils/sulogin.c b/loginutils/sulogin.c
index a458b6e..4e689ad 100644
--- a/loginutils/sulogin.c
+++ b/loginutils/sulogin.c
@@ -21,7 +21,7 @@
#define SULOGIN_PROMPT "\nGive root password for system maintenance\n" \
"(or type Control-D for normal startup):"
-static const char *forbid[] = {
+static const char * const forbid[] = {
"ENV",
"BASH_ENV",
"HOME",
@@ -53,11 +53,13 @@ extern int sulogin_main(int argc, char **argv)
char *device = (char *) 0;
const char *name = "root";
int timeout = 0;
- static char pass[BUFSIZ];
+
+#define pass bb_common_bufsiz1
+
struct passwd pwent;
struct passwd *pwd;
time_t start, now;
- const char **p;
+ const char * const *p;
#ifdef CONFIG_FEATURE_SHADOWPASSWDS
struct spwd *spwd = NULL;
#endif /* CONFIG_FEATURE_SHADOWPASSWDS */