Skip to content

[Feature request] Support setting serial to generic #261

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

Closed
v-Nyo opened this issue Jan 4, 2025 · 15 comments · May be fixed by #263
Closed

[Feature request] Support setting serial to generic #261

v-Nyo opened this issue Jan 4, 2025 · 15 comments · May be fixed by #263
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@v-Nyo
Copy link

v-Nyo commented Jan 4, 2025

Understood

Yes, this is not a bug report / support request

Text

The built in sdcard reader on my laptop does not report the vendor/model and always the same serial no matter the card plugged in.

Because of this I can only register a single sdcard.

@mcdope
Copy link
Owner

mcdope commented Jan 11, 2025

Such crappy readers exist? Oo Sure it's not the media?

Usually I would just refuse adding code to support trash-hardware or software, esp. since it reduces security. But we already have the Generic options for vendor and model and it will be optional anyway... Soooooo....

Will be added SOMEWHEN, but feel free to submit a PR if you're in a hurry.

@mcdope mcdope added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jan 11, 2025
@mcdope mcdope added this to the 1.?.0 milestone Jan 11, 2025
mcdope added a commit that referenced this issue Jan 18, 2025
@mcdope
Copy link
Owner

mcdope commented Jan 18, 2025

Too lazy to test, but in theory it's available in branch issue-261-support-generic-serial

@mcdope mcdope linked a pull request Jan 18, 2025 that will close this issue
@v-Nyo
Copy link
Author

v-Nyo commented Feb 3, 2025

thanks for the quick update, will hopefully have some time to test this week!

@v-Nyo
Copy link
Author

v-Nyo commented Feb 3, 2025

So I installed it like this:

git checkout issue-261-support-generic-serial
git diff origin #looks good
make && sudo make install
echo $? # is 0
reboot

Then changed everything but the vol id to Generic.

Does not work because it cant find the device...

only tried with FAT vol

Serial needs to be set. Everything else can be Generic

@mcdope
Copy link
Owner

mcdope commented Feb 3, 2025 via email

@v-Nyo
Copy link
Author

v-Nyo commented Feb 5, 2025

No worries it's not urgent. I am just grateful for you maintenance of this project ^_^

@mcdope
Copy link
Owner

mcdope commented Feb 11, 2025 via email

@v-Nyo
Copy link
Author

v-Nyo commented Feb 14, 2025

Maybe I am just to stupid to install the commit properly. Will try again when it's merged into master.

Would appreciate if you could at least quickly test if your device still gets recognized when you set it's serial to Generic.

mcdope added a commit that referenced this issue Feb 16, 2025
@mcdope
Copy link
Owner

mcdope commented Feb 16, 2025 via email

@v-Nyo
Copy link
Author

v-Nyo commented Feb 16, 2025

Thank you very much. I also had to set the Model (which was previously "MassStorageClass") also to Generic (Otherwise it would get stuck on the first drive), but now a I can add as many drives via this reader as I want!

The only thing worth mentioning would be that the warning for Model/Vendor gets printed 3 times each, kinda pollutes the log.
Otherwise works perfectly fine!

@v-Nyo
Copy link
Author

v-Nyo commented Feb 16, 2025

Okay maybe that was too early. How is it when you have 2 Devices with everything set to Generic?

I have issues when both drives are all generic. The first ones get's skipped but the second one works without any issues. ( And only the first ones prints the warning 3 times each).

When I set the model of the first one to MassStorageClass it starts working again but the second one only works once (the first time you unlock after changing the conf).

IDK what's going on here.

I think you should test if it works on you Machine with 2 devices all Generic and if it does close this issue. I don't want to steal more of you time when almost nobody is benefiting from this feature. Maybe this SD reader is really beyond saving.

@v-Nyo
Copy link
Author

v-Nyo commented Feb 16, 2025

Rebooted and tried to add a third device. From what I can tell it always get's stuck on the first device where everything but the vol. id is generic. It falsely detects that the first drive is connected and tries to probe for that volume (does not check if the UUID of the partition is there).

Also I don't get the warning printed 3 times each anymore ( only shows up when Model is not generic)

@v-Nyo
Copy link
Author

v-Nyo commented Mar 11, 2025

Well good news is that it's now a lot more stable. Before setting everything to generic I had to deal with a lot of timeouts / connections issues, now works like a breeze.

I am satisfied with the current state.

I would merge the pull request and add a quick note that setting serial to generic is not fully supported, has issues and link to this thread? (If you see no real benefit in fixing this)

Anyway thanks for you time.

@mcdope
Copy link
Owner

mcdope commented Mar 15, 2025

Rebooted and tried to add a third device. From what I can tell it always get's stuck on the first device where everything but the vol. id is generic. It falsely detects that the first drive is connected and tries to probe for that volume (does not check if the UUID of the partition is there).

That is kinda an expected sideeffect and unlikely to change. But again: your cardreader is utterly broken, you should just use proper devices. As soon as ANY field is set to generic, you're reducing the already low security of pam_usb.

I am satisfied with the current state.

Glad it workarounded your "wtf hardware" 😁

I would merge the pull request and add a quick note that setting serial to generic is not fully supported, has issues and link to this thread? (If you see no real benefit in fixing this)

I don't plan to merge this into master since it has too many caveats and is only required for very niche and very broken hardware.

You will have to either stick to your current build, or to be able to update: maintain your own branch forked from master but merging this and then do local builds.

@mcdope mcdope removed this from the 1.?.0 milestone Mar 15, 2025
@v-Nyo
Copy link
Author

v-Nyo commented Mar 15, 2025

You will have to either stick to your current build, or to be able to update: maintain your own branch forked from master but merging this and then do local builds.

Alright no problem, thanks

@v-Nyo v-Nyo closed this as completed Mar 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants