ports/148221: portmaster cannot correctly parse UIDs > 9999

Jim Trigg blaise at argent.heraldsnet.net
Mon Jun 28 21:00:07 UTC 2010


>Number:         148221
>Category:       ports
>Synopsis:       portmaster cannot correctly parse UIDs > 9999
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 28 21:00:07 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Jim Trigg
>Release:        FreeBSD 8.0-STABLE i386
>Organization:
Myself
>Environment:
System: FreeBSD argent.heraldsnet.net 8.0-STABLE FreeBSD 8.0-STABLE #0: Fri Mar 26 09:37:30 EDT 2010 root at sp2544c.serverpronto.com:/usr/obj/usr/src/sys/GENERIC i386

>Description:
Portmaster gives error message when invoked with UID > 9999:
[: UID
#####: bad number
As I have not yet set PM_SU_CMD, I don't know how this affects that functionality.
>How-To-Repeat:
Run portmaster as a user with UID > 9999 (in my case the UID was 11001).
>Fix:
--- /usr/local/sbin/portmaster	2010-06-28 16:37:09.000000000 -0400
+++ portmaster	2010-06-28 16:37:42.000000000 -0400
@@ -39,7 +39,7 @@
 	my_environment=`set`
 
 	# If we are already root, unset this to avoid potential conflict
-	euid=`ps -o uid $$` ; euid=${euid##* }
+	euid=`ps -o uid $$` ; euid=${euid##*[^0-9]}
 	[ "$euid" -eq 0 ] && unset PM_SU_CMD PM_SU_VERBOSE
 	unset euid
 fi
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list