1. lokkju
  2. adobe_case_sensitive_volumes

Source

adobe_case_sensitive_volumes / src / override_volume_sensitivity_check.c

#include <stdio.h>
#include <unistd.h>
#include <dlfcn.h>
#include "dyld-interposing.h"
#include <CoreServices/CoreServices.h>

static
int
my_open(const char* path, int flags, mode_t mode)
{
  int value;
  // do stuff before open (including changing the arguments)
  value = open(path, flags, mode);
  // do stuff after open (including changing the return value(s))
  return value;
}
DYLD_INTERPOSE(my_open, open)

static OSStatus my_FSGetVolumeParms (FSVolumeRefNum volume, GetVolParmsInfoBuffer *buffer, ByteCount bufferSize) {
    OSStatus status = FSGetVolumeParms(volume,buffer,bufferSize);
    int isCaseSensitive = !!(buffer->vMExtendedAttributes & (1 << bIsCaseSensitive));
    if(isCaseSensitive) {
        printf("== FSGetVolumeParms - lying and saying the volume is case insensitive, though it is case sensitive. ==\n");
        printf("%ld\n",buffer->vMExtendedAttributes);
        buffer->vMExtendedAttributes &= ~(1 << bIsCaseSensitive);
        printf("%ld\n",buffer->vMExtendedAttributes);
    }
    printf("== FSGetVolumeParms::bIsCaseSensitive = %i ==\n",!!(buffer->vMExtendedAttributes & (1 << bIsCaseSensitive)));
    return status;
}

DYLD_INTERPOSE(my_FSGetVolumeParms, FSGetVolumeParms);