summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@sernet.de>2007-12-01 21:31:52 +0100
committerVolker Lendecke <vl@sernet.de>2007-12-05 13:45:12 +0100
commit727746b8fb46a012e2ea901cffa5b91aec772f8d (patch)
treed0c63dda9eabd2aa6e6a1c9c42e11cddd72ddc3a /source3
parentdb1a23586a59e1b008c6c69cbf9d1f589a246ed2 (diff)
downloadsamba-727746b8fb46a012e2ea901cffa5b91aec772f8d.tar.gz
samba-727746b8fb46a012e2ea901cffa5b91aec772f8d.tar.bz2
samba-727746b8fb46a012e2ea901cffa5b91aec772f8d.zip
Reformatting, also allow quotas for transact_create
(This used to be commit 956aae7a57364debf724a7ef0bd0074119a24d24)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/nttrans.c50
1 files changed, 38 insertions, 12 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 397b634f13..8ea8e09433 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -682,23 +682,29 @@ void reply_ntcreate_and_X(connection_struct *conn,
* Check to see if this is a mac fork of some kind.
*/
- if( is_ntfs_stream_name(fname)) {
- enum FAKE_FILE_TYPE fake_file_type = is_fake_file(fname);
+ if (is_ntfs_stream_name(fname)) {
+ enum FAKE_FILE_TYPE fake_file_type;
+
+ fake_file_type = is_fake_file(fname);
+
if (fake_file_type!=FAKE_FILE_TYPE_NONE) {
/*
- * Here we go! support for changing the disk quotas --metze
+ * Here we go! support for changing the disk
+ * quotas --metze
*
- * We need to fake up to open this MAGIC QUOTA file
- * and return a valid FID.
+ * We need to fake up to open this MAGIC QUOTA
+ * file and return a valid FID.
*
- * w2k close this file directly after openening
- * xp also tries a QUERY_FILE_INFO on the file and then close it
+ * w2k close this file directly after
+ * openening xp also tries a QUERY_FILE_INFO
+ * on the file and then close it
*/
- reply_ntcreate_and_X_quota(conn, req,
- fake_file_type, fname);
- } else {
- reply_nterror(req, NT_STATUS_OBJECT_PATH_NOT_FOUND);
+ reply_ntcreate_and_X_quota(
+ conn, req, fake_file_type, fname);
+ END_PROFILE(SMBntcreateX);
+ return;
}
+ reply_nterror(req, NT_STATUS_OBJECT_PATH_NOT_FOUND);
END_PROFILE(SMBntcreateX);
return;
}
@@ -1474,7 +1480,27 @@ static void call_nt_transact_create(connection_struct *conn,
* Check to see if this is a mac fork of some kind.
*/
- if( is_ntfs_stream_name(fname)) {
+ if (is_ntfs_stream_name(fname)) {
+ enum FAKE_FILE_TYPE fake_file_type;
+
+ fake_file_type = is_fake_file(fname);
+
+ if (fake_file_type!=FAKE_FILE_TYPE_NONE) {
+ /*
+ * Here we go! support for changing the disk
+ * quotas --metze
+ *
+ * We need to fake up to open this MAGIC QUOTA
+ * file and return a valid FID.
+ *
+ * w2k close this file directly after
+ * openening xp also tries a QUERY_FILE_INFO
+ * on the file and then close it
+ */
+ reply_ntcreate_and_X_quota(
+ conn, req, fake_file_type, fname);
+ return;
+ }
reply_nterror(req, NT_STATUS_OBJECT_PATH_NOT_FOUND);
return;
}