Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 3485 - Long groupnames
Summary: Long groupnames
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High enhancement
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-07 11:13 UTC by Sascha Silbe
Modified: 2005-01-09 22:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for long group names (shadow-4.0.3.long_groups.patch,435 bytes, patch)
2002-08-03 07:33 UTC, Sascha Silbe
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha Silbe 2002-06-07 11:13:57 UTC
It would be great if useradd and groupadd would support names longer than 16 chars. POSIX does not specify a particular limit (instead it's a sysconf() parameter), so there are no compatibility issues in using long names. groupadd and useradd themselves behave the same to programs that call them with short names, so there are no issues as well.
On the other hand, my service framework uses names like <servicename>-<username>, so it's really useful.
And to make the decision even easier: the Debian tools work fine with long names.
Comment 1 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-09 12:21:23 UTC
Ok, please check for me what package contains the tools on debian, and even 
better, a url to the .deb and patches.
Comment 2 Sascha Silbe 2002-06-09 15:12:00 UTC
> Ok, please check for me what package contains the tools on debian,
passwd

> and even better, a url to the .deb 
http://ftp.debian.org/debian/pool/main/s/shadow/passwd_20000902-12_i386.deb

> and patches.
http://ftp.debian.org/debian/pool/main/s/shadow/shadow_20000902-12.diff.gz
http://ftp.debian.org/debian/pool/main/s/shadow/shadow_20000902.orig.tar.gz

Do you need anything else?
Comment 3 Sascha Silbe 2002-08-03 07:33:06 UTC
Created attachment 2785 [details, diff]
Patch for long group names

I've attached the patch to remove the arbitrary group name limit from
group{add,mod,del}.
Since there is no standardized limit on the length of group names, it should be
up to the administrator to choose the maximum length. At most groupadd should
print a warning, but it must not abort.
Comment 4 Martin Schlemmer (RETIRED) gentoo-dev 2002-08-03 10:38:48 UTC
Do you actually use group names longer than 16 chars ?

As for the username limit, this is glibc/utmp dependant.
It is limited as follow:

------------------------cut---------------------------
    /*
     * User names are limited by whatever utmp can
     * handle (usually max 8 characters).
     */
    if (strlen(name) > sizeof(ut.ut_user))
        return 0;
------------------------cut---------------------------

The sizeof ut.ut_user is equal to __UT_NAMESIZE, which in
my /usr/include/bits/utmp[x].h, it is as follows:

------------------------cut---------------------------
#define __UT_LINESIZE   32
#define __UT_NAMESIZE   32
#define __UT_HOSTSIZE   256
------------------------cut---------------------------

Meaning, usernames of 32 chars is supported.

Comment 5 Sascha Silbe 2002-08-03 11:25:00 UTC
Yes, I do use long group names for my service framework. The {user,group}names are called <service_name>-<user/group_name>. So, to give an example, if the service is called qmail-smtp-ssl and the group is qmail, the resulting name is qmail-smtp-ssl-qmail. That's 20 chars.
As for the user names, that's a limitation of glibc. If I need longer user names, I can just change the defines and recompile glibc and shadow (I might actually have to recompile some more packages and remove the current utmp file).
Comment 6 SpanKY gentoo-dev 2005-01-09 22:34:50 UTC
ok, ive added long groupname support to shadow-4.0.6 (no version bump)