Make pw(8) build without <utmp.h>.
authorEd Schouten <ed@FreeBSD.org>
Sun, 6 Dec 2009 01:27:28 +0000 (01:27 +0000)
committerEd Schouten <ed@FreeBSD.org>
Sun, 6 Dec 2009 01:27:28 +0000 (01:27 +0000)
The size of the username record in utmp files should not influence the
maximum username length. Right now ut_user/ut_name is big enough, so in
this case it's dead code anyway.

pw/pw_user.c

index 4c62fe83c6324a3ed1969b9082269849d3f1f5a1..c8364cad51f4298df03c28c651b04dc65b7afe93 100644 (file)
@@ -41,16 +41,11 @@ static const char rcsid[] =
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <unistd.h>
-#include <utmp.h>
 #include <login_cap.h>
 #include "pw.h"
 #include "bitmap.h"
 
-#if (MAXLOGNAME-1) > UT_NAMESIZE
-#define LOGNAMESIZE UT_NAMESIZE
-#else
 #define LOGNAMESIZE (MAXLOGNAME-1)
-#endif
 
 static         char locked_str[] = "*LOCKED*";