include/libmsrpc.h

ソースコードを見る。

データ構造

struct  _CACSIDINFO
 Stores information about a SID [詳細]
struct  _REGBINARYDATA
 Binary data of some kind [詳細]
struct  _REGMULTISZDATA
 array of strings [詳細]
union  _REGVALUEDATA
struct  _CACLOOKUPRIDSRECORD
struct  _CACUSERINFO
struct  _CACGROUPINFO
struct  _CACTIME
 Represents a period (duration) of time [詳細]
struct  _CACDOMINFO
struct  _CACSERVICE
struct  __CACSERVICECONFIG
struct  _CACSERVERHANDLE
 Server handle used to keep track of client/server/pipe information. [詳細]
struct  LsaOpenPolicy
struct  LsaGetNamesFromSids
struct  LsaGetSidsFromNames
struct  LsaFetchSid
struct  LsaQueryInfoPolicy
struct  LsaEnumSids
struct  LsaEnumAccountRights
struct  LsaEnumTrustedDomains
struct  LsaOpenTrustedDomain
struct  LsaQueryTrustedDomainInfo
struct  LsaEnumPrivileges
struct  LsaOpenAccount
struct  LsaAddPrivileges
struct  LsaRemovePrivileges
struct  LsaClearPrivileges
struct  LsaGetSecurityObject
struct  RegConnect
struct  RegOpenKey
struct  RegEnumKeys
struct  RegCreateKey
struct  RegDeleteKey
struct  RegDeleteValue
struct  RegQueryKeyInfo
struct  RegSaveKey
struct  RegQueryValue
struct  RegEnumValues
struct  RegSetValue
struct  RegGetVersion
struct  RegGetKeySecurity
struct  RegSetKeySecurity
struct  Shutdown
struct  SamConnect
struct  SamOpenDomain
struct  SamCreateUser
struct  SamOpenUser
struct  SamEnumUsers
struct  SamGetNamesFromRids
struct  SamGetRidsFromNames
struct  SamGetGroupsForUser
struct  SamOpenGroup
struct  SamCreateGroup
struct  SamGetGroupMembers
struct  SamAddGroupMember
struct  SamRemoveGroupMember
struct  SamSetGroupMembers
struct  SamEnumGroups
struct  SamEnumAliases
struct  SamCreateAlias
struct  SamOpenAlias
struct  SamAddAliasMember
struct  SamRemoveAliasMember
struct  SamGetAliasMembers
struct  SamSetAliasMembers
struct  SamUserChangePasswd
struct  SamSetPassword
struct  SamGetUserInfo
struct  SamSetUserInfo
struct  SamGetUserInfoCtr
struct  SamSetUserInfoCtr
struct  SamRenameUser
struct  SamGetGroupInfo
struct  SamSetGroupInfo
struct  SamRenameGroup
struct  SamGetAliasInfo
struct  SamSetAliasInfo
struct  SamGetDomainInfo
struct  SamGetDomainInfoCtr
struct  SamGetDisplayInfo
struct  SamLookupDomain
struct  SamGetSecurityObject
struct  SamFlush
struct  SvcOpenScm
struct  SvcEnumServices
struct  SvcOpenService
struct  SvcGetStatus
struct  SvcStartService
struct  SvcControlService
struct  SvcStopService
struct  SvcPauseService
struct  SvcContinueService
struct  SvcGetDisplayName
struct  SvcGetServiceConfig

型定義

typedef _CACSIDINFO CacSidInfo
 Stores information about a SID
typedef char * REG_SZ_DATA
 Null terminated string
typedef char * REG_EXPAND_SZ_DATA
 Null terminated string with windows environment variables that should be expanded
typedef _REGBINARYDATA REG_BINARY_DATA
 Binary data of some kind
typedef uint32 REG_DWORD_DATA
 32-bit (little endian) number
typedef uint32 REG_DWORD_BE_DATA
 32-bit big endian number
typedef _REGMULTISZDATA REG_MULTI_SZ_DATA
 array of strings
typedef _REGVALUEDATA REG_VALUE_DATA
typedef _CACLOOKUPRIDSRECORD CacLookupRidsRecord
typedef _CACUSERINFO CacUserInfo
typedef _CACGROUPINFO CacGroupInfo
typedef _CACGROUPINFO CacAliasInfo
typedef _CACTIME CacTime
 Represents a period (duration) of time
