Better isolate quota stuff
authorAlexander Bokovoy <ab@samba.org>
Mon, 12 May 2003 02:23:50 +0000 (02:23 +0000)
committerAlexander Bokovoy <ab@samba.org>
Mon, 12 May 2003 02:23:50 +0000 (02:23 +0000)
(This used to be commit 73de13159c57de21a59d2e32216812f5d9d2292e)

source3/smbd/ntquotas.c
source3/smbd/nttrans.c

index 85e1e137d9476ed976bbfdbfd0ed79f2db4bb4e3..d4e165e5ac5d635a3d4a699b9ac1a83d671766b7 100644 (file)
@@ -20,6 +20,8 @@
 
 #include "includes.h"
 
+#ifdef WITH_QUOTAS
+
 static SMB_BIG_UINT limit_nt2unix(SMB_BIG_UINT in, SMB_BIG_UINT bsize)
 {
        SMB_BIG_UINT ret = (SMB_BIG_UINT)0;
@@ -257,3 +259,5 @@ void destroy_quota_handle(void **pqt_handle)
 
        return;
 }
+
+#endif /* WITH_QUOTAS */
index c026ee9f58d055854f231ce65336ee35bf36a43a..e7c834f531d15e14fec7d9f685ad9b1eb19911ae 100644 (file)
@@ -691,6 +691,7 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib
 
                if( strchr_m(fname, ':')) {
                        
+#ifdef WITH_QUOTAS
                        if ((fake_file_type=is_fake_file(fname))!=0) {
                                /*
                                 * here we go! support for changing the disk quotas --metze
@@ -702,9 +703,12 @@ create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attrib
                                 * xp also tries a QUERY_FILE_INFO on the file and then close it
                                 */
                        } else {
+#endif
                                END_PROFILE(SMBntcreateX);
                                return ERROR_NT(NT_STATUS_OBJECT_PATH_NOT_FOUND);
+#ifdef WITH_QUOTAS
                        }
+#endif
                }
        }
        
@@ -1828,6 +1832,7 @@ static int call_nt_transact_ioctl(connection_struct *conn,
 }
 
 
+#ifdef WITH_QUOTAS
 /****************************************************************************
  Reply to get user quota 
 ****************************************************************************/
@@ -2197,6 +2202,7 @@ static int call_nt_transact_set_user_quota(connection_struct *conn,
 
        return -1;
 }
+#endif /* WITH_QUOTAS */
 
 /****************************************************************************
  Reply to a SMBNTtrans.
@@ -2441,6 +2447,7 @@ due to being in oplock break state.\n", (unsigned int)function_code ));
                                        &setup, &params, &data);
                        END_PROFILE_NESTED(NT_transact_query_security_desc);
                        break;
+#ifdef WITH_QUOTAS
                case NT_TRANSACT_GET_USER_QUOTA:
                        START_PROFILE_NESTED(NT_transact_get_user_quota);
                        outsize = call_nt_transact_get_user_quota(conn, inbuf, outbuf, 
@@ -2459,6 +2466,7 @@ due to being in oplock break state.\n", (unsigned int)function_code ));
                                                &data, data_count);
                        END_PROFILE_NESTED(NT_transact_set_user_quota);
                        break;                                  
+#endif /* WITH_QUOTAS */
                default:
                        /* Error in request */
                        DEBUG(0,("reply_nttrans: Unknown request %d in nttrans call\n", function_code));