raperrstr.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. #include <u.h>
  10. #include <libc.h>
  11. static struct {
  12. int err;
  13. char *msg;
  14. } RAPerrs[] = {
  15. { 0, "ok" },
  16. { 5, "permission denied" },
  17. { 50, "request not supported" },
  18. { 65, "access denied" },
  19. { 86, "password invalid" },
  20. { 128, "not listening on called name" },
  21. { 129, "not listening for calling name" },
  22. { 130, "called name not present" },
  23. { 131, "called name present, but insufficient resources" },
  24. { 234, "more data" },
  25. { 2102, "workstation driver is not installed" },
  26. { 2103, "server could not be located" },
  27. { 2104, "network cannot access a shared memory segment" },
  28. { 2105, "A network resource shortage occurred" },
  29. { 2106, "This operation is not supported on workstations" },
  30. { 2107, "device is not connected" },
  31. { 2114, "Server service is not started" },
  32. { 2115, "queue is empty" },
  33. { 2116, "device or directory does not exist" },
  34. { 2117, "operation is invalid on a redirected resource" },
  35. { 2118, "name has already been shared" },
  36. { 2119, "server is currently out of the requested resource" },
  37. { 2121, "Requested addition of items exceeds the maximum allowed" },
  38. { 2122, "Peer service supports only two simultaneous users" },
  39. { 2123, "API return buffer is too small" },
  40. { 2127, "remote API error occurred" },
  41. { 2131, "cannot open or read the configuration file" },
  42. { 2136, "general network error occurred" },
  43. { 2137, "Workstation service is corrupted" },
  44. { 2138, "Workstation service has not been started" },
  45. { 2139, "requested information is not available" },
  46. { 2140, "internal error" },
  47. { 2141, "server is not configured for transactions" },
  48. { 2142, "requested API is not supported on the remote server" },
  49. { 2143, "event name is invalid" },
  50. { 2144, "computer name already exists on the network" },
  51. { 2146, "specified component could not be found in the config info" },
  52. { 2147, "specified parameter could not be found in the config info" },
  53. { 2149, "A line in the configuration file is too long" },
  54. { 2150, "printer does not exist" },
  55. { 2151, "print job does not exist" },
  56. { 2152, "printer destination cannot be found" },
  57. { 2153, "printer destination already exists" },
  58. { 2154, "printer queue already exists" },
  59. { 2155, "no more printers can be added" },
  60. { 2156, "no more print jobs can be added" },
  61. { 2157, "no more printer destinations can be added" },
  62. { 2158, "printer idle and cannot accept control operations" },
  63. { 2159, "invalid control function in printer request" },
  64. { 2160, "print processor not responding" },
  65. { 2161, "spooler not running" },
  66. { 2162, "operation cannot be performed on the print destination in its current state" },
  67. { 2163, "operation cannot be performed on the printer queue in its current state" },
  68. { 2164, "operation cannot be performed on the print job in its current state" },
  69. { 2165, "spooler - no memory" },
  70. { 2166, "device driver does not exist" },
  71. { 2167, "data type not supported by the print processor" },
  72. { 2168, "print processor is not installed" },
  73. { 2180, "service database is locked" },
  74. { 2181, "service table full" },
  75. { 2182, "requested service already started" },
  76. { 2183, "service does not responding" },
  77. { 2184, "service not started" },
  78. { 2185, "service name invalid" },
  79. { 2186, "service is not responding to the control function" },
  80. { 2187, "service control is busy" },
  81. { 2188, "configuration file contains an invalid service program name" },
  82. { 2189, "service could not be controlled in its present state" },
  83. { 2190, "service ended abnormally" },
  84. { 2191, "requested pause or stop is not valid for this service" },
  85. { 2192, "could not find the service name in the dispatch table" },
  86. { 2193, "service control dispatcher pipe read failed" },
  87. { 2194, "thread create for the new service could not be created" },
  88. { 2200, "This workstation is already logged on to the local-area network" },
  89. { 2201, "workstation is not logged on to the local-area network" },
  90. { 2202, "user name or group name parameter is invalid" },
  91. { 2203, "password parameter is invalid" },
  92. { 2204, "logon processor did not add the message alias" },
  93. { 2205, "logon processor did not add the message alias" },
  94. { 2206, "logoff processor did not delete the message alias" },
  95. { 2207, "logoff processor did not delete the message alias" },
  96. { 2209, "Network logons are paused" },
  97. { 2210, "a centralized logon-server conflict occurred" },
  98. { 2211, "server is configured without a valid user path" },
  99. { 2212, "cannot run logon script" },
  100. { 2214, "logon server was not specified. computer will be logged on as STANDALONE" },
  101. { 2215, "logon server could not be found" },
  102. { 2216, "already a logon domain for this computer" },
  103. { 2217, "logon server could not validate the logon" },
  104. { 2219, "security database could not be found" },
  105. { 2220, "group name could not be found" },
  106. { 2221, "user name could not be found" },
  107. { 2222, "resource name could not be found" },
  108. { 2223, "group already exists" },
  109. { 2224, "user account already exists" },
  110. { 2225, "resource permission list already exists" },
  111. { 2226, "This operation is only allowed on the PDC of the domain" },
  112. { 2227, "security database has not been started" },
  113. { 2228, "There are too many names in the user accounts database" },
  114. { 2229, "disk I/O failure occurred" },
  115. { 2230, "limit of 64 entries per resource was exceeded" },
  116. { 2231, "Deleting a user with a session is not allowed" },
  117. { 2232, "parent directory could not be located" },
  118. { 2233, "Unable to add to the security database session cache segment" },
  119. { 2234, "This operation is not allowed on this special group" },
  120. { 2235, "This user is not cached in user accounts database session cache" },
  121. { 2236, "user already belongs to this group" },
  122. { 2237, "user does not belong to this group" },
  123. { 2238, "This user account is undefined" },
  124. { 2239, "This user account has expired" },
  125. { 2240, "user is not allowed to log on from this workstation" },
  126. { 2241, "user is not allowed to log on at this time" },
  127. { 2242, "password of this user has expired" },
  128. { 2243, "password of this user cannot change" },
  129. { 2244, "This password cannot be used now" },
  130. { 2245, "password does not meet the password policy requirements" },
  131. { 2246, "password of this user is too recent to change" },
  132. { 2247, "security database is corrupted" },
  133. { 2248, "No updates are necessary to this replicant network/local security database" },
  134. { 2249, "This replicant database is outdated; synchronization is required" },
  135. { 2250, "network connection could not be found" },
  136. { 2251, "This asg_type is invalid" },
  137. { 2252, "This device is currently being shared" },
  138. { 2270, "computer name cannot be added - name may already exist" },
  139. { 2271, "Messenger service is already started" },
  140. { 2272, "Messenger service failed to start" },
  141. { 2273, "message alias could not be found on the network" },
  142. { 2274, "This message alias has already been forwarded" },
  143. { 2275, "This message alias has been added but is still forwarded" },
  144. { 2276, "This message alias already exists locally" },
  145. { 2277, "maximum number of added message aliases has been exceeded" },
  146. { 2278, "computer name could not be deleted" },
  147. { 2279, "Messages cannot be forwarded back to the same workstation" },
  148. { 2280, "An error occurred in the domain message processor" },
  149. { 2281, "message was sent, but the recipient has paused the Messenger service" },
  150. { 2282, "message was sent but not received" },
  151. { 2283, "message alias is currently in use. Try again later" },
  152. { 2284, "Messenger service has not been started" },
  153. { 2285, "name is not on the local computer" },
  154. { 2286, "forwarded message alias could not be found on the network" },
  155. { 2287, "message alias table on the remote station is full" },
  156. { 2288, "Messages for this alias are not currently being forwarded" },
  157. { 2289, "broadcast message was truncated" },
  158. { 2294, "This is an invalid device name" },
  159. { 2295, "A write fault occurred" },
  160. { 2297, "A duplicate message alias exists on the network" },
  161. { 2298, "This message alias will be deleted later" },
  162. { 2299, "message alias was not successfully deleted from all networks" },
  163. { 2300, "This operation is not supported on computers with multiple networks" },
  164. { 2310, "This shared resource does not exist" },
  165. { 2311, "This device is not shared" },
  166. { 2312, "A session does not exist with that computer name" },
  167. { 2314, "There is not an open file with that identification number" },
  168. { 2315, "A failure occurred when executing a remote administration command" },
  169. { 2316, "A failure occurred when opening a remote temporary file" },
  170. { 2317, "Data returned from a RAP command has been truncated to 64K" },
  171. { 2318, "This device cannot be shared as both a spooled and a non-spooled resource" },
  172. { 2319, "information in the list of servers may be incorrect" },
  173. { 2320, "computer is not active in this domain" },
  174. { 2321, "share must be removed from DFS before it can be deleted" },
  175. { 2331, "operation is invalid for this device" },
  176. { 2332, "This device cannot be shared" },
  177. { 2333, "This device was not open" },
  178. { 2334, "This device name list is invalid" },
  179. { 2335, "queue priority is invalid" },
  180. { 2337, "There are no shared communication devices" },
  181. { 2338, "queue you specified does not exist" },
  182. { 2340, "This list of devices is invalid" },
  183. { 2341, "requested device is invalid" },
  184. { 2342, "This device is already in use by the spooler" },
  185. { 2343, "This device is already in use as a communication device" },
  186. { 2351, "This computer name is invalid" },
  187. { 2354, "string and prefix specified are too long" },
  188. { 2356, "This path component is invalid" },
  189. { 2357, "Could not determine the type of input" },
  190. { 2362, "buffer for types is not big enough" },
  191. { 2370, "Profile files cannot exceed 64K" },
  192. { 2371, "start offset is out of range" },
  193. { 2372, "system cannot delete current connections to network resources" },
  194. { 2373, "system was unable to parse the command line in this file" },
  195. { 2374, "An error occurred while loading the profile file" },
  196. { 2375, "Errors occurred while saving the profile file" },
  197. { 2377, "Log file %1 is full" },
  198. { 2378, "This log file has changed between reads" },
  199. { 2379, "Log file %1 is corrupt" },
  200. { 2380, "source path cannot be a directory" },
  201. { 2381, "source path is illegal" },
  202. { 2382, "destination path is illegal" },
  203. { 2383, "source and destination paths are on different servers" },
  204. { 2385, "Run server you requested is paused" },
  205. { 2389, "An error occurred when communicating with a Run server" },
  206. { 2391, "An error occurred when starting a background process" },
  207. { 2392, "shared resource you are connected to could not be found" },
  208. { 2400, "LAN adapter number is invalid" },
  209. { 2401, "There are open files on the connection" },
  210. { 2402, "Active connections still exist" },
  211. { 2403, "This share name or password is invalid" },
  212. { 2404, "device is being accessed by an active process" },
  213. { 2405, "drive letter is in use locally" },
  214. { 2430, "specified client is already registered for the specified event" },
  215. { 2431, "alert table is full" },
  216. { 2432, "An invalid or nonexistent alert name was raised" },
  217. { 2433, "alert recipient is invalid" },
  218. { 2434, "A user's session with this server has been deleted" },
  219. { 2440, "log file does not contain the requested record number" },
  220. { 2450, "user accounts database is not configured correctly" },
  221. { 2451, "This operation is not permitted when the Netlogon service is running" },
  222. { 2452, "This operation is not allowed on the last administrative account" },
  223. { 2453, "Could not find DC for this domain" },
  224. { 2454, "Could not set logon information for this user" },
  225. { 2455, "Netlogon service has not been started" },
  226. { 2456, "Unable to add to the user accounts database" },
  227. { 2457, "This server's clock is not synchronized with the PDC's clock" },
  228. { 2458, "A password mismatch has been detected" },
  229. { 2460, "server identification does not specify a valid server" },
  230. { 2461, "session identification does not specify a valid session" },
  231. { 2462, "connection identification does not specify a valid connection" },
  232. { 2463, "There is no space for another entry in the table of available servers" },
  233. { 2464, "server has reached the maximum number of sessions it supports" },
  234. { 2465, "server has reached the maximum number of connections it supports" },
  235. { 2466, "server cannot open more files because it has reached its maximum number" },
  236. { 2467, "There are no alternate servers registered on this server" },
  237. { 2470, "Try down-level (remote admin protocol) version of API instead" },
  238. { 2480, "UPS driver could not be accessed by the UPS service" },
  239. { 2481, "UPS service is not configured correctly" },
  240. { 2482, "UPS service could not access the specified Comm Port" },
  241. { 2483, "UPS indicated a line fail or low battery situation. Service not started" },
  242. { 2484, "UPS service failed to perform a system shut down" },
  243. { 2500, "program below returned an MS-DOS error code" },
  244. { 2501, "program below needs more memory" },
  245. { 2502, "program below called an unsupported MS-DOS function" },
  246. { 2503, "workstation failed to boot" },
  247. { 2504, "file below is corrupt" },
  248. { 2505, "No loader is specified in the boot-block definition file" },
  249. { 2506, "NetBIOS returned an error: The NCB and SMB are dumped above" },
  250. { 2507, "A disk I/O error occurred" },
  251. { 2508, "Image parameter substitution failed" },
  252. { 2509, "Too many image parameters cross disk sector boundaries" },
  253. { 2510, "image was not generated from an MS-DOS diskette formatted with /S" },
  254. { 2511, "Remote boot will be restarted later" },
  255. { 2512, "call to the Remoteboot server failed" },
  256. { 2513, "Cannot connect to the Remoteboot server" },
  257. { 2514, "Cannot open image file on the Remoteboot server" },
  258. { 2515, "Connecting to the Remoteboot server..." },
  259. { 2516, "Connecting to the Remoteboot server..." },
  260. { 2517, "Remote boot service was stopped" },
  261. { 2518, "Remote boot startup failed; check the error log" },
  262. { 2519, "A second connection to a Remoteboot resource is not allowed" },
  263. { 2550, "browser service was configured with MaintainServerList=No" },
  264. { 2610, "Service failed to startas no network adapters started with this service" },
  265. { 2611, "Service failed to start due to bad startup information in the registry" },
  266. { 2612, "Service failed to start because its database is absent or corrupt" },
  267. { 2613, "Service failed to start because RPLFILES share is absent" },
  268. { 2614, "Service failed to start because RPLUSER group is absent" },
  269. { 2615, "Cannot enumerate service records" },
  270. { 2616, "Workstation record information has been corrupted" },
  271. { 2617, "Workstation record was not found" },
  272. { 2618, "Workstation name is in use by some other workstation" },
  273. { 2619, "Profile record information has been corrupted" },
  274. { 2620, "Profile record was not found" },
  275. { 2621, "Profile name is in use by some other profile" },
  276. { 2622, "There are workstations using this profile" },
  277. { 2623, "Configuration record information has been corrupted" },
  278. { 2624, "Configuration record was not found" },
  279. { 2625, "Adapter ID record information has been corrupted" },
  280. { 2626, "An internal service error has occurred" },
  281. { 2627, "Vendor ID record information has been corrupted" },
  282. { 2628, "Boot block record information has been corrupted" },
  283. { 2629, "user account for this workstation record is missing" },
  284. { 2630, "RPLUSER local group could not be found" },
  285. { 2631, "Boot block record was not found" },
  286. { 2632, "Chosen profile is incompatible with this workstation" },
  287. { 2633, "Chosen network adapter ID is in use by some other workstation" },
  288. { 2634, "There are profiles using this configuration" },
  289. { 2635, "There are workstations, profiles, or configurations using this boot block" },
  290. { 2636, "Service failed to backup Remoteboot database" },
  291. { 2637, "Adapter record was not found" },
  292. { 2638, "Vendor record was not found" },
  293. { 2639, "Vendor name is in use by some other vendor record" },
  294. { 2640, "(boot name, vendor ID) is in use by some other boot block record" },
  295. { 2641, "Configuration name is in use by some other configuration" },
  296. { 2660, "internal database maintained by the Dfs service is corrupt" },
  297. { 2661, "One of the records in the internal Dfs database is corrupt" },
  298. { 2662, "There is no DFS name whose entry path matches the input Entry Path" },
  299. { 2663, "A root or link with the given name already exists" },
  300. { 2664, "server share specified is already shared in the Dfs" },
  301. { 2665, "indicated server share does not support the indicated DFS namespace" },
  302. { 2666, "operation is not valid on this portion of the namespace" },
  303. { 2667, "operation is not valid on this portion of the namespace" },
  304. { 2668, "operation is ambiguous because the link has multiple servers" },
  305. { 2669, "Unable to create a link" },
  306. { 2670, "server is not Dfs Aware" },
  307. { 2671, "specified rename target path is invalid" },
  308. { 2672, "specified DFS link is offline" },
  309. { 2673, "specified server is not a server for this link" },
  310. { 2674, "A cycle in the Dfs name was detected" },
  311. { 2675, "operation is not supported on a server-based Dfs" },
  312. { 2676, "This link is already supported by the specified server-share" },
  313. { 2677, "Can't remove the last server-share supporting this root or link" },
  314. { 2678, "operation is not supported for an Inter-DFS link" },
  315. { 2679, "internal state of the Dfs Service has become inconsistent" },
  316. { 2680, "Dfs Service has been installed on the specified server" },
  317. { 2681, "Dfs data being reconciled is identical" },
  318. { 2682, "DFS root cannot be deleted. Uninstall DFS if required" },
  319. { 2683, "A child or parent directory of the share is already in a Dfs" },
  320. { 2690, "Dfs internal error" },
  321. { 2691, "This machine is already joined to a domain" },
  322. { 2692, "This machine is not currently joined to a domain" },
  323. { 2693, "This machine is a DC and cannot be unjoined from a domain" },
  324. { 2694, "destination DC does not support creating machine accounts in OUs" },
  325. { 2695, "specified workgroup name is invalid" },
  326. { 2696, "specified computer name is incompatible with the default language used on the DC" },
  327. { 2697, "specified computer account could not be found" },
  328. { 2698, "This version of Windows cannot be joined to a domain" },
  329. { 2701, "password must change at the next logon" },
  330. { 2702, "account is locked out" },
  331. { 2703, "password is too long" },
  332. { 2704, "password does not meet the complexity policy" },
  333. { 2705, "password does not meet the requirements of the password filter DLLs" },
  334. };
  335. char *
  336. raperrstr(uint err)
  337. {
  338. int i, match;
  339. static char buf[0xff];
  340. match = -1;
  341. for(i = 0; i < nelem(RAPerrs); i++)
  342. if(RAPerrs[i].err == err)
  343. match = i;
  344. if(match != -1)
  345. snprint(buf, sizeof buf, "rap: %s", RAPerrs[match].msg);
  346. else
  347. snprint(buf, sizeof buf, "rap: %u/0x%x - unknown error",
  348. err, err);
  349. return buf;
  350. }