diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-12-09 19:46:56 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-12-09 19:46:56 +0000 |
commit | 6896e699cd67596b7ade3a07314f8768f4874804 (patch) | |
tree | e9c8106225010ed0dbd8f72000307f03d271831c /usr.sbin/sysinstall | |
parent | aa52ab15072abfaaeeacb749a275c5cff33f3220 (diff) | |
download | src-6896e699cd67596b7ade3a07314f8768f4874804.tar.gz src-6896e699cd67596b7ade3a07314f8768f4874804.zip |
Don't let sysinstall depend on <utmp.h>.
Looking at the other entries, I suspect we must also reserve one
terminating byte, so I'm using UNAME_FIELD_LEN - 1, not UNAME_FIELD_LEN.
Notes
Notes:
svn path=/head/; revision=200302
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r-- | usr.sbin/sysinstall/user.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr.sbin/sysinstall/user.c b/usr.sbin/sysinstall/user.c index ed2e77098b98..72b67161f4e0 100644 --- a/usr.sbin/sysinstall/user.c +++ b/usr.sbin/sysinstall/user.c @@ -35,7 +35,6 @@ */ #include "sysinstall.h" -#include <utmp.h> #include <ctype.h> #include <sys/param.h> #include <sysexits.h> @@ -47,7 +46,7 @@ #define GNAME_FIELD_LEN 32 #define GID_FIELD_LEN 11 #define GMEMB_FIELD_LEN 64 - +#define UNAME_FIELD_LEN MAXLOGNAME #define UID_FIELD_LEN 11 #define UGROUP_FIELD_LEN GNAME_FIELD_LEN #define GECOS_FIELD_LEN 64 @@ -61,7 +60,7 @@ static char gname[GNAME_FIELD_LEN], gid[GID_FIELD_LEN], gmemb[GMEMB_FIELD_LEN], - uname[UT_NAMESIZE + 1], + uname[UNAME_FIELD_LEN], passwd[PASSWD_FIELD_LEN], confpasswd[PASSWD_FIELD_LEN], uid[UID_FIELD_LEN], @@ -109,7 +108,7 @@ static Layout groupLayout[] = { /* The user configuration menu. */ static Layout userLayout[] = { #define LAYOUT_UNAME 0 - { 2, 6, UT_NAMESIZE, UT_NAMESIZE + 1, + { 2, 6, 16, UNAME_FIELD_LEN - 1, "Login ID:", "The login name of the new user (mandatory)", uname, STRINGOBJ, NULL }, #define LAYOUT_UID 1 |