Author: jerry Date: 2007-05-03 16:57:54 +0000 (Thu, 03 May 2007) New Revision: 22649
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22649 Log: revert the objectID changes (for now) and leave these for 3.0.26 Modified: branches/SAMBA_3_0_25/source/include/ntioctl.h branches/SAMBA_3_0_25/source/smbd/nttrans.c branches/SAMBA_3_0_25/source/smbd/trans2.c Changeset: Modified: branches/SAMBA_3_0_25/source/include/ntioctl.h =================================================================== --- branches/SAMBA_3_0_25/source/include/ntioctl.h 2007-05-03 16:14:22 UTC (rev 22648) +++ branches/SAMBA_3_0_25/source/include/ntioctl.h 2007-05-03 16:57:54 UTC (rev 22649) @@ -47,7 +47,7 @@ #define FSCTL_SET_REPARSE_POINT 0x000900A4 #define FSCTL_GET_REPARSE_POINT 0x000900A8 #define FSCTL_DELETE_REPARSE_POINT 0x000900AC -#define FSCTL_CREATE_OR_GET_OBJECT_ID 0x000900C0 +#define FSCTL_0x000900C0 0x000900C0 #define FSCTL_SET_SPARSE 0x000900C4 #define FSCTL_SET_ZERO_DATA 0x000900C8 #define FSCTL_SET_ENCRYPTION 0x000900D7 Modified: branches/SAMBA_3_0_25/source/smbd/nttrans.c =================================================================== --- branches/SAMBA_3_0_25/source/smbd/nttrans.c 2007-05-03 16:14:22 UTC (rev 22648) +++ branches/SAMBA_3_0_25/source/smbd/nttrans.c 2007-05-03 16:57:54 UTC (rev 22649) @@ -2279,29 +2279,15 @@ 0); return -1; - case FSCTL_CREATE_OR_GET_OBJECT_ID: - { - unsigned char objid[16]; - - /* This should return the object-id on this file. - * I think I'll make this be the inode+dev. JRA. + case FSCTL_0x000900C0: + /* pretend this succeeded - don't know what this really is + but works ok like this --metze */ - DEBUG(10,("FSCTL_CREATE_OR_GET_OBJECT_ID: called on FID[0x%04X]\n",fidnum)); - - data_count = 64; - pdata = nttrans_realloc(ppdata, data_count); - if (pdata == NULL) { - return ERROR_NT(NT_STATUS_NO_MEMORY); - } - SINO_T_VAL(pdata,0,fsp->inode); - SDEV_T_VAL(pdata,8,fsp->dev); - memcpy(pdata+16,create_volume_objectid(conn,objid),16); - SINO_T_VAL(pdata,32,fsp->inode); - SDEV_T_VAL(pdata,40,fsp->dev); - send_nt_replies(outbuf, bufsize, NT_STATUS_OK, NULL, 0, pdata, data_count); + DEBUG(10,("FSCTL_0x000900C0: called on FID[0x%04X](but not implemented)\n",fidnum)); + send_nt_replies(outbuf, bufsize, NT_STATUS_OK, NULL, 0, NULL, + 0); return -1; - } case FSCTL_GET_REPARSE_POINT: /* pretend this fail - my winXP does it like this @@ -2309,7 +2295,9 @@ */ DEBUG(10,("FSCTL_GET_REPARSE_POINT: called on FID[0x%04X](but not implemented)\n",fidnum)); - return ERROR_NT(NT_STATUS_NOT_A_REPARSE_POINT); + send_nt_replies(outbuf, bufsize, NT_STATUS_NOT_A_REPARSE_POINT, + NULL, 0, NULL, 0); + return -1; case FSCTL_SET_REPARSE_POINT: /* pretend this fail - I'm assuming this because of the FSCTL_GET_REPARSE_POINT case. @@ -2317,7 +2305,9 @@ */ DEBUG(10,("FSCTL_SET_REPARSE_POINT: called on FID[0x%04X](but not implemented)\n",fidnum)); - return ERROR_NT(NT_STATUS_NOT_A_REPARSE_POINT); + send_nt_replies(outbuf, bufsize, NT_STATUS_NOT_A_REPARSE_POINT, + NULL, 0, NULL, 0); + return -1; case FSCTL_GET_SHADOW_COPY_DATA: /* don't know if this name is right...*/ { Modified: branches/SAMBA_3_0_25/source/smbd/trans2.c =================================================================== --- branches/SAMBA_3_0_25/source/smbd/trans2.c 2007-05-03 16:14:22 UTC (rev 22648) +++ branches/SAMBA_3_0_25/source/smbd/trans2.c 2007-05-03 16:57:54 UTC (rev 22649) @@ -2219,12 +2219,6 @@ return(-1); } -unsigned char *create_volume_objectid(connection_struct *conn, unsigned char objid[16]) -{ - E_md4hash(lp_servicename(SNUM(conn)),objid); - return objid; -} - /**************************************************************************** Reply to a TRANS2_QFSINFO (query filesystem info). ****************************************************************************/ @@ -2332,8 +2326,6 @@ SIVAL(pdata,0,FILE_CASE_PRESERVED_NAMES|FILE_CASE_SENSITIVE_SEARCH| (lp_nt_acl_support(SNUM(conn)) ? FILE_PERSISTENT_ACLS : 0)| - FILE_SUPPORTS_OBJECT_IDS| - FILE_UNICODE_ON_DISK| quota_flag); /* FS ATTRIBUTES */ SIVAL(pdata,4,255); /* Max filename component length */ @@ -2515,12 +2507,8 @@ } #endif /* HAVE_SYS_QUOTAS */ case SMB_FS_OBJECTID_INFORMATION: - { - unsigned char objid[16]; - memcpy(pdata,create_volume_objectid(conn, objid),16); data_len = 64; break; - } /* * Query the version and capabilities of the CIFS UNIX extensions @@ -3154,68 +3142,6 @@ } /**************************************************************************** - Reply to a TRANSACT2_QFILEINFO on a PIPE ! -****************************************************************************/ - -static int call_trans2qpipeinfo(connection_struct *conn, char *inbuf, char *outbuf, int length, int bufsize, - unsigned int tran_call, - char **pparams, int total_params, char **ppdata, int total_data, - unsigned int max_data_bytes) -{ - char *params = *pparams; - char *pdata = *ppdata; - unsigned int data_size = 0; - unsigned int param_size = 2; - uint16 info_level; - smb_np_struct *p_pipe = NULL; - - if (!params) { - return ERROR_NT(NT_STATUS_INVALID_PARAMETER); - } - - if (total_params < 4) { - return ERROR_NT(NT_STATUS_INVALID_PARAMETER); - } - - p_pipe = get_rpc_pipe_p(params,0); - if (p_pipe == NULL) { - return ERROR_NT(NT_STATUS_INVALID_HANDLE); - } - - info_level = SVAL(params,2); - - *pparams = (char *)SMB_REALLOC(*pparams,2); - if (*pparams == NULL) { - return ERROR_NT(NT_STATUS_NO_MEMORY); - } - params = *pparams; - SSVAL(params,0,0); - data_size = max_data_bytes + DIR_ENTRY_SAFETY_MARGIN; - *ppdata = (char *)SMB_REALLOC(*ppdata, data_size); - if (*ppdata == NULL ) { - return ERROR_NT(NT_STATUS_NO_MEMORY); - } - pdata = *ppdata; - - switch (info_level) { - case SMB_FILE_STANDARD_INFORMATION: - memset(pdata,24,0); - SOFF_T(pdata,0,4096LL); - SIVAL(pdata,16,1); - SIVAL(pdata,20,1); - data_size = 24; - break; - - default: - return ERROR_NT(NT_STATUS_INVALID_LEVEL); - } - - send_trans2_replies(outbuf, bufsize, params, param_size, *ppdata, data_size, max_data_bytes); - - return(-1); -} - -/**************************************************************************** Reply to a TRANS2_QFILEPATHINFO or TRANSACT2_QFILEINFO (query file info by file name or file id). ****************************************************************************/ @@ -3260,20 +3186,6 @@ return ERROR_NT(NT_STATUS_INVALID_PARAMETER); } - if (IS_IPC(conn)) { - return call_trans2qpipeinfo(conn, - inbuf, - outbuf, - length, - bufsize, - tran_call, - pparams, - total_params, - ppdata, - total_data, - max_data_bytes); - } - fsp = file_fsp(params,0); info_level = SVAL(params,2); @@ -6562,8 +6474,7 @@ } if (IS_IPC(conn) && (tran_call != TRANSACT2_OPEN) - && (tran_call != TRANSACT2_GET_DFS_REFERRAL) - && (tran_call != TRANSACT2_QFILEINFO)) { + && (tran_call != TRANSACT2_GET_DFS_REFERRAL)) { END_PROFILE(SMBtrans2); return ERROR_DOS(ERRSRV,ERRaccess); }