1 // Copyright 2016 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef SYSTEM_API_DBUS_AUTHPOLICY_DBUS_CONSTANTS_H_
6 #define SYSTEM_API_DBUS_AUTHPOLICY_DBUS_CONSTANTS_H_
7 
8 namespace authpolicy {
9 
10 const char kAuthPolicyInterface[] = "org.chromium.AuthPolicy";
11 const char kAuthPolicyServicePath[] = "/org/chromium/AuthPolicy";
12 const char kAuthPolicyServiceName[] = "org.chromium.AuthPolicy";
13 // Methods
14 const char kAuthPolicyAuthenticateUser[] = "AuthenticateUser";
15 const char kAuthPolicyJoinADDomain[] = "JoinADDomain";
16 const char kAuthPolicyRefreshUserPolicy[] = "RefreshUserPolicy";
17 const char kAuthPolicyRefreshDevicePolicy[] = "RefreshDevicePolicy";
18 
19 // D-Bus call error codes. These values are written to logs. New enum values can
20 // be added, but existing enums must never be renumbered or deleted and reused.
21 enum ErrorType {
22   // Everything is A-OK!
23   ERROR_NONE = 0,
24   // Unspecified error.
25   ERROR_UNKNOWN = 1,
26   // Unspecified D-Bus error.
27   ERROR_DBUS_FAILURE = 2,
28   // Badly formatted user principal name.
29   ERROR_PARSE_UPN_FAILED = 3,
30   // Auth failed because of bad user name.
31   ERROR_BAD_USER_NAME = 4,
32   // Auth failed because of bad password.
33   ERROR_BAD_PASSWORD = 5,
34   // Auth failed because of expired password.
35   ERROR_PASSWORD_EXPIRED = 6,
36   // Auth failed because of bad realm or network.
37   ERROR_CANNOT_RESOLVE_KDC = 7,
38   // kinit exited with unspecified error.
39   ERROR_KINIT_FAILED = 8,
40   // net exited with unspecified error.
41   ERROR_NET_FAILED = 9,
42   // smdclient exited with unspecified error.
43   ERROR_SMBCLIENT_FAILED = 10,
44   // authpolicy_parser exited with unknown error.
45   ERROR_PARSE_FAILED = 11,
46   // Parsing GPOs failed.
47   ERROR_PARSE_PREG_FAILED = 12,
48   // GPO data is bad.
49   ERROR_BAD_GPOS = 13,
50   // Some local IO operation failed.
51   ERROR_LOCAL_IO = 14,
52   // Machine is not joined to AD domain yet.
53   ERROR_NOT_JOINED = 15,
54   // User is not logged in yet.
55   ERROR_NOT_LOGGED_IN = 16,
56   // Failed to send policy to Session Manager.
57   ERROR_STORE_POLICY_FAILED = 17,
58   // User doesn't have the right to join machines to the domain.
59   ERROR_JOIN_ACCESS_DENIED = 18,
60   // General network problem.
61   ERROR_NETWORK_PROBLEM = 19,
62   // Machine name contains restricted characters.
63   ERROR_BAD_MACHINE_NAME = 20,
64   // Machine name too long.
65   ERROR_MACHINE_NAME_TOO_LONG = 21,
66   // User joined maximum number of machines to the domain.
67   ERROR_USER_HIT_JOIN_QUOTA = 22,
68   // Kinit or smbclient failed to contact Key Distribution Center.
69   ERROR_CONTACTING_KDC_FAILED = 23,
70   // Kerberos credentials cache not found.
71   ERROR_NO_CREDENTIALS_CACHE_FOUND = 24,
72   // Kerberos ticket expired while renewing credentials.
73   ERROR_KERBEROS_TICKET_EXPIRED = 25,
74   // klist exited with unspecified error.
75   ERROR_KLIST_FAILED = 26,
76   // Should be the last.
77   ERROR_COUNT,
78 };
79 
80 }  // namespace authpolicy
81 
82 #endif  // SYSTEM_API_DBUS_AUTHPOLICY_DBUS_CONSTANTS_H_
83