関数 | |
int | cac_InitHandleData (CacServerHandle *hnd) |
void | cac_Init (int debug) |
Initializes the library - do not need to call this function. | |
int | cac_InitHandleMem (CacServerHandle *hnd) |
Called by cac_NewServerHandle() if allocate_fields = True. | |
CacServerHandle * | cac_NewServerHandle (BOOL allocate_fields) |
Creates an un-initialized CacServerHandle | |
void | cac_SetAuthDataFn (CacServerHandle *hnd, smbc_get_auth_data_fn auth_fn) |
Specifies the smbc_get_auth_data_fn to use if you do not want to use the default. | |
void | cac_SetSmbcContext (CacServerHandle *hnd, SMBCCTX *ctx) |
Use your own libsmbclient context - not necessary. | |
SMBCSRV * | cac_GetServer (CacServerHandle *hnd) |
internal function. | |
int | cac_Connect (CacServerHandle *hnd, const char *srv) |
Connects to a specified server. | |
void | cac_FreeHandle (CacServerHandle *hnd) |
Cleans up any data used by the CacServerHandle. | |
void | cac_InitCacTime (CacTime *cactime, NTTIME nttime) |
Initializes a CacTime structure based on an NTTIME structure If the function fails, then the CacTime structure will be zero'd out | |
void | cac_GetAuthDataFn (const char *pServer, const char *pShare, char *pWorkgroup, int maxLenWorkgroup, char *pUsername, int maxLenUsername, char *pPassword, int maxLenPassword) |
Default smbc_get_auth_data_fn for libmsrpc. |
int cac_InitHandleData | ( | CacServerHandle * | hnd | ) |
libmsrpc.c の 115 行で定義されています。
参照先 _CACSERVERHANDLE::_internal・CacServerHandleInternal::ctx・_CACSERVERHANDLE::domain・_SMBCCTX::netbios_name・_CACSERVERHANDLE::netbios_name・_SMBCCTX::user・_CACSERVERHANDLE::username・_SMBCCTX::workgroup.
参照元 cac_Connect().
00116 { 00117 /*store any automatically initialized values */ 00118 if ( !hnd->netbios_name ) { 00119 hnd->netbios_name = 00120 SMB_STRDUP( hnd->_internal.ctx->netbios_name ); 00121 } else if ( hnd->netbios_name[0] == '\0' ) { 00122 strncpy( hnd->netbios_name, hnd->_internal.ctx->netbios_name, 00123 sizeof( fstring ) ); 00124 } 00125 00126 if ( !hnd->username ) { 00127 hnd->username = SMB_STRDUP( hnd->_internal.ctx->user ); 00128 } else if ( hnd->username[0] == '\0' ) { 00129 strncpy( hnd->username, hnd->_internal.ctx->user, 00130 sizeof( fstring ) ); 00131 } 00132 00133 if ( !hnd->domain ) { 00134 hnd->domain = SMB_STRDUP( hnd->_internal.ctx->workgroup ); 00135 } else if ( hnd->domain[0] == '\0' ) { 00136 strncpy( hnd->domain, hnd->_internal.ctx->workgroup, 00137 sizeof( fstring ) ); 00138 } 00139 00140 return CAC_SUCCESS; 00141 }
SMBCSRV* cac_GetServer | ( | CacServerHandle * | hnd | ) |
internal function.
do not call this function
libmsrpc.c の 162 行で定義されています。
参照先 _CACSERVERHANDLE::_internal・CacServerHandleInternal::ctx・_CACSERVERHANDLE::domain・_CACSERVERHANDLE::password・_CACSERVERHANDLE::server・smbc_attr_server()・_CACSERVERHANDLE::status・_CACSERVERHANDLE::username.
参照元 cac_Connect()・cac_GetPipe()・cac_LsaOpenPolicy()・cac_RegConnect()・cac_SamConnect()・cac_SamDisableUser()・cac_SamEnableUser()・cac_SamRenameUser()・cac_SamSetPassword()・cac_SamSetUserInfo()・cac_SamSetUserInfoCtr()・cac_SamUserChangePasswd()・cac_Shutdown()・cac_SvcOpenScm().
00163 { 00164 SMBCSRV *srv; 00165 00166 if ( !hnd || !hnd->_internal.ctx ) { 00167 return NULL; 00168 } 00169 00170 srv = smbc_attr_server( hnd->_internal.ctx, hnd->server, "IPC$", 00171 hnd->domain, hnd->username, hnd->password, 00172 NULL ); 00173 if ( !srv ) { 00174 hnd->status = NT_STATUS_UNSUCCESSFUL; 00175 DEBUG( 1, 00176 ( "cac_GetServer: Could not find server connection.\n" ) ); 00177 } 00178 00179 return srv; 00180 }