smb-auth-20040711
[openafs.git] / src / WINNT / afsd / smb3.h
index 7a897e9..beaf37a 100644 (file)
@@ -1,11 +1,12 @@
-/* 
- * Copyright (C) 1998, 1989 Transarc Corporation - All rights reserved
- *
- * (C) COPYRIGHT IBM CORPORATION 1987, 1988
- * LICENSED MATERIALS - PROPERTY OF IBM
- *
- *
+/*
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ * 
+ * This software has been released under the terms of the IBM Public
+ * License.  For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
  */
+
 #ifndef __SMB3_H_ENV__
 #define __SMB3_H_ENV__ 1
 
@@ -40,6 +41,7 @@ typedef struct smb_tran2Dispatch {
 
 typedef struct smb_tran2QFSInfo {
        union {
+#pragma pack(push, 2)
                struct {
                        long FSID;                      /* file system ID */
                         long sectorsPerAllocUnit;
@@ -47,6 +49,7 @@ typedef struct smb_tran2QFSInfo {
                         long availAllocUnits;          /* free blocks */
                         unsigned short bytesPerSector; /* bytes per sector */
                 } allocInfo;
+#pragma pack(pop)
                 struct {
                        long vsn;       /* volume serial number */
                         char vnCount;  /* count of chars in label, incl null */
@@ -163,5 +166,19 @@ extern long smb_ReceiveNTCancel(smb_vc_t *vcp, smb_packet_t *inp, smb_packet_t *
 extern int smb_V3MatchMask(char *namep, char *maskp, int flags);
 
 extern void smb3_Init();
+extern cm_user_t *smb_FindCMUserByName(/*smb_vc_t *vcp,*/ char *usern, char *machine);
+
+/* SMB auth related functions */
+extern void smb_NegotiateExtendedSecurity(void ** secBlob, int * secBlobLength);
+
+#ifdef DJGPP
+#define DELETE (0x00010000)
+#define READ_CONTROL (0x00020000)
+#define SYNCHRONIZE (0x00100000)
+#define FILE_WRITE_ATTRIBUTES ( 0x0100 )
+#define FILE_GENERIC_READ (0x00120089)
+#define FILE_GENERIC_WRITE (0x00120116)
+#define FILE_GENERIC_EXECUTE (0x001200a0)
+#endif /* DJGPP */
 
 #endif /*  __SMB3_H_ENV__ */