FreeRDP
sam.c File Reference
#include <winpr/config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winpr/wtypes.h>
#include <winpr/crt.h>
#include <winpr/sam.h>
#include <winpr/print.h>
#include <winpr/file.h>
#include "../log.h"

Macros

#define WINPR_SAM_FILE   "/etc/winpr/SAM"
 
#define TAG   WINPR_TAG("utils")
 

Functions

static WINPR_SAM_ENTRY * SamEntryFromDataA (LPCSTR User, DWORD UserLength, LPCSTR Domain, DWORD DomainLength)
 
static BOOL SamAreEntriesEqual (const WINPR_SAM_ENTRY *a, const WINPR_SAM_ENTRY *b)
 
WINPR_SAM * SamOpen (const char *filename, BOOL readOnly)
 
static BOOL SamLookupStart (WINPR_SAM *sam)
 
static void SamLookupFinish (WINPR_SAM *sam)
 
static BOOL SamReadEntry (WINPR_SAM *sam, WINPR_SAM_ENTRY *entry)
 
void SamFreeEntry (WINPR_SAM *sam, WINPR_SAM_ENTRY *entry)
 
void SamResetEntry (WINPR_SAM_ENTRY *entry)
 
WINPR_SAM_ENTRY * SamLookupUserA (WINPR_SAM *sam, LPCSTR User, UINT32 UserLength, LPCSTR Domain, UINT32 DomainLength)
 
WINPR_SAM_ENTRY * SamLookupUserW (WINPR_SAM *sam, LPCWSTR User, UINT32 UserLength, LPCWSTR Domain, UINT32 DomainLength)
 
void SamClose (WINPR_SAM *sam)
 

Macro Definition Documentation

◆ TAG

#define TAG   WINPR_TAG("utils")

◆ WINPR_SAM_FILE

#define WINPR_SAM_FILE   "/etc/winpr/SAM"

WinPR: Windows Portable Runtime Security Accounts Manager (SAM)

Copyright 2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ SamAreEntriesEqual()

static BOOL SamAreEntriesEqual ( const WINPR_SAM_ENTRY *  a,
const WINPR_SAM_ENTRY *  b 
)
static
Here is the caller graph for this function:

◆ SamClose()

void SamClose ( WINPR_SAM *  sam)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SamEntryFromDataA()

static WINPR_SAM_ENTRY* SamEntryFromDataA ( LPCSTR  User,
DWORD  UserLength,
LPCSTR  Domain,
DWORD  DomainLength 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SamFreeEntry()

void SamFreeEntry ( WINPR_SAM *  sam,
WINPR_SAM_ENTRY *  entry 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SamLookupFinish()

static void SamLookupFinish ( WINPR_SAM *  sam)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SamLookupStart()

static BOOL SamLookupStart ( WINPR_SAM *  sam)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SamLookupUserA()

WINPR_SAM_ENTRY* SamLookupUserA ( WINPR_SAM *  sam,
LPCSTR  User,
UINT32  UserLength,
LPCSTR  Domain,
UINT32  DomainLength 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SamLookupUserW()

WINPR_SAM_ENTRY* SamLookupUserW ( WINPR_SAM *  sam,
LPCWSTR  User,
UINT32  UserLength,
LPCWSTR  Domain,
UINT32  DomainLength 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SamOpen()

WINPR_SAM* SamOpen ( const char *  filename,
BOOL  readOnly 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SamReadEntry()

static BOOL SamReadEntry ( WINPR_SAM *  sam,
WINPR_SAM_ENTRY *  entry 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SamResetEntry()

void SamResetEntry ( WINPR_SAM_ENTRY *  entry)
Here is the call graph for this function:
Here is the caller graph for this function: