From 0e8fd3398771da2f016d72830179507f3edda51b Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Sat, 4 May 1996 07:50:46 +0000 Subject: Initial version imported to CVS (This used to be commit 291551d80711daab7b7581720bcd9a08d6096517) --- source3/include/trans2.h | 241 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 241 insertions(+) create mode 100644 source3/include/trans2.h (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h new file mode 100644 index 0000000000..cc366ccaea --- /dev/null +++ b/source3/include/trans2.h @@ -0,0 +1,241 @@ +/* + Unix SMB/Netbios implementation. + Version 1.9. + SMB transaction2 handling + Copyright (C) Jeremy Allison 1994 + + Extensively modified by Andrew Tridgell, 1995 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#ifndef _TRANS2_H_ +#define _TRANS2_H_ + +/* Define the structures needed for the trans2 calls. */ + +/******************************************************* + For DosFindFirst/DosFindNext - level 1 + +MAXFILENAMELEN = 255; +FDATE == uint16 +FTIME == uint16 +ULONG == uint32 +USHORT == uint16 + +typedef struct _FILEFINDBUF { +Byte offset Type name description +-------------+-------+-------------------+-------------- +0 FDATE fdateCreation; +2 FTIME ftimeCreation; +4 FDATE fdateLastAccess; +6 FTIME ftimeLastAccess; +8 FDATE fdateLastWrite; +10 FTIME ftimeLastWrite; +12 ULONG cbFile file length in bytes +16 ULONG cbFileAlloc size of file allocation unit +20 USHORT attrFile +22 UCHAR cchName length of name to follow (not including zero) +23 UCHAR achName[MAXFILENAMELEN]; Null terminated name +} FILEFINDBUF; +*********************************************************/ + +#define l1_fdateCreation 0 +#define l1_fdateLastAccess 4 +#define l1_fdateLastWrite 8 +#define l1_cbFile 12 +#define l1_cbFileAlloc 16 +#define l1_attrFile 20 +#define l1_cchName 22 +#define l1_achName 23 + +/********************************************************** +For DosFindFirst/DosFindNext - level 2 + +typedef struct _FILEFINDBUF2 { +Byte offset Type name description +-------------+-------+-------------------+-------------- +0 FDATE fdateCreation; +2 FTIME ftimeCreation; +4 FDATE fdateLastAccess; +6 FTIME ftimeLastAccess; +8 FDATE fdateLastWrite; +10 FTIME ftimeLastWrite; +12 ULONG cbFile file length in bytes +16 ULONG cbFileAlloc size of file allocation unit +20 USHORT attrFile +22 ULONG cbList Extended attribute list (always 0) +26 UCHAR cchName length of name to follow (not including zero) +27 UCHAR achName[MAXFILENAMELEN]; Null terminated name +} FILEFINDBUF2; +*************************************************************/ + +#define l2_fdateCreation 0 +#define l2_fdateLastAccess 4 +#define l2_fdateLastWrite 8 +#define l2_cbFile 12 +#define l2_cbFileAlloc 16 +#define l2_attrFile 20 +#define l2_cbList 22 +#define l2_cchName 26 +#define l2_achName 27 + + +/********************************************************** +For DosFindFirst/DosFindNext - level 260 + +typedef struct _FILEFINDBUF260 { +Byte offset Type name description +-------------+-------+-------------------+-------------- +0 ULONG NextEntryOffset; +4 ULONG FileIndex; +8 LARGE_INTEGER CreationTime; +16 LARGE_INTEGER LastAccessTime; +24 LARGE_INTEGER LastWriteTime; +32 LARGE_INTEGER ChangeTime; +40 LARGE_INTEGER EndOfFile; +48 LARGE_INTEGER AllocationSize; +56 ULONG FileAttributes; +60 ULONG FileNameLength; +64 ULONG EaSize; +68 CHAR ShortNameLength; +70 UNICODE ShortName[12]; +94 UNICODE FileName[]; +*************************************************************/ + +#define l260_achName 94 + + +/********************************************************** +For DosQueryPathInfo/DosQueryFileInfo/DosSetPathInfo/ +DosSetFileInfo - level 1 + +typedef struct _FILESTATUS { +Byte offset Type name description +-------------+-------+-------------------+-------------- +0 FDATE fdateCreation; +2 FTIME ftimeCreation; +4 FDATE fdateLastAccess; +6 FTIME ftimeLastAccess; +8 FDATE fdateLastWrite; +10 FTIME ftimeLastWrite; +12 ULONG cbFile file length in bytes +16 ULONG cbFileAlloc size of file allocation unit +20 USHORT attrFile +} FILESTATUS; +*************************************************************/ + +/* Use the l1_ defines from DosFindFirst */ + +/********************************************************** +For DosQueryPathInfo/DosQueryFileInfo/DosSetPathInfo/ +DosSetFileInfo - level 2 + +typedef struct _FILESTATUS2 { +Byte offset Type name description +-------------+-------+-------------------+-------------- +0 FDATE fdateCreation; +2 FTIME ftimeCreation; +4 FDATE fdateLastAccess; +6 FTIME ftimeLastAccess; +8 FDATE fdateLastWrite; +10 FTIME ftimeLastWrite; +12 ULONG cbFile file length in bytes +16 ULONG cbFileAlloc size of file allocation unit +20 USHORT attrFile +22 ULONG cbList Length of EA's (0) +} FILESTATUS2; +*************************************************************/ + +/* Use the l2_ #defines from DosFindFirst */ + +/********************************************************** +For DosQFSInfo/DosSetFSInfo - level 1 + +typedef struct _FSALLOCATE { +Byte offset Type name description +-------------+-------+-------------------+-------------- +0 ULONG idFileSystem id of file system +4 ULONG cSectorUnit number of sectors per allocation unit +8 ULONG cUnit number of allocation units +12 ULONG cUnitAvail Available allocation units +16 USHORT cbSector bytes per sector +} FSALLOCATE; +*************************************************************/ + +#define l1_idFileSystem 0 +#define l1_cSectorUnit 4 +#define l1_cUnit 8 +#define l1_cUnitAvail 12 +#define l1_cbSector 16 + +/********************************************************** +For DosQFSInfo/DosSetFSInfo - level 2 + +typedef struct _FSINFO { +Byte offset Type name description +-------------+-------+-------------------+-------------- +0 FDATE vol_fdateCreation +2 FTIME vol_ftimeCreation +4 UCHAR vol_cch length of volume name (excluding NULL) +5 UCHAR vol_szVolLabel[12] volume name +} FSINFO; +*************************************************************/ + +#define SMB_QUERY_FS_LABEL_INFO 0x101 +#define SMB_QUERY_FS_VOLUME_INFO 0x102 +#define SMB_QUERY_FS_SIZE_INFO 0x103 +#define SMB_QUERY_FS_DEVICE_INFO 0x104 +#define SMB_QUERY_FS_ATTRIBUTE_INFO 0x105 + + +#define l2_vol_fdateCreation 0 +#define l2_vol_cch 4 +#define l2_vol_szVolLabel 5 + + +#define SMB_QUERY_FILE_BASIC_INFO 0x101 +#define SMB_QUERY_FILE_STANDARD_INFO 0x102 +#define SMB_QUERY_FILE_EA_INFO 0x103 +#define SMB_QUERY_FILE_NAME_INFO 0x104 +#define SMB_QUERY_FILE_ALLOCATION_INFO 0x105 +#define SMB_QUERY_FILE_END_OF_FILEINFO 0x106 +#define SMB_QUERY_FILE_ALL_INFO 0x107 +#define SMB_QUERY_FILE_ALT_NAME_INFO 0x108 +#define SMB_QUERY_FILE_STREAM_INFO 0x109 + +#define SMB_FIND_FILE_DIRECTORY_INFO 0x101 +#define SMB_FIND_FILE_FULL_DIRECTORY_INFO 0x102 +#define SMB_FIND_FILE_NAMES_INFO 0x103 +#define SMB_FIND_FILE_BOTH_DIRECTORY_INFO 0x104 + +#define SMB_SET_FILE_BASIC_INFO 0x101 +#define SMB_SET_FILE_DISPOSITION_INFO 0x102 +#define SMB_SET_FILE_ALLOCATION_INFO 0x103 +#define SMB_SET_FILE_END_OF_FILE_INFO 0x104 + +#define DIRLEN_GUESS (45+MAX(l1_achName,l2_achName)) + +/* Function prototypes */ + + +int reply_findnclose(char *inbuf,char *outbuf,int length,int bufsize); + +int reply_findclose(char *inbuf,char *outbuf,int length,int bufsize); + +#endif + + + -- cgit From df42b0a7bcdaae96035ecb1d434a66735358fd95 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Sun, 23 Feb 1997 05:18:09 +0000 Subject: Makefile: Added cleandir target. chgpasswd.c: Added patch from Roland Haag to allow password changes to be done more than once. loadparm.c: Added entries for the "directory mode/directory mask parameters". Changed default file mode to 644. proto.h: Added sys_gethostbyname. server.c: Added directory mode changes. system.c: Added sys_gethostbyname. trans2.c: Added NT_FILE_ATTRIBUTE_NORMAL patch from Roger Orr trans2.h: Defined NT_FILE_ATTRIBUTE_NORMAL for above patch. util.c: Changes calls to gethostbyname to sys_gethostbyname. jra@cygnus.com (This used to be commit d8d8a7ee00971fca7a8d079bfb547af107df35a4) --- source3/include/trans2.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index cc366ccaea..b99f1e6028 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -228,6 +228,11 @@ Byte offset Type name description #define DIRLEN_GUESS (45+MAX(l1_achName,l2_achName)) +/* NT uses a FILE_ATTRIBUTE_NORMAL when no other attributes + are set. */ + +#define NT_FILE_ATTRIBUTE_NORMAL 0x80 + /* Function prototypes */ -- cgit From 0f1f0ceb9519368188f695e18e2341ccfd1b2d15 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Thu, 8 May 1997 01:14:17 +0000 Subject: 'The mother of all checkins' :-). Jeremy Allison (jallison@whistle.com) Wed May 7 1997: Update for 1.9.17alpha1 release - 'browsefix release' designed to make browsing across subnets work. byteorder.h: Updated copyright to 1997. charcnv.c: Updated copyright to 1997. charset.c Updated copyright to 1997. charset.h Updated copyright to 1997. client.c Updated copyright to 1997. clientutil.c Updated copyright to 1997. dir.c Updated copyright to 1997. fault.c Updated copyright to 1997. includes.h Updated copyright to 1997. interface.c Updated copyright to 1997. ipc.c Updated copyright to 1997. kanji.c Updated copyright to 1997. kanji.h Updated copyright to 1997. loadparm.c Updated copyright to 1997. locking.c Updated copyright to 1997. mangle.c Updated copyright to 1997. message.c Updated copyright to 1997. nameannounce.c Made use of WINS subnet explicit. Added reset_announce_timer() so announcement can be made immediately when we become a master. Expanded code to do sync with dmb. namebrowse.c Removed redundent checks for AM_MASTER in sync code. Made use of WINS subnet explicit. namedbname.c Made use of WINS subnet explicit. namedbresp.c Made use of WINS subnet explicit. namedbserver.c Made use of WINS subnet explicit. namedbsubnet.c Explicitly add workgroup to WINS subnet when we become a dmb. Made use of WINS subnet explicit. namedbwork.c Made use of WINS subnet explicit. Removed redundent check_work_servertype() function. nameelect.c Explicitly add workgroup to WINS subnet when we become a master browser. Made use of WINS subnet explicit. namelogon.c Updated copyright to 1997. namepacket.c Updated copyright to 1997. namequery.c Updated copyright to 1997. nameresp.c Made use of WINS subnet explicit. Made nmbd fail if configured as master browser and one exists already. nameserv.c Made use of WINS subnet explicit. Remove redundent logon server and domain master code. nameserv.h Add emumerate subnet macros. nameservreply.c Made use of WINS subnet explicit. nameservresp.c Updated copyright to 1997. namework.c Made use of WINS subnet explicit. Updated code to add sync browser entries to add subnet parameter. nmbd.c Added sanity check for misconfigured nmbd. nmblib.c Updated copyright to 1997. nmblookup.c Updated copyright to 1997. nmbsync.c Removed redundent AM_ANY_MASTER check. params.c Updated copyright to 1997. password.c Updated copyright to 1997. pipes.c Updated copyright to 1997. predict.c Updated copyright to 1997. printing.c Updated copyright to 1997. proto.h Changed protos for new nmbd code. quotas.c Updated copyright to 1997. replace.c Updated copyright to 1997. reply.c Updated copyright to 1997. server.c Updated copyright to 1997. shmem.c Updated copyright to 1997. smb.h Updated copyright to 1997. smbencrypt.c Updated copyright to 1997. smbpasswd.c Updated copyright to 1997. smbrun.c Updated copyright to 1997. status.c Updated copyright to 1997. system.c Updated copyright to 1997. testparm.c Updated copyright to 1997. testprns.c Updated copyright to 1997. time.c Updated copyright to 1997. trans2.c Updated copyright to 1997. trans2.h Updated copyright to 1997. uid.c Updated copyright to 1997. username.c Updated copyright to 1997. util.c Updated copyright to 1997. version.h Changed to 1.9.17alpha1. (This used to be commit cf23a155a1315f50d488794a2caf88402bf3e3e6) --- source3/include/trans2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index b99f1e6028..70285358bc 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. SMB transaction2 handling - Copyright (C) Jeremy Allison 1994 + Copyright (C) Jeremy Allison 1994-1997 Extensively modified by Andrew Tridgell, 1995 -- cgit From f7f1be32757c386ea08f6dbf65a74457b2d4c6a9 Mon Sep 17 00:00:00 2001 From: Samba Release Account Date: Mon, 14 Jul 1997 18:19:26 +0000 Subject: CIFS definitions for SMB_INFO_xxx etc. lkcl (This used to be commit 9fda8a6fefd66a1c9f239e0dd41888af3555a22b) --- source3/include/trans2.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 70285358bc..9a2de63109 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -194,6 +194,11 @@ Byte offset Type name description } FSINFO; *************************************************************/ +#define SMB_INFO_STANDARD 1 +#define SMB_INFO_QUERY_EA_SIZE 2 +#define SMB_INFO_QUERY_EAS_FROM_LIST 3 +#define SMB_INFO_QUERY_ALL_EAS 4 +#define SMB_INFO_IS_NAME_VALID 6 #define SMB_QUERY_FS_LABEL_INFO 0x101 #define SMB_QUERY_FS_VOLUME_INFO 0x102 #define SMB_QUERY_FS_SIZE_INFO 0x103 -- cgit From c16d132bf95d96e2aa572cb9ba18a68abfbbeb8d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 23 Nov 1997 05:55:44 +0000 Subject: added some QPATHINFO and QFILEINFO tests into smbtorture. This tests for things like midnight access times, sticky create times and word reversed INFO_STANDARD returns (This used to be commit 89141de14edf9e46ab279d2a74a9b026716a0ba8) --- source3/include/trans2.h | 7 ------- 1 file changed, 7 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 9a2de63109..5218604e0e 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -238,13 +238,6 @@ Byte offset Type name description #define NT_FILE_ATTRIBUTE_NORMAL 0x80 -/* Function prototypes */ - - -int reply_findnclose(char *inbuf,char *outbuf,int length,int bufsize); - -int reply_findclose(char *inbuf,char *outbuf,int length,int bufsize); - #endif -- cgit From 55f400bd84f26027f5ec9b7fa06b22895de7557c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 22 Jan 1998 13:27:43 +0000 Subject: This is *not* a big change (although it looks like one). This is merely updating the Copyright statements from 1997 to 1998. It's a once a year thing :-). NO OTHER CHANGES WERE MADE. Jeremy. (This used to be commit b9c16977231efb274e08856f7f3f4408dad6d96c) --- source3/include/trans2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 5218604e0e..62b6a1a9bf 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. SMB transaction2 handling - Copyright (C) Jeremy Allison 1994-1997 + Copyright (C) Jeremy Allison 1994-1998 Extensively modified by Andrew Tridgell, 1995 -- cgit From 1d16f750515bcf49e0dc87394479dc56e7192538 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 26 May 1998 19:37:31 +0000 Subject: smb.h: More NT SMB stuff (just defines). smbpass.c: Do *NOT* make this function static. It breaks the compile on gcc util.c: Getting closer to MS wildcard semantics. A trailing '*' matches any trailing dot-separated components. trans2.c: Removed hacks that change multiple '?' -> '*' as this breaks things now. trans2.h: Removed NT_FILE_ATTRIBUTE_NORMAL - now FILE_ATTRIBUTE_NORMAL is defined in smb.h. Jeremy. (This used to be commit 42a65511068cd9006350c80bbed2f346f3f01cb0) --- source3/include/trans2.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 62b6a1a9bf..894823602e 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -233,11 +233,6 @@ Byte offset Type name description #define DIRLEN_GUESS (45+MAX(l1_achName,l2_achName)) -/* NT uses a FILE_ATTRIBUTE_NORMAL when no other attributes - are set. */ - -#define NT_FILE_ATTRIBUTE_NORMAL 0x80 - #endif -- cgit From 070b33489179d07ed76530ad52b828e6e708789d Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 16 Oct 1998 00:54:16 +0000 Subject: trans2.h: Added Thursby MAC extension. smbd/trans2.c: Added Thursby MAX extension. libsmb/clientgen.c: Fixed smbtorture lock code. Jeremy. (This used to be commit 514e52e4b4d6c7db7ebe2265e60c77b4f18d11b3) --- source3/include/trans2.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 894823602e..634244a193 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -231,6 +231,12 @@ Byte offset Type name description #define SMB_SET_FILE_ALLOCATION_INFO 0x103 #define SMB_SET_FILE_END_OF_FILE_INFO 0x104 +/* + * Thursby MAC extensions.... + */ + +#define SMB_MAC_QUERY_FS_INFO 0x301 + #define DIRLEN_GUESS (45+MAX(l1_achName,l2_achName)) #endif -- cgit From 3db52feb1f3b2c07ce0b06ad4a7099fa6efe3fc7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 13 Dec 1999 13:27:58 +0000 Subject: first pass at updating head branch to be to be the same as the SAMBA_2_0 branch (This used to be commit 453a822a76780063dff23526c35408866d0c0154) --- source3/include/trans2.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 634244a193..bbe796b742 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -239,6 +239,26 @@ Byte offset Type name description #define DIRLEN_GUESS (45+MAX(l1_achName,l2_achName)) +/* + * DeviceType and Characteristics returned in a + * SMB_QUERY_FS_DEVICE_INFO call. + */ + +#define DEVICETYPE_CD_ROM 0x2 +#define DEVICETYPE_CD_ROM_FILE_SYSTEM 0x3 +#define DEVICETYPE_DISK 0x7 +#define DEVICETYPE_DISK_FILE_SYSTEM 0x8 +#define DEVICETYPE_FILE_SYSTEM 0x9 + +/* Characteristics. */ +#define TYPE_REMOVABLE_MEDIA 0x1 +#define TYPE_READ_ONLY_DEVICE 0x2 +#define TYPE_FLOPPY 0x4 +#define TYPE_WORM 0x8 +#define TYPE_REMOTE 0x10 +#define TYPE_MOUNTED 0x20 +#define TYPE_VIRTUAL 0x40 + #endif -- cgit From 0055ee8cdc61d2ec1ca914cedb1f753b820c3bd5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 23 Aug 2001 22:58:24 +0000 Subject: Some W2k info. Jeremy. (This used to be commit 04478786c364585bf0263dc00343a25af6fa0a89) --- source3/include/trans2.h | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index bbe796b742..3bf6203710 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -259,6 +259,47 @@ Byte offset Type name description #define TYPE_MOUNTED 0x20 #define TYPE_VIRTUAL 0x40 +/* NT passthrough levels... */ + +#define SMB_FILE_DIRECTORY_INFORMATION 1001 +#define SMB_FILE_FULL_DIRECTORY_INFORMATION 1002 +#define SMB_FILE_BOTH_DIRECTORY_INFORMATION 1003 +#define SMB_FILE_BASIC_INFORMATION 1004 +#define SMB_FILE_STANDARD_INFORMATION 1005 +#define SMB_FILE_INTERNAL_INFORMATION 1006 +#define SMB_FILE_EA_INFORMATION 1007 +#define SMB_FILE_ACCESS_INFORMATION 1008 +#define SMB_FILE_NAME_INFORMATION 1009 +#define SMB_FILE_RENAME_INFORMATION 1010 +#define SMB_FILE_LINK_INFORMATION 1011 +#define SMB_FILE_NAMES_INFORMATION 1012 +#define SMB_FILE_DISPOSITION_INFORMATION 1013 +#define SMB_FILE_POSITION_INFORMATION 1014 +#define SMB_FILE_FULL_EA_INFORMATION 1015 +#define SMB_FILE_MODE_INFORMATION 1016 +#define SMB_FILE_ALIGNMENT_INFORMATION 1017 +#define SMB_FILE_ALL_INFORMATION 1018 +#define SMB_FILE_ALLOCATION_INFORMATION 1019 +#define SMB_FILE_END_OF_FILE_INFORMATION 1020 +#define SMB_FILE_ALTERNATE_NAME_INFORMATION 1021 +#define SMB_FILE_STREAM_INFORMATION 1022 +#define SMB_FILE_PIPE_INFORMATION 1023 +#define SMB_FILE_PIPE_LOCAL_INFORMATION 1024 +#define SMB_FILE_PIPE_REMOTE_INFORMATION 1025 +#define SMB_FILE_MAILSLOT_QUERY_INFORMATION 1026 +#define SMB_FILE_MAILSLOT_SET_INFORMATION 1027 +#define SMB_FILE_COMPRESSION_INFORMATION 1028 +#define SMB_FILE_OBJECTID_INFORMATION 1029 +#define SMB_FILE_COMPLETION_INFORMATION 1030 +#define SMB_FILE_MOVE_CLUSTER_INFORMATION 1031 +#define SMB_FILE_QUOTA_INFORMATION 1032 +#define SMB_FILE_REPARSEPOINT_INFORMATION 1033 +#define SMB_FILE_NETWORK_OPEN_INFORMATION 1034 +#define SMB_FILE_ATTRIBUTE_TAG_INFORMATION 1035 +#define SMB_FILE_TRACKING_INFORMATION 1036 +#define SMB_FILE_MAXIMUM_INFORMATION 1037 + + #endif -- cgit From 3454945146bdef0108f3a55fb32456cccf15f188 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 10 Jan 2002 00:28:09 +0000 Subject: Getting ready to add UNIX extensions in HEAD also. Jeremy (This used to be commit 6210d4aa196c944e47076e316980f76ac9c6b02d) --- source3/include/trans2.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 53 insertions(+), 1 deletion(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 3bf6203710..55b1670aa7 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -235,6 +235,14 @@ Byte offset Type name description * Thursby MAC extensions.... */ +/* + * MAC CIFS Extensions have the range 0x300 - 0x2FF reserved. + * Supposedly Microsoft have agreed to this. + */ + +#define MIN_MAC_INFO_LEVEL 0x300 +#define MAX_MAC_INFO_LEVEL 0x3FF + #define SMB_MAC_QUERY_FS_INFO 0x301 #define DIRLEN_GUESS (45+MAX(l1_achName,l2_achName)) @@ -299,8 +307,52 @@ Byte offset Type name description #define SMB_FILE_TRACKING_INFORMATION 1036 #define SMB_FILE_MAXIMUM_INFORMATION 1037 +/* UNIX CIFS Extensions - created by HP */ +/* + * UNIX CIFS Extensions have the range 0x200 - 0x2FF reserved. + * Supposedly Microsoft have agreed to this. + */ -#endif +#define MIN_UNIX_INFO_LEVEL 0x200 +#define MAX_UNIX_INFO_LEVEL 0x2FF +#define SMB_QUERY_FILE_UNIX_BASIC 0x200 /* UNIX File Info*/ +#define SMB_SET_FILE_UNIX_BASIC 0x200 +#define MODE_NO_CHANGE -1 /* file mode value which */ + /* means "don't change it" */ +/* + LARGE_INTEGER EndOfFile File size + LARGE_INTEGER Blocks Number of bytes used on disk (st_blocks). + LARGE_INTEGER CreationTime Creation time + LARGE_INTEGER LastAccessTime Last access time + LARGE_INTEGER LastModificationTime Last modification time + LARGE_INTEGER Uid Numeric user id for the owner + LARGE_INTEGER Gid Numeric group id of owner + ULONG Type Enumeration specifying the pathname type: + 0 -- File + 1 -- Directory + 2 -- Symbolic link + 3 -- Character device + 4 -- Block device + 5 -- FIFO (named pipe) + + LARGE_INTEGER devmajor Major device number if type is device + LARGE_INTEGER devminor Minor device number if type is device + LARGE_INTEGER uniqueid This is a server-assigned unique id for the file. The client + will typically map this onto an inode number. The scope of + uniqueness is the share. + LARGE_INTEGER permissions Standard UNIX file permissions + LARGE_INTEGER nlinks The number of directory entries that map to this entry + (number of hard links) + +*/ + +#define SMB_QUERY_FILE_UNIX_LINK 0x201 +#define SMB_SET_FILE_UNIX_LINK 0x201 +#define SMB_SET_FILE_UNIX_HLINK 0x203 + +#define SMB_FIND_FILE_UNIX 0x202 + +#endif -- cgit From 09571aa76d8c1f4994abe48e5dad4746a04c288b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 10 Jan 2002 01:49:09 +0000 Subject: We need to test for major/minor macros. Jeremy. (This used to be commit ee8c8add7f83d7a794546769c59c85ef8bb5b89a) --- source3/include/trans2.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 55b1670aa7..53f351d5cf 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -316,11 +316,21 @@ Byte offset Type name description #define MIN_UNIX_INFO_LEVEL 0x200 #define MAX_UNIX_INFO_LEVEL 0x2FF +#define INFO_LEVEL_IS_UNIX(level) (((level) >= MIN_UNIX_INFO_LEVEL) && ((level) <= MAX_UNIX_INFO_LEVEL)) + #define SMB_QUERY_FILE_UNIX_BASIC 0x200 /* UNIX File Info*/ #define SMB_SET_FILE_UNIX_BASIC 0x200 #define MODE_NO_CHANGE -1 /* file mode value which */ /* means "don't change it" */ +#define UNIX_TYPE_FILE 0 +#define UNIX_TYPE_DIR 1 +#define UNIX_TYPE_SYMLINK 2 +#define UNIX_TYPE_CHARDEV 3 +#define UNIX_TYPE_BLKDEV 4 +#define UNIX_TYPE_FIFO 5 +#define UNIX_TYPE_SOCKET 6 +#define UNIx_TYPE_UNKNOWN 0xFFFFFFFF /* LARGE_INTEGER EndOfFile File size @@ -337,6 +347,7 @@ Byte offset Type name description 3 -- Character device 4 -- Block device 5 -- FIFO (named pipe) + 6 -- Unix domain socket LARGE_INTEGER devmajor Major device number if type is device LARGE_INTEGER devminor Minor device number if type is device -- cgit From fd56ebd54f68433c9f764cf73e05dbe0649d0716 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 10 Jan 2002 02:18:08 +0000 Subject: Oh joy - the original code didn't do mapping of the perms onto the wire. Make it up as we go along... :-). Jeremy. (This used to be commit 4289fe3499e49c3ed356eff55ffbcfef4dca72af) --- source3/include/trans2.h | 52 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 41 insertions(+), 11 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 53f351d5cf..e05440c796 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -2,7 +2,7 @@ Unix SMB/Netbios implementation. Version 1.9. SMB transaction2 handling - Copyright (C) Jeremy Allison 1994-1998 + Copyright (C) Jeremy Allison 1994-2002. Extensively modified by Andrew Tridgell, 1995 @@ -323,15 +323,6 @@ Byte offset Type name description #define MODE_NO_CHANGE -1 /* file mode value which */ /* means "don't change it" */ -#define UNIX_TYPE_FILE 0 -#define UNIX_TYPE_DIR 1 -#define UNIX_TYPE_SYMLINK 2 -#define UNIX_TYPE_CHARDEV 3 -#define UNIX_TYPE_BLKDEV 4 -#define UNIX_TYPE_FIFO 5 -#define UNIX_TYPE_SOCKET 6 -#define UNIx_TYPE_UNKNOWN 0xFFFFFFFF - /* LARGE_INTEGER EndOfFile File size LARGE_INTEGER Blocks Number of bytes used on disk (st_blocks). @@ -354,12 +345,51 @@ Byte offset Type name description LARGE_INTEGER uniqueid This is a server-assigned unique id for the file. The client will typically map this onto an inode number. The scope of uniqueness is the share. - LARGE_INTEGER permissions Standard UNIX file permissions + LARGE_INTEGER permissions Standard UNIX file permissions - see below. LARGE_INTEGER nlinks The number of directory entries that map to this entry (number of hard links) */ +/* UNIX filetype mappings. */ + +#define UNIX_TYPE_FILE 0 +#define UNIX_TYPE_DIR 1 +#define UNIX_TYPE_SYMLINK 2 +#define UNIX_TYPE_CHARDEV 3 +#define UNIX_TYPE_BLKDEV 4 +#define UNIX_TYPE_FIFO 5 +#define UNIX_TYPE_SOCKET 6 +#define UNIX_TYPE_UNKNOWN 0xFFFFFFFF + +/* + * Oh this is fun. "Standard UNIX permissions" has no + * meaning in POSIX. We need to define the mapping onto + * and off the wire as this was not done in the original HP + * code. JRA. + */ + +#define UNIX_X_OTH 0000001 +#define UNIX_W_OTH 0000002 +#define UNIX_R_OTH 0000004 +#define UNIX_X_GRP 0000010 +#define UNIX_W_GRP 0000020 +#define UNIX_R_GRP 0000040 +#define UNIX_X_USR 0000100 +#define UNIX_W_USR 0000200 +#define UNIX_R_USR 0000400 +#define UNIX_STICKY 0001000 +#define UNIX_SET_GID 0002000 +#define UNIX_SET_UID 0004000 + +/* Masks for the above */ +#define UNIX_OTH_MASK 0000007 +#define UNIX_GRP_MASK 0000070 +#define UNIX_USR_MASK 0000700 +#define UNIX_PERM_MASK 0000777 +#define UNIX_EXTRA_MASK 0007000 +#define UNIX_ALL_MASK 0007777 + #define SMB_QUERY_FILE_UNIX_LINK 0x201 #define SMB_SET_FILE_UNIX_LINK 0x201 #define SMB_SET_FILE_UNIX_HLINK 0x203 -- cgit From 493e6e6f47b020f12ec45dd106d8f1fa6e2f9636 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 16 Jan 2002 02:42:47 +0000 Subject: At leadt don't lose this - I need to re-sync trans2.c between 2.2.x and HEAD soon. Jeremy. (This used to be commit 2f57257558b67b4a5106fece269ce55643464683) --- source3/include/trans2.h | 93 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 66 insertions(+), 27 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index e05440c796..067607e1cb 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -307,6 +307,17 @@ Byte offset Type name description #define SMB_FILE_TRACKING_INFORMATION 1036 #define SMB_FILE_MAXIMUM_INFORMATION 1037 +/* NT passthough levels for qfsinfo. */ + +#define SMB_FS_VOLUME_INFORMATION 1001 +#define SMB_FS_LABEL_INFORMATION 1002 +#define SMB_FS_SIZE_INFORMATION 1003 +#define SMB_FS_DEVICE_INFORMATION 1004 +#define SMB_FS_ATTRIBUTE_INFORMATION 1005 +#define SMB_FS_CONTROL_INFORMATION 1006 +#define SMB_FS_FULL_SIZE_INFORMATION 1007 +#define SMB_FS_OBJECTID_INFORMATION 1008 + /* UNIX CIFS Extensions - created by HP */ /* * UNIX CIFS Extensions have the range 0x200 - 0x2FF reserved. @@ -321,34 +332,39 @@ Byte offset Type name description #define SMB_QUERY_FILE_UNIX_BASIC 0x200 /* UNIX File Info*/ #define SMB_SET_FILE_UNIX_BASIC 0x200 -#define MODE_NO_CHANGE -1 /* file mode value which */ +#define MODE_NO_CHANGE 0xFFFFFFFF /* file mode value which */ /* means "don't change it" */ -/* - LARGE_INTEGER EndOfFile File size - LARGE_INTEGER Blocks Number of bytes used on disk (st_blocks). - LARGE_INTEGER CreationTime Creation time - LARGE_INTEGER LastAccessTime Last access time - LARGE_INTEGER LastModificationTime Last modification time - LARGE_INTEGER Uid Numeric user id for the owner - LARGE_INTEGER Gid Numeric group id of owner - ULONG Type Enumeration specifying the pathname type: - 0 -- File - 1 -- Directory - 2 -- Symbolic link - 3 -- Character device - 4 -- Block device - 5 -- FIFO (named pipe) - 6 -- Unix domain socket - - LARGE_INTEGER devmajor Major device number if type is device - LARGE_INTEGER devminor Minor device number if type is device - LARGE_INTEGER uniqueid This is a server-assigned unique id for the file. The client - will typically map this onto an inode number. The scope of - uniqueness is the share. - LARGE_INTEGER permissions Standard UNIX file permissions - see below. - LARGE_INTEGER nlinks The number of directory entries that map to this entry - (number of hard links) +#define UID_NO_CHANGE 0xFFFFFFFF +#define GID_NO_CHANGE 0xFFFFFFFF +/* +Offset Size Name +0 LARGE_INTEGER EndOfFile File size +8 LARGE_INTEGER Blocks Number of bytes used on disk (st_blocks). +16 LARGE_INTEGER CreationTime Creation time +24 LARGE_INTEGER LastAccessTime Last access time +32 LARGE_INTEGER LastModificationTime Last modification time +40 LARGE_INTEGER Uid Numeric user id for the owner +48 LARGE_INTEGER Gid Numeric group id of owner +56 ULONG Type Enumeration specifying the pathname type: + 0 -- File + 1 -- Directory + 2 -- Symbolic link + 3 -- Character device + 4 -- Block device + 5 -- FIFO (named pipe) + 6 -- Unix domain socket + +60 LARGE_INTEGER devmajor Major device number if type is device +68 LARGE_INTEGER devminor Minor device number if type is device +76 LARGE_INTEGER uniqueid This is a server-assigned unique id for the file. The client + will typically map this onto an inode number. The scope of + uniqueness is the share. +84 LARGE_INTEGER permissions Standard UNIX file permissions - see below. +92 LARGE_INTEGER nlinks The number of directory entries that map to this entry + (number of hard links) + +100 - end. */ /* UNIX filetype mappings. */ @@ -366,7 +382,7 @@ Byte offset Type name description * Oh this is fun. "Standard UNIX permissions" has no * meaning in POSIX. We need to define the mapping onto * and off the wire as this was not done in the original HP - * code. JRA. + * spec. JRA. */ #define UNIX_X_OTH 0000001 @@ -396,4 +412,27 @@ Byte offset Type name description #define SMB_FIND_FILE_UNIX 0x202 +/* + Info level for QVOLINFO - returns version of CIFS UNIX extensions, plus + 64-bits worth of capability fun :-). +*/ + +#define SMB_CIFS_UNIX_QUERY_INFO 0x200 + +/* Returns the following. + + UINT16 major version number + UINT16 minor version number + LARGE_INTEGER capability bitfield + +*/ + +#define CIFS_UNIX_MAJOR_VERSION 1 +#define CIFS_UNIX_MINOR_VERSION 0 + +#define CIFS_UNIX_FCNTL_LOCKS_CAP 0x1 +#define CIFS_UNIX_POSIX_ACLS_CAP 0x2 + +/* ... more as we think of them :-). */ + #endif -- cgit From 5cf6457bcc1182eac99f5618b647153707fa41ab Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 16 Jan 2002 23:32:10 +0000 Subject: Merged in %S fixes and XX_NOT_CHANGED fixes from 2.2. Jeremy. (This used to be commit 0fcca6c627a5c9c2219ec9714df5e0bc1a44cc29) --- source3/include/trans2.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 067607e1cb..7d35e9a5b6 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -332,10 +332,10 @@ Byte offset Type name description #define SMB_QUERY_FILE_UNIX_BASIC 0x200 /* UNIX File Info*/ #define SMB_SET_FILE_UNIX_BASIC 0x200 -#define MODE_NO_CHANGE 0xFFFFFFFF /* file mode value which */ +#define SMB_MODE_NO_CHANGE 0xFFFFFFFF /* file mode value which */ /* means "don't change it" */ -#define UID_NO_CHANGE 0xFFFFFFFF -#define GID_NO_CHANGE 0xFFFFFFFF +#define SMB_UID_NO_CHANGE 0xFFFFFFFF +#define SMB_GID_NO_CHANGE 0xFFFFFFFF /* Offset Size Name -- cgit From cd68afe31256ad60748b34f7318a180cfc2127cc Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 30 Jan 2002 06:08:46 +0000 Subject: Removed version number from file header. Changed "SMB/Netbios" to "SMB/CIFS" in file header. (This used to be commit 6a58c9bd06d0d7502a24bf5ce5a2faf0a146edfa) --- source3/include/trans2.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 7d35e9a5b6..3a6fe6e9ee 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -1,6 +1,5 @@ /* - Unix SMB/Netbios implementation. - Version 1.9. + Unix SMB/CIFS implementation. SMB transaction2 handling Copyright (C) Jeremy Allison 1994-2002. -- cgit From e90b65284812aaa5ff9e9935ce9bbad7791cbbcd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 15 Jul 2002 10:35:28 +0000 Subject: updated the 3.0 branch from the head branch - ready for alpha18 (This used to be commit 03ac082dcb375b6f3ca3d810a6a6367542bc23ce) --- source3/include/trans2.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 3a6fe6e9ee..fb265fdb1a 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -230,6 +230,10 @@ Byte offset Type name description #define SMB_SET_FILE_ALLOCATION_INFO 0x103 #define SMB_SET_FILE_END_OF_FILE_INFO 0x104 +/* Query FS info. */ +#define SMB_INFO_ALLOCATION 1 +#define SMB_INFO_VOLUME 2 + /* * Thursby MAC extensions.... */ @@ -336,6 +340,12 @@ Byte offset Type name description #define SMB_UID_NO_CHANGE 0xFFFFFFFF #define SMB_GID_NO_CHANGE 0xFFFFFFFF +#define SMB_SIZE_NO_CHANGE_LO 0xFFFFFFFF +#define SMB_SIZE_NO_CHANGE_HI 0xFFFFFFFF + +#define SMB_TIME_NO_CHANGE_LO 0xFFFFFFFF +#define SMB_TIME_NO_CHANGE_HI 0xFFFFFFFF + /* Offset Size Name 0 LARGE_INTEGER EndOfFile File size @@ -416,7 +426,7 @@ Offset Size Name 64-bits worth of capability fun :-). */ -#define SMB_CIFS_UNIX_QUERY_INFO 0x200 +#define SMB_QUERY_CIFS_UNIX_INFO 0x200 /* Returns the following. -- cgit From a834a73e341059be154426390304a42e4a011f72 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Wed, 25 Sep 2002 15:19:00 +0000 Subject: sync'ing up for 3.0alpha20 release (This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139) --- source3/include/trans2.h | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index fb265fdb1a..3468d3b995 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -193,16 +193,19 @@ Byte offset Type name description } FSINFO; *************************************************************/ -#define SMB_INFO_STANDARD 1 -#define SMB_INFO_QUERY_EA_SIZE 2 -#define SMB_INFO_QUERY_EAS_FROM_LIST 3 -#define SMB_INFO_QUERY_ALL_EAS 4 +#define SMB_INFO_STANDARD 1 /* FILESTATUS3 struct */ +#define SMB_INFO_SET_EA 2 /* EAOP2 struct, only valid on set not query */ +#define SMB_INFO_QUERY_EA_SIZE 2 /* FILESTATUS4 struct, only valid on query not set */ +#define SMB_INFO_QUERY_EAS_FROM_LIST 3 /* only valid on query not set */ +#define SMB_INFO_QUERY_ALL_EAS 4 /* only valid on query not set */ #define SMB_INFO_IS_NAME_VALID 6 -#define SMB_QUERY_FS_LABEL_INFO 0x101 -#define SMB_QUERY_FS_VOLUME_INFO 0x102 -#define SMB_QUERY_FS_SIZE_INFO 0x103 -#define SMB_QUERY_FS_DEVICE_INFO 0x104 -#define SMB_QUERY_FS_ATTRIBUTE_INFO 0x105 +#define SMB_INFO_STANDARD_LONG 11 /* similar to level 1, ie struct FileStatus3 */ +#define SMB_QUERY_EA_SIZE_LONG 12 /* similar to level 2, ie struct FileStatus4 */ +#define SMB_QUERY_FS_LABEL_INFO 0x101 +#define SMB_QUERY_FS_VOLUME_INFO 0x102 +#define SMB_QUERY_FS_SIZE_INFO 0x103 +#define SMB_QUERY_FS_DEVICE_INFO 0x104 +#define SMB_QUERY_FS_ATTRIBUTE_INFO 0x105 #define l2_vol_fdateCreation 0 -- cgit From d15cd357c702aaad4093f770d557b61a4e12f3a0 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 15 Apr 2003 19:51:17 +0000 Subject: merge in metze' smbcquotas patch from HEAD (This used to be commit b6a77048886151435a4a5eeb9a04be44d397c504) --- source3/include/trans2.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 3468d3b995..2ccf83478b 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -206,7 +206,9 @@ Byte offset Type name description #define SMB_QUERY_FS_SIZE_INFO 0x103 #define SMB_QUERY_FS_DEVICE_INFO 0x104 #define SMB_QUERY_FS_ATTRIBUTE_INFO 0x105 - +#if 0 +#define SMB_QUERY_FS_QUOTA_INFO +#endif #define l2_vol_fdateCreation 0 #define l2_vol_cch 4 @@ -320,7 +322,7 @@ Byte offset Type name description #define SMB_FS_SIZE_INFORMATION 1003 #define SMB_FS_DEVICE_INFORMATION 1004 #define SMB_FS_ATTRIBUTE_INFORMATION 1005 -#define SMB_FS_CONTROL_INFORMATION 1006 +#define SMB_FS_QUOTA_INFORMATION 1006 #define SMB_FS_FULL_SIZE_INFORMATION 1007 #define SMB_FS_OBJECTID_INFORMATION 1008 -- cgit From 3db0d893f3d3b16cf0402c049e0534a23d9ccd75 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 1 Jun 2003 13:43:21 +0000 Subject: added the COMPRESSION_INFO trans2 QFILEINFO level and fixed the IS_NAME_VALID QPATHINFO level (This used to be commit 1634346e2a6e73af80d4e68d50c6398fb24869a5) --- source3/include/trans2.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 2ccf83478b..eb5b1bc79f 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -224,6 +224,7 @@ Byte offset Type name description #define SMB_QUERY_FILE_ALL_INFO 0x107 #define SMB_QUERY_FILE_ALT_NAME_INFO 0x108 #define SMB_QUERY_FILE_STREAM_INFO 0x109 +#define SMB_QUERY_COMPRESSION_INFO 0x10b #define SMB_FIND_FILE_DIRECTORY_INFO 0x101 #define SMB_FIND_FILE_FULL_DIRECTORY_INFO 0x102 -- cgit From fdf78a499750a439701068c7a11a65482af2103c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 18 Aug 2003 21:38:33 +0000 Subject: Add level 261 to search. Found using Samba4 tester. Jeremy. (This used to be commit 4ee99d1c412ecc77541c988f6795ae3cb89907b8) --- source3/include/trans2.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index eb5b1bc79f..168e647721 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -230,6 +230,8 @@ Byte offset Type name description #define SMB_FIND_FILE_FULL_DIRECTORY_INFO 0x102 #define SMB_FIND_FILE_NAMES_INFO 0x103 #define SMB_FIND_FILE_BOTH_DIRECTORY_INFO 0x104 +#define SMB_FIND_FILE_LEVEL_261 0x105 +#define SMB_FIND_FILE_LEVEL_262 0x106 #define SMB_SET_FILE_BASIC_INFO 0x101 #define SMB_SET_FILE_DISPOSITION_INFO 0x102 -- cgit From cd9b973b176f50ba0082305ffb0f63067f36e7d6 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 10 Apr 2004 20:02:46 +0000 Subject: r150: Make 3.x pass the Samba 4.x RAW-SEARCH tests - except for the UNIX info levels, and the short case preserve names. Tested with NT - needs more testing. Will work on this more on Monday. Jeremy. (This used to be commit 88a9bca9aade3ee0ce9713857becfe0a13bbfd07) --- source3/include/trans2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 168e647721..3106cd092a 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -230,8 +230,8 @@ Byte offset Type name description #define SMB_FIND_FILE_FULL_DIRECTORY_INFO 0x102 #define SMB_FIND_FILE_NAMES_INFO 0x103 #define SMB_FIND_FILE_BOTH_DIRECTORY_INFO 0x104 -#define SMB_FIND_FILE_LEVEL_261 0x105 -#define SMB_FIND_FILE_LEVEL_262 0x106 +#define SMB_FIND_ID_FULL_DIRECTORY_INFO 0x105 +#define SMB_FIND_ID_BOTH_DIRECTORY_INFO 0x106 #define SMB_SET_FILE_BASIC_INFO 0x101 #define SMB_SET_FILE_DISPOSITION_INFO 0x102 -- cgit From 9aeff8d280875ae573e7b6a92df8e2b39a96b502 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 10 May 2004 23:04:31 +0000 Subject: r640: Make cifsvfs symlinks work with paths within and external to the share. Store external paths prefixed with smbln:. Jeremy. (This used to be commit 14a9997b2eb394174ccb36d2a10a755279740cba) --- source3/include/trans2.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 3106cd092a..98a4fc0976 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -450,6 +450,7 @@ Offset Size Name #define CIFS_UNIX_FCNTL_LOCKS_CAP 0x1 #define CIFS_UNIX_POSIX_ACLS_CAP 0x2 +#define CIFS_CLIENT_SYMLINK_STRING "smbln:" /* ... more as we think of them :-). */ #endif -- cgit From 327f9b9636dd468822625103c6feed5fc952cc7b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 12 May 2004 00:35:43 +0000 Subject: r653: Ok, so tridge convinced me. Allow full UNIX path symlinks to anywhere on the server filesystem so long as widelinks is set to true.... :-). Jeremy. (This used to be commit ba9809fcd493a53b33c3a24c9f91b0c1d9bd9726) --- source3/include/trans2.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 98a4fc0976..3106cd092a 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -450,7 +450,6 @@ Offset Size Name #define CIFS_UNIX_FCNTL_LOCKS_CAP 0x1 #define CIFS_UNIX_POSIX_ACLS_CAP 0x2 -#define CIFS_CLIENT_SYMLINK_STRING "smbln:" /* ... more as we think of them :-). */ #endif -- cgit From c0406ae1b04a60318ba18abb168b610d8c223005 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 9 Nov 2004 22:49:28 +0000 Subject: r3642: Extend vfs to add seekdir/telldir/rewinddir. Yes I know I have to fix the modules too... First step in fixing out large directories problem. Jeremy. (This used to be commit 344e9dd33a936b429fefb67cd748ac009a1bab10) --- source3/include/trans2.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 3106cd092a..37b3cb24b1 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -329,6 +329,13 @@ Byte offset Type name description #define SMB_FS_FULL_SIZE_INFORMATION 1007 #define SMB_FS_OBJECTID_INFORMATION 1008 +/* flags on trans2 findfirst/findnext that control search */ +#define FLAG_TRANS2_FIND_CLOSE 0x1 +#define FLAG_TRANS2_FIND_CLOSE_IF_END 0x2 +#define FLAG_TRANS2_FIND_REQUIRE_RESUME 0x4 +#define FLAG_TRANS2_FIND_CONTINUE 0x8 +#define FLAG_TRANS2_FIND_BACKUP_INTENT 0x10 + /* UNIX CIFS Extensions - created by HP */ /* * UNIX CIFS Extensions have the range 0x200 - 0x2FF reserved. -- cgit From f995b164b98221e224661e370d61ad08dadb2986 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 12 Nov 2004 23:42:12 +0000 Subject: r3713: Implementation of get posix acls in UNIX extensions. Passes valgrind. Need to add printout functions in client and set posix acl in server. SteveF - take a look at this for the cifsfs client ! Once this is working and tested the next step is to write this up for the UNIX extensions spec. documents. Jeremy. (This used to be commit 1bd3f133442a472b4718b94a636f2fec89a2e0dc) --- source3/include/trans2.h | 71 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 37b3cb24b1..55b28ae937 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -459,4 +459,75 @@ Offset Size Name /* ... more as we think of them :-). */ +/* SMB POSIX ACL definitions. */ +/* Wire format is (all little endian) : + +[2 bytes] - Version number. +[2 bytes] - Number of ACE entries to follow. +[2 bytes] - Number of default ACE entries to follow. +------------------------------------- +^ +| +ACE entries +| +v +------------------------------------- +^ +| +Default ACE entries +| +v +------------------------------------- + +Where an ACE entry looks like : + +[1 byte] - Entry type. + +Entry types are : + +ACL_USER_OBJ 0x01 +ACL_USER 0x02 +ACL_GROUP_OBJ 0x04 +ACL_GROUP 0x08 +ACL_MASK 0x10 +ACL_OTHER 0x20 + +[1 byte] - permissions (perm_t) + +perm_t types are : + +ACL_READ 0x04 +ACL_WRITE 0x02 +ACL_EXECUTE 0x01 + +[8 bytes] - uid/gid to apply this permission to. + +In the same format as the uid/gid fields in the other +UNIX extensions definitions. Use 0xFFFFFFFFFFFFFFFF for +the MASK and OTHER entry types. + +*/ + +/* The query/set info levels for POSIX ACLs. */ +#define SMB_QUERY_POSIX_ACL 0x204 +#define SMB_SET_POSIX_ACL 0x204 + +/* Current on the wire ACL version. */ +#define SMB_POSIX_ACL_VERSION 1 + +/* ACE entry type. */ +#define SMB_POSIX_ACL_USER_OBJ 0x01 +#define SMB_POSIX_ACL_USER 0x02 +#define SMB_POSIX_ACL_GROUP_OBJ 0x04 +#define SMB_POSIX_ACL_GROUP 0x08 +#define SMB_POSIX_ACL_MASK 0x10 +#define SMB_POSIX_ACL_OTHER 0x20 + +/* perm_t types. */ +#define SMB_POSIX_ACL_READ 0x04 +#define SMB_POSIX_ACL_WRITE 0x02 +#define SMB_POSIX_ACL_EXECUTE 0x01 + +#define SMB_POSIX_ACL_HEADER_SIZE 6 +#define SMB_POSIX_ACL_ENTRY_SIZE 10 #endif -- cgit From 2f167e909e08aac3b5ef7e20fe1b264f3c90382f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Nov 2004 19:36:50 +0000 Subject: r3859: Ensure if num_acls is set to 0xFFFF this field is ignored. Use def_acl everywhere instead of dir_acl. Jeremy. (This used to be commit d28611c960f87830aa8449725951984aa155b089) --- source3/include/trans2.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 55b28ae937..b1fe2d9d83 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -506,6 +506,10 @@ In the same format as the uid/gid fields in the other UNIX extensions definitions. Use 0xFFFFFFFFFFFFFFFF for the MASK and OTHER entry types. +If the Number of ACE entries for either file or default ACE's +is set to 0xFFFF this means ignore this kind of ACE (and the +number of entries sent will be zero. + */ /* The query/set info levels for POSIX ACLs. */ @@ -530,4 +534,6 @@ the MASK and OTHER entry types. #define SMB_POSIX_ACL_HEADER_SIZE 6 #define SMB_POSIX_ACL_ENTRY_SIZE 10 + +#define SMB_POSIX_IGNORE_ACE_ENTRIES 0xFFFF #endif -- cgit From 779191f26066934773b00e1ba55df635e5c6851e Mon Sep 17 00:00:00 2001 From: Steve French Date: Wed, 9 Mar 2005 21:43:00 +0000 Subject: r5715: Update for new CIFS POSIX info levels (This used to be commit af12daba2ae57a1f768248ba60d7769063f8200b) --- source3/include/trans2.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index b1fe2d9d83..68358344f4 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -433,7 +433,12 @@ Offset Size Name #define SMB_QUERY_FILE_UNIX_LINK 0x201 #define SMB_SET_FILE_UNIX_LINK 0x201 #define SMB_SET_FILE_UNIX_HLINK 0x203 +/* SMB_QUERY_POSIX_ACL 0x204 see below */ +#define SMB_QUERY_XATTR 0x205 /* need for non-user XATTRs */ +#define SMB_QUERY_ATTR_FLAGS 0x206 /* chflags, chattr */ +#define SMB_SET_ATTR_FLAGS 0x206 +/* Transact 2 Find First levels */ #define SMB_FIND_FILE_UNIX 0x202 /* @@ -457,6 +462,26 @@ Offset Size Name #define CIFS_UNIX_FCNTL_LOCKS_CAP 0x1 #define CIFS_UNIX_POSIX_ACLS_CAP 0x2 +#define SMB_QUERY_POSIX_FS_INFO 0x201 + +/* Returns FILE_SYSTEM_POSIX_INFO struct as follows + (NB For undefined values return -1 in that field) + le32 OptimalTransferSize; bsize on some os, iosize on other os, This + is a hint to the client about best size. Server + can return -1 if no preference, ie if SMB + negotiated size is adequate for optimal + read/write performance + le32 BlockSize; (often 512 bytes) NB: BlockSize * TotalBlocks = disk space + le64 TotalBlocks; redundant with other infolevels but easy to ret here + le64 BlocksAvail; although redundant, easy to return + le64 UserBlocksAvail; bavail + le64 TotalFileNodes; + le64 FreeFileNodes; + le64 FileSysIdentifier; fsid + (NB statfs field Namelen comes from FILE_SYSTEM_ATTRIBUTE_INFO call) + (NB statfs field flags can come from FILE_SYSTEM_DEVICE_INFO call) +*/ + /* ... more as we think of them :-). */ /* SMB POSIX ACL definitions. */ -- cgit From 983a1f69aebaa63dac55a58061386c4bc86b919f Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 17 Mar 2005 19:26:23 +0000 Subject: r5864: Stop using 'INFO' names on find calls. Getting ready to fixup OS/2 EA support. Jeremy. (This used to be commit a417feaa4108b443850ef6e8f0da32b79d79db59) --- source3/include/trans2.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 68358344f4..ee0c10d966 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -226,6 +226,9 @@ Byte offset Type name description #define SMB_QUERY_FILE_STREAM_INFO 0x109 #define SMB_QUERY_COMPRESSION_INFO 0x10b +#define SMB_FIND_INFO_STANDARD 1 +#define SMB_FIND_EA_SIZE 2 +#define SMB_FIND_EA_LIST 3 #define SMB_FIND_FILE_DIRECTORY_INFO 0x101 #define SMB_FIND_FILE_FULL_DIRECTORY_INFO 0x102 #define SMB_FIND_FILE_NAMES_INFO 0x103 -- cgit From dee553bdb1dc98b6fc4e97ecbad5f9254928ff3f Mon Sep 17 00:00:00 2001 From: Steve French Date: Fri, 1 Apr 2005 18:14:24 +0000 Subject: r6167: Add more defines for POSIX extensions to match the newly added client implementation (This used to be commit 8f6dba2cc3f337e990ef3e4b46718a5c1dca65ab) --- source3/include/trans2.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index ee0c10d966..63e51d5e19 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -440,6 +440,9 @@ Offset Size Name #define SMB_QUERY_XATTR 0x205 /* need for non-user XATTRs */ #define SMB_QUERY_ATTR_FLAGS 0x206 /* chflags, chattr */ #define SMB_SET_ATTR_FLAGS 0x206 +#define SMB_QUERY_POSIX_PERMISSION 0x207 +#define SMB_QUERY_POSIX_LOCK 0x208 +#define SMB_SET_POSIX_LOCK 0x208 /* Transact 2 Find First levels */ #define SMB_FIND_FILE_UNIX 0x202 @@ -464,6 +467,13 @@ Offset Size Name #define CIFS_UNIX_FCNTL_LOCKS_CAP 0x1 #define CIFS_UNIX_POSIX_ACLS_CAP 0x2 +#define CIFS_UNIX_XATTTR_CAP 0x4 /* for support of other xattr + namespaces such as system, + security and trusted */ +#define CIFS_UNIX_EXTATTR_CAP 0x8 /* for support of chattr + (chflags) and lsattr */ +#define CIFS_UNIX_POSIX_LOCK 0x10 + #define SMB_QUERY_POSIX_FS_INFO 0x201 -- cgit From ab8ffa822a38765301cb6a34dd917eb1c2963249 Mon Sep 17 00:00:00 2001 From: Steve French Date: Fri, 1 Apr 2005 21:15:09 +0000 Subject: r6170: Remove redundant flag that I had just added. (This used to be commit 981b44e600e2410395d6d02252795623e400d624) --- source3/include/trans2.h | 1 - 1 file changed, 1 deletion(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 63e51d5e19..2aae1137dd 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -472,7 +472,6 @@ Offset Size Name security and trusted */ #define CIFS_UNIX_EXTATTR_CAP 0x8 /* for support of chattr (chflags) and lsattr */ -#define CIFS_UNIX_POSIX_LOCK 0x10 #define SMB_QUERY_POSIX_FS_INFO 0x201 -- cgit From 1d37a6267ed07ce1d181d76a5e4ca06bc41c3c88 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 10 May 2005 17:58:51 +0000 Subject: r6715: We don't need to wrap the setfsinfo call in HAVE_QUOTA as they'll just return ENOSYS if we don't. Add new CAP for POSIX pathnames, prepare to allow FSINFO set for client POSIX caps. Jeremy. (This used to be commit 4d99b57aedba8431ef5827d1e75413a10b35e1ce) --- source3/include/trans2.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 2aae1137dd..2f56c640d3 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -448,7 +448,7 @@ Offset Size Name #define SMB_FIND_FILE_UNIX 0x202 /* - Info level for QVOLINFO - returns version of CIFS UNIX extensions, plus + Info level for TRANS2_QFSINFO - returns version of CIFS UNIX extensions, plus 64-bits worth of capability fun :-). */ @@ -472,7 +472,14 @@ Offset Size Name security and trusted */ #define CIFS_UNIX_EXTATTR_CAP 0x8 /* for support of chattr (chflags) and lsattr */ - +#define CIFS_UNIX_POSIX_PATHNAMES_CAP 0x10 /* Use POSIX pathnames on the wire. */ + +/* + Info level for TRANSACT2_SETFSINFO - takes 64-bits of capabilies in the data section. +*/ + +#define SMB_SET_CIFS_UNIX_INFO 0x200 + #define SMB_QUERY_POSIX_FS_INFO 0x201 -- cgit From ea41eedc20a9fbd19e69f0de6e9b1bd32b0e7a57 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 21 Jun 2005 05:18:09 +0000 Subject: r7796: Prepare for client setting capabilities to select posix pathnames on the wire. Jerry do not merge this please. New SMB_SET_FS_INFO - level 0x200 as was discussed on the mailing list. Jeremy. (This used to be commit 55029b1a0c9ae5b941eecd699dd905ea3d42b99c) --- source3/include/trans2.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 2f56c640d3..1d5dfe3678 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -450,11 +450,13 @@ Offset Size Name /* Info level for TRANS2_QFSINFO - returns version of CIFS UNIX extensions, plus 64-bits worth of capability fun :-). + Use the same info level for TRANS2_SETFSINFO */ #define SMB_QUERY_CIFS_UNIX_INFO 0x200 +#define SMB_SET_CIFS_UNIX_INFO 0x200 -/* Returns the following. +/* Returns or sets the following. UINT16 major version number UINT16 minor version number @@ -474,12 +476,6 @@ Offset Size Name (chflags) and lsattr */ #define CIFS_UNIX_POSIX_PATHNAMES_CAP 0x10 /* Use POSIX pathnames on the wire. */ -/* - Info level for TRANSACT2_SETFSINFO - takes 64-bits of capabilies in the data section. -*/ - -#define SMB_SET_CIFS_UNIX_INFO 0x200 - #define SMB_QUERY_POSIX_FS_INFO 0x201 -- cgit From 22dbd67708f1651a2341d70ce576fac360affccf Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 10 Apr 2006 15:33:04 +0000 Subject: r15018: Merge Volker's ipc/trans2/nttrans changes over into 3.0. Also merge the new POSIX lock code - this is not enabled unless -DDEVELOPER is defined. This doesn't yet map onto underlying system POSIX locks. Updates vfs to allow lock queries. Jeremy. (This used to be commit 08e52ead03304ff04229e1bfe544ff40e2564fc7) --- source3/include/trans2.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 1d5dfe3678..92c5a2e963 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -441,7 +441,9 @@ Offset Size Name #define SMB_QUERY_ATTR_FLAGS 0x206 /* chflags, chattr */ #define SMB_SET_ATTR_FLAGS 0x206 #define SMB_QUERY_POSIX_PERMISSION 0x207 +/* Only valid for qfileinfo */ #define SMB_QUERY_POSIX_LOCK 0x208 +/* Only valid for setfileinfo */ #define SMB_SET_POSIX_LOCK 0x208 /* Transact 2 Find First levels */ @@ -576,4 +578,28 @@ number of entries sent will be zero. #define SMB_POSIX_ACL_ENTRY_SIZE 10 #define SMB_POSIX_IGNORE_ACE_ENTRIES 0xFFFF + +/* Definition of SMB_SET_POSIX_LOCK */ +/* + [2 bytes] lock_type - 0 = Read, 1 = Write, 2 = Unlock + [2 bytes] lock_flags - 1 = Wait (only valid for setlock) + [4 bytes] pid = locking context. + [8 bytes] start = unsigned 64 bits. + [8 bytes] length = unsigned 64 bits. +*/ + +#define POSIX_LOCK_TYPE_OFFSET 0 +#define POSIX_LOCK_FLAGS_OFFSET 2 +#define POSIX_LOCK_PID_OFFSET 4 +#define POSIX_LOCK_START_OFFSET 8 +#define POSIX_LOCK_LEN_OFFSET 16 +#define POSIX_LOCK_DATA_SIZE 24 + +#define POSIX_LOCK_FLAG_NOWAIT 0 +#define POSIX_LOCK_FLAG_WAIT 1 + +#define POSIX_LOCK_TYPE_READ 0 +#define POSIX_LOCK_TYPE_WRITE 1 +#define POSIX_LOCK_TYPE_UNLOCK 2 + #endif -- cgit From 7a5fa7f12ec439ef5a4af29aa86498f799b6b9a5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 6 Feb 2007 21:05:34 +0000 Subject: r21191: Add in the POSIX open/mkdir/unlink calls. Move more error code returns to NTSTATUS. Client test code to follow... See if this passes the build-farm before I add it into 3.0.25. Jeremy. (This used to be commit 83dbbdff345fa9e427c9579183f4380004bf3dd7) --- source3/include/trans2.h | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 92c5a2e963..44e85d8489 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -446,6 +446,13 @@ Offset Size Name /* Only valid for setfileinfo */ #define SMB_SET_POSIX_LOCK 0x208 +/* The set info levels for POSIX path operations. */ +#define SMB_POSIX_PATH_OPEN 0x209 +#define SMB_POSIX_PATH_UNLINK 0x20A + +#define SMB_QUERY_FILE_UNIX_INFO2 0x20B /* UNIX File Info2 */ +#define SMB_SET_FILE_UNIX_INFO2 0x20B + /* Transact 2 Find First levels */ #define SMB_FIND_FILE_UNIX 0x202 @@ -477,6 +484,7 @@ Offset Size Name #define CIFS_UNIX_EXTATTR_CAP 0x8 /* for support of chattr (chflags) and lsattr */ #define CIFS_UNIX_POSIX_PATHNAMES_CAP 0x10 /* Use POSIX pathnames on the wire. */ +#define CIFS_UNIX_POSIX_PATH_OPERATIONS_CAP 0x20 /* We can cope with POSIX open/mkdir/unlink etc. */ #define SMB_QUERY_POSIX_FS_INFO 0x201 @@ -579,7 +587,7 @@ number of entries sent will be zero. #define SMB_POSIX_IGNORE_ACE_ENTRIES 0xFFFF -/* Definition of SMB_SET_POSIX_LOCK */ +/* Definition of parameter block of SMB_SET_POSIX_LOCK */ /* [2 bytes] lock_type - 0 = Read, 1 = Write, 2 = Unlock [2 bytes] lock_flags - 1 = Wait (only valid for setlock) @@ -602,4 +610,37 @@ number of entries sent will be zero. #define POSIX_LOCK_TYPE_WRITE 1 #define POSIX_LOCK_TYPE_UNLOCK 2 +/* SMB_POSIX_PATH_OPEN "open_mode" definitions. */ +#define SMB_O_RDONLY 0x1 +#define SMB_O_WRONLY 0x2 +#define SMB_O_RDWR 0x4 + +#define SMB_ACCMODE 0x7 + +#define SMB_O_CREAT 0x10 +#define SMB_O_EXCL 0x20 +#define SMB_O_TRUNC 0x40 +#define SMB_O_APPEND 0x80 +#define SMB_O_SYNC 0x100 +#define SMB_O_DIRECTORY 0x200 +#define SMB_O_NOFOLLOW 0x400 +#define SMB_O_DIRECT 0x800 + +/* Definition of request parameter block for SMB_POSIX_PATH_OPEN */ +/* + [4 bytes] flags (as smb_ntcreate_Flags). + [4 bytes] open_mode + [4 bytes] mode_t - same encoding as "Standard UNIX permissions" above. + [2 bytes] ret_info_level - optimization. Info level to be returned. +*/ + +/* Definition of reply data block for SMB_POSIX_PATH_OPEN */ + +#define SMB_NO_INFO_LEVEL_RETURNED 0xFFFF + +/* + [2 bytes] reply info level - as requested or 0xFFFF if not available. + [n bytes] - info level reply - if available. +*/ + #endif -- cgit From 15ee7961ef9422ba8b73f87784bda2c286afa87d Mon Sep 17 00:00:00 2001 From: Steve French Date: Tue, 6 Feb 2007 23:25:02 +0000 Subject: r21204: Add define for new QFS Info for "who am i" (This used to be commit 739a608eadd9448791366f26b42b06d38d77e037) --- source3/include/trans2.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 44e85d8489..5a3b25de4d 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -507,6 +507,21 @@ Offset Size Name (NB statfs field flags can come from FILE_SYSTEM_DEVICE_INFO call) */ +#define SMB_QUERY_POSIX_WHO_AM_I 0x202 /* QFS Info */ +/* returns: + __u32 flags; 0 = Authenticated user 1 = GUEST + __u32 mask; which flags bits server understands ie 0x0001 + __u64 unix_user_id; + __u64 unix_user_gid; + __u32 number_of_supplementary_gids; may be zero + __u32 number_of_sids; may be zero + __u32 length_of_sid_array; in bytes - may be zero + __u32 pad; reserved - MBZ + __u64 gid_array[0]; may be empty + __u8 * psid_list may be empty +*/ + + /* ... more as we think of them :-). */ /* SMB POSIX ACL definitions. */ -- cgit From 778f3a00f0fef879c6332abb1c965fe745d138c5 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 8 Feb 2007 00:14:37 +0000 Subject: r21227: Quick fix for Stevef - ensure the returned data on open is 8 byte aligned. Jeremy. (This used to be commit 7645044fcf77644839bb0d74163d93d03284bd67) --- source3/include/trans2.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 5a3b25de4d..fb8e7716ab 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -394,6 +394,8 @@ Offset Size Name 100 - end. */ +#define SMB_FILE_UNIX_BASIC_SIZE 100 + /* UNIX filetype mappings. */ #define UNIX_TYPE_FILE 0 -- cgit From 81cce1332129b97a5538f35c70367858f460935c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 1 Mar 2007 21:01:22 +0000 Subject: r21638: Change POSIX_UNLINK to allow clients to differentiate between unlink/rmdir calls. Jeremy. (This used to be commit f0c8488d382ada32fabe79399f64ba1c6486d009) --- source3/include/trans2.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index fb8e7716ab..89227c39d9 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -604,7 +604,7 @@ number of entries sent will be zero. #define SMB_POSIX_IGNORE_ACE_ENTRIES 0xFFFF -/* Definition of parameter block of SMB_SET_POSIX_LOCK */ +/* Definition of data block of SMB_SET_POSIX_LOCK */ /* [2 bytes] lock_type - 0 = Read, 1 = Write, 2 = Unlock [2 bytes] lock_flags - 1 = Wait (only valid for setlock) @@ -643,7 +643,7 @@ number of entries sent will be zero. #define SMB_O_NOFOLLOW 0x400 #define SMB_O_DIRECT 0x800 -/* Definition of request parameter block for SMB_POSIX_PATH_OPEN */ +/* Definition of request data block for SMB_POSIX_PATH_OPEN */ /* [4 bytes] flags (as smb_ntcreate_Flags). [4 bytes] open_mode @@ -660,4 +660,12 @@ number of entries sent will be zero. [n bytes] - info level reply - if available. */ +/* Definition of request data block for SMB_POSIX_UNLINK */ +/* + [2 bytes] flags (defined below). +*/ + +#define SMB_POSIX_UNLINK_FILE_TARGET 0 +#define SMB_POSIX_UNLINK_DIRECTORY_TARGET 1 + #endif -- cgit From ba992d5ad7bc2e32b2b458d8d91ca450e97513c3 Mon Sep 17 00:00:00 2001 From: James Peach Date: Tue, 6 Mar 2007 00:54:05 +0000 Subject: r21717: Support the SMB_QUERY_POSIX_WHOAMI info level on QueryFsInfo. (This used to be commit 32c7281f90b042c9f01962c4661faaf979676711) --- source3/include/trans2.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 89227c39d9..c6d98c7ed3 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -579,6 +579,37 @@ number of entries sent will be zero. */ +#define SMB_QUERY_POSIX_WHOAMI 0x202 + +enum smb_whoami_flags { + SMB_WHOAMI_GUEST = 0x1 /* Logged in as (or squashed to) guest */ +}; + +/* Mask of which WHOAMI bits are valid. This should make it easier for clients + * to cope with servers that have different sets of WHOAMI flags (as more get + * added). + */ +#define SMB_WHOAMI_MASK 0x00000001 + +/* + SMBWhoami - Query the user mapping performed by the server for the + connected tree. This is a subcommand of the TRANS2_QFSINFO. + + Returns: + 4 bytes unsigned - mapping flags (smb_whoami_flags) + 4 bytes unsigned - flags mask + + 8 bytes unsigned - primary UID + 8 bytes unsigned - primary GID + 4 bytes unsigned - number of supplementary GIDs + 4 bytes unsigned - number of SIDs + 4 bytes unsigned - SID list byte count + 4 bytes - pad / reserved (must be zero) + + 8 bytes unsigned[] - list of GIDs (may be empty) + DOM_SID[] - list of SIDs (may be empty) +*/ + /* The query/set info levels for POSIX ACLs. */ #define SMB_QUERY_POSIX_ACL 0x204 #define SMB_SET_POSIX_ACL 0x204 -- cgit From 30b9b9acae1a0bcea100e7fd9d2cdf29bf25148f Mon Sep 17 00:00:00 2001 From: James Peach Date: Thu, 8 Mar 2007 18:05:55 +0000 Subject: r21763: Add support for the UNIX_INFO2 infolevel. (This used to be commit 262e4e1fd8398934780db354fcc5316368032d7b) --- source3/include/trans2.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index c6d98c7ed3..8d372dcde3 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -1,6 +1,8 @@ /* Unix SMB/CIFS implementation. SMB transaction2 handling + + Copyright (C) James Peach 2007 Copyright (C) Jeremy Allison 1994-2002. Extensively modified by Andrew Tridgell, 1995 @@ -352,6 +354,7 @@ Byte offset Type name description #define SMB_QUERY_FILE_UNIX_BASIC 0x200 /* UNIX File Info*/ #define SMB_SET_FILE_UNIX_BASIC 0x200 +#define SMB_SET_FILE_UNIX_INFO2 0x20B /* UNIX File Info2 */ #define SMB_MODE_NO_CHANGE 0xFFFFFFFF /* file mode value which */ /* means "don't change it" */ @@ -435,6 +438,18 @@ Offset Size Name #define UNIX_EXTRA_MASK 0007000 #define UNIX_ALL_MASK 0007777 +/* Flags for chflags (CIFS_UNIX_EXTATTR_CAP capability) and + * SMB_QUERY_FILE_UNIX_INFO2. + */ +#define EXT_SECURE_DELETE 0x00000001 +#define EXT_ENABLE_UNDELETE 0x00000002 +#define EXT_SYNCHRONOUS 0x00000004 +#define EXT_IMMUTABLE 0x00000008 +#define EXT_OPEN_APPEND_ONLY 0x00000010 +#define EXT_DO_NOT_BACKUP 0x00000020 +#define EXT_NO_UPDATE_ATIME 0x00000040 +#define EXT_HIDDEN 0x00000080 + #define SMB_QUERY_FILE_UNIX_LINK 0x201 #define SMB_SET_FILE_UNIX_LINK 0x201 #define SMB_SET_FILE_UNIX_HLINK 0x203 @@ -455,8 +470,33 @@ Offset Size Name #define SMB_QUERY_FILE_UNIX_INFO2 0x20B /* UNIX File Info2 */ #define SMB_SET_FILE_UNIX_INFO2 0x20B +/* +SMB_QUERY_FILE_UNIX_INFO2 is SMB_QUERY_FILE_UNIX_BASIC with create +time and file flags appended. The corresponding info level for +findfirst/findnext is SMB_FIND_FILE_UNIX_INFO2. + Size Offset Value + --------------------- + 0 LARGE_INTEGER EndOfFile File size + 8 LARGE_INTEGER Blocks Number of blocks used on disk + 16 LARGE_INTEGER ChangeTime Attribute change time + 24 LARGE_INTEGER LastAccessTime Last access time + 32 LARGE_INTEGER LastModificationTime Last modification time + 40 LARGE_INTEGER Uid Numeric user id for the owner + 48 LARGE_INTEGER Gid Numeric group id of owner + 56 ULONG Type Enumeration specifying the file type + 60 LARGE_INTEGER devmajor Major device number if type is device + 68 LARGE_INTEGER devminor Minor device number if type is device + 76 LARGE_INTEGER uniqueid This is a server-assigned unique id + 84 LARGE_INTEGER permissions Standard UNIX permissions + 92 LARGE_INTEGER nlinks Number of hard links + 100 LARGE_INTEGER CreationTime Create/birth time + 108 ULONG FileFlags File flags enumeration + 112 ULONG FileFlagsMask Mask of valid flags +*/ + /* Transact 2 Find First levels */ #define SMB_FIND_FILE_UNIX 0x202 +#define SMB_FIND_FILE_UNIX_INFO2 0x20B /* UNIX File Info2 */ /* Info level for TRANS2_QFSINFO - returns version of CIFS UNIX extensions, plus -- cgit From 257d2e0d2a6cd4c2ea62399ec97ada46dd8c395c Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 9 Mar 2007 18:33:16 +0000 Subject: r21777: As Stevef requested and the Apple guys agreed, make mode_t in posix_open/posix_mkdir -> 8 bytes to match the SET_UNIX_INFO_BASIC call. Steve is updating the Wikki. Jeremy. (This used to be commit 2f1c95ac7718c1d2a75367ba712edd6b57069432) --- source3/include/trans2.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 8d372dcde3..be635462e1 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -717,8 +717,8 @@ enum smb_whoami_flags { /* Definition of request data block for SMB_POSIX_PATH_OPEN */ /* [4 bytes] flags (as smb_ntcreate_Flags). - [4 bytes] open_mode - [4 bytes] mode_t - same encoding as "Standard UNIX permissions" above. + [4 bytes] open_mode - SMB_O_xxx flags above. + [8 bytes] mode_t (permissions) - same encoding as "Standard UNIX permissions" above in SMB_SET_FILE_UNIX_BASIC. [2 bytes] ret_info_level - optimization. Info level to be returned. */ -- cgit From 5214cb6782b1ac01b4b23d53478fa11ad00915fe Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sun, 11 Mar 2007 02:33:17 +0000 Subject: r21783: Add in the "create info" field to the reply from POSIX_OPEN and POSIX_MKDIR as specified by Stevef in the wikki (extra 4 byte field). Also fix horrible bug in James's code (James you should review this for your Apple patch tree) where he failed to allocate the correct return memory size when returning a INFO2 struct. Added #define for the size of the INFO2 struct and made sure we allocate the correct size for return. Jeremy. (This used to be commit d88bc59cb4d5e8851b0856c67ed878ba8bd84552) --- source3/include/trans2.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index be635462e1..67a0e0fc52 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -498,6 +498,8 @@ findfirst/findnext is SMB_FIND_FILE_UNIX_INFO2. #define SMB_FIND_FILE_UNIX 0x202 #define SMB_FIND_FILE_UNIX_INFO2 0x20B /* UNIX File Info2 */ +#define SMB_FILE_UNIX_INFO2_SIZE 116 + /* Info level for TRANS2_QFSINFO - returns version of CIFS UNIX extensions, plus 64-bits worth of capability fun :-). @@ -727,7 +729,11 @@ enum smb_whoami_flags { #define SMB_NO_INFO_LEVEL_RETURNED 0xFFFF /* - [2 bytes] reply info level - as requested or 0xFFFF if not available. + [2 bytes] - flags field. Identical to flags reply for oplock response field in SMBNTCreateX) + [2 bytes] - FID returned. + [4 bytes] - CreateAction (same as in NTCreateX response). + [2 bytes] - reply info level - as requested or 0xFFFF if not available. + [2 bytes] - padding (must be zero) [n bytes] - info level reply - if available. */ -- cgit From ecd496f06654e8316260c9a6ddab5e473f9cc452 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 17 Mar 2007 00:32:54 +0000 Subject: r21865: Add in the stubs for SMB transport encryption. Will flesh these out as I implement. Don't add to SAMBA_3_0_25, this is experimental code. NFSv4 you're now officially on notice... :-). Jeremy. (This used to be commit 5bfe638f2172e272741997100ee5ae8ff280494d) --- source3/include/trans2.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 67a0e0fc52..32ea7d927f 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -529,7 +529,7 @@ findfirst/findnext is SMB_FIND_FILE_UNIX_INFO2. (chflags) and lsattr */ #define CIFS_UNIX_POSIX_PATHNAMES_CAP 0x10 /* Use POSIX pathnames on the wire. */ #define CIFS_UNIX_POSIX_PATH_OPERATIONS_CAP 0x20 /* We can cope with POSIX open/mkdir/unlink etc. */ - +#define CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP 0x40 /* We can do SPNEGO negotiations for encryption. */ #define SMB_QUERY_POSIX_FS_INFO 0x201 @@ -652,6 +652,27 @@ enum smb_whoami_flags { DOM_SID[] - list of SIDs (may be empty) */ +/* + * The following trans2 is done between client and server + * as a FSINFO call to set up the encryption state for transport + * encryption. + * + * The request looks like : + * + * [data block] -> SPNEGO framed GSSAPI request. + * + * The reply looks like : + * + * [data block] -> SPNEGO framed GSSAPI reply - if error + * is NT_STATUS_OK then we're done, if it's + * NT_STATUS_MORE_PROCESSING_REQUIRED then the + * client needs to keep going. If it's an + * error it can be any NT_STATUS error. + * + */ + +#define SMB_REQUEST_TRANSPORT_ENCRYPTION 0x203 + /* The query/set info levels for POSIX ACLs. */ #define SMB_QUERY_POSIX_ACL 0x204 #define SMB_SET_POSIX_ACL 0x204 -- cgit From 8b63654c2e63448cc21505d7996e1a4805e391df Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 27 Mar 2007 00:50:53 +0000 Subject: r21969: Start working on the gss-side of the server negotiation. Jeremy. (This used to be commit fbc569b530104679e47fe743963eb0c4384de6ae) --- source3/include/trans2.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 32ea7d927f..5f7587d6ea 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -530,6 +530,7 @@ findfirst/findnext is SMB_FIND_FILE_UNIX_INFO2. #define CIFS_UNIX_POSIX_PATHNAMES_CAP 0x10 /* Use POSIX pathnames on the wire. */ #define CIFS_UNIX_POSIX_PATH_OPERATIONS_CAP 0x20 /* We can cope with POSIX open/mkdir/unlink etc. */ #define CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP 0x40 /* We can do SPNEGO negotiations for encryption. */ +#define CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP 0x80 /* We *must* SPNEGO negotiations for encryption. */ #define SMB_QUERY_POSIX_FS_INFO 0x201 -- cgit From 32106b23951e01fb17f814584ebbcc8d7288cb75 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 16 May 2007 00:07:38 +0000 Subject: r22920: Add in the UNIX capability for 24-bit readX, as discussed with the Apple guys and Linux kernel guys. Still looking at how to do writeX as there's no recvfile(). Jeremy. (This used to be commit a53268fb2082de586e2df250d8ddfcff53379102) --- source3/include/trans2.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 5f7587d6ea..8b31b431c7 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -529,8 +529,10 @@ findfirst/findnext is SMB_FIND_FILE_UNIX_INFO2. (chflags) and lsattr */ #define CIFS_UNIX_POSIX_PATHNAMES_CAP 0x10 /* Use POSIX pathnames on the wire. */ #define CIFS_UNIX_POSIX_PATH_OPERATIONS_CAP 0x20 /* We can cope with POSIX open/mkdir/unlink etc. */ -#define CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP 0x40 /* We can do SPNEGO negotiations for encryption. */ -#define CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP 0x80 /* We *must* SPNEGO negotiations for encryption. */ +#define CIFS_UNIX_LARGE_READ_CAP 0x40 /* We can cope with 24 bit reads in readX. */ +#define CIFS_UNIX_LARGE_WRITE_CAP 0x80 /* We can cope with 24 bit writes in writeX. */ +#define CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP 0x100 /* We can do SPNEGO negotiations for encryption. */ +#define CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP 0x200 /* We *must* SPNEGO negotiations for encryption. */ #define SMB_QUERY_POSIX_FS_INFO 0x201 -- cgit From d824b98f80ba186030cbb70b3a1e5daf80469ecd Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 9 Jul 2007 19:25:36 +0000 Subject: r23779: Change from v2 or later to v3 or later. Jeremy. (This used to be commit 407e6e695b8366369b7c76af1ff76869b45347b3) --- source3/include/trans2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 8b31b431c7..d4c0e89e38 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -9,7 +9,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, -- cgit From 5e54558c6dea67b56bbfaba5698f3a434d3dffb6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 00:52:41 +0000 Subject: r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text (This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07) --- source3/include/trans2.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index d4c0e89e38..5cc50b193c 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -18,8 +18,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #ifndef _TRANS2_H_ -- cgit From e5a951325a6cac8567af3a66de6d2df577508ae4 Mon Sep 17 00:00:00 2001 From: "Gerald (Jerry) Carter" Date: Wed, 10 Oct 2007 15:34:30 -0500 Subject: [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch. (This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab) --- source3/include/trans2.h | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 5cc50b193c..f7f3ef2149 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -530,8 +530,7 @@ findfirst/findnext is SMB_FIND_FILE_UNIX_INFO2. #define CIFS_UNIX_POSIX_PATH_OPERATIONS_CAP 0x20 /* We can cope with POSIX open/mkdir/unlink etc. */ #define CIFS_UNIX_LARGE_READ_CAP 0x40 /* We can cope with 24 bit reads in readX. */ #define CIFS_UNIX_LARGE_WRITE_CAP 0x80 /* We can cope with 24 bit writes in writeX. */ -#define CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP 0x100 /* We can do SPNEGO negotiations for encryption. */ -#define CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP 0x200 /* We *must* SPNEGO negotiations for encryption. */ + #define SMB_QUERY_POSIX_FS_INFO 0x201 @@ -654,27 +653,6 @@ enum smb_whoami_flags { DOM_SID[] - list of SIDs (may be empty) */ -/* - * The following trans2 is done between client and server - * as a FSINFO call to set up the encryption state for transport - * encryption. - * - * The request looks like : - * - * [data block] -> SPNEGO framed GSSAPI request. - * - * The reply looks like : - * - * [data block] -> SPNEGO framed GSSAPI reply - if error - * is NT_STATUS_OK then we're done, if it's - * NT_STATUS_MORE_PROCESSING_REQUIRED then the - * client needs to keep going. If it's an - * error it can be any NT_STATUS error. - * - */ - -#define SMB_REQUEST_TRANSPORT_ENCRYPTION 0x203 - /* The query/set info levels for POSIX ACLs. */ #define SMB_QUERY_POSIX_ACL 0x204 #define SMB_SET_POSIX_ACL 0x204 -- cgit From afc93255d183eefb68e45b8ec6275f6a62cf9795 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Wed, 26 Dec 2007 17:12:36 -0800 Subject: Add SMB encryption. Still fixing client decrypt but negotiation works. Jeremy. (This used to be commit d78045601af787731f0737b8627450018902b104) --- source3/include/trans2.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index f7f3ef2149..8ed075d418 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -566,7 +566,6 @@ findfirst/findnext is SMB_FIND_FILE_UNIX_INFO2. __u8 * psid_list may be empty */ - /* ... more as we think of them :-). */ /* SMB POSIX ACL definitions. */ @@ -653,6 +652,29 @@ enum smb_whoami_flags { DOM_SID[] - list of SIDs (may be empty) */ +/* + * The following trans2 is done between client and server + * as a FSINFO call to set up the encryption state for transport + * encryption. + * This is a subcommand of the TRANS2_QFSINFO. + * + * The request looks like : + * + * [data block] -> SPNEGO framed GSSAPI request. + * + * The reply looks like : + * + * [data block] -> SPNEGO framed GSSAPI reply - if error + * is NT_STATUS_OK then we're done, if it's + * NT_STATUS_MORE_PROCESSING_REQUIRED then the + * client needs to keep going. If it's an + * error it can be any NT_STATUS error. + * + */ + +#define SMB_REQUEST_TRANSPORT_ENCRYPTION 0x203 /* QFSINFO */ + + /* The query/set info levels for POSIX ACLs. */ #define SMB_QUERY_POSIX_ACL 0x204 #define SMB_SET_POSIX_ACL 0x204 -- cgit From 5413ad4aca69245c575b621db33b61eae5db4a35 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 27 Dec 2007 10:18:22 -0800 Subject: Add CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP capability to our reported caps. Jeremy. (This used to be commit e86d027823c85173c64e7b85406e98f6f7345b10) --- source3/include/trans2.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/include/trans2.h') diff --git a/source3/include/trans2.h b/source3/include/trans2.h index 8ed075d418..3759d59681 100644 --- a/source3/include/trans2.h +++ b/source3/include/trans2.h @@ -530,7 +530,8 @@ findfirst/findnext is SMB_FIND_FILE_UNIX_INFO2. #define CIFS_UNIX_POSIX_PATH_OPERATIONS_CAP 0x20 /* We can cope with POSIX open/mkdir/unlink etc. */ #define CIFS_UNIX_LARGE_READ_CAP 0x40 /* We can cope with 24 bit reads in readX. */ #define CIFS_UNIX_LARGE_WRITE_CAP 0x80 /* We can cope with 24 bit writes in writeX. */ - +#define CIFS_UNIX_TRANSPORT_ENCRYPTION_CAP 0x100 /* We can do SPNEGO negotiations for encryption. */ +#define CIFS_UNIX_TRANSPORT_ENCRYPTION_MANDATORY_CAP 0x200 /* We *must* SPNEGO negotiations for encryption. */ #define SMB_QUERY_POSIX_FS_INFO 0x201 -- cgit