this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Check two possible paths for darling-mach.ko This is necessary because Ubuntu overrides `DEST_MODULE_LOCATION[0]` in `dkms.conf` to be `/updates/dkms`.

+17 -3
+17 -3
src/dyld/darling.c
··· 801 801 int loadKernelModule() 802 802 { 803 803 int fd; 804 - char path[128]; 804 + // We need to check two paths due to DKMS 805 + // Ubuntu overrides our dkms.conf and forces the modules into the updates folder 806 + char miscpath[128], updatespath[128]; 807 + char* path; 805 808 struct utsname name; 806 809 807 810 if (isModuleLoaded()) 808 811 return 0; 809 812 810 813 uname(&name); 811 - snprintf(path, sizeof(path), "/lib/modules/%s/kernel/misc/darling-mach.ko", name.release); 812 - if (access(path, F_OK)) 814 + snprintf(miscpath, sizeof(miscpath), "/lib/modules/%s/kernel/misc/darling-mach.ko", name.release); 815 + snprintf(updatespath, sizeof(updatespath), "/lib/modules/%s/updates/dkms/darling-mach.ko", name.release); 816 + 817 + // Since miscpath is the normal location we check for it last 818 + if(access(updatespath, F_OK) == 0) 819 + { 820 + path = updatespath; 821 + } 822 + else if (access(miscpath, F_OK)) 813 823 { 814 824 fprintf(stderr, "Cannot find kernel module at %s: %s\n", path, strerror(errno)); 815 825 return 1; 826 + } 827 + else 828 + { 829 + path = miscpath; 816 830 } 817 831 818 832 fd = open(path, O_RDONLY|O_CLOEXEC);