Bug 31235 - crontab truncates names at 31 char instead of 32
crontab truncates names at 31 char instead of 32
Product: Red Hat Linux
Classification: Retired
Component: vixie-cron (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jason Vas Dias
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-03-09 16:58 EST by mw
Modified: 2007-04-18 12:32 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-08-10 18:25:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description mw 2001-03-09 16:58:15 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.4.2-0.1.19 i686)

Adding two different users with `useradd' may result in them owning the
same cron file.
For example, the users


will have the same cron file.

Reproducible: Always
Steps to Reproduce:
1. useradd aaaaaaaaaabbbbbbbbbbccccccccccdd
2. crontab -e -u aaaaaaaaaabbbbbbbbbbccccccccccdd
3. ls /var/spool/cron/aaaaaaaaaabbbbbbbbbbccccccccccd

Actual Results:  /var/spool/cron/aaaaaaaaaabbbbbbbbbbccccccccccd

is created.  Only one d at the end.

Expected Results:  The cron file's basename should be the same as the
user's name:

It is possible to fix the bug by changing MAX_UNAME to 33.  Instead, I
think it is better to provide a solution that dynamically allocate space
for User[] and RealUser[].

Indeed, otherwise a change in useradd (it allows, say, 40 char usernames)
will trigger the bug again.
Comment 1 Jason Vas Dias 2004-08-10 18:25:23 EDT
Just cleaning up old bugs here.
This really isn't an issue - cron's MAX_UNAME IS now 33; the maximum
length of a username for Linux is still 32 (and probably always will
be) . If and when that changes, will reassess.

Note You need to log in before you can comment on or make changes to this bug.