00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #undef open
00026
00027 #define STRSAFE_NO_DEPRECATE
00028
00029 #include "dbus-sysdeps.h"
00030 #include "dbus-internals.h"
00031 #include "dbus-protocol.h"
00032 #include "dbus-string.h"
00033 #include "dbus-sysdeps.h"
00034 #include "dbus-sysdeps-win.h"
00035 #include "dbus-memory.h"
00036
00037 #include <io.h>
00038 #include <sys/stat.h>
00039 #include <aclapi.h>
00040
00041 #include <stdio.h>
00042 #include <stdlib.h>
00043 #include <fcntl.h>
00044 #include <errno.h>
00045
00046 #if defined __MINGW32__ || (defined _MSC_VER && _MSC_VER <= 1310)
00047
00048
00049
00050 #define errno_t int
00051
00052 errno_t strcat_s(char *dest, size_t size, char *src)
00053 {
00054 _dbus_assert(strlen(dest) + strlen(src) +1 <= size);
00055 strcat(dest,src);
00056 return 0;
00057 }
00058
00059 errno_t strcpy_s(char *dest, size_t size, char *src)
00060 {
00061 _dbus_assert(strlen(src) +1 <= size);
00062 strcpy(dest,src);
00063 return 0;
00064 }
00065 #endif
00066
00076 dbus_bool_t
00077 _dbus_become_daemon (const DBusString *pidfile,
00078 DBusPipe *print_pid_pipe,
00079 DBusError *error,
00080 dbus_bool_t keep_umask)
00081 {
00082 return TRUE;
00083 }
00084
00093 dbus_bool_t
00094 _dbus_write_pid_file (const DBusString *filename,
00095 unsigned long pid,
00096 DBusError *error)
00097 {
00098 const char *cfilename;
00099 DBusFile file;
00100 FILE *f;
00101
00102 cfilename = _dbus_string_get_const_data (filename);
00103
00104 if (!_dbus_file_open(&file, cfilename, O_WRONLY|O_CREAT|O_EXCL|O_BINARY, 0644))
00105 {
00106 dbus_set_error (error, _dbus_error_from_errno (errno),
00107 "Failed to open \"%s\": %s", cfilename,
00108 _dbus_strerror (errno));
00109 return FALSE;
00110 }
00111
00112 if ((f = fdopen (file.FDATA, "w")) == NULL)
00113 {
00114 dbus_set_error (error, _dbus_error_from_errno (errno),
00115 "Failed to fdopen fd %d: %s", file.FDATA, _dbus_strerror (errno));
00116 _dbus_file_close (&file, NULL);
00117 return FALSE;
00118 }
00119
00120 if (fprintf (f, "%lu\n", pid) < 0)
00121 {
00122 dbus_set_error (error, _dbus_error_from_errno (errno),
00123 "Failed to write to \"%s\": %s", cfilename,
00124 _dbus_strerror (errno));
00125
00126 fclose (f);
00127 return FALSE;
00128 }
00129
00130 if (fclose (f) == EOF)
00131 {
00132 dbus_set_error (error, _dbus_error_from_errno (errno),
00133 "Failed to close \"%s\": %s", cfilename,
00134 _dbus_strerror (errno));
00135 return FALSE;
00136 }
00137
00138 return TRUE;
00139 }
00140
00147 dbus_bool_t
00148 _dbus_verify_daemon_user (const char *user)
00149 {
00150 return TRUE;
00151 }
00152
00160 dbus_bool_t
00161 _dbus_change_to_daemon_user (const char *user,
00162 DBusError *error)
00163 {
00164 return TRUE;
00165 }
00166
00175 dbus_bool_t
00176 _dbus_change_identity (dbus_uid_t uid,
00177 dbus_gid_t gid,
00178 DBusError *error)
00179 {
00180 return TRUE;
00181 }
00182
00189 dbus_bool_t
00190 _dbus_user_at_console(const char *username,
00191 DBusError *error)
00192 {
00193 #ifdef DBUS_WINCE
00194 return TRUE;
00195 #else
00196 dbus_bool_t retval = FALSE;
00197 wchar_t *wusername;
00198 DWORD sid_length;
00199 PSID user_sid, console_user_sid;
00200 HWINSTA winsta;
00201
00202 wusername = _dbus_win_utf8_to_utf16 (username, error);
00203 if (!wusername)
00204 return FALSE;
00205
00206
00207 if (!_dbus_win_account_to_sid (wusername, &user_sid, error))
00208 goto out0;
00209
00210
00211
00212
00213 if (!(winsta = OpenWindowStation ("WinSta0", FALSE, READ_CONTROL)))
00214 {
00215 _dbus_win_set_error_from_win_error (error, GetLastError ());
00216 goto out2;
00217 }
00218
00219 sid_length = 0;
00220 GetUserObjectInformation (winsta, UOI_USER_SID,
00221 NULL, 0, &sid_length);
00222 if (sid_length == 0)
00223 {
00224
00225 goto out2;
00226 }
00227
00228 if (sid_length < 0 || sid_length > 1000)
00229 {
00230 dbus_set_error_const (error, DBUS_ERROR_FAILED, "Invalid SID length");
00231 goto out3;
00232 }
00233
00234 console_user_sid = dbus_malloc (sid_length);
00235 if (!console_user_sid)
00236 {
00237 _DBUS_SET_OOM (error);
00238 goto out3;
00239 }
00240
00241 if (!GetUserObjectInformation (winsta, UOI_USER_SID,
00242 console_user_sid, sid_length, &sid_length))
00243 {
00244 _dbus_win_set_error_from_win_error (error, GetLastError ());
00245 goto out4;
00246 }
00247
00248 if (!IsValidSid (console_user_sid))
00249 {
00250 dbus_set_error_const (error, DBUS_ERROR_FAILED, "Invalid SID");
00251 goto out4;
00252 }
00253
00254 retval = EqualSid (user_sid, console_user_sid);
00255
00256 out4:
00257 dbus_free (console_user_sid);
00258 out3:
00259 CloseWindowStation (winsta);
00260 out2:
00261 dbus_free (user_sid);
00262 out0:
00263 dbus_free (wusername);
00264
00265 return retval;
00266 #endif //DBUS_WINCE
00267 }
00268
00276 dbus_bool_t
00277 _dbus_delete_directory (const DBusString *filename,
00278 DBusError *error)
00279 {
00280 const char *filename_c;
00281
00282 _DBUS_ASSERT_ERROR_IS_CLEAR (error);
00283
00284 filename_c = _dbus_string_get_const_data (filename);
00285
00286 if (rmdir (filename_c) != 0)
00287 {
00288 dbus_set_error (error, DBUS_ERROR_FAILED,
00289 "Failed to remove directory %s: %s\n",
00290 filename_c, _dbus_strerror (errno));
00291 return FALSE;
00292 }
00293
00294 return TRUE;
00295 }
00296
00302 void
00303 _dbus_set_signal_handler (int sig,
00304 DBusSignalHandler handler)
00305 {
00306 _dbus_verbose ("_dbus_set_signal_handler() has to be implemented\n");
00307 }
00308
00314 dbus_bool_t
00315 _dbus_file_exists (const char *file)
00316 {
00317 HANDLE h = CreateFile(
00318 file,
00319 0,
00320 0,
00321 NULL,
00322 OPEN_EXISTING,
00323 FILE_ATTRIBUTE_NORMAL,
00324 NULL
00325 );
00326
00327
00328 if (h != INVALID_HANDLE_VALUE && GetLastError() != ERROR_PATH_NOT_FOUND)
00329 {
00330 CloseHandle(h);
00331 return TRUE;
00332 }
00333 else
00334 return FALSE;
00335 }
00336
00345 dbus_bool_t
00346 _dbus_stat(const DBusString *filename,
00347 DBusStat *statbuf,
00348 DBusError *error)
00349 {
00350 #ifdef DBUS_WINCE
00351 return TRUE;
00352
00353 #else
00354 const char *filename_c;
00355 #if !defined(DBUS_WIN) && !defined(DBUS_WINCE)
00356
00357 struct stat sb;
00358 #else
00359
00360 WIN32_FILE_ATTRIBUTE_DATA wfad;
00361 char *lastdot;
00362 DWORD rc;
00363 PSID owner_sid, group_sid;
00364 PSECURITY_DESCRIPTOR sd;
00365 #endif
00366
00367 _DBUS_ASSERT_ERROR_IS_CLEAR (error);
00368
00369 filename_c = _dbus_string_get_const_data (filename);
00370
00371 if (!GetFileAttributesEx (filename_c, GetFileExInfoStandard, &wfad))
00372 {
00373 _dbus_win_set_error_from_win_error (error, GetLastError ());
00374 return FALSE;
00375 }
00376
00377 if (wfad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
00378 statbuf->mode = _S_IFDIR;
00379 else
00380 statbuf->mode = _S_IFREG;
00381
00382 statbuf->mode |= _S_IREAD;
00383 if (wfad.dwFileAttributes & FILE_ATTRIBUTE_READONLY)
00384 statbuf->mode |= _S_IWRITE;
00385
00386 lastdot = strrchr (filename_c, '.');
00387 if (lastdot && stricmp (lastdot, ".exe") == 0)
00388 statbuf->mode |= _S_IEXEC;
00389
00390 statbuf->mode |= (statbuf->mode & 0700) >> 3;
00391 statbuf->mode |= (statbuf->mode & 0700) >> 6;
00392
00393 statbuf->nlink = 1;
00394
00395 sd = NULL;
00396 rc = GetNamedSecurityInfo ((char *) filename_c, SE_FILE_OBJECT,
00397 OWNER_SECURITY_INFORMATION |
00398 GROUP_SECURITY_INFORMATION,
00399 &owner_sid, &group_sid,
00400 NULL, NULL,
00401 &sd);
00402 if (rc != ERROR_SUCCESS)
00403 {
00404 _dbus_win_set_error_from_win_error (error, rc);
00405 if (sd != NULL)
00406 LocalFree (sd);
00407 return FALSE;
00408 }
00409
00410 #ifdef ENABLE_UID_TO_SID
00411
00412 statbuf->uid = _dbus_win_sid_to_uid_t (owner_sid);
00413 statbuf->gid = _dbus_win_sid_to_uid_t (group_sid);
00414 #endif
00415
00416 LocalFree (sd);
00417
00418 statbuf->size = ((dbus_int64_t) wfad.nFileSizeHigh << 32) + wfad.nFileSizeLow;
00419
00420 statbuf->atime =
00421 (((dbus_int64_t) wfad.ftLastAccessTime.dwHighDateTime << 32) +
00422 wfad.ftLastAccessTime.dwLowDateTime) / 10000000 - DBUS_INT64_CONSTANT (116444736000000000);
00423
00424 statbuf->mtime =
00425 (((dbus_int64_t) wfad.ftLastWriteTime.dwHighDateTime << 32) +
00426 wfad.ftLastWriteTime.dwLowDateTime) / 10000000 - DBUS_INT64_CONSTANT (116444736000000000);
00427
00428 statbuf->ctime =
00429 (((dbus_int64_t) wfad.ftCreationTime.dwHighDateTime << 32) +
00430 wfad.ftCreationTime.dwLowDateTime) / 10000000 - DBUS_INT64_CONSTANT (116444736000000000);
00431
00432 return TRUE;
00433 #endif //DBUS_WINCE
00434 }
00435
00436
00437 #ifdef HAVE_DIRENT_H
00438
00439
00440 #include <dirent.h>
00441 #define _dbus_opendir opendir
00442 #define _dbus_readdir readdir
00443 #define _dbus_closedir closedir
00444
00445 #else
00446
00447 #ifdef HAVE_IO_H
00448 #include <io.h>
00449 #endif
00450
00451 #include <sys/types.h>
00452 #include <stdlib.h>
00453
00454
00455
00456
00457
00458
00459
00460
00461
00462
00463
00464
00465
00466
00467
00468
00469
00470
00471
00472
00473
00474 #define HAVE_NO_D_NAMLEN
00475 #define HAVE_DD_LOCK
00476
00477 #define MAXNAMLEN 255
00478
00479 #define __dirfd(dir) (dir)->dd_fd
00480
00481
00482 struct dirent
00483 {
00484 long d_ino;
00485 off_t d_off;
00486 unsigned short d_reclen;
00487 char d_name[_MAX_FNAME+1];
00488 };
00489
00490
00491 typedef struct
00492 {
00493 long handle;
00494 short offset;
00495 short finished;
00496 struct _finddata_t fileinfo;
00497 char *dir;
00498 struct dirent dent;
00499 }
00500 DIR;
00501
00502
00503
00504
00505
00506
00507
00508
00509
00510
00511
00512
00513
00514
00515 DIR * _dbus_opendir(const char *dir)
00516 {
00517 DIR *dp;
00518 char *filespec;
00519 long handle;
00520 int index;
00521
00522 filespec = malloc(strlen(dir) + 2 + 1);
00523 strcpy(filespec, dir);
00524 index = strlen(filespec) - 1;
00525 if (index >= 0 && (filespec[index] == '/' || filespec[index] == '\\'))
00526 filespec[index] = '\0';
00527 strcat(filespec, "\\*");
00528
00529 dp = (DIR *)malloc(sizeof(DIR));
00530 dp->offset = 0;
00531 dp->finished = 0;
00532 dp->dir = strdup(dir);
00533
00534 if ((handle = _findfirst(filespec, &(dp->fileinfo))) < 0)
00535 {
00536 if (errno == ENOENT)
00537 dp->finished = 1;
00538 else
00539 return NULL;
00540 }
00541
00542 dp->handle = handle;
00543 free(filespec);
00544
00545 return dp;
00546 }
00547
00548 struct dirent * _dbus_readdir(DIR *dp)
00549 {
00550 if (!dp || dp->finished)
00551 return NULL;
00552
00553 if (dp->offset != 0)
00554 {
00555 if (_findnext(dp->handle, &(dp->fileinfo)) < 0)
00556 {
00557 dp->finished = 1;
00558 errno = 0;
00559 return NULL;
00560 }
00561 }
00562 dp->offset++;
00563
00564 strncpy(dp->dent.d_name, dp->fileinfo.name, _MAX_FNAME);
00565 dp->dent.d_ino = 1;
00566 dp->dent.d_reclen = strlen(dp->dent.d_name);
00567 dp->dent.d_off = dp->offset;
00568
00569 return &(dp->dent);
00570 }
00571
00572
00573 int _dbus_closedir(DIR *dp)
00574 {
00575 if (!dp)
00576 return 0;
00577 _findclose(dp->handle);
00578 if (dp->dir)
00579 free(dp->dir);
00580 if (dp)
00581 free(dp);
00582
00583 return 0;
00584 }
00585
00586 #endif //#ifdef HAVE_DIRENT_H
00587
00591 struct DBusDirIter
00592 {
00593 DIR *d;
00595 };
00596
00604 DBusDirIter*
00605 _dbus_directory_open (const DBusString *filename,
00606 DBusError *error)
00607 {
00608 DIR *d;
00609 DBusDirIter *iter;
00610 const char *filename_c;
00611
00612 _DBUS_ASSERT_ERROR_IS_CLEAR (error);
00613
00614 filename_c = _dbus_string_get_const_data (filename);
00615
00616 d = _dbus_opendir (filename_c);
00617 if (d == NULL)
00618 {
00619 dbus_set_error (error, _dbus_error_from_errno (errno),
00620 "Failed to read directory \"%s\": %s",
00621 filename_c,
00622 _dbus_strerror (errno));
00623 return NULL;
00624 }
00625 iter = dbus_new0 (DBusDirIter, 1);
00626 if (iter == NULL)
00627 {
00628 _dbus_closedir (d);
00629 dbus_set_error (error, DBUS_ERROR_NO_MEMORY,
00630 "Could not allocate memory for directory iterator");
00631 return NULL;
00632 }
00633
00634 iter->d = d;
00635
00636 return iter;
00637 }
00638
00652 dbus_bool_t
00653 _dbus_directory_get_next_file (DBusDirIter *iter,
00654 DBusString *filename,
00655 DBusError *error)
00656 {
00657 struct dirent *ent;
00658
00659 _DBUS_ASSERT_ERROR_IS_CLEAR (error);
00660
00661 again:
00662 errno = 0;
00663 ent = _dbus_readdir (iter->d);
00664 if (ent == NULL)
00665 {
00666 if (errno != 0)
00667 dbus_set_error (error,
00668 _dbus_error_from_errno (errno),
00669 "%s", _dbus_strerror (errno));
00670 return FALSE;
00671 }
00672 else if (ent->d_name[0] == '.' &&
00673 (ent->d_name[1] == '\0' ||
00674 (ent->d_name[1] == '.' && ent->d_name[2] == '\0')))
00675 goto again;
00676 else
00677 {
00678 _dbus_string_set_length (filename, 0);
00679 if (!_dbus_string_append (filename, ent->d_name))
00680 {
00681 dbus_set_error (error, DBUS_ERROR_NO_MEMORY,
00682 "No memory to read directory entry");
00683 return FALSE;
00684 }
00685 else
00686 return TRUE;
00687 }
00688 }
00689
00693 void
00694 _dbus_directory_close (DBusDirIter *iter)
00695 {
00696 _dbus_closedir (iter->d);
00697 dbus_free (iter);
00698 }
00699
00706 dbus_bool_t
00707 _dbus_path_is_absolute (const DBusString *filename)
00708 {
00709 if (_dbus_string_get_length (filename) > 0)
00710 return _dbus_string_get_byte (filename, 1) == ':'
00711 || _dbus_string_get_byte (filename, 0) == '\\'
00712 || _dbus_string_get_byte (filename, 0) == '/';
00713 else
00714 return FALSE;
00715 }
00716
00718
00730 dbus_bool_t
00731 _dbus_string_get_dirname(const DBusString *filename,
00732 DBusString *dirname)
00733 {
00734 int sep;
00735
00736 _dbus_assert (filename != dirname);
00737 _dbus_assert (filename != NULL);
00738 _dbus_assert (dirname != NULL);
00739
00740
00741 sep = _dbus_string_get_length (filename);
00742 if (sep == 0)
00743 return _dbus_string_append (dirname, ".");
00744
00745 while (sep > 0 &&
00746 (_dbus_string_get_byte (filename, sep - 1) == '/' ||
00747 _dbus_string_get_byte (filename, sep - 1) == '\\'))
00748 --sep;
00749
00750 _dbus_assert (sep >= 0);
00751
00752 if (sep == 0 ||
00753 (sep == 2 &&
00754 _dbus_string_get_byte (filename, 1) == ':' &&
00755 isalpha (_dbus_string_get_byte (filename, 0))))
00756 return _dbus_string_copy_len (filename, 0, sep + 1,
00757 dirname, _dbus_string_get_length (dirname));
00758
00759 {
00760 int sep1, sep2;
00761 _dbus_string_find_byte_backward (filename, sep, '/', &sep1);
00762 _dbus_string_find_byte_backward (filename, sep, '\\', &sep2);
00763
00764 sep = MAX (sep1, sep2);
00765 }
00766 if (sep < 0)
00767 return _dbus_string_append (dirname, ".");
00768
00769 while (sep > 0 &&
00770 (_dbus_string_get_byte (filename, sep - 1) == '/' ||
00771 _dbus_string_get_byte (filename, sep - 1) == '\\'))
00772 --sep;
00773
00774 _dbus_assert (sep >= 0);
00775
00776 if ((sep == 0 ||
00777 (sep == 2 &&
00778 _dbus_string_get_byte (filename, 1) == ':' &&
00779 isalpha (_dbus_string_get_byte (filename, 0))))
00780 &&
00781 (_dbus_string_get_byte (filename, sep) == '/' ||
00782 _dbus_string_get_byte (filename, sep) == '\\'))
00783 return _dbus_string_copy_len (filename, 0, sep + 1,
00784 dirname, _dbus_string_get_length (dirname));
00785 else
00786 return _dbus_string_copy_len (filename, 0, sep - 0,
00787 dirname, _dbus_string_get_length (dirname));
00788 }
00789
00790
00798 dbus_bool_t
00799 _dbus_unix_user_is_process_owner (dbus_uid_t uid)
00800 {
00801 return FALSE;
00802 }
00803
00804
00805
00806
00807
00817 dbus_bool_t
00818 _dbus_unix_user_is_at_console (dbus_uid_t uid,
00819 DBusError *error)
00820 {
00821 return FALSE;
00822 }
00823
00824
00833 dbus_bool_t
00834 _dbus_parse_unix_group_from_config (const DBusString *groupname,
00835 dbus_gid_t *gid_p)
00836 {
00837 return FALSE;
00838 }
00839
00848 dbus_bool_t
00849 _dbus_parse_unix_user_from_config (const DBusString *username,
00850 dbus_uid_t *uid_p)
00851 {
00852 return FALSE;
00853 }
00854
00855
00866 dbus_bool_t
00867 _dbus_unix_groups_from_uid (dbus_uid_t uid,
00868 dbus_gid_t **group_ids,
00869 int *n_group_ids)
00870 {
00871 return FALSE;
00872 }
00873
00874
00875
00877
00878
00879
00880
00881
00882
00883
00884
00892 void
00893 _dbus_win_set_error_from_win_error (DBusError *error,
00894 int code)
00895 {
00896 char *msg;
00897
00898
00899 FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER |
00900 FORMAT_MESSAGE_IGNORE_INSERTS |
00901 FORMAT_MESSAGE_FROM_SYSTEM,
00902 NULL, code, MAKELANGID (LANG_ENGLISH, SUBLANG_ENGLISH_US),
00903 (LPTSTR) &msg, 0, NULL);
00904 if (msg)
00905 {
00906 char *msg_copy;
00907
00908 msg_copy = dbus_malloc (strlen (msg));
00909 strcpy (msg_copy, msg);
00910 LocalFree (msg);
00911
00912 dbus_set_error (error, "win32.error", "%s", msg_copy);
00913 }
00914 else
00915 dbus_set_error (error, "win32.error", "Unknown error code %d or FormatMessage failed", code);
00916 }
00917
00918 void
00919 _dbus_win_warn_win_error (const char *message,
00920 int code)
00921 {
00922 DBusError error = DBUS_ERROR_INIT;
00923
00924 _dbus_win_set_error_from_win_error (&error, code);
00925 _dbus_warn ("%s: %s\n", message, error.message);
00926 dbus_error_free (&error);
00927 }
00928
00936 const char*
00937 _dbus_strerror (int error_number)
00938 {
00939 #ifdef DBUS_WINCE
00940
00941 return "unknown";
00942 #else
00943 const char *msg;
00944
00945 switch (error_number)
00946 {
00947 case WSAEINTR:
00948 return "Interrupted function call";
00949 case WSAEACCES:
00950 return "Permission denied";
00951 case WSAEFAULT:
00952 return "Bad address";
00953 case WSAEINVAL:
00954 return "Invalid argument";
00955 case WSAEMFILE:
00956 return "Too many open files";
00957 case WSAEWOULDBLOCK:
00958 return "Resource temporarily unavailable";
00959 case WSAEINPROGRESS:
00960 return "Operation now in progress";
00961 case WSAEALREADY:
00962 return "Operation already in progress";
00963 case WSAENOTSOCK:
00964 return "Socket operation on nonsocket";
00965 case WSAEDESTADDRREQ:
00966 return "Destination address required";
00967 case WSAEMSGSIZE:
00968 return "Message too long";
00969 case WSAEPROTOTYPE:
00970 return "Protocol wrong type for socket";
00971 case WSAENOPROTOOPT:
00972 return "Bad protocol option";
00973 case WSAEPROTONOSUPPORT:
00974 return "Protocol not supported";
00975 case WSAESOCKTNOSUPPORT:
00976 return "Socket type not supported";
00977 case WSAEOPNOTSUPP:
00978 return "Operation not supported";
00979 case WSAEPFNOSUPPORT:
00980 return "Protocol family not supported";
00981 case WSAEAFNOSUPPORT:
00982 return "Address family not supported by protocol family";
00983 case WSAEADDRINUSE:
00984 return "Address already in use";
00985 case WSAEADDRNOTAVAIL:
00986 return "Cannot assign requested address";
00987 case WSAENETDOWN:
00988 return "Network is down";
00989 case WSAENETUNREACH:
00990 return "Network is unreachable";
00991 case WSAENETRESET:
00992 return "Network dropped connection on reset";
00993 case WSAECONNABORTED:
00994 return "Software caused connection abort";
00995 case WSAECONNRESET:
00996 return "Connection reset by peer";
00997 case WSAENOBUFS:
00998 return "No buffer space available";
00999 case WSAEISCONN:
01000 return "Socket is already connected";
01001 case WSAENOTCONN:
01002 return "Socket is not connected";
01003 case WSAESHUTDOWN:
01004 return "Cannot send after socket shutdown";
01005 case WSAETIMEDOUT:
01006 return "Connection timed out";
01007 case WSAECONNREFUSED:
01008 return "Connection refused";
01009 case WSAEHOSTDOWN:
01010 return "Host is down";
01011 case WSAEHOSTUNREACH:
01012 return "No route to host";
01013 case WSAEPROCLIM:
01014 return "Too many processes";
01015 case WSAEDISCON:
01016 return "Graceful shutdown in progress";
01017 case WSATYPE_NOT_FOUND:
01018 return "Class type not found";
01019 case WSAHOST_NOT_FOUND:
01020 return "Host not found";
01021 case WSATRY_AGAIN:
01022 return "Nonauthoritative host not found";
01023 case WSANO_RECOVERY:
01024 return "This is a nonrecoverable error";
01025 case WSANO_DATA:
01026 return "Valid name, no data record of requested type";
01027 case WSA_INVALID_HANDLE:
01028 return "Specified event object handle is invalid";
01029 case WSA_INVALID_PARAMETER:
01030 return "One or more parameters are invalid";
01031 case WSA_IO_INCOMPLETE:
01032 return "Overlapped I/O event object not in signaled state";
01033 case WSA_IO_PENDING:
01034 return "Overlapped operations will complete later";
01035 case WSA_NOT_ENOUGH_MEMORY:
01036 return "Insufficient memory available";
01037 case WSA_OPERATION_ABORTED:
01038 return "Overlapped operation aborted";
01039 #ifdef WSAINVALIDPROCTABLE
01040
01041 case WSAINVALIDPROCTABLE:
01042 return "Invalid procedure table from service provider";
01043 #endif
01044 #ifdef WSAINVALIDPROVIDER
01045
01046 case WSAINVALIDPROVIDER:
01047 return "Invalid service provider version number";
01048 #endif
01049 #ifdef WSAPROVIDERFAILEDINIT
01050
01051 case WSAPROVIDERFAILEDINIT:
01052 return "Unable to initialize a service provider";
01053 #endif
01054
01055 case WSASYSCALLFAILURE:
01056 return "System call failure";
01057 }
01058 msg = strerror (error_number);
01059 if (msg == NULL)
01060 msg = "unknown";
01061
01062 return msg;
01063 #endif //DBUS_WINCE
01064 }
01065
01066
01067
01068
01069 const char*
01070 _dbus_lm_strerror(int error_number)
01071 {
01072 #ifdef DBUS_WINCE
01073
01074 return "unknown";
01075 #else
01076 const char *msg;
01077 switch (error_number)
01078 {
01079 case NERR_NetNotStarted:
01080 return "The workstation driver is not installed.";
01081 case NERR_UnknownServer:
01082 return "The server could not be located.";
01083 case NERR_ShareMem:
01084 return "An internal error occurred. The network cannot access a shared memory segment.";
01085 case NERR_NoNetworkResource:
01086 return "A network resource shortage occurred.";
01087 case NERR_RemoteOnly:
01088 return "This operation is not supported on workstations.";
01089 case NERR_DevNotRedirected:
01090 return "The device is not connected.";
01091 case NERR_ServerNotStarted:
01092 return "The Server service is not started.";
01093 case NERR_ItemNotFound:
01094 return "The queue is empty.";
01095 case NERR_UnknownDevDir:
01096 return "The device or directory does not exist.";
01097 case NERR_RedirectedPath:
01098 return "The operation is invalid on a redirected resource.";
01099 case NERR_DuplicateShare:
01100 return "The name has already been shared.";
01101 case NERR_NoRoom:
01102 return "The server is currently out of the requested resource.";
01103 case NERR_TooManyItems:
01104 return "Requested addition of items exceeds the maximum allowed.";
01105 case NERR_InvalidMaxUsers:
01106 return "The Peer service supports only two simultaneous users.";
01107 case NERR_BufTooSmall:
01108 return "The API return buffer is too small.";
01109 case NERR_RemoteErr:
01110 return "A remote API error occurred.";
01111 case NERR_LanmanIniError:
01112 return "An error occurred when opening or reading the configuration file.";
01113 case NERR_NetworkError:
01114 return "A general network error occurred.";
01115 case NERR_WkstaInconsistentState:
01116 return "The Workstation service is in an inconsistent state. Restart the computer before restarting the Workstation service.";
01117 case NERR_WkstaNotStarted:
01118 return "The Workstation service has not been started.";
01119 case NERR_BrowserNotStarted:
01120 return "The requested information is not available.";
01121 case NERR_InternalError:
01122 return "An internal error occurred.";
01123 case NERR_BadTransactConfig:
01124 return "The server is not configured for transactions.";
01125 case NERR_InvalidAPI:
01126 return "The requested API is not supported on the remote server.";
01127 case NERR_BadEventName:
01128 return "The event name is invalid.";
01129 case NERR_DupNameReboot:
01130 return "The computer name already exists on the network. Change it and restart the computer.";
01131 case NERR_CfgCompNotFound:
01132 return "The specified component could not be found in the configuration information.";
01133 case NERR_CfgParamNotFound:
01134 return "The specified parameter could not be found in the configuration information.";
01135 case NERR_LineTooLong:
01136 return "A line in the configuration file is too long.";
01137 case NERR_QNotFound:
01138 return "The printer does not exist.";
01139 case NERR_JobNotFound:
01140 return "The print job does not exist.";
01141 case NERR_DestNotFound:
01142 return "The printer destination cannot be found.";
01143 case NERR_DestExists:
01144 return "The printer destination already exists.";
01145 case NERR_QExists:
01146 return "The printer queue already exists.";
01147 case NERR_QNoRoom:
01148 return "No more printers can be added.";
01149 case NERR_JobNoRoom:
01150 return "No more print jobs can be added.";
01151 case NERR_DestNoRoom:
01152 return "No more printer destinations can be added.";
01153 case NERR_DestIdle:
01154 return "This printer destination is idle and cannot accept control operations.";
01155 case NERR_DestInvalidOp:
01156 return "This printer destination request contains an invalid control function.";
01157 case NERR_ProcNoRespond:
01158 return "The print processor is not responding.";
01159 case NERR_SpoolerNotLoaded:
01160 return "The spooler is not running.";
01161 case NERR_DestInvalidState:
01162 return "This operation cannot be performed on the print destination in its current state.";
01163 case NERR_QInvalidState:
01164 return "This operation cannot be performed on the printer queue in its current state.";
01165 case NERR_JobInvalidState:
01166 return "This operation cannot be performed on the print job in its current state.";
01167 case NERR_SpoolNoMemory:
01168 return "A spooler memory allocation failure occurred.";
01169 case NERR_DriverNotFound:
01170 return "The device driver does not exist.";
01171 case NERR_DataTypeInvalid:
01172 return "The data type is not supported by the print processor.";
01173 case NERR_ProcNotFound:
01174 return "The print processor is not installed.";
01175 case NERR_ServiceTableLocked:
01176 return "The service database is locked.";
01177 case NERR_ServiceTableFull:
01178 return "The service table is full.";
01179 case NERR_ServiceInstalled:
01180 return "The requested service has already been started.";
01181 case NERR_ServiceEntryLocked:
01182 return "The service does not respond to control actions.";
01183 case NERR_ServiceNotInstalled:
01184 return "The service has not been started.";
01185 case NERR_BadServiceName:
01186 return "The service name is invalid.";
01187 case NERR_ServiceCtlTimeout:
01188 return "The service is not responding to the control function.";
01189 case NERR_ServiceCtlBusy:
01190 return "The service control is busy.";
01191 case NERR_BadServiceProgName:
01192 return "The configuration file contains an invalid service program name.";
01193 case NERR_ServiceNotCtrl:
01194 return "The service could not be controlled in its present state.";
01195 case NERR_ServiceKillProc:
01196 return "The service ended abnormally.";
01197 case NERR_ServiceCtlNotValid:
01198 return "The requested pause or stop is not valid for this service.";
01199 case NERR_NotInDispatchTbl:
01200 return "The service control dispatcher could not find the service name in the dispatch table.";
01201 case NERR_BadControlRecv:
01202 return "The service control dispatcher pipe read failed.";
01203 case NERR_ServiceNotStarting:
01204 return "A thread for the new service could not be created.";
01205 case NERR_AlreadyLoggedOn:
01206 return "This workstation is already logged on to the local-area network.";
01207 case NERR_NotLoggedOn:
01208 return "The workstation is not logged on to the local-area network.";
01209 case NERR_BadUsername:
01210 return "The user name or group name parameter is invalid.";
01211 case NERR_BadPassword:
01212 return "The password parameter is invalid.";
01213 case NERR_UnableToAddName_W:
01214 return "@W The logon processor did not add the message alias.";
01215 case NERR_UnableToAddName_F:
01216 return "The logon processor did not add the message alias.";
01217 case NERR_UnableToDelName_W:
01218 return "@W The logoff processor did not delete the message alias.";
01219 case NERR_UnableToDelName_F:
01220 return "The logoff processor did not delete the message alias.";
01221 case NERR_LogonsPaused:
01222 return "Network logons are paused.";
01223 case NERR_LogonServerConflict:
01224 return "A centralized logon-server conflict occurred.";
01225 case NERR_LogonNoUserPath:
01226 return "The server is configured without a valid user path.";
01227 case NERR_LogonScriptError:
01228 return "An error occurred while loading or running the logon script.";
01229 case NERR_StandaloneLogon:
01230 return "The logon server was not specified. Your computer will be logged on as STANDALONE.";
01231 case NERR_LogonServerNotFound:
01232 return "The logon server could not be found.";
01233 case NERR_LogonDomainExists:
01234 return "There is already a logon domain for this computer.";
01235 case NERR_NonValidatedLogon:
01236 return "The logon server could not validate the logon.";
01237 case NERR_ACFNotFound:
01238 return "The security database could not be found.";
01239 case NERR_GroupNotFound:
01240 return "The group name could not be found.";
01241 case NERR_UserNotFound:
01242 return "The user name could not be found.";
01243 case NERR_ResourceNotFound:
01244 return "The resource name could not be found.";
01245 case NERR_GroupExists:
01246 return "The group already exists.";
01247 case NERR_UserExists:
01248 return "The user account already exists.";
01249 case NERR_ResourceExists:
01250 return "The resource permission list already exists.";
01251 case NERR_NotPrimary:
01252 return "This operation is only allowed on the primary domain controller of the domain.";
01253 case NERR_ACFNotLoaded:
01254 return "The security database has not been started.";
01255 case NERR_ACFNoRoom:
01256 return "There are too many names in the user accounts database.";
01257 case NERR_ACFFileIOFail:
01258 return "A disk I/O failure occurred.";
01259 case NERR_ACFTooManyLists:
01260 return "The limit of 64 entries per resource was exceeded.";
01261 case NERR_UserLogon:
01262 return "Deleting a user with a session is not allowed.";
01263 case NERR_ACFNoParent:
01264 return "The parent directory could not be located.";
01265 case NERR_CanNotGrowSegment:
01266 return "Unable to add to the security database session cache segment.";
01267 case NERR_SpeGroupOp:
01268 return "This operation is not allowed on this special group.";
01269 case NERR_NotInCache:
01270 return "This user is not cached in user accounts database session cache.";
01271 case NERR_UserInGroup:
01272 return "The user already belongs to this group.";
01273 case NERR_UserNotInGroup:
01274 return "The user does not belong to this group.";
01275 case NERR_AccountUndefined:
01276 return "This user account is undefined.";
01277 case NERR_AccountExpired:
01278 return "This user account has expired.";
01279 case NERR_InvalidWorkstation:
01280 return "The user is not allowed to log on from this workstation.";
01281 case NERR_InvalidLogonHours:
01282 return "The user is not allowed to log on at this time.";
01283 case NERR_PasswordExpired:
01284 return "The password of this user has expired.";
01285 case NERR_PasswordCantChange:
01286 return "The password of this user cannot change.";
01287 case NERR_PasswordHistConflict:
01288 return "This password cannot be used now.";
01289 case NERR_PasswordTooShort:
01290 return "The password does not meet the password policy requirements. Check the minimum password length, password complexity and password history requirements.";
01291 case NERR_PasswordTooRecent:
01292 return "The password of this user is too recent to change.";
01293 case NERR_InvalidDatabase:
01294 return "The security database is corrupted.";
01295 case NERR_DatabaseUpToDate:
01296 return "No updates are necessary to this replicant network/local security database.";
01297 case NERR_SyncRequired:
01298 return "This replicant database is outdated; synchronization is required.";
01299 case NERR_UseNotFound:
01300 return "The network connection could not be found.";
01301 case NERR_BadAsgType:
01302 return "This asg_type is invalid.";
01303 case NERR_DeviceIsShared:
01304 return "This device is currently being shared.";
01305 case NERR_NoComputerName:
01306 return "The computer name could not be added as a message alias. The name may already exist on the network.";
01307 case NERR_MsgAlreadyStarted:
01308 return "The Messenger service is already started.";
01309 case NERR_MsgInitFailed:
01310 return "The Messenger service failed to start.";
01311 case NERR_NameNotFound:
01312 return "The message alias could not be found on the network.";
01313 case NERR_AlreadyForwarded:
01314 return "This message alias has already been forwarded.";
01315 case NERR_AddForwarded:
01316 return "This message alias has been added but is still forwarded.";
01317 case NERR_AlreadyExists:
01318 return "This message alias already exists locally.";
01319 case NERR_TooManyNames:
01320 return "The maximum number of added message aliases has been exceeded.";
01321 case NERR_DelComputerName:
01322 return "The computer name could not be deleted.";
01323 case NERR_LocalForward:
01324 return "Messages cannot be forwarded back to the same workstation.";
01325 case NERR_GrpMsgProcessor:
01326 return "An error occurred in the domain message processor.";
01327 case NERR_PausedRemote:
01328 return "The message was sent, but the recipient has paused the Messenger service.";
01329 case NERR_BadReceive:
01330 return "The message was sent but not received.";
01331 case NERR_NameInUse:
01332 return "The message alias is currently in use. Try again later.";
01333 case NERR_MsgNotStarted:
01334 return "The Messenger service has not been started.";
01335 case NERR_NotLocalName:
01336 return "The name is not on the local computer.";
01337 case NERR_NoForwardName:
01338 return "The forwarded message alias could not be found on the network.";
01339 case NERR_RemoteFull:
01340 return "The message alias table on the remote station is full.";
01341 case NERR_NameNotForwarded:
01342 return "Messages for this alias are not currently being forwarded.";
01343 case NERR_TruncatedBroadcast:
01344 return "The broadcast message was truncated.";
01345 case NERR_InvalidDevice:
01346 return "This is an invalid device name.";
01347 case NERR_WriteFault:
01348 return "A write fault occurred.";
01349 case NERR_DuplicateName:
01350 return "A duplicate message alias exists on the network.";
01351 case NERR_DeleteLater:
01352 return "@W This message alias will be deleted later.";
01353 case NERR_IncompleteDel:
01354 return "The message alias was not successfully deleted from all networks.";
01355 case NERR_MultipleNets:
01356 return "This operation is not supported on computers with multiple networks.";
01357 case NERR_NetNameNotFound:
01358 return "This shared resource does not exist.";
01359 case NERR_DeviceNotShared:
01360 return "This device is not shared.";
01361 case NERR_ClientNameNotFound:
01362 return "A session does not exist with that computer name.";
01363 case NERR_FileIdNotFound:
01364 return "There is not an open file with that identification number.";
01365 case NERR_ExecFailure:
01366 return "A failure occurred when executing a remote administration command.";
01367 case NERR_TmpFile:
01368 return "A failure occurred when opening a remote temporary file.";
01369 case NERR_TooMuchData:
01370 return "The data returned from a remote administration command has been truncated to 64K.";
01371 case NERR_DeviceShareConflict:
01372 return "This device cannot be shared as both a spooled and a non-spooled resource.";
01373 case NERR_BrowserTableIncomplete:
01374 return "The information in the list of servers may be incorrect.";
01375 case NERR_NotLocalDomain:
01376 return "The computer is not active in this domain.";
01377 #ifdef NERR_IsDfsShare
01378
01379 case NERR_IsDfsShare:
01380 return "The share must be removed from the Distributed File System before it can be deleted.";
01381 #endif
01382
01383 case NERR_DevInvalidOpCode:
01384 return "The operation is invalid for this device.";
01385 case NERR_DevNotFound:
01386 return "This device cannot be shared.";
01387 case NERR_DevNotOpen:
01388 return "This device was not open.";
01389 case NERR_BadQueueDevString:
01390 return "This device name list is invalid.";
01391 case NERR_BadQueuePriority:
01392 return "The queue priority is invalid.";
01393 case NERR_NoCommDevs:
01394 return "There are no shared communication devices.";
01395 case NERR_QueueNotFound:
01396 return "The queue you specified does not exist.";
01397 case NERR_BadDevString:
01398 return "This list of devices is invalid.";
01399 case NERR_BadDev:
01400 return "The requested device is invalid.";
01401 case NERR_InUseBySpooler:
01402 return "This device is already in use by the spooler.";
01403 case NERR_CommDevInUse:
01404 return "This device is already in use as a communication device.";
01405 case NERR_InvalidComputer:
01406 return "This computer name is invalid.";
01407 case NERR_MaxLenExceeded:
01408 return "The string and prefix specified are too long.";
01409 case NERR_BadComponent:
01410 return "This path component is invalid.";
01411 case NERR_CantType:
01412 return "Could not determine the type of input.";
01413 case NERR_TooManyEntries:
01414 return "The buffer for types is not big enough.";
01415 case NERR_ProfileFileTooBig:
01416 return "Profile files cannot exceed 64K.";
01417 case NERR_ProfileOffset:
01418 return "The start offset is out of range.";
01419 case NERR_ProfileCleanup:
01420 return "The system cannot delete current connections to network resources.";
01421 case NERR_ProfileUnknownCmd:
01422 return "The system was unable to parse the command line in this file.";
01423 case NERR_ProfileLoadErr:
01424 return "An error occurred while loading the profile file.";
01425 case NERR_ProfileSaveErr:
01426 return "@W Errors occurred while saving the profile file. The profile was partially saved.";
01427 case NERR_LogOverflow:
01428 return "Log file %1 is full.";
01429 case NERR_LogFileChanged:
01430 return "This log file has changed between reads.";
01431 case NERR_LogFileCorrupt:
01432 return "Log file %1 is corrupt.";
01433 case NERR_SourceIsDir:
01434 return "The source path cannot be a directory.";
01435 case NERR_BadSource:
01436 return "The source path is illegal.";
01437 case NERR_BadDest:
01438 return "The destination path is illegal.";
01439 case NERR_DifferentServers:
01440 return "The source and destination paths are on different servers.";
01441 case NERR_RunSrvPaused:
01442 return "The Run server you requested is paused.";
01443 case NERR_ErrCommRunSrv:
01444 return "An error occurred when communicating with a Run server.";
01445 case NERR_ErrorExecingGhost:
01446 return "An error occurred when starting a background process.";
01447 case NERR_ShareNotFound:
01448 return "The shared resource you are connected to could not be found.";
01449 case NERR_InvalidLana:
01450 return "The LAN adapter number is invalid.";
01451 case NERR_OpenFiles:
01452 return "There are open files on the connection.";
01453 case NERR_ActiveConns:
01454 return "Active connections still exist.";
01455 case NERR_BadPasswordCore:
01456 return "This share name or password is invalid.";
01457 case NERR_DevInUse:
01458 return "The device is being accessed by an active process.";
01459 case NERR_LocalDrive:
01460 return "The drive letter is in use locally.";
01461 case NERR_AlertExists:
01462 return "The specified client is already registered for the specified event.";
01463 case NERR_TooManyAlerts:
01464 return "The alert table is full.";
01465 case NERR_NoSuchAlert:
01466 return "An invalid or nonexistent alert name was raised.";
01467 case NERR_BadRecipient:
01468 return "The alert recipient is invalid.";
01469 case NERR_AcctLimitExceeded:
01470 return "A user's session with this server has been deleted.";
01471 case NERR_InvalidLogSeek:
01472 return "The log file does not contain the requested record number.";
01473 case NERR_BadUasConfig:
01474 return "The user accounts database is not configured correctly.";
01475 case NERR_InvalidUASOp:
01476 return "This operation is not permitted when the Netlogon service is running.";
01477 case NERR_LastAdmin:
01478 return "This operation is not allowed on the last administrative account.";
01479 case NERR_DCNotFound:
01480 return "Could not find domain controller for this domain.";
01481 case NERR_LogonTrackingError:
01482 return "Could not set logon information for this user.";
01483 case NERR_NetlogonNotStarted:
01484 return "The Netlogon service has not been started.";
01485 case NERR_CanNotGrowUASFile:
01486 return "Unable to add to the user accounts database.";
01487 case NERR_TimeDiffAtDC:
01488 return "This server's clock is not synchronized with the primary domain controller's clock.";
01489 case NERR_PasswordMismatch:
01490 return "A password mismatch has been detected.";
01491 case NERR_NoSuchServer:
01492 return "The server identification does not specify a valid server.";
01493 case NERR_NoSuchSession:
01494 return "The session identification does not specify a valid session.";
01495 case NERR_NoSuchConnection:
01496 return "The connection identification does not specify a valid connection.";
01497 case NERR_TooManyServers:
01498 return "There is no space for another entry in the table of available servers.";
01499 case NERR_TooManySessions:
01500 return "The server has reached the maximum number of sessions it supports.";
01501 case NERR_TooManyConnections:
01502 return "The server has reached the maximum number of connections it supports.";
01503 case NERR_TooManyFiles:
01504 return "The server cannot open more files because it has reached its maximum number.";
01505 case NERR_NoAlternateServers:
01506 return "There are no alternate servers registered on this server.";
01507 case NERR_TryDownLevel:
01508 return "Try down-level (remote admin protocol) version of API instead.";
01509 case NERR_UPSDriverNotStarted:
01510 return "The UPS driver could not be accessed by the UPS service.";
01511 case NERR_UPSInvalidConfig:
01512 return "The UPS service is not configured correctly.";
01513 case NERR_UPSInvalidCommPort:
01514 return "The UPS service could not access the specified Comm Port.";
01515 case NERR_UPSSignalAsserted:
01516 return "The UPS indicated a line fail or low battery situation. Service not started.";
01517 case NERR_UPSShutdownFailed:
01518 return "The UPS service failed to perform a system shut down.";
01519 case NERR_BadDosRetCode:
01520 return "The program below returned an MS-DOS error code:";
01521 case NERR_ProgNeedsExtraMem:
01522 return "The program below needs more memory:";
01523 case NERR_BadDosFunction:
01524 return "The program below called an unsupported MS-DOS function:";
01525 case NERR_RemoteBootFailed:
01526 return "The workstation failed to boot.";
01527 case NERR_BadFileCheckSum:
01528 return "The file below is corrupt.";
01529 case NERR_NoRplBootSystem:
01530 return "No loader is specified in the boot-block definition file.";
01531 case NERR_RplLoadrNetBiosErr:
01532 return "NetBIOS returned an error: The NCB and SMB are dumped above.";
01533 case NERR_RplLoadrDiskErr:
01534 return "A disk I/O error occurred.";
01535 case NERR_ImageParamErr:
01536 return "Image parameter substitution failed.";
01537 case NERR_TooManyImageParams:
01538 return "Too many image parameters cross disk sector boundaries.";
01539 case NERR_NonDosFloppyUsed:
01540 return "The image was not generated from an MS-DOS diskette formatted with /S.";
01541 case NERR_RplBootRestart:
01542 return "Remote boot will be restarted later.";
01543 case NERR_RplSrvrCallFailed:
01544 return "The call to the Remoteboot server failed.";
01545 case NERR_CantConnectRplSrvr:
01546 return "Cannot connect to the Remoteboot server.";
01547 case NERR_CantOpenImageFile:
01548 return "Cannot open image file on the Remoteboot server.";
01549 case NERR_CallingRplSrvr:
01550 return "Connecting to the Remoteboot server...";
01551 case NERR_StartingRplBoot:
01552 return "Connecting to the Remoteboot server...";
01553 case NERR_RplBootServiceTerm:
01554 return "Remote boot service was stopped; check the error log for the cause of the problem.";
01555 case NERR_RplBootStartFailed:
01556 return "Remote boot startup failed; check the error log for the cause of the problem.";
01557 case NERR_RPL_CONNECTED:
01558 return "A second connection to a Remoteboot resource is not allowed.";
01559 case NERR_BrowserConfiguredToNotRun:
01560 return "The browser service was configured with MaintainServerList=No.";
01561 case NERR_RplNoAdaptersStarted:
01562 return "Service failed to start since none of the network adapters started with this service.";
01563 case NERR_RplBadRegistry:
01564 return "Service failed to start due to bad startup information in the registry.";
01565 case NERR_RplBadDatabase:
01566 return "Service failed to start because its database is absent or corrupt.";
01567 case NERR_RplRplfilesShare:
01568 return "Service failed to start because RPLFILES share is absent.";
01569 case NERR_RplNotRplServer:
01570 return "Service failed to start because RPLUSER group is absent.";
01571 case NERR_RplCannotEnum:
01572 return "Cannot enumerate service records.";
01573 case NERR_RplWkstaInfoCorrupted:
01574 return "Workstation record information has been corrupted.";
01575 case NERR_RplWkstaNotFound:
01576 return "Workstation record was not found.";
01577 case NERR_RplWkstaNameUnavailable:
01578 return "Workstation name is in use by some other workstation.";
01579 case NERR_RplProfileInfoCorrupted:
01580 return "Profile record information has been corrupted.";
01581 case NERR_RplProfileNotFound:
01582 return "Profile record was not found.";
01583 case NERR_RplProfileNameUnavailable:
01584 return "Profile name is in use by some other profile.";
01585 case NERR_RplProfileNotEmpty:
01586 return "There are workstations using this profile.";
01587 case NERR_RplConfigInfoCorrupted:
01588 return "Configuration record information has been corrupted.";
01589 case NERR_RplConfigNotFound:
01590 return "Configuration record was not found.";
01591 case NERR_RplAdapterInfoCorrupted:
01592 return "Adapter ID record information has been corrupted.";
01593 case NERR_RplInternal:
01594 return "An internal service error has occurred.";
01595 case NERR_RplVendorInfoCorrupted:
01596 return "Vendor ID record information has been corrupted.";
01597 case NERR_RplBootInfoCorrupted:
01598 return "Boot block record information has been corrupted.";
01599 case NERR_RplWkstaNeedsUserAcct:
01600 return "The user account for this workstation record is missing.";
01601 case NERR_RplNeedsRPLUSERAcct:
01602 return "The RPLUSER local group could not be found.";
01603 case NERR_RplBootNotFound:
01604 return "Boot block record was not found.";
01605 case NERR_RplIncompatibleProfile:
01606 return "Chosen profile is incompatible with this workstation.";
01607 case NERR_RplAdapterNameUnavailable:
01608 return "Chosen network adapter ID is in use by some other workstation.";
01609 case NERR_RplConfigNotEmpty:
01610 return "There are profiles using this configuration.";
01611 case NERR_RplBootInUse:
01612 return "There are workstations, profiles, or configurations using this boot block.";
01613 case NERR_RplBackupDatabase:
01614 return "Service failed to backup Remoteboot database.";
01615 case NERR_RplAdapterNotFound:
01616 return "Adapter record was not found.";
01617 case NERR_RplVendorNotFound:
01618 return "Vendor record was not found.";
01619 case NERR_RplVendorNameUnavailable:
01620 return "Vendor name is in use by some other vendor record.";
01621 case NERR_RplBootNameUnavailable:
01622 return "(boot name, vendor ID) is in use by some other boot block record.";
01623 case NERR_RplConfigNameUnavailable:
01624 return "Configuration name is in use by some other configuration.";
01625 case NERR_DfsInternalCorruption:
01626 return "The internal database maintained by the Dfs service is corrupt.";
01627 case NERR_DfsVolumeDataCorrupt:
01628 return "One of the records in the internal Dfs database is corrupt.";
01629 case NERR_DfsNoSuchVolume:
01630 return "There is no DFS name whose entry path matches the input Entry Path.";
01631 case NERR_DfsVolumeAlreadyExists:
01632 return "A root or link with the given name already exists.";
01633 case NERR_DfsAlreadyShared:
01634 return "The server share specified is already shared in the Dfs.";
01635 case NERR_DfsNoSuchShare:
01636 return "The indicated server share does not support the indicated DFS namespace.";
01637 case NERR_DfsNotALeafVolume:
01638 return "The operation is not valid on this portion of the namespace.";
01639 case NERR_DfsLeafVolume:
01640 return "The operation is not valid on this portion of the namespace.";
01641 case NERR_DfsVolumeHasMultipleServers:
01642 return "The operation is ambiguous because the link has multiple servers.";
01643 case NERR_DfsCantCreateJunctionPoint:
01644 return "Unable to create a link.";
01645 case NERR_DfsServerNotDfsAware:
01646 return "The server is not Dfs Aware.";
01647 case NERR_DfsBadRenamePath:
01648 return "The specified rename target path is invalid.";
01649 case NERR_DfsVolumeIsOffline:
01650 return "The specified DFS link is offline.";
01651 case NERR_DfsNoSuchServer:
01652 return "The specified server is not a server for this link.";
01653 case NERR_DfsCyclicalName:
01654 return "A cycle in the Dfs name was detected.";
01655 case NERR_DfsNotSupportedInServerDfs:
01656 return "The operation is not supported on a server-based Dfs.";
01657 case NERR_DfsDuplicateService:
01658 return "This link is already supported by the specified server-share.";
01659 case NERR_DfsCantRemoveLastServerShare:
01660 return "Can't remove the last server-share supporting this root or link.";
01661 case NERR_DfsVolumeIsInterDfs:
01662 return "The operation is not supported for an Inter-DFS link.";
01663 case NERR_DfsInconsistent:
01664 return "The internal state of the Dfs Service has become inconsistent.";
01665 case NERR_DfsServerUpgraded:
01666 return "The Dfs Service has been installed on the specified server.";
01667 case NERR_DfsDataIsIdentical:
01668 return "The Dfs data being reconciled is identical.";
01669 case NERR_DfsCantRemoveDfsRoot:
01670 return "The DFS root cannot be deleted. Uninstall DFS if required.";
01671 case NERR_DfsChildOrParentInDfs:
01672 return "A child or parent directory of the share is already in a Dfs.";
01673 case NERR_DfsInternalError:
01674 return "Dfs internal error.";
01675
01676 #if 0
01677
01678 case NERR_SetupAlreadyJoined:
01679 return "This machine is already joined to a domain.";
01680 case NERR_SetupNotJoined:
01681 return "This machine is not currently joined to a domain.";
01682 case NERR_SetupDomainController:
01683 return "This machine is a domain controller and cannot be unjoined from a domain.";
01684 case NERR_DefaultJoinRequired:
01685 return "The destination domain controller does not support creating machine accounts in OUs.";
01686 case NERR_InvalidWorkgroupName:
01687 return "The specified workgroup name is invalid.";
01688 case NERR_NameUsesIncompatibleCodePage:
01689 return "The specified computer name is incompatible with the default language used on the domain controller.";
01690 case NERR_ComputerAccountNotFound:
01691 return "The specified computer account could not be found.";
01692 case NERR_PersonalSku:
01693 return "This version of Windows cannot be joined to a domain.";
01694 case NERR_PasswordMustChange:
01695 return "The password must change at the next logon.";
01696 case NERR_AccountLockedOut:
01697 return "The account is locked out.";
01698 case NERR_PasswordTooLong:
01699 return "The password is too long.";
01700 case NERR_PasswordNotComplexEnough:
01701 return "The password does not meet the complexity policy.";
01702 case NERR_PasswordFilterError:
01703 return "The password does not meet the requirements of the password filter DLLs.";
01704 #endif
01705
01706 }
01707 msg = strerror (error_number);
01708 if (msg == NULL)
01709 msg = "unknown";
01710
01711 return msg;
01712 #endif //DBUS_WINCE
01713 }