Skip to content

Commit

Permalink
fix user mode switch for config line path
Browse files Browse the repository at this point in the history
  • Loading branch information
holgerBerger committed Dec 18, 2024
1 parent 47bba66 commit 04c4f7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ws_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ int main(int argc, char **argv) {
// user can change this if no setuid installation OR if root
auto configfilestoread = std::vector<cppfs::path>{"/etc/ws.d","/etc/ws.conf"};
if (configfile != "") {
if (user::isRoot() || user::isnotSetuid()) { // FIXME: capability? this could be DANGEROUS!
if (user::isRoot() || caps.isUserMode()) {
configfilestoread = {configfile};
} else {
fmt::print(stderr, "WARNING: ignored config file options!\n");
fmt::print(stderr, "Warning: ignored config file options!\n");
}
}

Expand Down

0 comments on commit 04c4f7a

Please sign in to comment.