summaryrefslogtreecommitdiffstats
path: root/cloud_print/service/win/local_security_policy.h
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-15 04:25:54 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-15 04:25:54 +0000
commita8a717ddd32ce52531ae4365632d337b7b7ba1f9 (patch)
tree205a8c20b62d41c4d8598cc0616b2e33c7b1e290 /cloud_print/service/win/local_security_policy.h
parentb379cc5a3c5f40eb697edc32ea802ba9d1e41e5f (diff)
downloadchromium_src-a8a717ddd32ce52531ae4365632d337b7b7ba1f9.zip
chromium_src-a8a717ddd32ce52531ae4365632d337b7b7ba1f9.tar.gz
chromium_src-a8a717ddd32ce52531ae4365632d337b7b7ba1f9.tar.bz2
Removed default account for service.
Added required options run-as-user and run-as-password. Added code to set security rights required to run service. File access and chrome binary checks changed from fatal error to just error message. BUG=141243 Review URL: https://chromiumcodereview.appspot.com/10824294 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151652 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print/service/win/local_security_policy.h')
-rw-r--r--cloud_print/service/win/local_security_policy.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/cloud_print/service/win/local_security_policy.h b/cloud_print/service/win/local_security_policy.h
new file mode 100644
index 0000000..712ab19
--- /dev/null
+++ b/cloud_print/service/win/local_security_policy.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CLOUD_PRINT_SERVICE_WIN_LOCAL_SECURITY_POLICY_H_
+#define CLOUD_PRINT_SERVICE_WIN_LOCAL_SECURITY_POLICY_H_
+
+#include <wtypes.h> // Has to be before ntsecapi.h
+#include <ntsecapi.h>
+
+#include "base/basictypes.h"
+#include "base/string16.h"
+
+extern const wchar_t kSeServiceLogonRight[];
+
+class LocalSecurityPolicy {
+ public:
+ LocalSecurityPolicy();
+ ~LocalSecurityPolicy();
+
+ bool Open();
+ void Close();
+
+ bool IsPrivilegeSet(const string16& username,
+ const string16& privilage) const;
+ bool SetPrivilege(const string16& username, const string16& privilage);
+
+ private:
+ LSA_HANDLE policy_;
+
+ DISALLOW_COPY_AND_ASSIGN(LocalSecurityPolicy);
+};
+
+#endif // CLOUD_PRINT_SERVICE_WIN_LOCAL_SECURITY_POLICY_H_