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.

99 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1991-1996 Microsoft Corporation
  3. Module Name:
  4. brsec.c
  5. Abstract:
  6. This module contains the Browser service support routines
  7. which create security objects and enforce security _access checking.
  8. Author:
  9. Cliff Van Dyke (CliffV) 22-Aug-1991
  10. Revision History:
  11. --*/
  12. #include "precomp.h"
  13. #pragma hdrstop
  14. //
  15. // Include brsec.h again allocating the actual variables
  16. // this time around.
  17. //
  18. #define BRSECURE_ALLOCATE
  19. #include "brsec.h"
  20. #undef BRSECURE_ALLOCATE
  21. NTSTATUS
  22. BrCreateBrowserObjects(
  23. VOID
  24. )
  25. /*++
  26. Routine Description:
  27. This function creates the workstation user-mode objects which are
  28. represented by security descriptors.
  29. Arguments:
  30. None.
  31. Return Value:
  32. NT status code
  33. --*/
  34. {
  35. NTSTATUS Status;
  36. //
  37. // Order matters! These ACEs are inserted into the DACL in the
  38. // following order. Security access is granted or denied based on
  39. // the order of the ACEs in the DACL.
  40. //
  41. //
  42. // Members of Group SECURITY_LOCAL aren't allowed to do a UAS logon
  43. // to force it to be done remotely.
  44. //
  45. ACE_DATA AceData[] = {
  46. {ACCESS_ALLOWED_ACE_TYPE, 0, 0,
  47. GENERIC_ALL, &AliasAdminsSid},
  48. {ACCESS_ALLOWED_ACE_TYPE, 0, 0,
  49. BROWSER_CONTROL_ACCESS, &AliasSystemOpsSid},
  50. {ACCESS_ALLOWED_ACE_TYPE, 0, 0,
  51. BROWSER_CONTROL_ACCESS, &LocalSystemSid},
  52. {ACCESS_ALLOWED_ACE_TYPE, 0, 0,
  53. BROWSER_QUERY_ACCESS, &WorldSid}
  54. };
  55. //
  56. // Actually create the security descriptor.
  57. //
  58. Status = NetpCreateSecurityObject(
  59. AceData,
  60. sizeof(AceData)/sizeof(AceData[0]),
  61. AliasAdminsSid,
  62. AliasAdminsSid,
  63. &BrGlobalBrowserInfoMapping,
  64. &BrGlobalBrowserSecurityDescriptor );
  65. return Status;
  66. }