Disable reading of drirc files by default so chromium processes

with OpenGL contexts can drop the ability to read files.

Diff from robert@ with a comment added.

ok robert@ deraadt@
This commit is contained in:
jsg 2016-01-07 23:41:25 +00:00
parent 0a1bf36b6d
commit 8d4acd4c62

View File

@ -940,6 +940,14 @@ static void parseOneConfigFile (XML_Parser p) {
void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info,
int screenNum, const char *driverName) {
#if defined(__OpenBSD__)
/*
* Opening drirc files is disabled by default so sandboxed
* browser processes with OpenGL contexts can drop the ability
* to read files.
*/
initOptionCache (cache, info);
#else
char *filenames[2] = {"/etc/drirc", NULL};
char *home;
uint32_t i;
@ -985,6 +993,7 @@ void driParseConfigFiles (driOptionCache *cache, const driOptionCache *info,
}
free(filenames[1]);
#endif
}
void driDestroyOptionInfo (driOptionCache *info) {