we take it as an error if no caps is granted to an entity in the
specified keyring file when rebuilding the monitor db.
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit
b4bd4004a836121c11b0bb97d8123df54c271f04)
KeyServerData::Incremental auth_inc;
auth_inc.name = k->first;
auth_inc.auth = k->second;
+ if (auth_inc.auth.caps.empty()) {
+ cerr << "no caps granted to: " << auth_inc.name << std::endl;
+ return -EINVAL;
+ }
auth_inc.op = KeyServerData::AUTH_INC_ADD;
AuthMonitor::Incremental inc;