Lines Matching refs:to_keep
95 static bool DropBoundingSet(const CapSet& to_keep) { in DropBoundingSet() argument
104 if (cap < to_keep.size() && to_keep.test(cap)) { in DropBoundingSet()
116 static bool SetProcCaps(const CapSet& to_keep, bool add_setpcap) { in SetProcCaps() argument
121 for (size_t cap = 0; cap < to_keep.size(); ++cap) { in SetProcCaps()
122 if (to_keep.test(cap)) { in SetProcCaps()
142 PLOG(ERROR) << "cap_set_proc(" << to_keep.to_ulong() << ") failed"; in SetProcCaps()
181 bool SetCapsForExec(const CapSet& to_keep) { in SetCapsForExec() argument
184 if (!SetProcCaps(to_keep, add_setpcap)) { in SetCapsForExec()
189 if (!DropBoundingSet(to_keep)) { in SetCapsForExec()
195 if (!SetProcCaps(to_keep, add_setpcap)) { in SetCapsForExec()
203 return SetAmbientCaps(to_keep); in SetCapsForExec()