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

*** 24,53 **** */ #ifndef _LIBMLSVC_H #define _LIBMLSVC_H - #include <uuid/uuid.h> #include <sys/param.h> #include <sys/types.h> #include <sys/uio.h> #include <sys/ksynch.h> #include <time.h> #include <stdio.h> #include <string.h> #include <netdb.h> #include <libuutil.h> ! #include <smbsrv/wintypes.h> #include <smbsrv/hash_table.h> #include <smbsrv/smb_token.h> #include <smbsrv/smb_privilege.h> #include <smbsrv/smb_share.h> #include <smbsrv/smb_xdr.h> #include <smbsrv/smb_dfs.h> #include <smbsrv/libsmb.h> - #include <smbsrv/libmlrpc.h> - #include <smbsrv/ndl/lsarpc.ndl> #ifdef __cplusplus extern "C" { #endif --- 24,56 ---- */ #ifndef _LIBMLSVC_H #define _LIBMLSVC_H #include <sys/param.h> #include <sys/types.h> #include <sys/uio.h> #include <sys/ksynch.h> + #include <uuid/uuid.h> + #include <time.h> #include <stdio.h> #include <string.h> + #include <syslog.h> #include <netdb.h> #include <libuutil.h> ! ! #include <smb/wintypes.h> ! #include <libmlrpc/libmlrpc.h> ! #include <smbsrv/hash_table.h> #include <smbsrv/smb_token.h> #include <smbsrv/smb_privilege.h> #include <smbsrv/smb_share.h> #include <smbsrv/smb_xdr.h> #include <smbsrv/smb_dfs.h> #include <smbsrv/libsmb.h> #ifdef __cplusplus extern "C" { #endif
*** 125,165 **** typedef struct ms_luid { uint32_t low_part; uint32_t high_part; } ms_luid_t; - int srvsvc_net_remote_tod(char *, char *, struct timeval *, struct tm *); - - /* * A client_t is created while binding a client connection to hold the * context for calls made using that connection. * * Handles are RPC call specific and we use an inheritance mechanism to * ensure that each handle has a pointer to the client_t. When the top * level (bind) handle is released, we close the connection. */ ! typedef struct mlsvc_handle { ! ndr_hdid_t handle; ! ndr_client_t *clnt; ! } mlsvc_handle_t; void ndr_rpc_init(void); void ndr_rpc_fini(void); uint32_t ndr_rpc_bind(mlsvc_handle_t *, char *, char *, char *, const char *); void ndr_rpc_unbind(mlsvc_handle_t *); - int ndr_rpc_call(mlsvc_handle_t *, int, void *); - void ndr_rpc_set_nonull(mlsvc_handle_t *); - int ndr_rpc_get_ssnkey(mlsvc_handle_t *, unsigned char *, size_t); - void *ndr_rpc_malloc(mlsvc_handle_t *, size_t); - ndr_heap_t *ndr_rpc_get_heap(mlsvc_handle_t *); - void ndr_rpc_release(mlsvc_handle_t *); - boolean_t ndr_is_null_handle(mlsvc_handle_t *); - boolean_t ndr_is_bind_handle(mlsvc_handle_t *); - void ndr_inherit_handle(mlsvc_handle_t *, mlsvc_handle_t *); void ndr_rpc_status(mlsvc_handle_t *, int, uint32_t); /* SVCCTL service */ /* * Calculate the wide-char equivalent string length required to * store a string - including the terminating null wide-char. */ --- 128,162 ---- typedef struct ms_luid { uint32_t low_part; uint32_t high_part; } ms_luid_t; /* * A client_t is created while binding a client connection to hold the * context for calls made using that connection. * * Handles are RPC call specific and we use an inheritance mechanism to * ensure that each handle has a pointer to the client_t. When the top * level (bind) handle is released, we close the connection. */ ! typedef struct mlrpc_handle mlsvc_handle_t; + /* mlsvc_client.c */ void ndr_rpc_init(void); void ndr_rpc_fini(void); uint32_t ndr_rpc_bind(mlsvc_handle_t *, char *, char *, char *, const char *); void ndr_rpc_unbind(mlsvc_handle_t *); void ndr_rpc_status(mlsvc_handle_t *, int, uint32_t); + /* These three get info about the connected client. */ + boolean_t ndr_is_admin(ndr_xa_t *); + boolean_t ndr_is_poweruser(ndr_xa_t *); + int32_t ndr_native_os(ndr_xa_t *); + + /* SRVSVC */ + int srvsvc_net_remote_tod(char *, char *, struct timeval *, struct tm *); + /* SVCCTL service */ /* * Calculate the wide-char equivalent string length required to * store a string - including the terminating null wide-char. */