[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 24c71504337fd8bdf95480cd1f5a054653b9e5e2..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 */
@@ -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() )
 
 
 /**********************************************************************