Skip to content
New issue

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

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

Already on GitHub? # to your account

Prevent incorrect user_not_volume_owner messages #177

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

cvgs
Copy link
Contributor

@cvgs cvgs commented Dec 21, 2021

Prevent incorrect user_not_volume_owner messages by checking RealName and all RecordName attributes with case insensitivity

Sometimes erase-install incorrectly shows that the user is not volume owner, because the account_shortname can be different from the name that is returned by fdesetup list.

There are three main reasons:

  • The end user enters the username in a different capitalization, and we to a case-sensitive comparison
  • The end user enters his RealName, or a different RecordName belonging to his user account (as the user record can have multiple RecordNames)
  • --currentUser returns a different RecordName than what is stored in "fdesetup list". Not sure why, but i have seen this happen as well (like John.Doe vs. John.Doe@pretendco.com)

This pull request expands the volume owner comparison as follows:

  • do a case-insensitive match
  • compare all RecordNames against the account_shortname
  • compare the RealName against the account_shortname

This should cover the cases listed above so that the volume owner check should return a valid result, regardless of the entered account_shortname.

…all RecordName attributes with case insensitivity
@grahampugh grahampugh changed the base branch from main to v25.1-rc December 21, 2021 15:43
@grahampugh
Copy link
Owner

Changing this to merge into v25.1-rc branch, which is ahead of main.

@grahampugh grahampugh merged commit 1e3c562 into grahampugh:v25.1-rc Dec 21, 2021
grahampugh pushed a commit that referenced this pull request Dec 21, 2021
@grahampugh
Copy link
Owner

I have built new packages including this change into the 25.1 pre-release. Please can you try it out?

@cvgs
Copy link
Contributor Author

cvgs commented Dec 22, 2021

I am trying the 25.1rc right now, but i keep getting reproducable errors in the caching stage that say "Build 21C52 selected. Downloading #18... [run_installinstallmacos] Error obtaining valid installer. Cannot continue.".

I've tested it multiple times now, and "erase-install --move --update" always fails here. Running installinstallmacos by hand works, as well as running the curl command shown in the eraseinstall.log, so i guess it's not a problem with my internet connection. Tested on MacBookPro17,1 and MacBookPro14,1.

Just wanted to give feedback so you can double-check that.
erase-install.log

Will report on the user feature once i've cached an installer manually…

@cvgs
Copy link
Contributor Author

cvgs commented Dec 22, 2021

Apart from the download problems, 25.1rc worked for upgrading from Big Sur to Monterey, and it correctly parsed the volume owner.

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

Successfully merging this pull request may close these issues.

2 participants