summaryrefslogtreecommitdiff
path: root/source3/smbd/reply.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-04-11 02:20:56 +0000
committerAndrew Tridgell <tridge@samba.org>2002-04-11 02:20:56 +0000
commit9cd0306baa1b3a78b40ab97b5d199b90a4c34aa6 (patch)
treede86987bf008f56bc1e4130add688bce45d11cf9 /source3/smbd/reply.c
parentd3fa6d5de64f022eafd99b83d4853c86f8b2f46c (diff)
downloadsamba-9cd0306baa1b3a78b40ab97b5d199b90a4c34aa6.tar.gz
samba-9cd0306baa1b3a78b40ab97b5d199b90a4c34aa6.tar.bz2
samba-9cd0306baa1b3a78b40ab97b5d199b90a4c34aa6.zip
This split the mangling code up to allow for the possibility of multiple
mangling implementation, selectable using "mangling method = " in smb.conf It also tidies the interface a little, although it is still nasty. (This used to be commit be23d87a178e7d0691e7d942adf89bb3d2d533c2)
Diffstat (limited to 'source3/smbd/reply.c')
-rw-r--r--source3/smbd/reply.c43
1 files changed, 10 insertions, 33 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index f3b3ce4a8a..fbb981781f 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1300,8 +1300,8 @@ NTSTATUS unlink_internals(connection_struct *conn, int dirtype, char *name)
* Tine Smukavec <valentin.smukavec@hermes.si>.
*/
- if (!rc && is_mangled(mask))
- check_mangled_cache( mask );
+ if (!rc && mangle_is_mangled(mask))
+ mangle_check_cache( mask );
has_wild = ms_has_wild(mask);
@@ -1842,12 +1842,15 @@ int reply_writebraw(connection_struct *conn, char *inbuf,char *outbuf, int size,
/* we won't return a status if write through is not selected - this follows what WfWg does */
END_PROFILE(SMBwritebraw);
if (!write_through && total_written==tcount) {
+
+#if RABBIT_PELLET_FIX
/*
* Fix for "rabbit pellet" mode, trigger an early TCP ack by
* sending a SMBkeepalive. Thanks to DaveCB at Sun for this. JRA.
*/
if (!send_keepalive(smbd_server_fd()))
exit_server("reply_writebraw: send of keepalive failed");
+#endif
return(-1);
}
@@ -3022,21 +3025,8 @@ NTSTATUS rename_internals(connection_struct *conn, char *name, char *newname, BO
* Tine Smukavec <valentin.smukavec@hermes.si>.
*/
-#if 1
- if (!rc && is_mangled(mask))
- check_mangled_cache( mask );
-#else
- if (!rc)
- {
- char *unmangled;
-
- unmangled = dos_unmangle(mask);
- if (unmangled)
- strncpy(mask, unmangled, strlen(unmangled) + 1);
-
- SAFE_FREE(unmangled);
- }
-#endif
+ if (!rc && mangle_is_mangled(mask))
+ mangle_check_cache( mask );
has_wild = ms_has_wild(mask);
@@ -3044,7 +3034,7 @@ NTSTATUS rename_internals(connection_struct *conn, char *name, char *newname, BO
/*
* No wildcards - just process the one file.
*/
- BOOL is_short_name = is_8_3(name, True);
+ BOOL is_short_name = mangle_is_8_3(name, True);
/* Add a terminating '/' to the directory name. */
pstrcat(directory,"/");
@@ -3439,21 +3429,8 @@ int reply_copy(connection_struct *conn, char *inbuf,char *outbuf, int dum_size,
* Tine Smukavec <valentin.smukavec@hermes.si>.
*/
-#if 1
- if (!rc && is_mangled(mask))
- check_mangled_cache( mask );
-#else
- if (!rc)
- {
- char *unmangled;
-
- unmangled = dos_unmangle(mask);
- if (unmangled)
- strncpy(mask, unmangled, strlen(unmangled) + 1);
-
- SAFE_FREE(unmangled);
- }
-#endif
+ if (!rc && mangle_is_mangled(mask))
+ mangle_check_cache( mask );
has_wild = ms_has_wild(mask);