typedef _CACDOMINFO CacDomainInfo
typedef _CACSERVICE CacService
typedef __CACSERVICECONFIG CacServiceConfig
typedef _CACSERVERHANDLE CacServerHandle
 Server handle used to keep track of client/server/pipe information.

関数

SMBCSRVcac_GetServer (CacServerHandle *hnd)
 internal function.
void cac_Init (int debug)
 Initializes the library - do not need to call this function.
CacServerHandlecac_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.
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
int cac_InitHandleMem (CacServerHandle *hnd)
 Called by cac_NewServerHandle() if allocate_fields = True.
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_LsaOpenPolicy (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaOpenPolicy *op)
 Opens a policy handle on a remote machine.
int cac_LsaClosePolicy (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *pol)
 Closes an LSA policy handle (Retrieved using cac_LsaOpenPolicy).
int cac_LsaGetNamesFromSids (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaGetNamesFromSids *op)
 Looks up the names for a list of SIDS
int cac_LsaGetSidsFromNames (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaGetSidsFromNames *op)
 Looks up the SIDs for a list of names
int cac_LsaFetchSid (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaFetchSid *op)
 Looks up the domain or local sid of a machine with an open LSA policy handle
int cac_LsaQueryInfoPolicy (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaQueryInfoPolicy *op)
 Retrieves information about the LSA machine/domain
int cac_LsaEnumSids (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaEnumSids *op)
 Enumerates the SIDs in the LSA.
int cac_LsaEnumAccountRights (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaEnumAccountRights *op)
 Enumerates rights assigned to a given account.
int cac_LsaEnumTrustedDomains (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaEnumTrustedDomains *op)
 Enumerates the trusted domains in the LSA.
int cac_LsaOpenTrustedDomain (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaOpenTrustedDomain *op)
 Opens a trusted domain by SID.
int cac_LsaQueryTrustedDomainInfo (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaQueryTrustedDomainInfo *op)
 Retrieves information a trusted domain.
int cac_LsaEnumPrivileges (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaEnumPrivileges *op)
 Enumerates the Privileges supported by the LSA.
int cac_LsaOpenAccount (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaOpenAccount *op)
 Opens a handle to an account in the LSA
int cac_LsaAddPrivileges (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaAddPrivileges *op)
 Adds Privileges an account.
int cac_LsaRemovePrivileges (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaRemovePrivileges *op)
 Removes a _specific_ set of privileges from an account
int cac_LsaClearPrivileges (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaClearPrivileges *op)
 Removes ALL privileges from an account
int cac_LsaSetPrivileges (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaAddPrivileges *op)
 Sets an accounts priviliges.
int cac_LsaGetSecurityObject (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaGetSecurityObject *op)
 Retrieves Security Descriptor information about the LSA
int cac_RegConnect (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegConnect *op)
 Opens a handle to the registry on the server
int cac_RegClose (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *key)
 Closes an open registry handle
int cac_RegOpenKey (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegOpenKey *op)
 Opens a registry key
int cac_RegEnumKeys (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegEnumKeys *op)
 Enumerates Subkeys of a given key.
int cac_RegCreateKey (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegCreateKey *op)
 Creates a registry key, if the key already exists, it will be opened __Creating keys is not currently working__.
int cac_RegDeleteKey (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegDeleteKey *op)
 Deletes a subkey of an open key.
int cac_RegDeleteValue (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegDeleteValue *op)
 Deletes a registry value.
int cac_RegQueryKeyInfo (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegQueryKeyInfo *op)
 Retrieves information about an open key
int cac_RegSaveKey (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegSaveKey *op)
 Saves a key to a file on the remote machine __Not currently working__.
int cac_RegQueryValue (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegQueryValue *op)
 Retrieves a value (type and data) _not currently working_.
int cac_RegEnumValues (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegEnumValues *op)
 Enumerates a number of Registry values in an open registry key.
int cac_RegSetValue (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegSetValue *op)
 Sets or creates value (type and data).
int cac_RegGetVersion (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegGetVersion *op)
 Retrieves the registry version number
int cac_RegGetKeySecurity (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegGetKeySecurity *op)
 Retrieves a key security descriptor.
int cac_RegSetKeySecurity (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegSetKeySecurity *op)
 Sets the key security descriptor.
