def is_shared_lib_vma(vma): tag = 'is_shared_lib_vma' # Should we check perms_key_is_writeable() or # perms_key_is_cow() here? In my experience, if # filename_is_shared_lib() returns True, then # it doesn't matter (a writeable shared lib vma # mapping will always be private/COW as well). if (not vm.perms_key_is_writeable(vma.perms_key) and vm.filename_is_shared_lib(vma.filename)): #print_debug(tag, (" shared lib vma: {} {}").format( # vma.perms_key, vma.filename)) return True #if vma.filename and len(vma.filename) > 0: # print_debug(tag, ("non-shared lib vma: {} {}").format( # vma.perms_key, vma.filename)) return False
def is_shared_dir_file_vma(vma): if (not vm.perms_key_is_writeable(vma.perms_key) and vm.filename_is_non_lib_shared_dir_file(vma.filename)): return True return False
def is_writeable(self): return vm.perms_key_is_writeable(self.perms_key)