bin/112920: [PATCH]: wrong realpath(1) behaviour

Ighighi ighighi at gmail.com
Thu May 24 00:20:01 UTC 2007


>Number:         112920
>Category:       bin
>Synopsis:       [PATCH]: wrong realpath(1) behaviour
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 24 00:20:00 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Ighighi
>Release:        6.2-STABLE
>Organization:
>Environment:
FreeBSD orion 6.2-STABLE FreeBSD 6.2-STABLE #1: Fri May 18 01:56:15 VET 2007     root at orion:/usr/obj/usr/src/sys/CUSTOM  i386
>Description:
When printing the message error, the realpath(1) utility uses the buf passed to
realpath(3) instead of the passed argv[1].  When errno is set to ENAMETOOLONG, it
prints the current directory, which is misleading, IMO.
>How-To-Repeat:
$ cd /
$ realpath `perl -e 'print "A"x1026'`
realpath: /: File name too long
$ cd /tmp
$ realpath `perl -e 'print "A"x1026'`
realpath: /tmp: File name too long

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list