int cac_Shutdown (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct Shutdown *op)
 Shutdown the server _not currently working_.
int cac_AbortShutdown (CacServerHandle *hnd, TALLOC_CTX *mem_ctx)
 Attempt to abort initiated shutdown on the server _not currently working_.
int cac_SamConnect (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamConnect *op)
 Connects to the SAM.
int cac_SamClose (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *sam)
 Closes any (SAM, domain, user, group, etc.
int cac_SamOpenDomain (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamOpenDomain *op)
 Opens a handle to a domain.
int cac_SamCreateUser (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamCreateUser *op)
 Creates a new domain user, if the account already exists it will _not_ be opened and hnd->status will be NT_STATUS_USER_EXISTS
int cac_SamOpenUser (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamOpenUser *op)
 Opens a domain user.
int cac_SamDeleteUser (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *user_hnd)
 Deletes a domain user.
int cac_SamEnumUsers (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamEnumUsers *op)
 Enumerates domain users.
int cac_SamGetNamesFromRids (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamGetNamesFromRids *op)
 Returns a list of names which map to a list of RIDs.
int cac_SamGetRidsFromNames (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamGetRidsFromNames *op)
 Returns a list of RIDs which map to a list of names.
int cac_SamGetGroupsForUser (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamGetGroupsForUser *op)
 Retrieves a list of groups that a user is a member of.
int cac_SamOpenGroup (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamOpenGroup *op)
 Opens a domain group.
int cac_SamCreateGroup (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamCreateGroup *op)
 Creates a group.
int cac_SamDeleteGroup (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *group_hnd)
 Deletes a domain group.
int cac_SamGetGroupMembers (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamGetGroupMembers *op)
 Retrives a list of users in a group.
int cac_SamAddGroupMember (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamAddGroupMember *op)
 Adds a user to a group.
int cac_SamRemoveGroupMember (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamRemoveGroupMember *op)
 Removes a user from a group.
int cac_SamClearGroupMembers (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *group_hnd)
 Removes all the members of a group - warning: if this function fails is is possible that some but not all members were removed
int cac_SamSetGroupMembers (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamSetGroupMembers *op)
 Clears the members of a group and adds a list of members to the group
int cac_SamEnumGroups (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamEnumGroups *op)
 Enumerates domain groups.
int cac_SamEnumAliases (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamEnumAliases *op)
 Enumerates domain aliases.
int cac_SamCreateAlias (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamCreateAlias *op)
 Creates an alias.
int cac_SamOpenAlias (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamOpenAlias *op)
 Opens a handle to an alias.
int cac_SamDeleteAlias (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *alias_hnd)
 Deletes an alias.
int cac_SamAddAliasMember (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamAddAliasMember *op)
 Adds an account to an alias.
int cac_SamRemoveAliasMember (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamRemoveAliasMember *op)
 Removes an account from an alias.
int cac_SamGetAliasMembers (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamGetAliasMembers *op)
 Retrieves a list of all accounts in an alias.
int cac_SamClearAliasMembers (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *alias_hnd)
 Removes all the members of an alias - warning: if this function fails is is possible that some but not all members were removed
int cac_SamSetAliasMembers (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamSetAliasMembers *op)
 Clears the members of an alias and adds a list of members to the alias
int cac_SamUserChangePasswd (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamUserChangePasswd *op)
 Used by a user to change their password
int cac_SamEnableUser (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *user_hnd)
 Enables a user
int cac_SamDisableUser (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *user_hnd)
 Disables a user
int cac_SamSetPassword (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamSetPassword *op)
 Sets a user's password
int cac_SamGetUserInfo (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamGetUserInfo *op)
 Retrieves user information using a CacUserInfo structure.
int cac_SamSetUserInfo (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamSetUserInfo *op)
 Sets the user info using a CacUserInfo structure.
int cac_SamGetUserInfoCtr (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamGetUserInfoCtr *op)
 Retrieves user information using a SAM_USERINFO_CTR structure.
int cac_SamSetUserInfoCtr (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamSetUserInfoCtr *op)
 Sets the user info using a SAM_USERINFO_CTR structure.
int cac_SamRenameUser (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamRenameUser *op)
 Changes the name of a user.
int cac_SamGetGroupInfo (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamGetGroupInfo *op)
 Retrieves information about a group.
int cac_SamSetGroupInfo (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamSetGroupInfo *op)
 Sets information about a group.
int cac_SamRenameGroup (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamRenameGroup *op)
 Changes the name of a group
int cac_SamGetAliasInfo (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamGetAliasInfo *op)
 Retrieves information about an alias.
int cac_SamSetAliasInfo (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamSetAliasInfo *op)
 Sets information about an alias.
int cac_SamGetDomainInfo (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamGetDomainInfo *op)
 Gets domain information in the form of a CacDomainInfo structure.
int cac_SamGetDomainInfoCtr (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamGetDomainInfoCtr *op)
 Gets domain information in the form of a SAM_UNK_CTR structure.
int cac_SamGetDisplayInfo (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamGetDisplayInfo *op)
 Gets dislpay information using a SAM_DISPINFO_CTR.
int cac_SamLookupDomain (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamLookupDomain *op)
 Looks up a Domain SID given it's name.
int cac_SamGetSecurityObject (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamGetSecurityObject *op)
 Retrievies Security descriptor information for a SAM/Domain/user
int cac_SamFlush (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SamFlush *op)
 Closes the domain handle, then re-opens it - effectively flushing any changes made.
int cac_SvcOpenScm (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SvcOpenScm *op)
 Opens a handle to the SCM on the remote machine.
int cac_SvcClose (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, POLICY_HND *scm_hnd)
 Closes an Svc handle (SCM or Service)
int cac_SvcEnumServices (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SvcEnumServices *op)
 Enumerates services on the remote machine.
int cac_SvcOpenService (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SvcOpenService *op)
 Opens a handle to a service.
int cac_SvcGetStatus (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SvcGetStatus *op)
 Retrieves the status of a service.
int cac_SvcStartService (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SvcStartService *op)
 Attempts to start a service.
int cac_SvcControlService (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SvcControlService *op)
 Performs a control operation on a service and _immediately_ returns.
int cac_SvcStopService (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SvcStopService *op)
 Attempts to stop a service.
int cac_SvcPauseService (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SvcPauseService *op)
 Attempts to pause a service.
int cac_SvcContinueService (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SvcContinueService *op)
 Attempts to continue a paused service.
int cac_SvcGetDisplayName (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SvcGetDisplayName *op)
 Retrieves the display name of a service _not currently working_
int cac_SvcGetServiceConfig (CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct SvcGetServiceConfig *op)
 Retrieves configuration information about a service.
rpc_pipe_clientcac_GetPipe (CacServerHandle *hnd, int pi_idx)


関数

SMBCSRV* cac_GetServer ( CacServerHandle hnd  ) 

internal function.

do not call this function

libmsrpc.c162 行で定義されています。

参照先 _CACSERVERHANDLE::_internalCacServerHandleInternal::ctx_CACSERVERHANDLE::domain_CACSERVERHANDLE::password_CACSERVERHANDLE::serversmbc_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 }

