[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
[samba.git] / source / include / rpc_misc.h
index e5d91c1b6300750911fbb895981f7be3798e18ef..53073c85be5c9cb64bc4c1f9b19e3f6379b1e8e8 100644 (file)
@@ -8,7 +8,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,
@@ -17,8 +17,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 <http://www.gnu.org/licenses/>.
 */
 
 #ifndef _RPC_MISC_H /* _RPC_MISC_H */
@@ -27,7 +26,7 @@
 #define SMB_RPC_INTERFACE_VERSION 1
 #define PRS_POINTER_CAST BOOL (*)(const char*, prs_struct*, int, void*)
 
-enum unistr2_term_codes { UNI_FLAGS_NONE = 0, UNI_STR_TERMINATE = 1, UNI_MAXLEN_TERMINATE = 2, UNI_BROKEN_NON_NULL = 3 };
+enum unistr2_term_codes { UNI_FLAGS_NONE = 0, UNI_STR_TERMINATE = 1, UNI_MAXLEN_TERMINATE = 2, UNI_BROKEN_NON_NULL = 3, UNI_STR_DBLTERMINATE = 4 };
 
 
 
@@ -92,34 +91,16 @@ enum unistr2_term_codes { UNI_FLAGS_NONE = 0, UNI_STR_TERMINATE = 1, UNI_MAXLEN_
  * RPC policy handle used pretty much everywhere
  **********************************************************************/
  
+typedef struct policy_handle POLICY_HND;
 typedef struct {
        uint32 ptr_hnd;          /* pointer to enumeration handle */
        uint32 handle;           /* enumeration handle */
 } ENUM_HND;
 
-
-
-/********************************************************************** 
- * RPC policy handle used pretty much everywhere
- **********************************************************************/
-
-typedef struct {
-       uint32 data1;
-       uint32 data2;
-       uint16 data3;
-       uint16 data4;
-       uint8 data5[8];
-#ifdef __INSURE__
-
-       /* To prevent the leakage of policy handles mallocate a bit of
-          memory when a policy handle is created and free it when the
-          handle is closed.  This should cause Insure to flag an error
-          when policy handles are overwritten or fall out of scope without
-          being freed. */
-
-       char *marker;
-#endif
-} POLICY_HND;
+#define OUR_HANDLE(hnd) (((hnd)==NULL) ? "NULL" :\
+       ( IVAL((hnd)->uuid.node,2) == (uint32)sys_getpid() ? "OURS" : \
+               "OTHER")), ((unsigned int)IVAL((hnd)->uuid.node,2)),\
+               ((unsigned int)sys_getpid() )
 
 
 /********************************************************************** 
@@ -264,13 +245,20 @@ typedef struct {
  * Domain SID structures
  **********************************************************************/
 
-/* DOM_RID2 - domain RID structure for ntlsa pipe */
+/* DOM_RID - domain RID structure for ntlsa pipe */
 typedef struct {
-       uint8 type; /* value is SID_NAME_USE enum */
+       uint16 type; /* value is SID_NAME_USE enum */
        uint32 rid;
        uint32 rid_idx; /* referenced domain index */
-} DOM_RID2;
+} DOM_RID;
 
+/* DOM_RID2 - second domain RID structure for ntlsa pipe */
+typedef struct {
+       uint16 type; /* value is SID_NAME_USE enum */
+       uint32 rid;
+       uint32 rid_idx; /* referenced domain index */
+       uint32 unknown;
+} DOM_RID2;
 
 typedef struct {               /* DOM_RID3 - domain RID structure for samr pipe */
        uint32 rid;        /* domain-relative (to a SID) id */
@@ -317,7 +305,7 @@ typedef struct log_info {
 
 /* DOM_CHAL - challenge info */
 typedef struct chal_info {
-       uchar data[8]; /* credentials */
+       unsigned char data[8]; /* credentials */
 } DOM_CHAL;
  
 /* DOM_CREDs - timestamped client or server credentials */
@@ -350,10 +338,5 @@ typedef struct owf_info {
        uint8 data[16];
 } OWF_INFO;
 
-typedef struct uint64_s
-{
-       uint32 low;
-       uint32 high;
-} UINT64_S;
 
 #endif /* _RPC_MISC_H */