| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "remoting/host/pam_authorization_factory_posix.h" | 5 #include "remoting/host/pam_authorization_factory_posix.h" |
| 6 | 6 |
| 7 #include <security/pam_appl.h> | 7 #include <security/pam_appl.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/environment.h" | 13 #include "base/environment.h" |
| 14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
| 15 #include "remoting/base/logging.h" | 15 #include "remoting/base/logging.h" |
| 16 #include "remoting/host/username.h" | 16 #include "remoting/host/username.h" |
| 17 #include "remoting/protocol/channel_authenticator.h" | 17 #include "remoting/protocol/channel_authenticator.h" |
| 18 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 18 #include "third_party/libjingle_xmpp/xmllite/xmlelement.h" |
| 19 | 19 |
| 20 namespace remoting { | 20 namespace remoting { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 class PamAuthorizer : public protocol::Authenticator { | 23 class PamAuthorizer : public protocol::Authenticator { |
| 24 public: | 24 public: |
| 25 PamAuthorizer(std::unique_ptr<protocol::Authenticator> underlying); | 25 PamAuthorizer(std::unique_ptr<protocol::Authenticator> underlying); |
| 26 ~PamAuthorizer() override; | 26 ~PamAuthorizer() override; |
| 27 | 27 |
| 28 // protocol::Authenticator interface. | 28 // protocol::Authenticator interface. |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 std::unique_ptr<protocol::Authenticator> | 171 std::unique_ptr<protocol::Authenticator> |
| 172 PamAuthorizationFactory::CreateAuthenticator(const std::string& local_jid, | 172 PamAuthorizationFactory::CreateAuthenticator(const std::string& local_jid, |
| 173 const std::string& remote_jid) { | 173 const std::string& remote_jid) { |
| 174 std::unique_ptr<protocol::Authenticator> authenticator( | 174 std::unique_ptr<protocol::Authenticator> authenticator( |
| 175 underlying_->CreateAuthenticator(local_jid, remote_jid)); | 175 underlying_->CreateAuthenticator(local_jid, remote_jid)); |
| 176 return base::MakeUnique<PamAuthorizer>(std::move(authenticator)); | 176 return base::MakeUnique<PamAuthorizer>(std::move(authenticator)); |
| 177 } | 177 } |
| 178 | 178 |
| 179 } // namespace remoting | 179 } // namespace remoting |
| OLD | NEW |