int cac_Shutdown ( CacServerHandle hnd,
TALLOC_CTX mem_ctx,
struct Shutdown op 
)

Shutdown the server _not currently working_.

引数:
hnd Initialized and connected server handle
mem_ctx Context for memory allocation
op Initialized parameters
戻り値:
CAC_FAILURE The operation could not complete successfully. hnd->status is set with appropriate NTSTATUS code

CAC_SUCCESS The operation completed successfully

cac_winreg.c1035 行で定義されています。

参照先 _CACSERVERHANDLE::_internalcac_GetPipe()cac_GetServer()_SMBCSRV::clicli_rpc_pipe_open_noauth()CacServerHandleInternal::ctxShutdown::forceShutdown::inShutdown::messageCacServerHandleInternal::pipesShutdown::reasonShutdown::rebootrpccli_shutdown_init()rpccli_shutdown_init_ex()CacServerHandleInternal::srv_level_CACSERVERHANDLE::statustalloc_strdup()Shutdown::timeout.

01037 {
01038         SMBCSRV *srv = NULL;
01039         struct rpc_pipe_client *pipe_hnd = NULL;
01040 
01041         char *msg;
01042 
01043         if ( !hnd )
01044                 return CAC_FAILURE;
01045 
01046         if ( !hnd->_internal.ctx ) {
01047                 hnd->status = NT_STATUS_INVALID_HANDLE;
01048                 return CAC_FAILURE;
01049         }
01050 
01051         if ( !op || !mem_ctx ) {
01052                 hnd->status = NT_STATUS_INVALID_PARAMETER;
01053                 return CAC_FAILURE;
01054         }
01055 
01056         srv = cac_GetServer( hnd );
01057         if ( !srv ) {
01058                 hnd->status = NT_STATUS_INVALID_HANDLE;
01059                 return CAC_FAILURE;
01060         }
01061 
01062         /*initialize for winreg pipe if we have to */
01063         if ( !hnd->_internal.pipes[PI_SHUTDOWN] ) {
01064                 if ( !
01065                      ( pipe_hnd =
01066                        cli_rpc_pipe_open_noauth( srv->cli, PI_SHUTDOWN,
01067                                                  &( hnd->status ) ) ) ) {
01068                         return CAC_FAILURE;
01069                 }
01070 
01071                 hnd->_internal.pipes[PI_SHUTDOWN] = True;
01072         }
01073 
01074         pipe_hnd = cac_GetPipe( hnd, PI_SHUTDOWN );
01075         if ( !pipe_hnd ) {
01076                 hnd->status = NT_STATUS_INVALID_HANDLE;
01077                 return CAC_FAILURE;
01078         }
01079 
01080         msg = ( op->in.message !=
01081                 NULL ) ? op->in.message : talloc_strdup( mem_ctx, "" );
01082 
01083         hnd->status = NT_STATUS_OK;
01084 
01085         if ( hnd->_internal.srv_level > SRV_WIN_NT4 ) {
01086                 hnd->status =
01087                         rpccli_shutdown_init_ex( pipe_hnd, mem_ctx, msg,
01088                                                  op->in.timeout,
01089                                                  op->in.reboot, op->in.force,
01090                                                  op->in.reason );
01091         }
01092 
01093         if ( hnd->_internal.srv_level < SRV_WIN_2K
01094              || !NT_STATUS_IS_OK( hnd->status ) ) {
01095                 hnd->status =
01096                         rpccli_shutdown_init( pipe_hnd, mem_ctx, msg,
01097                                               op->in.timeout, op->in.reboot,
01098                                               op->in.force );
01099 
01100                 hnd->_internal.srv_level = SRV_WIN_NT4;
01101         }
01102 
01103         if ( !NT_STATUS_IS_OK( hnd->status ) ) {
01104                 return CAC_FAILURE;
01105         }
01106 
01107         return CAC_SUCCESS;
01108 }

