fix race condition

This commit is contained in:
albert
2005-06-10 15:43:15 +00:00
parent cd80f609e6
commit 864a5356a1
5 changed files with 27 additions and 5 deletions

View File

@ -509,8 +509,10 @@ int open_psdb_message(const char *restrict override, void (*message)(const char
||
(sm=getenv("PS_SYSTEM_MAP"))
){
read_and_parse();
if(sysmap_mmap(sm, message)) return 0;
if(!have_privs){
read_and_parse();
if(sysmap_mmap(sm, message)) return 0;
}
/* failure is better than ignoring the user & using bad data */
return -1; /* ought to return "Namelist not found." */
}