+2008-11-27 Mike Frysinger <vapier@gentoo.org>
+
+ * NEWS, configure.in, libmisc/chkname.c: make group max length a
+ configure option. The configure behavior encoded is:
+ <no option> -> default of 16 (like today);
+ --with-group-name-max-length -> default of 16;
+ --without-group-name-max-length -> no max length;
+ --with-group-name-max-length=n > max is set to n.
+
2008-11-23 Nicolas François <nicolas.francois@centraliens.net>
* src/su.c: (!USE_PAM) Provide visible information indicating that
groupadd, groupdel, groupmod, newusers, useradd, userdel, and usermod.
This authentication is not necessary when these tools are not
installed setuid root.
+ * Added configure --with-group-name-max-length (default) /
+ --without-group-name-max-length options. This permits to configure the maximum length allowed for group names:
+ <no option> -> default of 16 (like today)
+ --with-group-name-max-length -> default of 16
+ --without-group-name-max-length -> no max length
+ --with-group-name-max-length=n > max is set to n
+ No sanity checking is performed on n so people could do
+ something neat like --with-group-name-max-length=MAX_INT
- addition of users or groups
* Speed improvement in case UID_MAX/SYS_UID_MAX/GID_MAX/SYS_GID_MAX is
used for an user/group. This should be noticeable in case of LDAP
AC_ARG_WITH(nscd,
[AC_HELP_STRING([--with-nscd], [enable support for nscd @<:@default=yes@:>@])],
[with_nscd=$withval], [with_nscd=yes])
+AC_ARG_WITH(group-name-max-length,
+ [AC_HELP_STRING([--with-group-name-max-length], [set max group name length @<:@default=16@:>@])],
+ [with_group_name_max_length=$withval], [with_group_name_max_length=yes])
+
+if test "$with_group_name_max_length" = "no" ; then
+ with_group_name_max_length=0
+elif test "$with_group_name_max_length" = "yes" ; then
+ with_group_name_max_length=16
+fi
+AC_DEFINE_UNQUOTED(GROUP_NAME_MAX_LENGTH, $with_group_name_max_length, [max group name length])
AM_CONDITIONAL(USE_SHA_CRYPT, test "x$with_sha_crypt" = "xyes")
if test "$with_sha_crypt" = "yes"; then
* Arbitrary limit for group names - max 16
* characters (same as on HP-UX 10).
*/
- if (strlen (name) > 16) {
+ if (GROUP_NAME_MAX_LENGTH && strlen (name) > GROUP_NAME_MAX_LENGTH)
return false;
- }
return is_valid_name (name);
}