int cac_AbortShutdown ( CacServerHandle hnd,
TALLOC_CTX mem_ctx 
)

Attempt to abort initiated shutdown on the server _not currently working_.

引数:
hnd Initialized and connected server handle
mem_ctx Context for memory allocation
戻り値:
CAC_FAILURE The operation could not complete successfully. hnd->status is set with appropriate NTSTATUS code

CAC_SUCCESS The operation completed successfully

cac_winreg.c1110 行で定義されています。

参照先 _CACSERVERHANDLE::_internalcac_GetPipe()CacServerHandleInternal::ctxCacServerHandleInternal::pipesrpccli_shutdown_abort()_CACSERVERHANDLE::status.

01111 {
01112         struct rpc_pipe_client *pipe_hnd = NULL;
01113 
01114         if ( !hnd )
01115                 return CAC_FAILURE;
01116 
01117         if ( !hnd->_internal.ctx || !hnd->_internal.pipes[PI_SHUTDOWN] ) {
01118                 hnd->status = NT_STATUS_INVALID_HANDLE;
01119                 return CAC_FAILURE;
01120         }
01121 
01122         pipe_hnd = cac_GetPipe( hnd, PI_SHUTDOWN );
01123         if ( !pipe_hnd ) {
01124                 hnd->status = NT_STATUS_INVALID_HANDLE;
01125                 return CAC_FAILURE;
01126         }
01127 
01128         hnd->status = rpccli_shutdown_abort( pipe_hnd, mem_ctx );
01129 
01130         if ( !NT_STATUS_IS_OK( hnd->status ) )
01131                 return CAC_FAILURE;
01132 
01133         return CAC_SUCCESS;
01134 }

struct rpc_pipe_client* cac_GetPipe ( CacServerHandle hnd,
int  pi_idx 
)

libmsrpc_internal.c31 行で定義されています。

