usr/src/cmd/installadm/service_config.py
changeset 1676 1ced705a7c09
parent 1652 15ba29ecb4ed
child 1691 e18daaf0b780
equal deleted inserted replaced
1675:c225c357f3d2 1676:1ced705a7c09
   758     logging.log(com.XDEBUG,
   758     logging.log(com.XDEBUG,
   759                 '**** START service_config._write_config_file ****')
   759                 '**** START service_config._write_config_file ****')
   760 
   760 
   761     svcdir = os.path.join(AI_SERVICE_DIR_PATH, service_name)
   761     svcdir = os.path.join(AI_SERVICE_DIR_PATH, service_name)
   762     try:
   762     try:
       
   763         # These directories need to have at least o+x permission because
       
   764         # cgi_get_manifest.py script which is run as webservd user reads
       
   765         # .config file there.
       
   766         orig_umask = os.umask(00)
       
   767         modified_umask = orig_umask & 0776
       
   768         os.umask(modified_umask)
   763         os.makedirs(svcdir)
   769         os.makedirs(svcdir)
       
   770         os.umask(orig_umask)
   764     except OSError as err:
   771     except OSError as err:
   765         if err.errno != errno.EEXIST:
   772         if err.errno != errno.EEXIST:
   766             raise
   773             raise
   767 
   774 
   768     cfgpath = os.path.join(svcdir, CFGFILE)
   775     cfgpath = os.path.join(svcdir, CFGFILE)