From def41233b4ee342313cdcc9417dc5c04d053a18b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 9 Apr 2005 00:41:38 +0000 Subject: r6258: Fix found by OS/2 set_ea call. When setting specific info remember to terminate once we've done that and not "break" into the generic file metadata set code. Jeremy. (This used to be commit f1e12be9ed0ca0077bac8e5f32051758e1d84ad7) --- source3/smbd/trans2.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'source3/smbd/trans2.c') diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 8d673c25bd..1095e4ce75 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -3739,7 +3739,11 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char if (!NT_STATUS_IS_OK(status)) { return ERROR_NT(status); } - break; + + /* We're done. We only get EA info in this call. */ + SSVAL(params,0,0); + send_trans2_replies(outbuf, bufsize, params, 2, *ppdata, 0); + return(-1); } #if 0 @@ -3929,7 +3933,9 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char return ERROR_NT(status); } - break; + SSVAL(params,0,0); + send_trans2_replies(outbuf, bufsize, params, 2, *ppdata, 0); + return(-1); } case SMB_FILE_POSITION_INFORMATION: @@ -3949,9 +3955,14 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char #endif /* LARGE_SMB_OFF_T */ DEBUG(10,("call_trans2setfilepathinfo: Set file position information for file %s to %.0f\n", fname, (double)position_information )); - if (fsp) + if (fsp) { fsp->position_information = position_information; - break; + } + + /* We're done. We only get position info in this call. */ + SSVAL(params,0,0); + send_trans2_replies(outbuf, bufsize, params, 2, *ppdata, 0); + return(-1); } /* From tridge Samba4 : @@ -3971,7 +3982,11 @@ static int call_trans2setfilepathinfo(connection_struct *conn, char *inbuf, char if (mode != 0 && mode != 2 && mode != 4 && mode != 6) { return ERROR_NT(NT_STATUS_INVALID_PARAMETER); } - break; + + /* We're done. We only get mode info in this call. */ + SSVAL(params,0,0); + send_trans2_replies(outbuf, bufsize, params, 2, *ppdata, 0); + return(-1); } /* -- cgit