s3/rpc_client: lookupsids error handling of NT_STATUS_NONE_MAPPED
[amitay/samba.git] / source3 / include / ntquotas.h
index 137f3a1381d7c4284cf3d526448594f980d8e3c2..6fbbbb9ae5f35890018a13dcdc1caf64326963df 100644 (file)
@@ -14,8 +14,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #ifndef _NTQUOTAS_H
 #define QUOTAS_4000            0x4000
 #define QUOTAS_8000            0x8000
 
-#define SMB_NTQUOTAS_NO_LIMIT  ((SMB_BIG_UINT)(-1))
-#define SMB_NTQUOTAS_NO_ENTRY  ((SMB_BIG_UINT)(-2))
-#define SMB_NTQUOTAS_NO_SPACE  ((SMB_BIG_UINT)(0))
-#define SMB_NTQUOTAS_1_B       (SMB_BIG_UINT)0x0000000000000001
-#define SMB_NTQUOTAS_1KB       (SMB_BIG_UINT)0x0000000000000400
-#define SMB_NTQUOTAS_1MB       (SMB_BIG_UINT)0x0000000000100000
-#define SMB_NTQUOTAS_1GB       (SMB_BIG_UINT)0x0000000040000000
-#define SMB_NTQUOTAS_1TB       (SMB_BIG_UINT)0x0000010000000000
-#define SMB_NTQUOTAS_1PB       (SMB_BIG_UINT)0x0004000000000000
-#define SMB_NTQUOTAS_1EB       (SMB_BIG_UINT)0x1000000000000000
+#define SMB_NTQUOTAS_NO_LIMIT  ((uint64_t)(-1))
+#define SMB_NTQUOTAS_NO_ENTRY  ((uint64_t)(-2))
+#define SMB_NTQUOTAS_NO_SPACE  ((uint64_t)(0))
+#define SMB_NTQUOTAS_1_B       (uint64_t)0x0000000000000001
+#define SMB_NTQUOTAS_1KB       (uint64_t)0x0000000000000400
+#define SMB_NTQUOTAS_1MB       (uint64_t)0x0000000000100000
+#define SMB_NTQUOTAS_1GB       (uint64_t)0x0000000040000000
+#define SMB_NTQUOTAS_1TB       (uint64_t)0x0000010000000000
+#define SMB_NTQUOTAS_1PB       (uint64_t)0x0004000000000000
+#define SMB_NTQUOTAS_1EB       (uint64_t)0x1000000000000000
 
 enum SMB_QUOTA_TYPE {
        SMB_INVALID_QUOTA_TYPE = -1,
        SMB_USER_FS_QUOTA_TYPE = 1,
        SMB_USER_QUOTA_TYPE = 2,
        SMB_GROUP_FS_QUOTA_TYPE = 3,/* not used yet */
-       SMB_GROUP_QUOTA_TYPE = 4 /* not in use yet, maybe for disk_free queries */
+       SMB_GROUP_QUOTA_TYPE = 4 /* used by disk_free queries */
 };
 
 typedef struct _SMB_NTQUOTA_STRUCT {
        enum SMB_QUOTA_TYPE qtype;
-       SMB_BIG_UINT usedspace;
-       SMB_BIG_UINT softlim;
-       SMB_BIG_UINT hardlim;
-       uint32 qflags;
-       DOM_SID sid;
+       uint64_t usedspace;
+       uint64_t softlim;
+       uint64_t hardlim;
+       uint32_t qflags;
+       struct dom_sid sid;
 } SMB_NTQUOTA_STRUCT;
 
 typedef struct _SMB_NTQUOTA_LIST {
@@ -84,14 +83,9 @@ typedef struct _SMB_NTQUOTA_LIST {
 } SMB_NTQUOTA_LIST;
 
 typedef struct _SMB_NTQUOTA_HANDLE {
-       BOOL valid;
+       bool valid;
        SMB_NTQUOTA_LIST *quota_list;
        SMB_NTQUOTA_LIST *tmp_list;
 } SMB_NTQUOTA_HANDLE;
 
-#define CHECK_NTQUOTA_HANDLE_OK(fsp,conn)      (FNUM_OK(fsp,conn) &&\
-        (fsp)->fake_file_handle &&\
-        ((fsp)->fake_file_handle->type == FAKE_FILE_TYPE_QUOTA) &&\
-        (fsp)->fake_file_handle->pd)
-
 #endif /*_NTQUOTAS_H */