Print this page
1575 untangle libmlrpc ... (smbsrv)


  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 #include <assert.h>
  27 #include <syslog.h>
  28 #include <door.h>
  29 #include <fcntl.h>
  30 #include <string.h>
  31 #include <strings.h>
  32 #include <stdlib.h>
  33 #include <unistd.h>
  34 #include <errno.h>
  35 #include <sys/mman.h>

  36 #include <smbsrv/libsmb.h>
  37 #include <smbsrv/wintypes.h>
  38 #include <smbsrv/smb_door.h>
  39 
  40 static int smb_door_call(uint32_t, void *, xdrproc_t, void *, xdrproc_t);
  41 static int smb_door_call_private(int, smb_doorarg_t *);
  42 static int smb_door_encode(smb_doorarg_t *, uint32_t);
  43 static int smb_door_decode(smb_doorarg_t *);
  44 static void smb_door_sethdr(smb_doorhdr_t *, uint32_t, uint32_t);
  45 static boolean_t smb_door_chkhdr(smb_doorarg_t *, smb_doorhdr_t *);
  46 static void smb_door_free(door_arg_t *arg);
  47 
  48 /*
  49  * Given a SID, make a door call to get  the associated name.
  50  *
  51  * Returns 0 if the door call is successful, otherwise -1.
  52  *
  53  * If 0 is returned, the lookup result will be available in a_status.
  54  * NT_STATUS_SUCCESS            The SID was mapped to a name.
  55  * NT_STATUS_NONE_MAPPED        The SID could not be mapped to a name.
  56  */
  57 int




  16  * fields enclosed by brackets "[]" replaced with your own identifying
  17  * information: Portions Copyright [yyyy] [name of copyright owner]
  18  *
  19  * CDDL HEADER END
  20  */
  21 /*
  22  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  23  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  24  */
  25 
  26 #include <assert.h>
  27 #include <syslog.h>
  28 #include <door.h>
  29 #include <fcntl.h>
  30 #include <string.h>
  31 #include <strings.h>
  32 #include <stdlib.h>
  33 #include <unistd.h>
  34 #include <errno.h>
  35 #include <sys/mman.h>
  36 #include <smb/wintypes.h>
  37 #include <smbsrv/libsmb.h>

  38 #include <smbsrv/smb_door.h>
  39 
  40 static int smb_door_call(uint32_t, void *, xdrproc_t, void *, xdrproc_t);
  41 static int smb_door_call_private(int, smb_doorarg_t *);
  42 static int smb_door_encode(smb_doorarg_t *, uint32_t);
  43 static int smb_door_decode(smb_doorarg_t *);
  44 static void smb_door_sethdr(smb_doorhdr_t *, uint32_t, uint32_t);
  45 static boolean_t smb_door_chkhdr(smb_doorarg_t *, smb_doorhdr_t *);
  46 static void smb_door_free(door_arg_t *arg);
  47 
  48 /*
  49  * Given a SID, make a door call to get  the associated name.
  50  *
  51  * Returns 0 if the door call is successful, otherwise -1.
  52  *
  53  * If 0 is returned, the lookup result will be available in a_status.
  54  * NT_STATUS_SUCCESS            The SID was mapped to a name.
  55  * NT_STATUS_NONE_MAPPED        The SID could not be mapped to a name.
  56  */
  57 int