87 * ERRDOS/ERRbadfile
88 * ERRDOS/ERRnoaccess
89 * ERRDOS/ERRbadshare # returned by NT for files that are already open
90 * ERRHRD/ERRnowrite
91 * ERRSRV/ERRaccess
92 * ERRSRV/ERRinvdevice
93 * ERRSRV/ERRinvid
94 * ERRSRV/ERRbaduid
95 */
96 smb_sdrc_t
97 smb_pre_delete(smb_request_t *sr)
98 {
99 int rc;
100 smb_fqi_t *fqi;
101
102 fqi = &sr->arg.dirop.fqi;
103
104 if ((rc = smbsr_decode_vwv(sr, "w", &fqi->fq_sattr)) == 0)
105 rc = smbsr_decode_data(sr, "%S", sr, &fqi->fq_path.pn_path);
106
107 DTRACE_SMB_2(op__Delete__start, smb_request_t *, sr, smb_fqi_t *, fqi);
108
109 return ((rc == 0) ? SDRC_SUCCESS : SDRC_ERROR);
110 }
111
112 void
113 smb_post_delete(smb_request_t *sr)
114 {
115 DTRACE_SMB_1(op__Delete__done, smb_request_t *, sr);
116 }
117
118 /*
119 * smb_com_delete
120 *
121 * 1. intialize, pre-process and validate pathname
122 *
123 * 2. process the path to get directory node & last_comp,
124 * store these in fqi
125 * - If smb_pathname_reduce cannot find the specified path,
126 * the error (ENOTDIR) is translated to NT_STATUS_OBJECT_PATH_NOT_FOUND
127 * if the target is a single file (no wildcards). If there are
|
87 * ERRDOS/ERRbadfile
88 * ERRDOS/ERRnoaccess
89 * ERRDOS/ERRbadshare # returned by NT for files that are already open
90 * ERRHRD/ERRnowrite
91 * ERRSRV/ERRaccess
92 * ERRSRV/ERRinvdevice
93 * ERRSRV/ERRinvid
94 * ERRSRV/ERRbaduid
95 */
96 smb_sdrc_t
97 smb_pre_delete(smb_request_t *sr)
98 {
99 int rc;
100 smb_fqi_t *fqi;
101
102 fqi = &sr->arg.dirop.fqi;
103
104 if ((rc = smbsr_decode_vwv(sr, "w", &fqi->fq_sattr)) == 0)
105 rc = smbsr_decode_data(sr, "%S", sr, &fqi->fq_path.pn_path);
106
107 DTRACE_SMB_1(op__Delete__start, smb_request_t *, sr); /* arg.dirop */
108
109 return ((rc == 0) ? SDRC_SUCCESS : SDRC_ERROR);
110 }
111
112 void
113 smb_post_delete(smb_request_t *sr)
114 {
115 DTRACE_SMB_1(op__Delete__done, smb_request_t *, sr);
116 }
117
118 /*
119 * smb_com_delete
120 *
121 * 1. intialize, pre-process and validate pathname
122 *
123 * 2. process the path to get directory node & last_comp,
124 * store these in fqi
125 * - If smb_pathname_reduce cannot find the specified path,
126 * the error (ENOTDIR) is translated to NT_STATUS_OBJECT_PATH_NOT_FOUND
127 * if the target is a single file (no wildcards). If there are
|