| Index: sandbox/linux/services/credentials.cc
|
| diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
|
| index c1283ea61a02b12fb53120444b320f89fa3d509f..06e1a6454218eff80669fea9b2591ae492d181b1 100644
|
| --- a/sandbox/linux/services/credentials.cc
|
| +++ b/sandbox/linux/services/credentials.cc
|
| @@ -157,21 +157,16 @@ void CheckCloneNewUserErrno(int error) {
|
|
|
| namespace sandbox {
|
|
|
| -Credentials::Credentials() {
|
| -}
|
| -
|
| -Credentials::~Credentials() {
|
| -}
|
| -
|
| bool Credentials::DropAllCapabilities() {
|
| ScopedCap cap(cap_init());
|
| CHECK(cap);
|
| PCHECK(0 == cap_set_proc(cap.get()));
|
| + CHECK(!HasAnyCapability());
|
| // We never let this function fail.
|
| return true;
|
| }
|
|
|
| -bool Credentials::HasAnyCapability() const {
|
| +bool Credentials::HasAnyCapability() {
|
| ScopedCap current_cap(cap_get_proc());
|
| CHECK(current_cap);
|
| ScopedCap empty_cap(cap_init());
|
| @@ -179,7 +174,7 @@ bool Credentials::HasAnyCapability() const {
|
| return cap_compare(current_cap.get(), empty_cap.get()) != 0;
|
| }
|
|
|
| -scoped_ptr<std::string> Credentials::GetCurrentCapString() const {
|
| +scoped_ptr<std::string> Credentials::GetCurrentCapString() {
|
| ScopedCap current_cap(cap_get_proc());
|
| CHECK(current_cap);
|
| ScopedCapText cap_text(cap_to_text(current_cap.get(), NULL));
|
|
|