参照先 _CACSERVERHANDLE::_internalcac_GetServer()_SMBCSRV::clirpc_pipe_client::nextrpc_pipe_client::pipe_idxcli_state::pipe_listCacServerHandleInternal::pipes_CACSERVERHANDLE::status.

参照元 cac_AbortShutdown()cac_LsaAddPrivileges()cac_LsaClearPrivileges()cac_LsaClosePolicy()cac_LsaEnumAccountRights()cac_LsaEnumPrivileges()cac_LsaEnumSids()cac_LsaEnumTrustedDomains()cac_LsaFetchSid()cac_LsaGetNamesFromSids()cac_LsaGetSecurityObject()cac_LsaGetSidsFromNames()cac_LsaOpenAccount()cac_LsaOpenPolicy()cac_LsaOpenTrustedDomain()cac_LsaQueryInfoPolicy()cac_LsaQueryTrustedDomainInfo()cac_LsaRemovePrivileges()cac_LsaSetPrivileges()cac_RegClose()cac_RegConnect()cac_RegCreateKey()cac_RegDeleteKey()cac_RegDeleteValue()cac_RegEnumKeys()cac_RegEnumValues()cac_RegGetKeySecurity()cac_RegGetVersion()cac_RegOpenKey()cac_RegQueryKeyInfo()cac_RegQueryValue()cac_RegSaveKey()cac_RegSetKeySecurity()cac_RegSetValue()cac_SamAddAliasMember()cac_SamAddGroupMember()cac_SamClearAliasMembers()cac_SamClearGroupMembers()cac_SamClose()cac_SamConnect()cac_SamCreateAlias()cac_SamCreateGroup()cac_SamCreateUser()cac_SamDeleteAlias()cac_SamDeleteGroup()cac_SamDeleteUser()cac_SamDisableUser()cac_SamEnableUser()cac_SamEnumAliases()cac_SamEnumGroups()cac_SamEnumUsers()cac_SamGetAliasInfo()cac_SamGetAliasMembers()cac_SamGetDisplayInfo()cac_SamGetDomainInfo()cac_SamGetDomainInfoCtr()cac_SamGetGroupInfo()cac_SamGetGroupMembers()cac_SamGetGroupsForUser()cac_SamGetNamesFromRids()cac_SamGetRidsFromNames()cac_SamGetSecurityObject()cac_SamGetUserInfo()cac_SamGetUserInfoCtr()cac_SamLookupDomain()cac_SamOpenAlias()cac_SamOpenDomain()cac_SamOpenGroup()cac_SamOpenUser()cac_SamRemoveAliasMember()cac_SamRemoveGroupMember()cac_SamRenameGroup()cac_SamRenameUser()cac_SamSetAliasInfo()cac_SamSetAliasMembers()cac_SamSetGroupInfo()cac_SamSetGroupMembers()cac_SamSetPassword()cac_SamSetUserInfo()cac_SamSetUserInfoCtr()cac_SamUserChangePasswd()cac_Shutdown()cac_SvcClose()cac_SvcContinueService()cac_SvcControlService()cac_SvcEnumServices()cac_SvcGetDisplayName()cac_SvcGetServiceConfig()cac_SvcGetStatus()cac_SvcOpenService()cac_SvcPauseService()cac_SvcStartService()cac_SvcStopService()cac_WaitForService().

00032 {
00033         SMBCSRV *srv = NULL;
00034         struct rpc_pipe_client *pipe_hnd = NULL;
00035 
00036         if ( !hnd ) {
00037                 return NULL;
00038         }
00039 
00040         if ( hnd->_internal.pipes[pi_idx] == False ) {
00041                 hnd->status = NT_STATUS_INVALID_HANDLE;
00042                 return NULL;
00043         }
00044 
00045         srv = cac_GetServer( hnd );
00046         if ( !srv ) {
00047                 hnd->status = NT_STATUS_INVALID_CONNECTION;
00048                 return NULL;
00049         }
00050 
00051         pipe_hnd = srv->cli->pipe_list;
00052 
00053         while ( pipe_hnd != NULL && pipe_hnd->pipe_idx != pi_idx ) {
00054                 pipe_hnd = pipe_hnd->next;
00055         }
00056 
00057         return pipe_hnd;
00058 }


Sambaに対してSat Aug 29 21:23:34 2009に生成されました。  doxygen 1.4.7