1 | Index: drivers.c␊ |
2 | ===================================================================␊ |
3 | --- drivers.c␉(revision 1211)␊ |
4 | +++ drivers.c␉(working copy)␊ |
5 | @@ -726,7 +726,7 @@␊ |
6 | ParseXML( char * buffer, ModulePtr * module, TagPtr * personalities )␊ |
7 | {␊ |
8 | ␉long length, pos;␊ |
9 | -␉TagPtr moduleDict;␊ |
10 | +␉TagPtr moduleDict, required;␊ |
11 | ␉ModulePtr tmpModule;␊ |
12 | ␊ |
13 | pos = 0;␊ |
14 | @@ -746,14 +746,14 @@␊ |
15 | ␊ |
16 | if (length == -1) return -1;␊ |
17 | ␊ |
18 | -#if 0 /** remove this check. **/ ␊ |
19 | - if (strcmp(XMLCastString(XMLGetProperty(moduleDict, kPropOSBundleRequired)), "Safe Boot") == 0)␊ |
20 | + required = XMLGetProperty(moduleDict, kPropOSBundleRequired);␊ |
21 | + if ( (required == 0) ||␊ |
22 | + (required->type != kTagTypeString) ||␊ |
23 | + !strcmp(required->string, "Safe Boot"))␊ |
24 | {␊ |
25 | - // Don't load Safe Boot kexts. NOTE: -x should be check too.␊ |
26 | XMLFreeTag(moduleDict);␊ |
27 | return -2;␊ |
28 | }␊ |
29 | -#endif ␊ |
30 | ␊ |
31 | tmpModule = malloc(sizeof(Module));␊ |
32 | if (tmpModule == 0)␊ |
33 |