Bug 31235 - crontab truncates names at 31 char instead of 32
Summary: crontab truncates names at 31 char instead of 32
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: vixie-cron   
(Show other bugs)
Version: 7.1
Hardware: i386 Linux
medium
medium
Target Milestone: ---
Assignee: Jason Vas Dias
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-03-09 21:58 UTC by mw
Modified: 2007-04-18 16:32 UTC (History)
1 user (show)

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


Attachments (Terms of Use)

Description mw 2001-03-09 21:58:15 UTC
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

aaaaaaaaaabbbbbbbbbbccccccccccdd
aaaaaaaaaabbbbbbbbbbccccccccccd

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:
/var/spool/cron/aaaaaaaaaabbbbbbbbbbccccccccccdd




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 22:25:23 UTC
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.