[sudo-commits] sudo changeset 7998:0183f8a1b278
Todd C. Miller
Todd.Miller at courtesan.com
Fri Apr 13 16:00:54 EDT 2012
changeset: 7998:0183f8a1b278 in /home/hg/sudo
user: Todd C. Miller <Todd.Miller at courtesan.com>
date: Fri Apr 13 16:00:32 2012 -0400
When looking for a device match, do a breadth-first search instead
of depth-first. We already special case /dev/pts/ so chances are
good that if it is not a pseudo-tty it is in the base of /dev/.
Also avoid a stat(2) when possible if struct dirent has d_type.
src/ttyname.c | 48 ++++++++++++++++++++++++++++++++++--------------
1 files changed, 34 insertions(+), 14 deletions(-)
More information about the sudo-commits