smb_delete.c revision da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0
6f51c802311fd81a409a26763ed45b28a3234d0dJakub Hrozek * CDDL HEADER START
6f51c802311fd81a409a26763ed45b28a3234d0dJakub Hrozek * The contents of this file are subject to the terms of the
6f51c802311fd81a409a26763ed45b28a3234d0dJakub Hrozek * Common Development and Distribution License (the "License").
6f51c802311fd81a409a26763ed45b28a3234d0dJakub Hrozek * You may not use this file except in compliance with the License.
6f51c802311fd81a409a26763ed45b28a3234d0dJakub Hrozek * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
03532fb1cbb7e8c1d5cf2e93aa3719f926631cabStephen Gallagher * See the License for the specific language governing permissions
8a2a49333b7df3a4b86db42cd20ec8286d2788d3Pavel Březina * and limitations under the License.
6f51c802311fd81a409a26763ed45b28a3234d0dJakub Hrozek * When distributing Covered Code, include this CDDL HEADER in each
6f51c802311fd81a409a26763ed45b28a3234d0dJakub Hrozek * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6f51c802311fd81a409a26763ed45b28a3234d0dJakub Hrozek * If applicable, add the following below this CDDL HEADER, with the
6f51c802311fd81a409a26763ed45b28a3234d0dJakub Hrozek * fields enclosed by brackets "[]" replaced with your own identifying
6f51c802311fd81a409a26763ed45b28a3234d0dJakub Hrozek * information: Portions Copyright [yyyy] [name of copyright owner]
6f51c802311fd81a409a26763ed45b28a3234d0dJakub Hrozek * CDDL HEADER END
46e44f86067b7f77c3f71cb7ac57456434e354dcStephen Gallagher * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
6ea6ec5cb7d9985e2730fb9d4657624d10aed4d8Nick Guay * Use is subject to license terms.
6f51c802311fd81a409a26763ed45b28a3234d0dJakub Hrozek#pragma ident "%Z%%M% %I% %E% SMI"
46e44f86067b7f77c3f71cb7ac57456434e354dcStephen Gallagherstatic DWORD smb_delete_check(struct smb_request *sr, struct smb_node *node,
9b3f37cb0c70c7b18c49b657e3799094a8711cadJakub Hrozekstatic DWORD smb_delete_share_check(struct smb_node *node);
5ef295d1cf410ceaa92c03a7843df8a36409f465Stephen Gallagher * smb_com_delete
* ERRDOS/ERRbadshare # returned by NT for files that are already open
int rc;
int od = 0;
int deleted = 0;
unsigned short sattr;
char *path;
char *name;
char *fname;
char *sname;
char *fullname;
int is_stream;
!= NT_STATUS_SUCCESS) {
goto delete_error;
if (is_stream) {
fullname, 0);
if (rc != 0) {
deleted++;
if (deleted == 0) {
goto delete_error;
return (SDRC_NORMAL_REPLY);
static DWORD
return (NT_STATUS_UNSUCCESSFUL);
return (NT_STATUS_UNSUCCESSFUL);
return (NT_STATUS_UNSUCCESSFUL);
return (NT_STATUS_UNSUCCESSFUL);
return (NT_STATUS_UNSUCCESSFUL);
return (NT_STATUS_SUCCESS);
static DWORD
return (NT_STATUS_SUCCESS);
return (NT_STATUS_SUCCESS);
while (file) {
DELETE)) {
return (NT_STATUS_SHARING_VIOLATION);
return (NT_STATUS_SUCCESS);