capability: accept new ownerdata for existing caps
This commit is contained in:
parent
c7561f03ef
commit
1e221ac32e
1 changed files with 5 additions and 0 deletions
|
@ -67,6 +67,11 @@ capability_put(struct CapabilityIndex *idx, const char *cap, void *ownerdata)
|
||||||
if ((entry = rb_dictionary_retrieve(idx->cap_dict, cap)) != NULL)
|
if ((entry = rb_dictionary_retrieve(idx->cap_dict, cap)) != NULL)
|
||||||
{
|
{
|
||||||
entry->flags &= ~CAP_ORPHANED;
|
entry->flags &= ~CAP_ORPHANED;
|
||||||
|
if (ownerdata != NULL)
|
||||||
|
{
|
||||||
|
s_assert(entry->ownerdata == NULL);
|
||||||
|
entry->ownerdata = ownerdata;
|
||||||
|
}
|
||||||
return (1 << entry->value);
|
return (1 << entry->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue