Prefix VFS API macros with SMB_ for consistency and to avoid problems with VFS_ macro...
[tprouty/samba.git] / source / smbd / ntquotas.c
index f34d61541cea30e3137b1345c26cff608e4a697f..f6f14794816f1944a65cd75fe75ac37494afdee3 100644 (file)
@@ -74,7 +74,6 @@ int vfs_get_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, DOM_SID *psid,
        int ret;
        SMB_DISK_QUOTA D;
        unid_t id;
-       enum SID_NAME_USE sid_use = SID_NAME_USE_NONE;
 
        ZERO_STRUCT(D);
 
@@ -85,12 +84,12 @@ int vfs_get_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, DOM_SID *psid,
 
        id.uid = -1;
 
-       if (psid && !sid_to_uid(psid, &id.uid, &sid_use)) {
+       if (psid && NT_STATUS_IS_ERR(sid_to_uid(psid, &id.uid))) {
                DEBUG(0,("sid_to_uid: failed, SID[%s]\n",
                        sid_string_static(psid)));      
        }
 
-       ret = VFS_GET_QUOTA(fsp->conn, qtype, id, &D);
+       ret = SMB_VFS_GET_QUOTA(fsp->conn, qtype, id, &D);
 
        if (psid)
                qt->sid    = *psid;
@@ -113,7 +112,6 @@ int vfs_set_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, DOM_SID *psid,
        int ret;
        SMB_DISK_QUOTA D;
        unid_t id;
-       enum SID_NAME_USE sid_use = SID_NAME_USE_NONE;
        ZERO_STRUCT(D);
 
        if (!fsp||!fsp->conn||!qt)
@@ -133,12 +131,12 @@ int vfs_set_ntquota(files_struct *fsp, enum SMB_QUOTA_TYPE qtype, DOM_SID *psid,
        D.isoftlimit = limit_blk2inodes(D.softlimit);
        D.ihardlimit = limit_blk2inodes(D.hardlimit);
 
-       if (psid && !sid_to_uid(psid, &id.uid, &sid_use)) {
+       if (psid && NT_STATUS_IS_ERR(sid_to_uid(psid, &id.uid))) {
                DEBUG(0,("sid_to_uid: failed, SID[%s]\n",
                        sid_string_static(psid)));      
        }
 
-       ret = VFS_SET_QUOTA(fsp->conn, qtype, id, &D);
+       ret = SMB_VFS_SET_QUOTA(fsp->conn, qtype, id, &D);
        
        return ret;
 }
@@ -187,7 +185,7 @@ int vfs_get_user_ntquota_list(files_struct *fsp, SMB_NTQUOTA_LIST **qt_list)
                        continue;
                }
 
-               if (uid_to_sid(&sid,usr->pw_uid)==NULL) {
+               if (NT_STATUS_IS_ERR(uid_to_sid(&sid, usr->pw_uid))) {
                        DEBUG(0,("uid_to_sid failed for %d\n",usr->pw_uid));
                        continue;
                }