home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip531.zip / win32 / nt.h < prev    next >
C/C++ Source or Header  |  1997-02-17  |  2KB  |  41 lines

  1. /* nt.h:  central header for EF_NTSD "SD" extra field */
  2.  
  3. #ifndef _NT_H
  4. #define _NT_H
  5.  
  6. #define EB_NTSD_MAX_VER_SUPPORT (0) /* maximum ver# we know how to handle */
  7.  
  8. #define EB_NTSD_C_LEN     4    /* length of central EB data */
  9. #define EB_NTSD_L_LEN     5    /* length of minimal local EB data */
  10. #define EB_NTSD_LSIZE     0    /* offset of (ulg) uncompressed SD data size */
  11. #define EB_NTSD_VERSION   4    /* offset of NTSD version byte */
  12. /*  ...followed by... */
  13. /*  SHORT CType;  compression type */
  14. /*  ULONG EACRC;  CRC value for uncompressed security descriptor data */
  15. /*  <var.> Variable length data */
  16.  
  17.  
  18. #define NTSD_BUFFERSIZE (1024)  /* threshold to cause malloc() */
  19. #define OVERRIDE_BACKUP     1   /* we have SeBackupPrivilege on remote */
  20. #define OVERRIDE_RESTORE    2   /* we have SeRestorePrivilege on remote */
  21. #define OVERRIDE_SACL       4   /* we have SeSystemSecurityPrivilege on remote */
  22.  
  23. typedef struct {
  24.     BOOL bValid;                /* are our contents valid? */
  25.     BOOL bProcessDefer;         /* process deferred entry yet? */
  26.     BOOL bUsePrivileges;        /* use privilege overrides? */
  27.     DWORD dwFileSystemFlags;    /* describes target file system */
  28.     BOOL bRemote;               /* is volume remote? */
  29.     DWORD dwRemotePrivileges;   /* relevant only on remote volumes */
  30.     DWORD dwFileAttributes;
  31.     char RootPath[MAX_PATH+1];  /* path to network / filesystem */
  32. } VOLUMECAPS, *PVOLUMECAPS, *LPVOLUMECAPS;
  33.  
  34. BOOL SecuritySet(char *resource, PVOLUMECAPS VolumeCaps, uch *securitydata);
  35. BOOL GetVolumeCaps(char *rootpath, char *name, PVOLUMECAPS VolumeCaps);
  36. BOOL ValidateSecurity(uch *securitydata);
  37. BOOL ProcessDefer(PDWORD dwDirectoryCount, PDWORD dwBytesProcessed,
  38.                   PDWORD dwDirectoryFail, PDWORD dwBytesFail);
  39.  
  40. #endif /* _NT_H */
  41.