[RTEMS Project] #3781: RSB crashes in case the host as an unreadable directory in "/"

RTEMS trac trac at rtems.org
Fri Aug 9 10:49:09 UTC 2019


#3781: RSB crashes in case the host as an unreadable directory in "/"
-----------------------------+---------------------
 Reporter:  Sebastian Huber  |       Owner:  (none)
     Type:  defect           |      Status:  new
 Priority:  normal           |   Milestone:  5.1
Component:  tool/rsb         |     Version:  5
 Severity:  normal           |  Resolution:
 Keywords:                   |  Blocked By:
 Blocking:                   |
-----------------------------+---------------------

Comment (by Sebastian Huber):

 In `source-builder/sb/check.py`:
 {{{
 def path_check(opts, silent = False):
     if 'PATH' in os.environ:
         paths = os.environ['PATH'].split(os.pathsep)
         for p in paths:
             if len(p.strip()) == 0:
                 if not silent:
                     log.notice('error: environment PATH contains an empty
 path')
                 return False
             elif not options.host_windows and (p.strip() == '.' or
 p.strip() == '..'):
                 if not silent:
                     log.notice('error: environment PATH invalid path: %s'
 % (p))
                 return False
             elif not path.exists(p):
                 if not silent and opts.warn_all():
                     log.notice('warning: environment PATH not found: %s' %
 (p))
             elif not path.isdir(p):
                 if not silent and opts.warn_all():
                     log.notice('warning: environment PATH not a directory:
 %s' % (p))
     return True
 }}}
 The path.exists() seems to be rather complicated, why is it necessary in
 addition to path.isdir()? What is the overall goal of this check? Is it
 not the responsibility of the user to take care of his $PATH variable?

--
Ticket URL: <http://devel.rtems.org/ticket/3781#comment:1>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list