[sudo-commits] sudo changeset 8940:5d818e399157

Todd C. Miller Todd.Miller at courtesan.com
Wed Aug 7 13:14:01 MDT 2013


changeset:	8940:5d818e399157 in /home/hg/sudo
details:	http://www.sudo.ws/repos/sudo/rev/5d818e399157
user:		Todd C. Miller <Todd.Miller at courtesan.com>
date:		Wed Aug 07 13:13:56 2013 -0600

Log Message:
	Add atoid() function to convert a string to an id_t (uid, gid or
	pid).  We have to be careful to choose() either strtol() or strtoul()
	depending on whether the string appears to be signed or unsigned.
	Always using strtoul() is unsafe on 64-bit platforms since the
	uid might be represented as a negative number and (unsigned long)-1
	on a 64-bit system is 0xffffffffffffffff not 0xffffffff.
	Fixes a problem with uids larger than 0x7fffffff on 32-bit platforms.

diffstat:

 plugins/sudoers/atoid.c |  84 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 84 insertions(+), 0 deletions(-)


More information about the sudo-commits mailing list