You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/app/RequiredPrivilege.cpp and src/app/util/privilege-storage.cpp both define functions with the same names; the former defines them as weak symbols, while the latter defines them as non-weak symbols.
Unfortunately, all the symbols in privilege-storage.cpp match names in RequiredPrivilege.cpp, so if the static library containing RequiredPrivilege.cpp happens to come earlier than the static library containing privilege-storage.cpp while linking, we will not end up pulling in the privilege-storage.cpp symbols, since those names will all be satisfied already.
The failure mode here is pretty insiduous: the application compiles/links correctly, but all ACL checks require "administer" privilege... which means the problem would not necessarily be caught in any of our normal testing, if people are generally testing with commissioners that do in fact have "administer" privileges.
Proposed Solution
Either stop using weak symbols or add some other function to privilege-storage.cpp that is called from somewhere and forces those symbols to be linked in. Any better options?
The text was updated successfully, but these errors were encountered:
Problem
src/app/RequiredPrivilege.cpp
andsrc/app/util/privilege-storage.cpp
both define functions with the same names; the former defines them as weak symbols, while the latter defines them as non-weak symbols.Unfortunately, all the symbols in
privilege-storage.cpp
match names inRequiredPrivilege.cpp
, so if the static library containingRequiredPrivilege.cpp
happens to come earlier than the static library containingprivilege-storage.cpp
while linking, we will not end up pulling in theprivilege-storage.cpp
symbols, since those names will all be satisfied already.The failure mode here is pretty insiduous: the application compiles/links correctly, but all ACL checks require "administer" privilege... which means the problem would not necessarily be caught in any of our normal testing, if people are generally testing with commissioners that do in fact have "administer" privileges.
Proposed Solution
Either stop using weak symbols or add some other function to
privilege-storage.cpp
that is called from somewhere and forces those symbols to be linked in. Any better options?The text was updated successfully, but these errors were encountered: