00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _NTQUOTAS_H
00022 #define _NTQUOTAS_H
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #define QUOTAS_ENABLED 0x0001
00035 #define QUOTAS_DENY_DISK 0x0002
00036 #define QUOTAS_LOG_VIOLATIONS 0x0004
00037 #define CONTENT_INDEX_DISABLED 0x0008
00038 #define QUOTAS_LOG_THRESHOLD 0x0010
00039 #define QUOTAS_LOG_LIMIT 0x0020
00040 #define LOG_VOLUME_THRESHOLD 0x0040
00041 #define LOG_VOLUME_LIMIT 0x0080
00042 #define QUOTAS_INCOMPLETE 0x0100
00043 #define QUOTAS_REBUILDING 0x0200
00044 #define QUOTAS_0400 0x0400
00045 #define QUOTAS_0800 0x0800
00046 #define QUOTAS_1000 0x1000
00047 #define QUOTAS_2000 0x2000
00048 #define QUOTAS_4000 0x4000
00049 #define QUOTAS_8000 0x8000
00050
00051 #define SMB_NTQUOTAS_NO_LIMIT ((SMB_BIG_UINT)(-1))
00052 #define SMB_NTQUOTAS_NO_ENTRY ((SMB_BIG_UINT)(-2))
00053 #define SMB_NTQUOTAS_NO_SPACE ((SMB_BIG_UINT)(0))
00054 #define SMB_NTQUOTAS_1_B (SMB_BIG_UINT)0x0000000000000001
00055 #define SMB_NTQUOTAS_1KB (SMB_BIG_UINT)0x0000000000000400
00056 #define SMB_NTQUOTAS_1MB (SMB_BIG_UINT)0x0000000000100000
00057 #define SMB_NTQUOTAS_1GB (SMB_BIG_UINT)0x0000000040000000
00058 #define SMB_NTQUOTAS_1TB (SMB_BIG_UINT)0x0000010000000000
00059 #define SMB_NTQUOTAS_1PB (SMB_BIG_UINT)0x0004000000000000
00060 #define SMB_NTQUOTAS_1EB (SMB_BIG_UINT)0x1000000000000000
00061
00062 enum SMB_QUOTA_TYPE {
00063 SMB_INVALID_QUOTA_TYPE = -1,
00064 SMB_USER_FS_QUOTA_TYPE = 1,
00065 SMB_USER_QUOTA_TYPE = 2,
00066 SMB_GROUP_FS_QUOTA_TYPE = 3,
00067 SMB_GROUP_QUOTA_TYPE = 4
00068 };
00069
00070 typedef struct _SMB_NTQUOTA_STRUCT {
00071 enum SMB_QUOTA_TYPE qtype;
00072 SMB_BIG_UINT usedspace;
00073 SMB_BIG_UINT softlim;
00074 SMB_BIG_UINT hardlim;
00075 uint32 qflags;
00076 DOM_SID sid;
00077 } SMB_NTQUOTA_STRUCT;
00078
00079 typedef struct _SMB_NTQUOTA_LIST {
00080 struct _SMB_NTQUOTA_LIST *prev,*next;
00081 TALLOC_CTX *mem_ctx;
00082 uid_t uid;
00083 SMB_NTQUOTA_STRUCT *quotas;
00084 } SMB_NTQUOTA_LIST;
00085
00086 typedef struct _SMB_NTQUOTA_HANDLE {
00087 BOOL valid;
00088 SMB_NTQUOTA_LIST *quota_list;
00089 SMB_NTQUOTA_LIST *tmp_list;
00090 } SMB_NTQUOTA_HANDLE;
00091
00092 #define CHECK_NTQUOTA_HANDLE_OK(fsp,conn) (FNUM_OK(fsp,conn) &&\
00093 (fsp)->fake_file_handle &&\
00094 ((fsp)->fake_file_handle->type == FAKE_FILE_TYPE_QUOTA) &&\
00095 (fsp)->fake_file_handle->pd)
00096
00097 #endif