nix-community / vulnix

Vulnerability (CVE) scanner for Nix/NixOS.
BSD 3-Clause "New" or "Revised" License
464 stars 35 forks source link

vulnix --system doesn't work when run as unprivileged user #13

Closed basvandijk closed 7 years ago

basvandijk commented 8 years ago

My NixOS system apparently doesn't have the /nix/var/nix/current-system directory:

$ vulnix --system
error: getting status of ‘/nix/var/nix/current-system’: No such file or directory

Maybe vulnix should try /nix/var/nix/profiles/system if that previous directory can't be found.

Similarly user-mode also doesn't work:

$ vulnix --user
error: getting status of ‘/home/bas.van.dijk/.nix-profile/pkgs’: No such file or directory
ckauhaus commented 8 years ago

User mode is currently broken, this is a known issue. We're working on it.

W.r.t. current-system: this is interesting - we thought we could depend on /nix/var/nix/current-system... I'll get that fixed, too.

ckauhaus commented 8 years ago

The broken user mode will be handled separately in #8

adisbladis commented 7 years ago

This seems to no longer be the case. vulnix --system as an unprivileged user works fine.

ckauhaus commented 7 years ago

I'm going to check it - I think we fixed it without closing the ticket...

ckauhaus commented 7 years ago

vulnix --system should work on recent NixOS system when invoked as unprivileged user. Closing this issue.