Instead of looking for a specific file via the file system which would "depend" on systemd in as much as systemd provides the /dev/by-uuid/ directory (AFAIR anyway), maybe look into the blkid.h file included in linux-utils. libblkid(3), blkid(8) are some good man pages to start out with. I haven't used blkid.h myself, but given what the blkid command does I think it's fair to say its library may be fruitful for your purposes.
Sure, it's not cross-platform to BSDs and such, but it'll at least get you out of the systemd requirement :) ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Wednesday, April 29, 2020 7:02 PM, lmsru...@gmail.com <lmsru...@gmail.com> wrote: > Hi, > > I have just developed a PAM module that can be used to log into linux > by using a usb drive. The software was designed according to the > suckless philosophy of simplicity, clarity and frugality. However it > does depend on systemd, so any suggestion on how to achieve the same > functionality without this dependency is welcome. > > The code is hosted at GitHub > > https://github.com/LuisRusso/PamUUID > > Besides announcing the software to the community I would like to > request that it be added in the "other projects" list of the suckless > webpage. > > Best regards, > > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Luís M. S. Russo