Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't read file permissions (perms) from an L01 #156

Closed
mikebbt opened this issue Jun 16, 2021 · 1 comment
Closed

Can't read file permissions (perms) from an L01 #156

mikebbt opened this issue Jun 16, 2021 · 1 comment

Comments

@mikebbt
Copy link

mikebbt commented Jun 16, 2021

I'm attempting to read an L01 and I can't seem to get the information in the permissions category for the file(s) within. The libewf calls I'm using are:

libewf_file_entry_get_permission_id() - I'm using the file entry handle here to get the "permissions group index" (pm), this value looks ok.

libewf_handle_get_file_permission_by_id() - using the "main" handle (from call to libewf_handle_open) here along with the ID from the above call to get a filePermissions ptr to the Permissions Category, this looks valid.

libewf_file_permission_get_number_of_sub_file_permissions() - passing filePermissions ptr here along with a value to get set with the number of subs, this seems accurate as it returns the correct number of permissions for the file(s) in the L01.

Using the number of subs from the above call I'm next calling libewf_file_permission_get_sub_file_permission() which returns a subFile ptr. This is where it goes south, using the subFile ptr I try to make calls to get the permission items (name size, name, uid size, uid, access mask etc....) but none of these are valid. Using a hex editor I can see the items under "perms" in the L01 so I know they are there.

Some questions:

  1. Do these calls to extract file permission information work currently?
  2. Do my calls above look correct, perhaps I'm missing something?
  3. Would it be possible to check this sample file to see if you are able to extract any file permissions?

The sample contains 3 files, IMG_0003 & 0004 each have 5 permissions and AlbumArtSmall.jpg has 7, these numbers are consistent with what is returned after calling libewf_file_permission_get_number_of_sub_file_permissions.

Thanks,
Mike
SampleFiles3.L01.zip

@mikebbt
Copy link
Author

mikebbt commented Jul 8, 2021

Went back, did some refactor and it is now working so was a problem on my end, closing out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant