Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
1.8 KiB

  1. /*++
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. account.h
  5. Abstract:
  6. Security related function prototypes.
  7. Author:
  8. Rita Wong (ritaw) 10-Apr-1992
  9. Revision History:
  10. --*/
  11. #ifndef _SCACCOUNT_INCLUDED_
  12. #define _SCACCOUNT_INCLUDED_
  13. #define SC_LOCAL_DOMAIN_NAME L"."
  14. #define SC_LOCAL_DOMAIN_NAME_LENGTH (sizeof(SC_LOCAL_DOMAIN_NAME) / sizeof(WCHAR) - 1)
  15. #define SC_LOCAL_SYSTEM_USER_NAME L"LocalSystem"
  16. #define SC_LOCAL_NTAUTH_NAME L"NT AUTHORITY"
  17. #define SCDOMAIN_USERNAME_SEPARATOR L'\\'
  18. //
  19. // External global variables used by the lockapi.c module
  20. //
  21. extern UNICODE_STRING ScComputerName;
  22. extern UNICODE_STRING ScAccountDomain;
  23. BOOL
  24. ScGetComputerNameAndMutex(
  25. VOID
  26. );
  27. VOID
  28. ScEndServiceAccount(
  29. VOID
  30. );
  31. BOOL
  32. ScInitServiceAccount(
  33. VOID
  34. );
  35. DWORD
  36. ScCanonAccountName(
  37. IN LPWSTR AccountName,
  38. OUT LPWSTR *CanonAccountName
  39. );
  40. DWORD
  41. ScValidateAndSaveAccount(
  42. IN LPWSTR ServiceName,
  43. IN HKEY ServiceNameKey,
  44. IN LPWSTR CanonAccountName,
  45. IN LPWSTR Password OPTIONAL
  46. );
  47. DWORD
  48. ScValidateAndChangeAccount(
  49. IN LPSERVICE_RECORD ServiceRecord,
  50. IN HKEY ServiceNameKey,
  51. IN LPWSTR OldAccountName,
  52. IN LPWSTR CanonAccountName,
  53. IN LPWSTR Password OPTIONAL
  54. );
  55. VOID
  56. ScRemoveAccount(
  57. IN LPWSTR ServiceName
  58. );
  59. DWORD
  60. ScLookupServiceAccount(
  61. IN LPWSTR ServiceName,
  62. OUT LPWSTR *AccountName
  63. );
  64. DWORD
  65. ScLogonService(
  66. IN LPWSTR ServiceName,
  67. IN LPWSTR AccountName,
  68. OUT LPHANDLE ServiceToken,
  69. OUT LPHANDLE ProfileHandle OPTIONAL,
  70. OUT PSID *ServiceSid
  71. );
  72. DWORD
  73. ScGetAccountDomainInfo(
  74. VOID
  75. );
  76. #endif // _SCACCOUNT_INCLUDED_