diff options
Diffstat (limited to 'usr/src/uts/common/smbsrv/cifs.h')
-rw-r--r-- | usr/src/uts/common/smbsrv/cifs.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/usr/src/uts/common/smbsrv/cifs.h b/usr/src/uts/common/smbsrv/cifs.h index 4533a21bb6..1f657a2d8c 100644 --- a/usr/src/uts/common/smbsrv/cifs.h +++ b/usr/src/uts/common/smbsrv/cifs.h @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2007 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -421,6 +421,23 @@ extern "C" { #define SMB_DA_WRITE_THROUGH 0x4000 /* + * Macros used for share reservation rule checking + */ + +#define SMB_DENY_READ(share_access) ((share_access & FILE_SHARE_READ) == 0) + +#define SMB_DENY_WRITE(share_access) ((share_access & FILE_SHARE_WRITE) == 0) + +#define SMB_DENY_DELETE(share_access) ((share_access & FILE_SHARE_DELETE) == 0) + +#define SMB_DENY_RW(share_access) \ + ((share_access & (FILE_SHARE_READ | FILE_SHARE_WRITE)) == 0) + +#define SMB_DENY_ALL(share_access) (share_access == 0) + +#define SMB_DENY_NONE(share_access) (share_access == FILE_SHARE_ALL) + +/* * The SMB open function determines what action should be taken depending * on the existence or lack thereof of files used in the operation. It * has the following mapping: |