#include "libmsrpc_internal.h"
/*used to get a struct rpc_pipe_client* to be passed into rpccli* calls*/
-struct rpc_pipe_client *cac_GetPipe(CacServerHandle *hnd, int pi_idx) {
- SMBCSRV *srv = NULL;
- struct rpc_pipe_client *pipe_hnd = NULL;
+struct rpc_pipe_client *cac_GetPipe(CacServerHandle *hnd, int pi_idx)
+{
+ SMBCSRV *srv = NULL;
+ struct rpc_pipe_client *pipe_hnd = NULL;
- if(!hnd)
- return NULL;
+ if(!hnd) {
+ return NULL;
+ }
- if(hnd->_internal.pipes[pi_idx] == False) {
- hnd->status = NT_STATUS_INVALID_HANDLE;
- return NULL;
- }
+ if(hnd->_internal.pipes[pi_idx] == False) {
+ hnd->status = NT_STATUS_INVALID_HANDLE;
+ return NULL;
+ }
- srv = cac_GetServer(hnd);
- if(!srv) {
- hnd->status = NT_STATUS_INVALID_CONNECTION;
- return NULL;
- }
+ srv = cac_GetServer(hnd);
+ if(!srv) {
+ hnd->status = NT_STATUS_INVALID_CONNECTION;
+ return NULL;
+ }
- pipe_hnd = srv->cli.pipe_list;
+ pipe_hnd = srv->cli->pipe_list;
- while(pipe_hnd != NULL && pipe_hnd->pipe_idx != pi_idx)
- pipe_hnd = pipe_hnd->next;
+ while(pipe_hnd != NULL && pipe_hnd->pipe_idx != pi_idx) {
+ pipe_hnd = pipe_hnd->next;
+ }
- return pipe_hnd;
+ return pipe_hnd;
}
/*takes a string like HKEY_LOCAL_MACHINE\HARDWARE\ACPI and returns the reg_type code and then a pointer to the start of the path (HARDWARE)*/
SAM_USERINFO_CTR *ctr = NULL;
/*the flags we are 'setting'- include/passdb.h*/
- uint32 flags = ACCT_USERNAME | ACCT_FULL_NAME | ACCT_PRIMARY_GID | ACCT_ADMIN_DESC | ACCT_DESCRIPTION |
+ uint32 flags = ACCT_USERNAME | ACCT_FULL_NAME | ACCT_PRIMARY_GID | ACCT_DESCRIPTION | ACCT_COMMENT |
ACCT_HOME_DIR | ACCT_HOME_DRIVE | ACCT_LOGON_SCRIPT | ACCT_PROFILE | ACCT_WORKSTATIONS |
ACCT_FLAGS;