Source code of Windows XP (NT5)
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.

106 lines
2.1 KiB

  1. /*--
  2. Copyright (c) 1996-1997 Microsoft Corporation
  3. Module Name:
  4. calcscom.h
  5. Abstract:
  6. Support routines for dacls/sacls exes
  7. Author:
  8. 14-Dec-1996 (macm)
  9. Environment:
  10. User mode only.
  11. Requires ANSI C extensions: slash-slash comments, long external names.
  12. Revision History:
  13. --*/
  14. #ifndef __CACLSCOM_H__
  15. #define __CACLSCON_H__
  16. #include <accctrl.h>
  17. typedef struct _CACLS_STR_RIGHTS_
  18. {
  19. CHAR szRightsTag[2];
  20. DWORD Right;
  21. PSTR pszDisplayTag;
  22. } CACLS_STR_RIGHTS, *PCACLS_STR_RIGHTS;
  23. typedef struct _CACLS_CMDLINE
  24. {
  25. PSTR pszSwitch;
  26. INT iIndex;
  27. BOOL fFindNextSwitch;
  28. DWORD cValues;
  29. } CACLS_CMDLINE, *PCACLS_CMDLINE;
  30. //
  31. // Function prototypes
  32. //
  33. DWORD
  34. ConvertCmdlineRights (
  35. IN PSTR pszCmdline,
  36. IN PCACLS_STR_RIGHTS pRightsTable,
  37. IN INT cRights,
  38. OUT DWORD *pConvertedRights
  39. );
  40. DWORD
  41. ParseCmdline (
  42. IN PSTR *ppszArgs,
  43. IN INT cArgs,
  44. IN INT cSkip,
  45. IN PCACLS_CMDLINE pCmdValues,
  46. IN INT cCmdValues
  47. );
  48. DWORD
  49. ProcessOperation (
  50. IN PSTR *ppszCmdline,
  51. IN PCACLS_CMDLINE pCmdInfo,
  52. IN ACCESS_MODE AccessMode,
  53. IN PCACLS_STR_RIGHTS pRightsTable,
  54. IN INT cRights,
  55. IN DWORD fInherit,
  56. IN PACL pOldAcl OPTIONAL,
  57. OUT PACL *ppNewAcl
  58. );
  59. DWORD
  60. SetAndPropagateFileRights (
  61. IN PSTR pszFilePath,
  62. IN PACL pAcl,
  63. IN SECURITY_INFORMATION SeInfo,
  64. IN BOOL fPropagate,
  65. IN BOOL fContinueOnDenied,
  66. IN BOOL fBreadthFirst,
  67. IN DWORD fInherit
  68. );
  69. DWORD
  70. DisplayAcl (
  71. IN PSTR pszPath,
  72. IN PACL pAcl,
  73. IN PCACLS_STR_RIGHTS pRightsTable,
  74. IN INT cRights
  75. );
  76. DWORD
  77. TranslateAccountName (
  78. IN PSID pSid,
  79. OUT PSTR *ppszName
  80. );
  81. #endif