[sudo-commits] sudo changeset 8939:cd92246a710f

Todd C. Miller Todd.Miller at courtesan.com
Wed Aug 7 11:23:34 MDT 2013


changeset:	8939:cd92246a710f in /home/hg/sudo
details:	http://www.sudo.ws/repos/sudo/rev/cd92246a710f
user:		Todd C. Miller <Todd.Miller at courtesan.com>
date:		Wed Aug 07 11:23:19 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:

 MANIFEST                    |   1 +
 config.h.in                 |   3 +++
 configure                   |  11 +++++++++++
 configure.in                |   1 +
 plugins/sudoers/Makefile.in |   5 ++++-
 plugins/sudoers/policy.c    |  27 +++++++++++++++++++++------
 plugins/sudoers/sudoers.h   |   3 +++
 7 files changed, 44 insertions(+), 7 deletions(-)


More information about the sudo-commits mailing list