adduser/passwd: too long username

Laszlo Papp lpapp at kde.org
Tue Aug 5 15:15:36 UTC 2014


commit 980965767ef3ace983746ee25e92665b87d16755
Author: Laszlo Papp <lpapp at kde.org>
Date:   Tue Aug 5 11:42:24 2014 +0100

    Allow 256 bytes long usernames as per Unix standards (usually)

diff --git a/libpwdgrp/pwd_grp.c b/libpwdgrp/pwd_grp.c
index 2060d78..9e4424f 100644
--- a/libpwdgrp/pwd_grp.c
+++ b/libpwdgrp/pwd_grp.c
@@ -23,8 +23,8 @@
 /**********************************************************************/
 /* Sizes for statically allocated buffers. */

-#define PWD_BUFFER_SIZE 256
-#define GRP_BUFFER_SIZE 256
+#define PWD_BUFFER_SIZE 2*LOGIN_NAME_MAX+256
+#define GRP_BUFFER_SIZE 2*LOGIN_NAME_MAX+256

 /**********************************************************************/
 /* Prototypes for internal functions. */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20140805/16d08bb3/attachment.html>


More information about the busybox mailing list